
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": Some values do not have unique names */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "PixelChannel": Some values do not have unique names */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */
/* WARNING: Enum "LogEventType": Some values do not have unique names */

MagickBooleanType GrayscaleImage(Image *image,PixelIntensityMethod method,ExceptionInfo *exception)

{
  size_t sVar1;
  bool bVar2;
  CacheView *cache_view;
  CacheType CVar3;
  size_t sVar4;
  MagickBooleanType MVar5;
  int iVar6;
  int in_GS_OFFSET;
  MagickSizeType MVar7;
  MagickOffsetType progress;
  Image *local_38;
  PixelIntensityMethod local_34;
  ExceptionInfo *local_30;
  CacheView *local_2c;
  undefined4 local_28;
  MagickOffsetType *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0xc91d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (image == (Image *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");
  }
  if (image->signature != 0xabacadab) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,
                  "GrayscaleImage");
  }
  if (image->debug != MagickFalse) {
    LogMagickEvent(TraceEvent,"MagickCore/enhance.c","GrayscaleImage",0x9b3,"%s",image->filename);
  }
  if (image->storage_class == PseudoClass) {
    MVar5 = SyncImage(image,exception);
    if (MVar5 == MagickFalse) {
      MVar5 = MagickFalse;
      goto LAB_000c9378;
    }
    MVar5 = SetImageStorageClass(image,DirectClass,exception);
    if (MVar5 == MagickFalse) {
      MVar5 = MagickFalse;
      goto LAB_000c9378;
    }
  }
  progress._0_4_ = 0;
  progress._4_4_ = 0;
  cache_view = AcquireAuthenticCacheView(image,exception);
  CVar3 = GetImagePixelCacheType(image);
  if (((CVar3 == MemoryCache) || (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)) &&
     ((CVar3 = GetImagePixelCacheType(image), CVar3 == MemoryCache ||
      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)))) {
    MVar7 = GetMagickResourceLimit(ThreadResource);
    sVar1 = image->rows;
    sVar4 = sVar1 + 0x3f;
    if (-1 < (int)sVar1) {
      sVar4 = sVar1;
    }
    bVar2 = 0x7f < (int)sVar1;
    if ((int)MVar7 < (int)sVar4 >> 6) {
      MVar7 = GetMagickResourceLimit(ThreadResource);
      bVar2 = 1 < (int)MVar7;
    }
    if (bVar2) {
      MVar7 = GetMagickResourceLimit(ThreadResource);
      sVar1 = image->rows;
      sVar4 = sVar1 + 0x3f;
      if (-1 < (int)sVar1) {
        sVar4 = sVar1;
      }
      iVar6 = (int)sVar4 >> 6;
      if ((int)MVar7 < iVar6) {
        MVar7 = GetMagickResourceLimit(ThreadResource);
        iVar6 = (int)MVar7;
      }
    }
    else {
LAB_000c9305:
      iVar6 = 1;
    }
  }
  else {
    MVar7 = GetMagickResourceLimit(ThreadResource);
    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {
      MVar7 = GetMagickResourceLimit(ThreadResource);
      if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) goto LAB_000c9305;
    }
    MVar7 = GetMagickResourceLimit(ThreadResource);
    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {
      MVar7 = GetMagickResourceLimit(ThreadResource);
      iVar6 = (int)MVar7;
    }
    else {
      iVar6 = 2;
    }
  }
  local_24 = &progress;
  local_30 = exception;
  local_38 = image;
  local_34 = method;
  local_28 = 1;
  local_2c = cache_view;
  GOMP_parallel(GrayscaleImage__omp_fn_7,&local_38,iVar6,0);
  DestroyCacheView(cache_view);
  image->type = GrayscaleType;
  image->intensity = method;
  if ((method - Rec601LuminancePixelIntensityMethod & 0xfffffffd) == 0) {
    MVar5 = SetImageColorspace(image,LinearGRAYColorspace,exception);
  }
  else {
    MVar5 = SetImageColorspace(image,GRAYColorspace,exception);
  }
LAB_000c9378:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return MVar5;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 GrayscaleImage(int *param_1,int param_2,undefined4 param_3)

{
  bool bVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int in_GS_OFFSET;
  undefined8 uVar6;
  undefined4 local_44;
  undefined4 local_40;
  int *local_38;
  int local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0xc91d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");
  }
  if (param_1[0xcd1] != -0x54535255) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,
                  "GrayscaleImage");
  }
  if (param_1[0xcca] != 0) {
    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6
                  );
  }
  if (*param_1 == 2) {
    iVar3 = SyncImage(param_1,param_3);
    if (iVar3 == 0) {
      uVar2 = 0;
      goto LAB_000c9378;
    }
    iVar3 = SetImageStorageClass(param_1,1,param_3);
    if (iVar3 == 0) {
      uVar2 = 0;
      goto LAB_000c9378;
    }
  }
  local_44 = 0;
  local_40 = 0;
  uVar2 = AcquireAuthenticCacheView(param_1,param_3);
  iVar3 = GetImagePixelCacheType(param_1);
  if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&
     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||
      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {
    iVar5 = GetMagickResourceLimit(7);
    iVar3 = param_1[7];
    iVar4 = iVar3 + 0x3f;
    if (-1 < iVar3) {
      iVar4 = iVar3;
    }
    bVar1 = 0x7f < iVar3;
    if (iVar5 < iVar4 >> 6) {
      iVar3 = GetMagickResourceLimit(7);
      bVar1 = 1 < iVar3;
    }
    if (bVar1) {
      iVar5 = GetMagickResourceLimit(7);
      iVar3 = param_1[7];
      iVar4 = iVar3 + 0x3f;
      if (-1 < iVar3) {
        iVar4 = iVar3;
      }
      iVar4 = iVar4 >> 6;
      if (iVar5 < iVar4) {
        iVar4 = GetMagickResourceLimit(7);
      }
    }
    else {
LAB_000c9305:
      iVar4 = 1;
    }
  }
  else {
    uVar6 = GetMagickResourceLimit(7);
    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {
      uVar6 = GetMagickResourceLimit(7);
      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;
    }
    uVar6 = GetMagickResourceLimit(7);
    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {
      iVar4 = GetMagickResourceLimit(7);
    }
    else {
      iVar4 = 2;
    }
  }
  local_24 = &local_44;
  local_30 = param_3;
  local_38 = param_1;
  local_34 = param_2;
  local_28 = 1;
  local_2c = uVar2;
  GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);
  DestroyCacheView(uVar2);
  param_1[0x9e] = 2;
  param_1[0x8b] = param_2;
  if ((param_2 - 6U & 0xfffffffd) == 0) {
    uVar2 = SetImageColorspace(param_1,0x21,param_3);
  }
  else {
    uVar2 = SetImageColorspace(param_1,3,param_3);
  }
LAB_000c9378:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_002decd0();
  }
  return uVar2;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00039d70
ADD EBX,0x354e27
SUB ESP,0x3c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x2c],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x50]
MOV EDI,dword ptr [ESP + 0x58]
TEST ESI,ESI
JZ 0x000c94b6
CMP dword ptr [ESI + 0x3344],0xabacadab
JNZ 0x000c94d5
MOV EAX,dword ptr [ESI + 0x3328]
TEST EAX,EAX
JNZ 0x000c93d8
CMP dword ptr [ESI],0x2
JZ 0x000c93a8
MOV dword ptr [ESP + 0x8],0x0
SUB ESP,0x8
MOV dword ptr [ESP + 0x14],0x0
PUSH EDI
PUSH ESI
CALL 0x00032fa0
MOV dword ptr [ESP],ESI
MOV EBP,EAX
CALL 0x000318f0
ADD ESP,0x10
CMP EAX,0x4
JZ 0x000c92b0
SUB ESP,0xc
PUSH ESI
CALL 0x000318f0
ADD ESP,0x10
CMP EAX,0x3
JZ 0x000c92b0
SUB ESP,0xc
PUSH 0x7
CALL 0x00032640
ADD ESP,0x10
CMP EDX,0x0
JA 0x000c927d
CMP EAX,0x1
JBE 0x000c9430
SUB ESP,0xc
PUSH 0x7
CALL 0x00032640
ADD ESP,0x10
CMP EDX,0x0
JA 0x000c9398
CMP EAX,0x1
JA 0x000c9398
SUB ESP,0xc
PUSH 0x7
CALL 0x00032640
ADD ESP,0x10
JMP 0x000c930a
SUB ESP,0xc
PUSH ESI
CALL 0x000318f0
ADD ESP,0x10
CMP EAX,0x4
JZ 0x000c92d2
SUB ESP,0xc
PUSH ESI
CALL 0x000318f0
ADD ESP,0x10
CMP EAX,0x3
JNZ 0x000c9262
SUB ESP,0xc
PUSH 0x7
CALL 0x00032640
MOV EDX,dword ptr [ESI + 0x1c]
ADD ESP,0x10
MOV ECX,EAX
LEA EAX,[EDX + 0x3f]
TEST EDX,EDX
CMOVNS EAX,EDX
SAR EAX,0x6
CMP EDX,0x7f
SETG DL
CMP EAX,ECX
JG 0x000c9480
TEST DL,DL
JNZ 0x000c9458
MOV EAX,0x1
MOV ECX,dword ptr [ESP + 0x54]
LEA EDX,[ESP + 0x8]
MOV dword ptr [ESP + 0x20],EBP
MOV dword ptr [ESP + 0x28],EDX
MOV dword ptr [ESP + 0x1c],EDI
MOV dword ptr [ESP + 0x14],ESI
MOV dword ptr [ESP + 0x18],ECX
MOV dword ptr [ESP + 0x24],0x1
PUSH 0x0
PUSH EAX
LEA EAX,[ESP + 0x1c]
PUSH EAX
LEA EAX,[EBX + 0xffc9f900]
PUSH EAX
CALL 0x000324d0
MOV dword ptr [ESP],EBP
CALL 0x00032f30
MOV EAX,dword ptr [ESP + 0x64]
ADD ESP,0x10
MOV dword ptr [ESI + 0x278],0x2
MOV dword ptr [ESI + 0x22c],EAX
SUB EAX,0x6
AND EAX,0xfffffffd
JZ 0x000c93c0
SUB ESP,0x4
PUSH EDI
PUSH 0x3
PUSH ESI
CALL 0x000335f0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x2c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x000c94f4
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,0x2
JMP 0x000c930a
SUB ESP,0x8
PUSH EDI
PUSH ESI
CALL 0x000334c0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000c9410
XOR EAX,EAX
JMP 0x000c9378
SUB ESP,0x4
PUSH EDI
PUSH 0x21
PUSH ESI
CALL 0x000335f0
ADD ESP,0x10
JMP 0x000c9378
LEA EAX,[ESI + 0x318]
SUB ESP,0x8
PUSH EAX
LEA EAX,[EBX + 0xffed95ae]
PUSH EAX
LEA EAX,[EBX + 0xffed4ef8]
PUSH 0x9b3
PUSH EAX
LEA EAX,[EBX + 0xffed4c8c]
PUSH EAX
PUSH 0x8000
CALL 0x000323b0
ADD ESP,0x20
JMP 0x000c921c
SUB ESP,0x4
PUSH EDI
PUSH 0x1
PUSH ESI
CALL 0x00030bc0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000c9225
XOR EAX,EAX
JMP 0x000c9378
SUB ESP,0xc
PUSH 0x7
CALL 0x00032640
ADD ESP,0x10
CMP EDX,0x0
JA 0x000c927d
CMP EAX,0x1
JA 0x000c927d
JMP 0x000c9305
SUB ESP,0xc
PUSH 0x7
CALL 0x00032640
MOV ECX,dword ptr [ESI + 0x1c]
ADD ESP,0x10
LEA EDX,[ECX + 0x3f]
TEST ECX,ECX
CMOVNS EDX,ECX
SAR EDX,0x6
CMP EDX,EAX
JG 0x000c94a0
MOV EAX,EDX
JMP 0x000c930a
SUB ESP,0xc
PUSH 0x7
CALL 0x00032640
ADD ESP,0x10
CMP EAX,0x1
SETG DL
JMP 0x000c92fd
SUB ESP,0xc
PUSH 0x7
CALL 0x00032640
ADD ESP,0x10
MOV EDX,EAX
MOV EAX,EDX
JMP 0x000c930a
LEA EAX,[EBX + 0xffed4f08]
PUSH EAX
LEA EAX,[EBX + 0xffed4c8c]
PUSH 0x9b0
PUSH EAX
LEA EAX,[EBX + 0xffed9cf4]
PUSH EAX
CALL 0x000313d0
LEA EAX,[EBX + 0xffed4f08]
PUSH EAX
LEA EAX,[EBX + 0xffed4c8c]
PUSH 0x9b1
PUSH EAX
LEA EAX,[EBX + 0xffecc4b8]
PUSH EAX
CALL 0x000313d0
CALL 0x002decd0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 GrayscaleImage(int *param_1,int param_2,undefined4 param_3)\n\n{\n  bool bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  undefined8 uVar6;\n  undefined4 local_44;\n  undefined4 local_40;\n  int *local_38;\n  int local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (param_1[0xcd1] != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }\n  if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }\n  local_44 = 0;\n  local_40 = 0;\n  uVar2 = AcquireAuthenticCacheView(param_1,param_3);\n  iVar3 = GetImagePixelCacheType(param_1);\n  if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }\n  local_24 = &local_44;\n  local_30 = param_3;\n  local_38 = param_1;\n  local_34 = param_2;\n  local_28 = 1;\n  local_2c = uVar2;\n  GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);\n  DestroyCacheView(uVar2);\n  param_1[0x9e] = 2;\n  param_1[0x8b] = param_2;\n  if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002decd0();\n  }\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 GrayscaleImage(int *param_1,int param_2,undefined4 param_3)\n\n{\n  bool bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  undefined8 uVar6;\n  undefined4 local_44;\n  undefined4 local_40;\n  int *local_38;\n  int local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (param_1[0xcd1] != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }\n  if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }\n  local_44 = 0;\n  local_40 = 0;\n  uVar2 = AcquireAuthenticCacheView(param_1,param_3);\n  iVar3 = GetImagePixelCacheType(param_1);\n  if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }\n  local_24 = &local_44;\n  local_30 = param_3;\n  local_38 = param_1;\n  local_34 = param_2;\n  local_28 = 1;\n  local_2c = uVar2;\n  GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);\n  DestroyCacheView(uVar2);\n  param_1[0x9e] = 2;\n  param_1[0x8b] = param_2;\n  if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002decd0();\n  }\n  return uVar2;\n}" type_identifier (function_declarator "GrayscaleImage(int *param_1,int param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,int param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  bool bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  undefined8 uVar6;\n  undefined4 local_44;\n  undefined4 local_40;\n  int *local_38;\n  int local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (param_1[0xcd1] != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }\n  if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }\n  local_44 = 0;\n  local_40 = 0;\n  uVar2 = AcquireAuthenticCacheView(param_1,param_3);\n  iVar3 = GetImagePixelCacheType(param_1);\n  if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }\n  local_24 = &local_44;\n  local_30 = param_3;\n  local_38 = param_1;\n  local_34 = param_2;\n  local_28 = 1;\n  local_2c = uVar2;\n  GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);\n  DestroyCacheView(uVar2);\n  param_1[0x9e] = 2;\n  param_1[0x8b] = param_2;\n  if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002decd0();\n  }\n  return uVar2;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined8 uVar6;" type_identifier identifier ;) (declaration "undefined4 local_44;" type_identifier identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (declaration "int *local_38;" primitive_type (pointer_declarator "*local_38" * identifier) ;) (declaration "int local_34;" primitive_type identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "undefined4 local_2c;" type_identifier identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "undefined4 *local_24;" type_identifier (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0xc91d9;" (assignment_expression "uStack_14 = 0xc91d9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }" if (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }" { comment (expression_statement "__assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");" (call_expression "__assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage")" identifier (argument_list "("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage")" ( (string_literal ""image != (Image *) NULL"" " string_content ") , (string_literal ""MagickCore/enhance.c"" " string_content ") , number_literal , (string_literal ""GrayscaleImage"" " string_content ") ))) ;) })) (if_statement "if (param_1[0xcd1] != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }" if (parenthesized_expression "(param_1[0xcd1] != -0x54535255)" ( (binary_expression "param_1[0xcd1] != -0x54535255" (subscript_expression "param_1[0xcd1]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }" { comment (expression_statement "__assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");" (call_expression "__assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage")" identifier (argument_list "("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage")" ( (string_literal ""image->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/enhance.c"" " string_content ") , number_literal , (string_literal ""GrayscaleImage"" " string_content ") ))) ;) })) (if_statement "if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }" if (parenthesized_expression "(param_1[0xcca] != 0)" ( (binary_expression "param_1[0xcca] != 0" (subscript_expression "param_1[0xcca]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }" { (expression_statement "LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );" (call_expression "LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  )" identifier (argument_list "(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  )" ( number_literal , (string_literal ""MagickCore/enhance.c"" " string_content ") , (string_literal ""GrayscaleImage"" " string_content ") , number_literal , (pointer_expression "&DAT_002f75ae" & identifier) , (binary_expression "param_1 + 0xc6" identifier + number_literal) ))) ;) })) (if_statement "if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }" if (parenthesized_expression "(*param_1 == 2)" ( (binary_expression "*param_1 == 2" (pointer_expression "*param_1" * identifier) == number_literal) )) (compound_statement "{\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }" { (expression_statement "iVar3 = SyncImage(param_1,param_3);" (assignment_expression "iVar3 = SyncImage(param_1,param_3)" identifier = (call_expression "SyncImage(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000c9378;" goto statement_identifier ;) })) (expression_statement "iVar3 = SetImageStorageClass(param_1,1,param_3);" (assignment_expression "iVar3 = SetImageStorageClass(param_1,1,param_3)" identifier = (call_expression "SetImageStorageClass(param_1,1,param_3)" identifier (argument_list "(param_1,1,param_3)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000c9378;" goto statement_identifier ;) })) })) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" identifier = number_literal) ;) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = AcquireAuthenticCacheView(param_1,param_3);" (assignment_expression "uVar2 = AcquireAuthenticCacheView(param_1,param_3)" identifier = (call_expression "AcquireAuthenticCacheView(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = GetImagePixelCacheType(param_1);" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" identifier = (call_expression "GetImagePixelCacheType(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }" if (parenthesized_expression "(((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3))))" ( (binary_expression "((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))" (parenthesized_expression "((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3))" ( (binary_expression "(iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (parenthesized_expression "(iVar3 == 4)" ( (binary_expression "iVar3 == 4" identifier == number_literal) )) || (parenthesized_expression "(iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" ( (comma_expression "iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" identifier = (call_expression "GetImagePixelCacheType(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar3 == 3" identifier == number_literal)) ))) )) && (parenthesized_expression "((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))" ( (parenthesized_expression "(iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3))" ( (comma_expression "iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" identifier = (call_expression "GetImagePixelCacheType(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (binary_expression "iVar3 == 4" identifier == number_literal) || (parenthesized_expression "(iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" ( (comma_expression "iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" identifier = (call_expression "GetImagePixelCacheType(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar3 == 3" identifier == number_literal)) )))) )) ))) )) (compound_statement "{\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }" { (expression_statement "iVar5 = GetMagickResourceLimit(7);" (assignment_expression "iVar5 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (expression_statement "iVar3 = param_1[7];" (assignment_expression "iVar3 = param_1[7]" identifier = (subscript_expression "param_1[7]" identifier [ number_literal ])) ;) (expression_statement "iVar4 = iVar3 + 0x3f;" (assignment_expression "iVar4 = iVar3 + 0x3f" identifier = (binary_expression "iVar3 + 0x3f" identifier + number_literal)) ;) (if_statement "if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }" if (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) (compound_statement "{\n      iVar4 = iVar3;\n    }" { (expression_statement "iVar4 = iVar3;" (assignment_expression "iVar4 = iVar3" identifier = identifier) ;) })) (expression_statement "bVar1 = 0x7f < iVar3;" (assignment_expression "bVar1 = 0x7f < iVar3" identifier = (binary_expression "0x7f < iVar3" number_literal < identifier)) ;) (if_statement "if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }" if (parenthesized_expression "(iVar5 < iVar4 >> 6)" ( (binary_expression "iVar5 < iVar4 >> 6" identifier < (binary_expression "iVar4 >> 6" identifier >> number_literal)) )) (compound_statement "{\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }" { (expression_statement "iVar3 = GetMagickResourceLimit(7);" (assignment_expression "iVar3 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (expression_statement "bVar1 = 1 < iVar3;" (assignment_expression "bVar1 = 1 < iVar3" identifier = (binary_expression "1 < iVar3" number_literal < identifier)) ;) })) (if_statement "if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }" { (expression_statement "iVar5 = GetMagickResourceLimit(7);" (assignment_expression "iVar5 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (expression_statement "iVar3 = param_1[7];" (assignment_expression "iVar3 = param_1[7]" identifier = (subscript_expression "param_1[7]" identifier [ number_literal ])) ;) (expression_statement "iVar4 = iVar3 + 0x3f;" (assignment_expression "iVar4 = iVar3 + 0x3f" identifier = (binary_expression "iVar3 + 0x3f" identifier + number_literal)) ;) (if_statement "if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }" if (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) (compound_statement "{\n        iVar4 = iVar3;\n      }" { (expression_statement "iVar4 = iVar3;" (assignment_expression "iVar4 = iVar3" identifier = identifier) ;) })) (expression_statement "iVar4 = iVar4 >> 6;" (assignment_expression "iVar4 = iVar4 >> 6" identifier = (binary_expression "iVar4 >> 6" identifier >> number_literal)) ;) (if_statement "if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }" if (parenthesized_expression "(iVar5 < iVar4)" ( (binary_expression "iVar5 < iVar4" identifier < identifier) )) (compound_statement "{\n        iVar4 = GetMagickResourceLimit(7);\n      }" { (expression_statement "iVar4 = GetMagickResourceLimit(7);" (assignment_expression "iVar4 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) })) }) (else_clause "else {\nLAB_000c9305:\n      iVar4 = 1;\n    }" else (compound_statement "{\nLAB_000c9305:\n      iVar4 = 1;\n    }" { (labeled_statement "LAB_000c9305:\n      iVar4 = 1;" statement_identifier : (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;)) }))) }) (else_clause "else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }" else (compound_statement "{\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }" { (expression_statement "uVar6 = GetMagickResourceLimit(7);" (assignment_expression "uVar6 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (if_statement "if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }" if (parenthesized_expression "(((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2))" ( (binary_expression "((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)" (parenthesized_expression "((int)((ulonglong)uVar6 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)uVar6 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar6 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal) )) && (parenthesized_expression "((uint)uVar6 < 2)" ( (binary_expression "(uint)uVar6 < 2" (cast_expression "(uint)uVar6" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) ))) )) (compound_statement "{\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }" { (expression_statement "uVar6 = GetMagickResourceLimit(7);" (assignment_expression "uVar6 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (if_statement "if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;" if (parenthesized_expression "(((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2))" ( (binary_expression "((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)" (parenthesized_expression "((int)((ulonglong)uVar6 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)uVar6 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar6 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal) )) && (parenthesized_expression "((uint)uVar6 < 2)" ( (binary_expression "(uint)uVar6 < 2" (cast_expression "(uint)uVar6" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) ))) )) (goto_statement "goto LAB_000c9305;" goto statement_identifier ;)) })) (expression_statement "uVar6 = GetMagickResourceLimit(7);" (assignment_expression "uVar6 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (if_statement "if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }" if (parenthesized_expression "(((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2))" ( (binary_expression "((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)" (parenthesized_expression "((int)((ulonglong)uVar6 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)uVar6 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar6 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal) )) && (parenthesized_expression "((uint)uVar6 < 2)" ( (binary_expression "(uint)uVar6 < 2" (cast_expression "(uint)uVar6" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) ))) )) (compound_statement "{\n      iVar4 = GetMagickResourceLimit(7);\n    }" { (expression_statement "iVar4 = GetMagickResourceLimit(7);" (assignment_expression "iVar4 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) }) (else_clause "else {\n      iVar4 = 2;\n    }" else (compound_statement "{\n      iVar4 = 2;\n    }" { (expression_statement "iVar4 = 2;" (assignment_expression "iVar4 = 2" identifier = number_literal) ;) }))) }))) (expression_statement "local_24 = &local_44;" (assignment_expression "local_24 = &local_44" identifier = (pointer_expression "&local_44" & identifier)) ;) (expression_statement "local_30 = param_3;" (assignment_expression "local_30 = param_3" identifier = identifier) ;) (expression_statement "local_38 = param_1;" (assignment_expression "local_38 = param_1" identifier = identifier) ;) (expression_statement "local_34 = param_2;" (assignment_expression "local_34 = param_2" identifier = identifier) ;) (expression_statement "local_28 = 1;" (assignment_expression "local_28 = 1" identifier = number_literal) ;) (expression_statement "local_2c = uVar2;" (assignment_expression "local_2c = uVar2" identifier = identifier) ;) (expression_statement "GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);" (call_expression "GOMP_parallel(FUN_000bd900,&local_38,iVar4,0)" identifier (argument_list "(FUN_000bd900,&local_38,iVar4,0)" ( identifier , (pointer_expression "&local_38" & identifier) , identifier , number_literal ))) ;) (expression_statement "DestroyCacheView(uVar2);" (call_expression "DestroyCacheView(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "param_1[0x9e] = 2;" (assignment_expression "param_1[0x9e] = 2" (subscript_expression "param_1[0x9e]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[0x8b] = param_2;" (assignment_expression "param_1[0x8b] = param_2" (subscript_expression "param_1[0x8b]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }" if (parenthesized_expression "((param_2 - 6U & 0xfffffffd) == 0)" ( (binary_expression "(param_2 - 6U & 0xfffffffd) == 0" (parenthesized_expression "(param_2 - 6U & 0xfffffffd)" ( (binary_expression "param_2 - 6U & 0xfffffffd" (binary_expression "param_2 - 6U" identifier - number_literal) & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }" { (expression_statement "uVar2 = SetImageColorspace(param_1,0x21,param_3);" (assignment_expression "uVar2 = SetImageColorspace(param_1,0x21,param_3)" identifier = (call_expression "SetImageColorspace(param_1,0x21,param_3)" identifier (argument_list "(param_1,0x21,param_3)" ( identifier , number_literal , identifier )))) ;) }) (else_clause "else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }" else (compound_statement "{\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }" { (expression_statement "uVar2 = SetImageColorspace(param_1,3,param_3);" (assignment_expression "uVar2 = SetImageColorspace(param_1,3,param_3)" identifier = (call_expression "SetImageColorspace(param_1,3,param_3)" identifier (argument_list "(param_1,3,param_3)" ( identifier , number_literal , identifier )))) ;) }))) (labeled_statement "LAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002decd0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002decd0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_002decd0();\n  }" { comment (expression_statement "FUN_002decd0();" (call_expression "FUN_002decd0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "GravityType": Some values do not have unique names */\n/* WARNING: Enum "DisposeType": Some values do not have unique names */\n/* WARNING: Enum "ChannelType": Some values do not have unique names */\n/* WARNING: Enum "PixelChannel": Some values do not have unique names */\n/* WARNING: Enum "ExceptionType": Some values do not have unique names */\n/* WARNING: Enum "LogEventType": Some values do not have unique names */\n\nMagickBooleanType GrayscaleImage(Image *image,PixelIntensityMethod method,ExceptionInfo *exception)\n\n{\n  size_t sVar1;\n  bool bVar2;\n  CacheView *cache_view;\n  CacheType CVar3;\n  size_t sVar4;\n  MagickBooleanType MVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  MagickSizeType MVar7;\n  MagickOffsetType progress;\n  Image *local_38;\n  PixelIntensityMethod local_34;\n  ExceptionInfo *local_30;\n  CacheView *local_2c;\n  undefined4 local_28;\n  MagickOffsetType *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (image == (Image *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (image->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (image->debug != MagickFalse) {\n    LogMagickEvent(TraceEvent,"MagickCore/enhance.c","GrayscaleImage",0x9b3,"%s",image->filename);\n  }\n  if (image->storage_class == PseudoClass) {\n    MVar5 = SyncImage(image,exception);\n    if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }\n    MVar5 = SetImageStorageClass(image,DirectClass,exception);\n    if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }\n  }\n  progress._0_4_ = 0;\n  progress._4_4_ = 0;\n  cache_view = AcquireAuthenticCacheView(image,exception);\n  CVar3 = GetImagePixelCacheType(image);\n  if (((CVar3 == MemoryCache) || (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)) &&\n     ((CVar3 = GetImagePixelCacheType(image), CVar3 == MemoryCache ||\n      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)))) {\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    sVar1 = image->rows;\n    sVar4 = sVar1 + 0x3f;\n    if (-1 < (int)sVar1) {\n      sVar4 = sVar1;\n    }\n    bVar2 = 0x7f < (int)sVar1;\n    if ((int)MVar7 < (int)sVar4 >> 6) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      bVar2 = 1 < (int)MVar7;\n    }\n    if (bVar2) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      sVar1 = image->rows;\n      sVar4 = sVar1 + 0x3f;\n      if (-1 < (int)sVar1) {\n        sVar4 = sVar1;\n      }\n      iVar6 = (int)sVar4 >> 6;\n      if ((int)MVar7 < iVar6) {\n        MVar7 = GetMagickResourceLimit(ThreadResource);\n        iVar6 = (int)MVar7;\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar6 = 1;\n    }\n  }\n  else {\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) goto LAB_000c9305;\n    }\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      iVar6 = (int)MVar7;\n    }\n    else {\n      iVar6 = 2;\n    }\n  }\n  local_24 = &progress;\n  local_30 = exception;\n  local_38 = image;\n  local_34 = method;\n  local_28 = 1;\n  local_2c = cache_view;\n  GOMP_parallel(GrayscaleImage__omp_fn_7,&local_38,iVar6,0);\n  DestroyCacheView(cache_view);\n  image->type = GrayscaleType;\n  image->intensity = method;\n  if ((method - Rec601LuminancePixelIntensityMethod & 0xfffffffd) == 0) {\n    MVar5 = SetImageColorspace(image,LinearGRAYColorspace,exception);\n  }\n  else {\n    MVar5 = SetImageColorspace(image,GRAYColorspace,exception);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return MVar5;\n}\n\n" comment comment comment comment comment comment comment comment (function_definition "MagickBooleanType GrayscaleImage(Image *image,PixelIntensityMethod method,ExceptionInfo *exception)\n\n{\n  size_t sVar1;\n  bool bVar2;\n  CacheView *cache_view;\n  CacheType CVar3;\n  size_t sVar4;\n  MagickBooleanType MVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  MagickSizeType MVar7;\n  MagickOffsetType progress;\n  Image *local_38;\n  PixelIntensityMethod local_34;\n  ExceptionInfo *local_30;\n  CacheView *local_2c;\n  undefined4 local_28;\n  MagickOffsetType *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (image == (Image *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (image->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (image->debug != MagickFalse) {\n    LogMagickEvent(TraceEvent,"MagickCore/enhance.c","GrayscaleImage",0x9b3,"%s",image->filename);\n  }\n  if (image->storage_class == PseudoClass) {\n    MVar5 = SyncImage(image,exception);\n    if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }\n    MVar5 = SetImageStorageClass(image,DirectClass,exception);\n    if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }\n  }\n  progress._0_4_ = 0;\n  progress._4_4_ = 0;\n  cache_view = AcquireAuthenticCacheView(image,exception);\n  CVar3 = GetImagePixelCacheType(image);\n  if (((CVar3 == MemoryCache) || (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)) &&\n     ((CVar3 = GetImagePixelCacheType(image), CVar3 == MemoryCache ||\n      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)))) {\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    sVar1 = image->rows;\n    sVar4 = sVar1 + 0x3f;\n    if (-1 < (int)sVar1) {\n      sVar4 = sVar1;\n    }\n    bVar2 = 0x7f < (int)sVar1;\n    if ((int)MVar7 < (int)sVar4 >> 6) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      bVar2 = 1 < (int)MVar7;\n    }\n    if (bVar2) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      sVar1 = image->rows;\n      sVar4 = sVar1 + 0x3f;\n      if (-1 < (int)sVar1) {\n        sVar4 = sVar1;\n      }\n      iVar6 = (int)sVar4 >> 6;\n      if ((int)MVar7 < iVar6) {\n        MVar7 = GetMagickResourceLimit(ThreadResource);\n        iVar6 = (int)MVar7;\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar6 = 1;\n    }\n  }\n  else {\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) goto LAB_000c9305;\n    }\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      iVar6 = (int)MVar7;\n    }\n    else {\n      iVar6 = 2;\n    }\n  }\n  local_24 = &progress;\n  local_30 = exception;\n  local_38 = image;\n  local_34 = method;\n  local_28 = 1;\n  local_2c = cache_view;\n  GOMP_parallel(GrayscaleImage__omp_fn_7,&local_38,iVar6,0);\n  DestroyCacheView(cache_view);\n  image->type = GrayscaleType;\n  image->intensity = method;\n  if ((method - Rec601LuminancePixelIntensityMethod & 0xfffffffd) == 0) {\n    MVar5 = SetImageColorspace(image,LinearGRAYColorspace,exception);\n  }\n  else {\n    MVar5 = SetImageColorspace(image,GRAYColorspace,exception);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return MVar5;\n}" type_identifier (function_declarator "GrayscaleImage(Image *image,PixelIntensityMethod method,ExceptionInfo *exception)" identifier (parameter_list "(Image *image,PixelIntensityMethod method,ExceptionInfo *exception)" ( (parameter_declaration "Image *image" type_identifier (pointer_declarator "*image" * identifier)) , (parameter_declaration "PixelIntensityMethod method" type_identifier identifier) , (parameter_declaration "ExceptionInfo *exception" type_identifier (pointer_declarator "*exception" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  bool bVar2;\n  CacheView *cache_view;\n  CacheType CVar3;\n  size_t sVar4;\n  MagickBooleanType MVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  MagickSizeType MVar7;\n  MagickOffsetType progress;\n  Image *local_38;\n  PixelIntensityMethod local_34;\n  ExceptionInfo *local_30;\n  CacheView *local_2c;\n  undefined4 local_28;\n  MagickOffsetType *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (image == (Image *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (image->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (image->debug != MagickFalse) {\n    LogMagickEvent(TraceEvent,"MagickCore/enhance.c","GrayscaleImage",0x9b3,"%s",image->filename);\n  }\n  if (image->storage_class == PseudoClass) {\n    MVar5 = SyncImage(image,exception);\n    if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }\n    MVar5 = SetImageStorageClass(image,DirectClass,exception);\n    if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }\n  }\n  progress._0_4_ = 0;\n  progress._4_4_ = 0;\n  cache_view = AcquireAuthenticCacheView(image,exception);\n  CVar3 = GetImagePixelCacheType(image);\n  if (((CVar3 == MemoryCache) || (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)) &&\n     ((CVar3 = GetImagePixelCacheType(image), CVar3 == MemoryCache ||\n      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)))) {\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    sVar1 = image->rows;\n    sVar4 = sVar1 + 0x3f;\n    if (-1 < (int)sVar1) {\n      sVar4 = sVar1;\n    }\n    bVar2 = 0x7f < (int)sVar1;\n    if ((int)MVar7 < (int)sVar4 >> 6) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      bVar2 = 1 < (int)MVar7;\n    }\n    if (bVar2) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      sVar1 = image->rows;\n      sVar4 = sVar1 + 0x3f;\n      if (-1 < (int)sVar1) {\n        sVar4 = sVar1;\n      }\n      iVar6 = (int)sVar4 >> 6;\n      if ((int)MVar7 < iVar6) {\n        MVar7 = GetMagickResourceLimit(ThreadResource);\n        iVar6 = (int)MVar7;\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar6 = 1;\n    }\n  }\n  else {\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) goto LAB_000c9305;\n    }\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      iVar6 = (int)MVar7;\n    }\n    else {\n      iVar6 = 2;\n    }\n  }\n  local_24 = &progress;\n  local_30 = exception;\n  local_38 = image;\n  local_34 = method;\n  local_28 = 1;\n  local_2c = cache_view;\n  GOMP_parallel(GrayscaleImage__omp_fn_7,&local_38,iVar6,0);\n  DestroyCacheView(cache_view);\n  image->type = GrayscaleType;\n  image->intensity = method;\n  if ((method - Rec601LuminancePixelIntensityMethod & 0xfffffffd) == 0) {\n    MVar5 = SetImageColorspace(image,LinearGRAYColorspace,exception);\n  }\n  else {\n    MVar5 = SetImageColorspace(image,GRAYColorspace,exception);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return MVar5;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "CacheView *cache_view;" type_identifier (pointer_declarator "*cache_view" * identifier) ;) (declaration "CacheType CVar3;" type_identifier identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "MagickBooleanType MVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "MagickSizeType MVar7;" type_identifier identifier ;) (declaration "MagickOffsetType progress;" type_identifier identifier ;) (declaration "Image *local_38;" type_identifier (pointer_declarator "*local_38" * identifier) ;) (declaration "PixelIntensityMethod local_34;" type_identifier identifier ;) (declaration "ExceptionInfo *local_30;" type_identifier (pointer_declarator "*local_30" * identifier) ;) (declaration "CacheView *local_2c;" type_identifier (pointer_declarator "*local_2c" * identifier) ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "MagickOffsetType *local_24;" type_identifier (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0xc91d9;" (assignment_expression "uStack_14 = 0xc91d9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (image == (Image *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }" if (parenthesized_expression "(image == (Image *)0x0)" ( (binary_expression "image == (Image *)0x0" identifier == (cast_expression "(Image *)0x0" ( (type_descriptor "Image *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }" { comment (expression_statement "__assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");" (call_expression "__assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage")" identifier (argument_list "("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage")" ( (string_literal ""image != (Image *) NULL"" " string_content ") , (string_literal ""MagickCore/enhance.c"" " string_content ") , number_literal , (string_literal ""GrayscaleImage"" " string_content ") ))) ;) })) (if_statement "if (image->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }" if (parenthesized_expression "(image->signature != 0xabacadab)" ( (binary_expression "image->signature != 0xabacadab" (field_expression "image->signature" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }" { comment (expression_statement "__assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");" (call_expression "__assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage")" identifier (argument_list "("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage")" ( (string_literal ""image->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/enhance.c"" " string_content ") , number_literal , (string_literal ""GrayscaleImage"" " string_content ") ))) ;) })) (if_statement "if (image->debug != MagickFalse) {\n    LogMagickEvent(TraceEvent,"MagickCore/enhance.c","GrayscaleImage",0x9b3,"%s",image->filename);\n  }" if (parenthesized_expression "(image->debug != MagickFalse)" ( (binary_expression "image->debug != MagickFalse" (field_expression "image->debug" identifier -> field_identifier) != identifier) )) (compound_statement "{\n    LogMagickEvent(TraceEvent,"MagickCore/enhance.c","GrayscaleImage",0x9b3,"%s",image->filename);\n  }" { (expression_statement "LogMagickEvent(TraceEvent,"MagickCore/enhance.c","GrayscaleImage",0x9b3,"%s",image->filename);" (call_expression "LogMagickEvent(TraceEvent,"MagickCore/enhance.c","GrayscaleImage",0x9b3,"%s",image->filename)" identifier (argument_list "(TraceEvent,"MagickCore/enhance.c","GrayscaleImage",0x9b3,"%s",image->filename)" ( identifier , (string_literal ""MagickCore/enhance.c"" " string_content ") , (string_literal ""GrayscaleImage"" " string_content ") , number_literal , (string_literal ""%s"" " string_content ") , (field_expression "image->filename" identifier -> field_identifier) ))) ;) })) (if_statement "if (image->storage_class == PseudoClass) {\n    MVar5 = SyncImage(image,exception);\n    if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }\n    MVar5 = SetImageStorageClass(image,DirectClass,exception);\n    if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }\n  }" if (parenthesized_expression "(image->storage_class == PseudoClass)" ( (binary_expression "image->storage_class == PseudoClass" (field_expression "image->storage_class" identifier -> field_identifier) == identifier) )) (compound_statement "{\n    MVar5 = SyncImage(image,exception);\n    if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }\n    MVar5 = SetImageStorageClass(image,DirectClass,exception);\n    if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }\n  }" { (expression_statement "MVar5 = SyncImage(image,exception);" (assignment_expression "MVar5 = SyncImage(image,exception)" identifier = (call_expression "SyncImage(image,exception)" identifier (argument_list "(image,exception)" ( identifier , identifier )))) ;) (if_statement "if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }" if (parenthesized_expression "(MVar5 == MagickFalse)" ( (binary_expression "MVar5 == MagickFalse" identifier == identifier) )) (compound_statement "{\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }" { (expression_statement "MVar5 = MagickFalse;" (assignment_expression "MVar5 = MagickFalse" identifier = identifier) ;) (goto_statement "goto LAB_000c9378;" goto statement_identifier ;) })) (expression_statement "MVar5 = SetImageStorageClass(image,DirectClass,exception);" (assignment_expression "MVar5 = SetImageStorageClass(image,DirectClass,exception)" identifier = (call_expression "SetImageStorageClass(image,DirectClass,exception)" identifier (argument_list "(image,DirectClass,exception)" ( identifier , identifier , identifier )))) ;) (if_statement "if (MVar5 == MagickFalse) {\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }" if (parenthesized_expression "(MVar5 == MagickFalse)" ( (binary_expression "MVar5 == MagickFalse" identifier == identifier) )) (compound_statement "{\n      MVar5 = MagickFalse;\n      goto LAB_000c9378;\n    }" { (expression_statement "MVar5 = MagickFalse;" (assignment_expression "MVar5 = MagickFalse" identifier = identifier) ;) (goto_statement "goto LAB_000c9378;" goto statement_identifier ;) })) })) (expression_statement "progress._0_4_ = 0;" (assignment_expression "progress._0_4_ = 0" (field_expression "progress._0_4_" identifier . field_identifier) = number_literal) ;) (expression_statement "progress._4_4_ = 0;" (assignment_expression "progress._4_4_ = 0" (field_expression "progress._4_4_" identifier . field_identifier) = number_literal) ;) (expression_statement "cache_view = AcquireAuthenticCacheView(image,exception);" (assignment_expression "cache_view = AcquireAuthenticCacheView(image,exception)" identifier = (call_expression "AcquireAuthenticCacheView(image,exception)" identifier (argument_list "(image,exception)" ( identifier , identifier )))) ;) (expression_statement "CVar3 = GetImagePixelCacheType(image);" (assignment_expression "CVar3 = GetImagePixelCacheType(image)" identifier = (call_expression "GetImagePixelCacheType(image)" identifier (argument_list "(image)" ( identifier )))) ;) (if_statement "if (((CVar3 == MemoryCache) || (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)) &&\n     ((CVar3 = GetImagePixelCacheType(image), CVar3 == MemoryCache ||\n      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)))) {\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    sVar1 = image->rows;\n    sVar4 = sVar1 + 0x3f;\n    if (-1 < (int)sVar1) {\n      sVar4 = sVar1;\n    }\n    bVar2 = 0x7f < (int)sVar1;\n    if ((int)MVar7 < (int)sVar4 >> 6) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      bVar2 = 1 < (int)MVar7;\n    }\n    if (bVar2) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      sVar1 = image->rows;\n      sVar4 = sVar1 + 0x3f;\n      if (-1 < (int)sVar1) {\n        sVar4 = sVar1;\n      }\n      iVar6 = (int)sVar4 >> 6;\n      if ((int)MVar7 < iVar6) {\n        MVar7 = GetMagickResourceLimit(ThreadResource);\n        iVar6 = (int)MVar7;\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar6 = 1;\n    }\n  }\n  else {\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) goto LAB_000c9305;\n    }\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      iVar6 = (int)MVar7;\n    }\n    else {\n      iVar6 = 2;\n    }\n  }" if (parenthesized_expression "(((CVar3 == MemoryCache) || (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)) &&\n     ((CVar3 = GetImagePixelCacheType(image), CVar3 == MemoryCache ||\n      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache))))" ( (binary_expression "((CVar3 == MemoryCache) || (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)) &&\n     ((CVar3 = GetImagePixelCacheType(image), CVar3 == MemoryCache ||\n      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)))" (parenthesized_expression "((CVar3 == MemoryCache) || (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache))" ( (binary_expression "(CVar3 == MemoryCache) || (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)" (parenthesized_expression "(CVar3 == MemoryCache)" ( (binary_expression "CVar3 == MemoryCache" identifier == identifier) )) || (parenthesized_expression "(CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)" ( (comma_expression "CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache" (assignment_expression "CVar3 = GetImagePixelCacheType(image)" identifier = (call_expression "GetImagePixelCacheType(image)" identifier (argument_list "(image)" ( identifier )))) , (binary_expression "CVar3 == MapCache" identifier == identifier)) ))) )) && (parenthesized_expression "((CVar3 = GetImagePixelCacheType(image), CVar3 == MemoryCache ||\n      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)))" ( (parenthesized_expression "(CVar3 = GetImagePixelCacheType(image), CVar3 == MemoryCache ||\n      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache))" ( (comma_expression "CVar3 = GetImagePixelCacheType(image), CVar3 == MemoryCache ||\n      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)" (assignment_expression "CVar3 = GetImagePixelCacheType(image)" identifier = (call_expression "GetImagePixelCacheType(image)" identifier (argument_list "(image)" ( identifier )))) , (binary_expression "CVar3 == MemoryCache ||\n      (CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)" (binary_expression "CVar3 == MemoryCache" identifier == identifier) || (parenthesized_expression "(CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache)" ( (comma_expression "CVar3 = GetImagePixelCacheType(image), CVar3 == MapCache" (assignment_expression "CVar3 = GetImagePixelCacheType(image)" identifier = (call_expression "GetImagePixelCacheType(image)" identifier (argument_list "(image)" ( identifier )))) , (binary_expression "CVar3 == MapCache" identifier == identifier)) )))) )) ))) )) (compound_statement "{\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    sVar1 = image->rows;\n    sVar4 = sVar1 + 0x3f;\n    if (-1 < (int)sVar1) {\n      sVar4 = sVar1;\n    }\n    bVar2 = 0x7f < (int)sVar1;\n    if ((int)MVar7 < (int)sVar4 >> 6) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      bVar2 = 1 < (int)MVar7;\n    }\n    if (bVar2) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      sVar1 = image->rows;\n      sVar4 = sVar1 + 0x3f;\n      if (-1 < (int)sVar1) {\n        sVar4 = sVar1;\n      }\n      iVar6 = (int)sVar4 >> 6;\n      if ((int)MVar7 < iVar6) {\n        MVar7 = GetMagickResourceLimit(ThreadResource);\n        iVar6 = (int)MVar7;\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar6 = 1;\n    }\n  }" { (expression_statement "MVar7 = GetMagickResourceLimit(ThreadResource);" (assignment_expression "MVar7 = GetMagickResourceLimit(ThreadResource)" identifier = (call_expression "GetMagickResourceLimit(ThreadResource)" identifier (argument_list "(ThreadResource)" ( identifier )))) ;) (expression_statement "sVar1 = image->rows;" (assignment_expression "sVar1 = image->rows" identifier = (field_expression "image->rows" identifier -> field_identifier)) ;) (expression_statement "sVar4 = sVar1 + 0x3f;" (assignment_expression "sVar4 = sVar1 + 0x3f" identifier = (binary_expression "sVar1 + 0x3f" identifier + number_literal)) ;) (if_statement "if (-1 < (int)sVar1) {\n      sVar4 = sVar1;\n    }" if (parenthesized_expression "(-1 < (int)sVar1)" ( (binary_expression "-1 < (int)sVar1" number_literal < (cast_expression "(int)sVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      sVar4 = sVar1;\n    }" { (expression_statement "sVar4 = sVar1;" (assignment_expression "sVar4 = sVar1" identifier = identifier) ;) })) (expression_statement "bVar2 = 0x7f < (int)sVar1;" (assignment_expression "bVar2 = 0x7f < (int)sVar1" identifier = (binary_expression "0x7f < (int)sVar1" number_literal < (cast_expression "(int)sVar1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if ((int)MVar7 < (int)sVar4 >> 6) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      bVar2 = 1 < (int)MVar7;\n    }" if (parenthesized_expression "((int)MVar7 < (int)sVar4 >> 6)" ( (binary_expression "(int)MVar7 < (int)sVar4 >> 6" (cast_expression "(int)MVar7" ( (type_descriptor "int" primitive_type) ) identifier) < (binary_expression "(int)sVar4 >> 6" (cast_expression "(int)sVar4" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) )) (compound_statement "{\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      bVar2 = 1 < (int)MVar7;\n    }" { (expression_statement "MVar7 = GetMagickResourceLimit(ThreadResource);" (assignment_expression "MVar7 = GetMagickResourceLimit(ThreadResource)" identifier = (call_expression "GetMagickResourceLimit(ThreadResource)" identifier (argument_list "(ThreadResource)" ( identifier )))) ;) (expression_statement "bVar2 = 1 < (int)MVar7;" (assignment_expression "bVar2 = 1 < (int)MVar7" identifier = (binary_expression "1 < (int)MVar7" number_literal < (cast_expression "(int)MVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) (if_statement "if (bVar2) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      sVar1 = image->rows;\n      sVar4 = sVar1 + 0x3f;\n      if (-1 < (int)sVar1) {\n        sVar4 = sVar1;\n      }\n      iVar6 = (int)sVar4 >> 6;\n      if ((int)MVar7 < iVar6) {\n        MVar7 = GetMagickResourceLimit(ThreadResource);\n        iVar6 = (int)MVar7;\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar6 = 1;\n    }" if (parenthesized_expression "(bVar2)" ( identifier )) (compound_statement "{\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      sVar1 = image->rows;\n      sVar4 = sVar1 + 0x3f;\n      if (-1 < (int)sVar1) {\n        sVar4 = sVar1;\n      }\n      iVar6 = (int)sVar4 >> 6;\n      if ((int)MVar7 < iVar6) {\n        MVar7 = GetMagickResourceLimit(ThreadResource);\n        iVar6 = (int)MVar7;\n      }\n    }" { (expression_statement "MVar7 = GetMagickResourceLimit(ThreadResource);" (assignment_expression "MVar7 = GetMagickResourceLimit(ThreadResource)" identifier = (call_expression "GetMagickResourceLimit(ThreadResource)" identifier (argument_list "(ThreadResource)" ( identifier )))) ;) (expression_statement "sVar1 = image->rows;" (assignment_expression "sVar1 = image->rows" identifier = (field_expression "image->rows" identifier -> field_identifier)) ;) (expression_statement "sVar4 = sVar1 + 0x3f;" (assignment_expression "sVar4 = sVar1 + 0x3f" identifier = (binary_expression "sVar1 + 0x3f" identifier + number_literal)) ;) (if_statement "if (-1 < (int)sVar1) {\n        sVar4 = sVar1;\n      }" if (parenthesized_expression "(-1 < (int)sVar1)" ( (binary_expression "-1 < (int)sVar1" number_literal < (cast_expression "(int)sVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n        sVar4 = sVar1;\n      }" { (expression_statement "sVar4 = sVar1;" (assignment_expression "sVar4 = sVar1" identifier = identifier) ;) })) (expression_statement "iVar6 = (int)sVar4 >> 6;" (assignment_expression "iVar6 = (int)sVar4 >> 6" identifier = (binary_expression "(int)sVar4 >> 6" (cast_expression "(int)sVar4" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) (if_statement "if ((int)MVar7 < iVar6) {\n        MVar7 = GetMagickResourceLimit(ThreadResource);\n        iVar6 = (int)MVar7;\n      }" if (parenthesized_expression "((int)MVar7 < iVar6)" ( (binary_expression "(int)MVar7 < iVar6" (cast_expression "(int)MVar7" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n        MVar7 = GetMagickResourceLimit(ThreadResource);\n        iVar6 = (int)MVar7;\n      }" { (expression_statement "MVar7 = GetMagickResourceLimit(ThreadResource);" (assignment_expression "MVar7 = GetMagickResourceLimit(ThreadResource)" identifier = (call_expression "GetMagickResourceLimit(ThreadResource)" identifier (argument_list "(ThreadResource)" ( identifier )))) ;) (expression_statement "iVar6 = (int)MVar7;" (assignment_expression "iVar6 = (int)MVar7" identifier = (cast_expression "(int)MVar7" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) }) (else_clause "else {\nLAB_000c9305:\n      iVar6 = 1;\n    }" else (compound_statement "{\nLAB_000c9305:\n      iVar6 = 1;\n    }" { (labeled_statement "LAB_000c9305:\n      iVar6 = 1;" statement_identifier : (expression_statement "iVar6 = 1;" (assignment_expression "iVar6 = 1" identifier = number_literal) ;)) }))) }) (else_clause "else {\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) goto LAB_000c9305;\n    }\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      iVar6 = (int)MVar7;\n    }\n    else {\n      iVar6 = 2;\n    }\n  }" else (compound_statement "{\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) goto LAB_000c9305;\n    }\n    MVar7 = GetMagickResourceLimit(ThreadResource);\n    if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      iVar6 = (int)MVar7;\n    }\n    else {\n      iVar6 = 2;\n    }\n  }" { (expression_statement "MVar7 = GetMagickResourceLimit(ThreadResource);" (assignment_expression "MVar7 = GetMagickResourceLimit(ThreadResource)" identifier = (call_expression "GetMagickResourceLimit(ThreadResource)" identifier (argument_list "(ThreadResource)" ( identifier )))) ;) (if_statement "if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) goto LAB_000c9305;\n    }" if (parenthesized_expression "(((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2))" ( (binary_expression "((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)" (parenthesized_expression "((int)(MVar7 >> 0x20) == 0)" ( (binary_expression "(int)(MVar7 >> 0x20) == 0" (cast_expression "(int)(MVar7 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(MVar7 >> 0x20)" ( (binary_expression "MVar7 >> 0x20" identifier >> number_literal) ))) == number_literal) )) && (parenthesized_expression "((uint)MVar7 < 2)" ( (binary_expression "(uint)MVar7 < 2" (cast_expression "(uint)MVar7" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) ))) )) (compound_statement "{\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) goto LAB_000c9305;\n    }" { (expression_statement "MVar7 = GetMagickResourceLimit(ThreadResource);" (assignment_expression "MVar7 = GetMagickResourceLimit(ThreadResource)" identifier = (call_expression "GetMagickResourceLimit(ThreadResource)" identifier (argument_list "(ThreadResource)" ( identifier )))) ;) (if_statement "if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) goto LAB_000c9305;" if (parenthesized_expression "(((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2))" ( (binary_expression "((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)" (parenthesized_expression "((int)(MVar7 >> 0x20) == 0)" ( (binary_expression "(int)(MVar7 >> 0x20) == 0" (cast_expression "(int)(MVar7 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(MVar7 >> 0x20)" ( (binary_expression "MVar7 >> 0x20" identifier >> number_literal) ))) == number_literal) )) && (parenthesized_expression "((uint)MVar7 < 2)" ( (binary_expression "(uint)MVar7 < 2" (cast_expression "(uint)MVar7" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) ))) )) (goto_statement "goto LAB_000c9305;" goto statement_identifier ;)) })) (expression_statement "MVar7 = GetMagickResourceLimit(ThreadResource);" (assignment_expression "MVar7 = GetMagickResourceLimit(ThreadResource)" identifier = (call_expression "GetMagickResourceLimit(ThreadResource)" identifier (argument_list "(ThreadResource)" ( identifier )))) ;) (if_statement "if (((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)) {\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      iVar6 = (int)MVar7;\n    }\n    else {\n      iVar6 = 2;\n    }" if (parenthesized_expression "(((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2))" ( (binary_expression "((int)(MVar7 >> 0x20) == 0) && ((uint)MVar7 < 2)" (parenthesized_expression "((int)(MVar7 >> 0x20) == 0)" ( (binary_expression "(int)(MVar7 >> 0x20) == 0" (cast_expression "(int)(MVar7 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(MVar7 >> 0x20)" ( (binary_expression "MVar7 >> 0x20" identifier >> number_literal) ))) == number_literal) )) && (parenthesized_expression "((uint)MVar7 < 2)" ( (binary_expression "(uint)MVar7 < 2" (cast_expression "(uint)MVar7" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) ))) )) (compound_statement "{\n      MVar7 = GetMagickResourceLimit(ThreadResource);\n      iVar6 = (int)MVar7;\n    }" { (expression_statement "MVar7 = GetMagickResourceLimit(ThreadResource);" (assignment_expression "MVar7 = GetMagickResourceLimit(ThreadResource)" identifier = (call_expression "GetMagickResourceLimit(ThreadResource)" identifier (argument_list "(ThreadResource)" ( identifier )))) ;) (expression_statement "iVar6 = (int)MVar7;" (assignment_expression "iVar6 = (int)MVar7" identifier = (cast_expression "(int)MVar7" ( (type_descriptor "int" primitive_type) ) identifier)) ;) }) (else_clause "else {\n      iVar6 = 2;\n    }" else (compound_statement "{\n      iVar6 = 2;\n    }" { (expression_statement "iVar6 = 2;" (assignment_expression "iVar6 = 2" identifier = number_literal) ;) }))) }))) (expression_statement "local_24 = &progress;" (assignment_expression "local_24 = &progress" identifier = (pointer_expression "&progress" & identifier)) ;) (expression_statement "local_30 = exception;" (assignment_expression "local_30 = exception" identifier = identifier) ;) (expression_statement "local_38 = image;" (assignment_expression "local_38 = image" identifier = identifier) ;) (expression_statement "local_34 = method;" (assignment_expression "local_34 = method" identifier = identifier) ;) (expression_statement "local_28 = 1;" (assignment_expression "local_28 = 1" identifier = number_literal) ;) (expression_statement "local_2c = cache_view;" (assignment_expression "local_2c = cache_view" identifier = identifier) ;) (expression_statement "GOMP_parallel(GrayscaleImage__omp_fn_7,&local_38,iVar6,0);" (call_expression "GOMP_parallel(GrayscaleImage__omp_fn_7,&local_38,iVar6,0)" identifier (argument_list "(GrayscaleImage__omp_fn_7,&local_38,iVar6,0)" ( identifier , (pointer_expression "&local_38" & identifier) , identifier , number_literal ))) ;) (expression_statement "DestroyCacheView(cache_view);" (call_expression "DestroyCacheView(cache_view)" identifier (argument_list "(cache_view)" ( identifier ))) ;) (expression_statement "image->type = GrayscaleType;" (assignment_expression "image->type = GrayscaleType" (field_expression "image->type" identifier -> field_identifier) = identifier) ;) (expression_statement "image->intensity = method;" (assignment_expression "image->intensity = method" (field_expression "image->intensity" identifier -> field_identifier) = identifier) ;) (if_statement "if ((method - Rec601LuminancePixelIntensityMethod & 0xfffffffd) == 0) {\n    MVar5 = SetImageColorspace(image,LinearGRAYColorspace,exception);\n  }\n  else {\n    MVar5 = SetImageColorspace(image,GRAYColorspace,exception);\n  }" if (parenthesized_expression "((method - Rec601LuminancePixelIntensityMethod & 0xfffffffd) == 0)" ( (binary_expression "(method - Rec601LuminancePixelIntensityMethod & 0xfffffffd) == 0" (parenthesized_expression "(method - Rec601LuminancePixelIntensityMethod & 0xfffffffd)" ( (binary_expression "method - Rec601LuminancePixelIntensityMethod & 0xfffffffd" (binary_expression "method - Rec601LuminancePixelIntensityMethod" identifier - identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    MVar5 = SetImageColorspace(image,LinearGRAYColorspace,exception);\n  }" { (expression_statement "MVar5 = SetImageColorspace(image,LinearGRAYColorspace,exception);" (assignment_expression "MVar5 = SetImageColorspace(image,LinearGRAYColorspace,exception)" identifier = (call_expression "SetImageColorspace(image,LinearGRAYColorspace,exception)" identifier (argument_list "(image,LinearGRAYColorspace,exception)" ( identifier , identifier , identifier )))) ;) }) (else_clause "else {\n    MVar5 = SetImageColorspace(image,GRAYColorspace,exception);\n  }" else (compound_statement "{\n    MVar5 = SetImageColorspace(image,GRAYColorspace,exception);\n  }" { (expression_statement "MVar5 = SetImageColorspace(image,GRAYColorspace,exception);" (assignment_expression "MVar5 = SetImageColorspace(image,GRAYColorspace,exception)" identifier = (call_expression "SetImageColorspace(image,GRAYColorspace,exception)" identifier (argument_list "(image,GRAYColorspace,exception)" ( identifier , identifier , identifier )))) ;) }))) (labeled_statement "LAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return MVar5;" return identifier ;) })))
(translation_unit "undefined4 GrayscaleImage(int *param_1,int param_2,undefined4 param_3)\n\n{\n  bool bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  undefined8 uVar6;\n  undefined4 local_44;\n  undefined4 local_40;\n  int *local_38;\n  int local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == (int *)0x0) {\n                    \n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (param_1[0xcd1] != -0x54535255) {\n                    \n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }\n  if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }\n  local_44 = 0;\n  local_40 = 0;\n  uVar2 = AcquireAuthenticCacheView(param_1,param_3);\n  iVar3 = GetImagePixelCacheType(param_1);\n  if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }\n  local_24 = &local_44;\n  local_30 = param_3;\n  local_38 = param_1;\n  local_34 = param_2;\n  local_28 = 1;\n  local_2c = uVar2;\n  GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);\n  DestroyCacheView(uVar2);\n  param_1[0x9e] = 2;\n  param_1[0x8b] = param_2;\n  if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_002decd0();\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 GrayscaleImage(int *param_1,int param_2,undefined4 param_3)\n\n{\n  bool bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  undefined8 uVar6;\n  undefined4 local_44;\n  undefined4 local_40;\n  int *local_38;\n  int local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == (int *)0x0) {\n                    \n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (param_1[0xcd1] != -0x54535255) {\n                    \n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }\n  if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }\n  local_44 = 0;\n  local_40 = 0;\n  uVar2 = AcquireAuthenticCacheView(param_1,param_3);\n  iVar3 = GetImagePixelCacheType(param_1);\n  if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }\n  local_24 = &local_44;\n  local_30 = param_3;\n  local_38 = param_1;\n  local_34 = param_2;\n  local_28 = 1;\n  local_2c = uVar2;\n  GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);\n  DestroyCacheView(uVar2);\n  param_1[0x9e] = 2;\n  param_1[0x8b] = param_2;\n  if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_002decd0();\n  }\n  return uVar2;\n}" type_identifier (function_declarator "GrayscaleImage(int *param_1,int param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,int param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  bool bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  undefined8 uVar6;\n  undefined4 local_44;\n  undefined4 local_40;\n  int *local_38;\n  int local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == (int *)0x0) {\n                    \n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (param_1[0xcd1] != -0x54535255) {\n                    \n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }\n  if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }\n  local_44 = 0;\n  local_40 = 0;\n  uVar2 = AcquireAuthenticCacheView(param_1,param_3);\n  iVar3 = GetImagePixelCacheType(param_1);\n  if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }\n  local_24 = &local_44;\n  local_30 = param_3;\n  local_38 = param_1;\n  local_34 = param_2;\n  local_28 = 1;\n  local_2c = uVar2;\n  GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);\n  DestroyCacheView(uVar2);\n  param_1[0x9e] = 2;\n  param_1[0x8b] = param_2;\n  if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_002decd0();\n  }\n  return uVar2;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined8 uVar6;" type_identifier identifier ;) (declaration "undefined4 local_44;" type_identifier identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (declaration "int *local_38;" primitive_type (pointer_declarator "*local_38" * identifier) ;) (declaration "int local_34;" primitive_type identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "undefined4 local_2c;" type_identifier identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "undefined4 *local_24;" type_identifier (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0xc91d9;" (assignment_expression "uStack_14 = 0xc91d9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_1 == (int *)0x0) {\n                    \n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }" if (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }" { (expression_statement "__assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");" (call_expression "__assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage")" identifier (argument_list "("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage")" ( (string_literal ""image != (Image *) NULL"" " string_content ") , (string_literal ""MagickCore/enhance.c"" " string_content ") , number_literal , (string_literal ""GrayscaleImage"" " string_content ") ))) ;) })) (if_statement "if (param_1[0xcd1] != -0x54535255) {\n                    \n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }" if (parenthesized_expression "(param_1[0xcd1] != -0x54535255)" ( (binary_expression "param_1[0xcd1] != -0x54535255" (subscript_expression "param_1[0xcd1]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n                    \n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }" { (expression_statement "__assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");" (call_expression "__assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage")" identifier (argument_list "("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage")" ( (string_literal ""image->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/enhance.c"" " string_content ") , number_literal , (string_literal ""GrayscaleImage"" " string_content ") ))) ;) })) (if_statement "if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }" if (parenthesized_expression "(param_1[0xcca] != 0)" ( (binary_expression "param_1[0xcca] != 0" (subscript_expression "param_1[0xcca]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }" { (expression_statement "LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );" (call_expression "LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  )" identifier (argument_list "(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  )" ( number_literal , (string_literal ""MagickCore/enhance.c"" " string_content ") , (string_literal ""GrayscaleImage"" " string_content ") , number_literal , (pointer_expression "&DAT_002f75ae" & identifier) , (binary_expression "param_1 + 0xc6" identifier + number_literal) ))) ;) })) (if_statement "if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }" if (parenthesized_expression "(*param_1 == 2)" ( (binary_expression "*param_1 == 2" (pointer_expression "*param_1" * identifier) == number_literal) )) (compound_statement "{\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }" { (expression_statement "iVar3 = SyncImage(param_1,param_3);" (assignment_expression "iVar3 = SyncImage(param_1,param_3)" identifier = (call_expression "SyncImage(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000c9378;" goto statement_identifier ;) })) (expression_statement "iVar3 = SetImageStorageClass(param_1,1,param_3);" (assignment_expression "iVar3 = SetImageStorageClass(param_1,1,param_3)" identifier = (call_expression "SetImageStorageClass(param_1,1,param_3)" identifier (argument_list "(param_1,1,param_3)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000c9378;" goto statement_identifier ;) })) })) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" identifier = number_literal) ;) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = AcquireAuthenticCacheView(param_1,param_3);" (assignment_expression "uVar2 = AcquireAuthenticCacheView(param_1,param_3)" identifier = (call_expression "AcquireAuthenticCacheView(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = GetImagePixelCacheType(param_1);" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" identifier = (call_expression "GetImagePixelCacheType(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }" if (parenthesized_expression "(((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3))))" ( (binary_expression "((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))" (parenthesized_expression "((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3))" ( (binary_expression "(iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (parenthesized_expression "(iVar3 == 4)" ( (binary_expression "iVar3 == 4" identifier == number_literal) )) || (parenthesized_expression "(iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" ( (comma_expression "iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" identifier = (call_expression "GetImagePixelCacheType(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar3 == 3" identifier == number_literal)) ))) )) && (parenthesized_expression "((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))" ( (parenthesized_expression "(iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3))" ( (comma_expression "iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" identifier = (call_expression "GetImagePixelCacheType(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (binary_expression "iVar3 == 4" identifier == number_literal) || (parenthesized_expression "(iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" ( (comma_expression "iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" identifier = (call_expression "GetImagePixelCacheType(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar3 == 3" identifier == number_literal)) )))) )) ))) )) (compound_statement "{\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }" { (expression_statement "iVar5 = GetMagickResourceLimit(7);" (assignment_expression "iVar5 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (expression_statement "iVar3 = param_1[7];" (assignment_expression "iVar3 = param_1[7]" identifier = (subscript_expression "param_1[7]" identifier [ number_literal ])) ;) (expression_statement "iVar4 = iVar3 + 0x3f;" (assignment_expression "iVar4 = iVar3 + 0x3f" identifier = (binary_expression "iVar3 + 0x3f" identifier + number_literal)) ;) (if_statement "if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }" if (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) (compound_statement "{\n      iVar4 = iVar3;\n    }" { (expression_statement "iVar4 = iVar3;" (assignment_expression "iVar4 = iVar3" identifier = identifier) ;) })) (expression_statement "bVar1 = 0x7f < iVar3;" (assignment_expression "bVar1 = 0x7f < iVar3" identifier = (binary_expression "0x7f < iVar3" number_literal < identifier)) ;) (if_statement "if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }" if (parenthesized_expression "(iVar5 < iVar4 >> 6)" ( (binary_expression "iVar5 < iVar4 >> 6" identifier < (binary_expression "iVar4 >> 6" identifier >> number_literal)) )) (compound_statement "{\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }" { (expression_statement "iVar3 = GetMagickResourceLimit(7);" (assignment_expression "iVar3 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (expression_statement "bVar1 = 1 < iVar3;" (assignment_expression "bVar1 = 1 < iVar3" identifier = (binary_expression "1 < iVar3" number_literal < identifier)) ;) })) (if_statement "if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }" { (expression_statement "iVar5 = GetMagickResourceLimit(7);" (assignment_expression "iVar5 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (expression_statement "iVar3 = param_1[7];" (assignment_expression "iVar3 = param_1[7]" identifier = (subscript_expression "param_1[7]" identifier [ number_literal ])) ;) (expression_statement "iVar4 = iVar3 + 0x3f;" (assignment_expression "iVar4 = iVar3 + 0x3f" identifier = (binary_expression "iVar3 + 0x3f" identifier + number_literal)) ;) (if_statement "if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }" if (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) (compound_statement "{\n        iVar4 = iVar3;\n      }" { (expression_statement "iVar4 = iVar3;" (assignment_expression "iVar4 = iVar3" identifier = identifier) ;) })) (expression_statement "iVar4 = iVar4 >> 6;" (assignment_expression "iVar4 = iVar4 >> 6" identifier = (binary_expression "iVar4 >> 6" identifier >> number_literal)) ;) (if_statement "if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }" if (parenthesized_expression "(iVar5 < iVar4)" ( (binary_expression "iVar5 < iVar4" identifier < identifier) )) (compound_statement "{\n        iVar4 = GetMagickResourceLimit(7);\n      }" { (expression_statement "iVar4 = GetMagickResourceLimit(7);" (assignment_expression "iVar4 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) })) }) (else_clause "else {\nLAB_000c9305:\n      iVar4 = 1;\n    }" else (compound_statement "{\nLAB_000c9305:\n      iVar4 = 1;\n    }" { (labeled_statement "LAB_000c9305:\n      iVar4 = 1;" statement_identifier : (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;)) }))) }) (else_clause "else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }" else (compound_statement "{\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }" { (expression_statement "uVar6 = GetMagickResourceLimit(7);" (assignment_expression "uVar6 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (if_statement "if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }" if (parenthesized_expression "(((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2))" ( (binary_expression "((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)" (parenthesized_expression "((int)((ulonglong)uVar6 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)uVar6 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar6 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal) )) && (parenthesized_expression "((uint)uVar6 < 2)" ( (binary_expression "(uint)uVar6 < 2" (cast_expression "(uint)uVar6" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) ))) )) (compound_statement "{\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }" { (expression_statement "uVar6 = GetMagickResourceLimit(7);" (assignment_expression "uVar6 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (if_statement "if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;" if (parenthesized_expression "(((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2))" ( (binary_expression "((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)" (parenthesized_expression "((int)((ulonglong)uVar6 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)uVar6 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar6 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal) )) && (parenthesized_expression "((uint)uVar6 < 2)" ( (binary_expression "(uint)uVar6 < 2" (cast_expression "(uint)uVar6" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) ))) )) (goto_statement "goto LAB_000c9305;" goto statement_identifier ;)) })) (expression_statement "uVar6 = GetMagickResourceLimit(7);" (assignment_expression "uVar6 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) (if_statement "if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }" if (parenthesized_expression "(((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2))" ( (binary_expression "((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)" (parenthesized_expression "((int)((ulonglong)uVar6 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)uVar6 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar6 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal) )) && (parenthesized_expression "((uint)uVar6 < 2)" ( (binary_expression "(uint)uVar6 < 2" (cast_expression "(uint)uVar6" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) ))) )) (compound_statement "{\n      iVar4 = GetMagickResourceLimit(7);\n    }" { (expression_statement "iVar4 = GetMagickResourceLimit(7);" (assignment_expression "iVar4 = GetMagickResourceLimit(7)" identifier = (call_expression "GetMagickResourceLimit(7)" identifier (argument_list "(7)" ( number_literal )))) ;) }) (else_clause "else {\n      iVar4 = 2;\n    }" else (compound_statement "{\n      iVar4 = 2;\n    }" { (expression_statement "iVar4 = 2;" (assignment_expression "iVar4 = 2" identifier = number_literal) ;) }))) }))) (expression_statement "local_24 = &local_44;" (assignment_expression "local_24 = &local_44" identifier = (pointer_expression "&local_44" & identifier)) ;) (expression_statement "local_30 = param_3;" (assignment_expression "local_30 = param_3" identifier = identifier) ;) (expression_statement "local_38 = param_1;" (assignment_expression "local_38 = param_1" identifier = identifier) ;) (expression_statement "local_34 = param_2;" (assignment_expression "local_34 = param_2" identifier = identifier) ;) (expression_statement "local_28 = 1;" (assignment_expression "local_28 = 1" identifier = number_literal) ;) (expression_statement "local_2c = uVar2;" (assignment_expression "local_2c = uVar2" identifier = identifier) ;) (expression_statement "GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);" (call_expression "GOMP_parallel(FUN_000bd900,&local_38,iVar4,0)" identifier (argument_list "(FUN_000bd900,&local_38,iVar4,0)" ( identifier , (pointer_expression "&local_38" & identifier) , identifier , number_literal ))) ;) (expression_statement "DestroyCacheView(uVar2);" (call_expression "DestroyCacheView(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "param_1[0x9e] = 2;" (assignment_expression "param_1[0x9e] = 2" (subscript_expression "param_1[0x9e]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[0x8b] = param_2;" (assignment_expression "param_1[0x8b] = param_2" (subscript_expression "param_1[0x8b]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }" if (parenthesized_expression "((param_2 - 6U & 0xfffffffd) == 0)" ( (binary_expression "(param_2 - 6U & 0xfffffffd) == 0" (parenthesized_expression "(param_2 - 6U & 0xfffffffd)" ( (binary_expression "param_2 - 6U & 0xfffffffd" (binary_expression "param_2 - 6U" identifier - number_literal) & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }" { (expression_statement "uVar2 = SetImageColorspace(param_1,0x21,param_3);" (assignment_expression "uVar2 = SetImageColorspace(param_1,0x21,param_3)" identifier = (call_expression "SetImageColorspace(param_1,0x21,param_3)" identifier (argument_list "(param_1,0x21,param_3)" ( identifier , number_literal , identifier )))) ;) }) (else_clause "else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }" else (compound_statement "{\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }" { (expression_statement "uVar2 = SetImageColorspace(param_1,3,param_3);" (assignment_expression "uVar2 = SetImageColorspace(param_1,3,param_3)" identifier = (call_expression "SetImageColorspace(param_1,3,param_3)" identifier (argument_list "(param_1,3,param_3)" ( identifier , number_literal , identifier )))) ;) }))) (labeled_statement "LAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_002decd0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_002decd0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_002decd0();\n  }" { (expression_statement "FUN_002decd0();" (call_expression "FUN_002decd0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , (pointer_expression & IDENT) , (binary_expression IDENT + LIT) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression IDENT == LIT)) ))) )) && (parenthesized_expression ( (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression (binary_expression IDENT == LIT) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression IDENT == LIT)) )))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression LIT < IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT >> LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression LIT < IDENT)) ;) })) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) })) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) == LIT) )) && (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) == LIT) )) && (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) ))) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) == LIT) )) && (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) }))) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT )))) ;) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 GrayscaleImage(int *param_1,int param_2,undefined4 param_3)\n\n{\n  bool bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  undefined8 uVar6;\n  undefined4 local_44;\n  undefined4 local_40;\n  int *local_38;\n  int local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == (int *)0x0) {\n                    \n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (param_1[0xcd1] != -0x54535255) {\n                    \n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }\n  if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }\n  local_44 = 0;\n  local_40 = 0;\n  uVar2 = AcquireAuthenticCacheView(param_1,param_3);\n  iVar3 = GetImagePixelCacheType(param_1);\n  if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }\n  local_24 = &local_44;\n  local_30 = param_3;\n  local_38 = param_1;\n  local_34 = param_2;\n  local_28 = 1;\n  local_2c = uVar2;\n  GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);\n  DestroyCacheView(uVar2);\n  param_1[0x9e] = 2;\n  param_1[0x8b] = param_2;\n  if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_002decd0();\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "GrayscaleImage(int *param_1,int param_2,undefined4 param_3)" (identifier "GrayscaleImage") (parameter_list "(int *param_1,int param_2,undefined4 param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  bool bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  undefined8 uVar6;\n  undefined4 local_44;\n  undefined4 local_40;\n  int *local_38;\n  int local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xc91d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == (int *)0x0) {\n                    \n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }\n  if (param_1[0xcd1] != -0x54535255) {\n                    \n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }\n  if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }\n  if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }\n  local_44 = 0;\n  local_40 = 0;\n  uVar2 = AcquireAuthenticCacheView(param_1,param_3);\n  iVar3 = GetImagePixelCacheType(param_1);\n  if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }\n  local_24 = &local_44;\n  local_30 = param_3;\n  local_38 = param_1;\n  local_34 = param_2;\n  local_28 = 1;\n  local_2c = uVar2;\n  GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);\n  DestroyCacheView(uVar2);\n  param_1[0x9e] = 2;\n  param_1[0x8b] = param_2;\n  if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }\nLAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_002decd0();\n  }\n  return uVar2;\n}" ({ "{") (declaration "bool bVar1;" (primitive_type "bool") (identifier "bVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined8 uVar6;" (type_identifier "undefined8") (identifier "uVar6") (; ";")) (declaration "undefined4 local_44;" (type_identifier "undefined4") (identifier "local_44") (; ";")) (declaration "undefined4 local_40;" (type_identifier "undefined4") (identifier "local_40") (; ";")) (declaration "int *local_38;" (primitive_type "int") (pointer_declarator "*local_38" (* "*") (identifier "local_38")) (; ";")) (declaration "int local_34;" (primitive_type "int") (identifier "local_34") (; ";")) (declaration "undefined4 local_30;" (type_identifier "undefined4") (identifier "local_30") (; ";")) (declaration "undefined4 local_2c;" (type_identifier "undefined4") (identifier "local_2c") (; ";")) (declaration "undefined4 local_28;" (type_identifier "undefined4") (identifier "local_28") (; ";")) (declaration "undefined4 *local_24;" (type_identifier "undefined4") (pointer_declarator "*local_24" (* "*") (identifier "local_24")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0xc91d9;" (assignment_expression "uStack_14 = 0xc91d9" (identifier "uStack_14") (= "=") (number_literal "0xc91d9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (param_1 == (int *)0x0) {\n                    \n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }" (if "if") (parenthesized_expression "(param_1 == (int *)0x0)" (( "(") (binary_expression "param_1 == (int *)0x0" (identifier "param_1") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");\n  }" ({ "{") (expression_statement "__assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");" (call_expression "__assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage")" (identifier "__assert_fail") (argument_list "("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage")" (( "(") (string_literal ""image != (Image *) NULL"" (" """) (string_content "image != (Image *) NULL") (" """)) (, ",") (string_literal ""MagickCore/enhance.c"" (" """) (string_content "MagickCore/enhance.c") (" """)) (, ",") (number_literal "0x9b0") (, ",") (string_literal ""GrayscaleImage"" (" """) (string_content "GrayscaleImage") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (param_1[0xcd1] != -0x54535255) {\n                    \n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }" (if "if") (parenthesized_expression "(param_1[0xcd1] != -0x54535255)" (( "(") (binary_expression "param_1[0xcd1] != -0x54535255" (subscript_expression "param_1[0xcd1]" (identifier "param_1") ([ "[") (number_literal "0xcd1") (] "]")) (!= "!=") (number_literal "-0x54535255")) () ")")) (compound_statement "{\n                    \n    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");\n  }" ({ "{") (expression_statement "__assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage");" (call_expression "__assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage")" (identifier "__assert_fail") (argument_list "("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,\n                  "GrayscaleImage")" (( "(") (string_literal ""image->signature == MagickCoreSignature"" (" """) (string_content "image->signature == MagickCoreSignature") (" """)) (, ",") (string_literal ""MagickCore/enhance.c"" (" """) (string_content "MagickCore/enhance.c") (" """)) (, ",") (number_literal "0x9b1") (, ",") (string_literal ""GrayscaleImage"" (" """) (string_content "GrayscaleImage") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (param_1[0xcca] != 0) {\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }" (if "if") (parenthesized_expression "(param_1[0xcca] != 0)" (( "(") (binary_expression "param_1[0xcca] != 0" (subscript_expression "param_1[0xcca]" (identifier "param_1") ([ "[") (number_literal "0xcca") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );\n  }" ({ "{") (expression_statement "LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  );" (call_expression "LogMagickEvent(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  )" (identifier "LogMagickEvent") (argument_list "(0x8000,"MagickCore/enhance.c","GrayscaleImage",0x9b3,&DAT_002f75ae,param_1 + 0xc6\n                  )" (( "(") (number_literal "0x8000") (, ",") (string_literal ""MagickCore/enhance.c"" (" """) (string_content "MagickCore/enhance.c") (" """)) (, ",") (string_literal ""GrayscaleImage"" (" """) (string_content "GrayscaleImage") (" """)) (, ",") (number_literal "0x9b3") (, ",") (pointer_expression "&DAT_002f75ae" (& "&") (identifier "DAT_002f75ae")) (, ",") (binary_expression "param_1 + 0xc6" (identifier "param_1") (+ "+") (number_literal "0xc6")) () ")"))) (; ";")) (} "}"))) (if_statement "if (*param_1 == 2) {\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }" (if "if") (parenthesized_expression "(*param_1 == 2)" (( "(") (binary_expression "*param_1 == 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (number_literal "2")) () ")")) (compound_statement "{\n    iVar3 = SyncImage(param_1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n    iVar3 = SetImageStorageClass(param_1,1,param_3);\n    if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }\n  }" ({ "{") (expression_statement "iVar3 = SyncImage(param_1,param_3);" (assignment_expression "iVar3 = SyncImage(param_1,param_3)" (identifier "iVar3") (= "=") (call_expression "SyncImage(param_1,param_3)" (identifier "SyncImage") (argument_list "(param_1,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_000c9378;" (goto "goto") (statement_identifier "LAB_000c9378") (; ";")) (} "}"))) (expression_statement "iVar3 = SetImageStorageClass(param_1,1,param_3);" (assignment_expression "iVar3 = SetImageStorageClass(param_1,1,param_3)" (identifier "iVar3") (= "=") (call_expression "SetImageStorageClass(param_1,1,param_3)" (identifier "SetImageStorageClass") (argument_list "(param_1,1,param_3)" (( "(") (identifier "param_1") (, ",") (number_literal "1") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = 0;\n      goto LAB_000c9378;\n    }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_000c9378;" (goto "goto") (statement_identifier "LAB_000c9378") (; ";")) (} "}"))) (} "}"))) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" (identifier "local_44") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" (identifier "local_40") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = AcquireAuthenticCacheView(param_1,param_3);" (assignment_expression "uVar2 = AcquireAuthenticCacheView(param_1,param_3)" (identifier "uVar2") (= "=") (call_expression "AcquireAuthenticCacheView(param_1,param_3)" (identifier "AcquireAuthenticCacheView") (argument_list "(param_1,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "iVar3 = GetImagePixelCacheType(param_1);" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" (identifier "iVar3") (= "=") (call_expression "GetImagePixelCacheType(param_1)" (identifier "GetImagePixelCacheType") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }\n  else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }" (if "if") (parenthesized_expression "(((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3))))" (( "(") (binary_expression "((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&\n     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))" (parenthesized_expression "((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3))" (( "(") (binary_expression "(iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (parenthesized_expression "(iVar3 == 4)" (( "(") (binary_expression "iVar3 == 4" (identifier "iVar3") (== "==") (number_literal "4")) () ")")) (|| "||") (parenthesized_expression "(iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (( "(") (comma_expression "iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" (identifier "iVar3") (= "=") (call_expression "GetImagePixelCacheType(param_1)" (identifier "GetImagePixelCacheType") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (, ",") (binary_expression "iVar3 == 3" (identifier "iVar3") (== "==") (number_literal "3"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))" (( "(") (parenthesized_expression "(iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3))" (( "(") (comma_expression "iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" (identifier "iVar3") (= "=") (call_expression "GetImagePixelCacheType(param_1)" (identifier "GetImagePixelCacheType") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (, ",") (binary_expression "iVar3 == 4 ||\n      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (binary_expression "iVar3 == 4" (identifier "iVar3") (== "==") (number_literal "4")) (|| "||") (parenthesized_expression "(iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)" (( "(") (comma_expression "iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3" (assignment_expression "iVar3 = GetImagePixelCacheType(param_1)" (identifier "iVar3") (= "=") (call_expression "GetImagePixelCacheType(param_1)" (identifier "GetImagePixelCacheType") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (, ",") (binary_expression "iVar3 == 3" (identifier "iVar3") (== "==") (number_literal "3"))) () ")")))) () ")")) () ")"))) () ")")) (compound_statement "{\n    iVar5 = GetMagickResourceLimit(7);\n    iVar3 = param_1[7];\n    iVar4 = iVar3 + 0x3f;\n    if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }\n    bVar1 = 0x7f < iVar3;\n    if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }\n    if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }\n  }" ({ "{") (expression_statement "iVar5 = GetMagickResourceLimit(7);" (assignment_expression "iVar5 = GetMagickResourceLimit(7)" (identifier "iVar5") (= "=") (call_expression "GetMagickResourceLimit(7)" (identifier "GetMagickResourceLimit") (argument_list "(7)" (( "(") (number_literal "7") () ")")))) (; ";")) (expression_statement "iVar3 = param_1[7];" (assignment_expression "iVar3 = param_1[7]" (identifier "iVar3") (= "=") (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]"))) (; ";")) (expression_statement "iVar4 = iVar3 + 0x3f;" (assignment_expression "iVar4 = iVar3 + 0x3f" (identifier "iVar4") (= "=") (binary_expression "iVar3 + 0x3f" (identifier "iVar3") (+ "+") (number_literal "0x3f"))) (; ";")) (if_statement "if (-1 < iVar3) {\n      iVar4 = iVar3;\n    }" (if "if") (parenthesized_expression "(-1 < iVar3)" (( "(") (binary_expression "-1 < iVar3" (number_literal "-1") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n      iVar4 = iVar3;\n    }" ({ "{") (expression_statement "iVar4 = iVar3;" (assignment_expression "iVar4 = iVar3" (identifier "iVar4") (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (expression_statement "bVar1 = 0x7f < iVar3;" (assignment_expression "bVar1 = 0x7f < iVar3" (identifier "bVar1") (= "=") (binary_expression "0x7f < iVar3" (number_literal "0x7f") (< "<") (identifier "iVar3"))) (; ";")) (if_statement "if (iVar5 < iVar4 >> 6) {\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }" (if "if") (parenthesized_expression "(iVar5 < iVar4 >> 6)" (( "(") (binary_expression "iVar5 < iVar4 >> 6" (identifier "iVar5") (< "<") (binary_expression "iVar4 >> 6" (identifier "iVar4") (>> ">>") (number_literal "6"))) () ")")) (compound_statement "{\n      iVar3 = GetMagickResourceLimit(7);\n      bVar1 = 1 < iVar3;\n    }" ({ "{") (expression_statement "iVar3 = GetMagickResourceLimit(7);" (assignment_expression "iVar3 = GetMagickResourceLimit(7)" (identifier "iVar3") (= "=") (call_expression "GetMagickResourceLimit(7)" (identifier "GetMagickResourceLimit") (argument_list "(7)" (( "(") (number_literal "7") () ")")))) (; ";")) (expression_statement "bVar1 = 1 < iVar3;" (assignment_expression "bVar1 = 1 < iVar3" (identifier "bVar1") (= "=") (binary_expression "1 < iVar3" (number_literal "1") (< "<") (identifier "iVar3"))) (; ";")) (} "}"))) (if_statement "if (bVar1) {\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }\n    else {\nLAB_000c9305:\n      iVar4 = 1;\n    }" (if "if") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (compound_statement "{\n      iVar5 = GetMagickResourceLimit(7);\n      iVar3 = param_1[7];\n      iVar4 = iVar3 + 0x3f;\n      if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }\n      iVar4 = iVar4 >> 6;\n      if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }\n    }" ({ "{") (expression_statement "iVar5 = GetMagickResourceLimit(7);" (assignment_expression "iVar5 = GetMagickResourceLimit(7)" (identifier "iVar5") (= "=") (call_expression "GetMagickResourceLimit(7)" (identifier "GetMagickResourceLimit") (argument_list "(7)" (( "(") (number_literal "7") () ")")))) (; ";")) (expression_statement "iVar3 = param_1[7];" (assignment_expression "iVar3 = param_1[7]" (identifier "iVar3") (= "=") (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]"))) (; ";")) (expression_statement "iVar4 = iVar3 + 0x3f;" (assignment_expression "iVar4 = iVar3 + 0x3f" (identifier "iVar4") (= "=") (binary_expression "iVar3 + 0x3f" (identifier "iVar3") (+ "+") (number_literal "0x3f"))) (; ";")) (if_statement "if (-1 < iVar3) {\n        iVar4 = iVar3;\n      }" (if "if") (parenthesized_expression "(-1 < iVar3)" (( "(") (binary_expression "-1 < iVar3" (number_literal "-1") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n        iVar4 = iVar3;\n      }" ({ "{") (expression_statement "iVar4 = iVar3;" (assignment_expression "iVar4 = iVar3" (identifier "iVar4") (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (expression_statement "iVar4 = iVar4 >> 6;" (assignment_expression "iVar4 = iVar4 >> 6" (identifier "iVar4") (= "=") (binary_expression "iVar4 >> 6" (identifier "iVar4") (>> ">>") (number_literal "6"))) (; ";")) (if_statement "if (iVar5 < iVar4) {\n        iVar4 = GetMagickResourceLimit(7);\n      }" (if "if") (parenthesized_expression "(iVar5 < iVar4)" (( "(") (binary_expression "iVar5 < iVar4" (identifier "iVar5") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n        iVar4 = GetMagickResourceLimit(7);\n      }" ({ "{") (expression_statement "iVar4 = GetMagickResourceLimit(7);" (assignment_expression "iVar4 = GetMagickResourceLimit(7)" (identifier "iVar4") (= "=") (call_expression "GetMagickResourceLimit(7)" (identifier "GetMagickResourceLimit") (argument_list "(7)" (( "(") (number_literal "7") () ")")))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\nLAB_000c9305:\n      iVar4 = 1;\n    }" (else "else") (compound_statement "{\nLAB_000c9305:\n      iVar4 = 1;\n    }" ({ "{") (labeled_statement "LAB_000c9305:\n      iVar4 = 1;" (statement_identifier "LAB_000c9305") (: ":") (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" (identifier "iVar4") (= "=") (number_literal "1")) (; ";"))) (} "}")))) (} "}")) (else_clause "else {\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }" (else "else") (compound_statement "{\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }\n    uVar6 = GetMagickResourceLimit(7);\n    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }\n  }" ({ "{") (expression_statement "uVar6 = GetMagickResourceLimit(7);" (assignment_expression "uVar6 = GetMagickResourceLimit(7)" (identifier "uVar6") (= "=") (call_expression "GetMagickResourceLimit(7)" (identifier "GetMagickResourceLimit") (argument_list "(7)" (( "(") (number_literal "7") () ")")))) (; ";")) (if_statement "if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }" (if "if") (parenthesized_expression "(((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2))" (( "(") (binary_expression "((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)" (parenthesized_expression "((int)((ulonglong)uVar6 >> 0x20) == 0)" (( "(") (binary_expression "(int)((ulonglong)uVar6 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar6 >> 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar6")) (>> ">>") (number_literal "0x20")) () ")"))) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((uint)uVar6 < 2)" (( "(") (binary_expression "(uint)uVar6 < 2" (cast_expression "(uint)uVar6" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar6")) (< "<") (number_literal "2")) () ")"))) () ")")) (compound_statement "{\n      uVar6 = GetMagickResourceLimit(7);\n      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;\n    }" ({ "{") (expression_statement "uVar6 = GetMagickResourceLimit(7);" (assignment_expression "uVar6 = GetMagickResourceLimit(7)" (identifier "uVar6") (= "=") (call_expression "GetMagickResourceLimit(7)" (identifier "GetMagickResourceLimit") (argument_list "(7)" (( "(") (number_literal "7") () ")")))) (; ";")) (if_statement "if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;" (if "if") (parenthesized_expression "(((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2))" (( "(") (binary_expression "((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)" (parenthesized_expression "((int)((ulonglong)uVar6 >> 0x20) == 0)" (( "(") (binary_expression "(int)((ulonglong)uVar6 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar6 >> 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar6")) (>> ">>") (number_literal "0x20")) () ")"))) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((uint)uVar6 < 2)" (( "(") (binary_expression "(uint)uVar6 < 2" (cast_expression "(uint)uVar6" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar6")) (< "<") (number_literal "2")) () ")"))) () ")")) (goto_statement "goto LAB_000c9305;" (goto "goto") (statement_identifier "LAB_000c9305") (; ";"))) (} "}"))) (expression_statement "uVar6 = GetMagickResourceLimit(7);" (assignment_expression "uVar6 = GetMagickResourceLimit(7)" (identifier "uVar6") (= "=") (call_expression "GetMagickResourceLimit(7)" (identifier "GetMagickResourceLimit") (argument_list "(7)" (( "(") (number_literal "7") () ")")))) (; ";")) (if_statement "if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {\n      iVar4 = GetMagickResourceLimit(7);\n    }\n    else {\n      iVar4 = 2;\n    }" (if "if") (parenthesized_expression "(((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2))" (( "(") (binary_expression "((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)" (parenthesized_expression "((int)((ulonglong)uVar6 >> 0x20) == 0)" (( "(") (binary_expression "(int)((ulonglong)uVar6 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar6 >> 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar6")) (>> ">>") (number_literal "0x20")) () ")"))) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((uint)uVar6 < 2)" (( "(") (binary_expression "(uint)uVar6 < 2" (cast_expression "(uint)uVar6" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar6")) (< "<") (number_literal "2")) () ")"))) () ")")) (compound_statement "{\n      iVar4 = GetMagickResourceLimit(7);\n    }" ({ "{") (expression_statement "iVar4 = GetMagickResourceLimit(7);" (assignment_expression "iVar4 = GetMagickResourceLimit(7)" (identifier "iVar4") (= "=") (call_expression "GetMagickResourceLimit(7)" (identifier "GetMagickResourceLimit") (argument_list "(7)" (( "(") (number_literal "7") () ")")))) (; ";")) (} "}")) (else_clause "else {\n      iVar4 = 2;\n    }" (else "else") (compound_statement "{\n      iVar4 = 2;\n    }" ({ "{") (expression_statement "iVar4 = 2;" (assignment_expression "iVar4 = 2" (identifier "iVar4") (= "=") (number_literal "2")) (; ";")) (} "}")))) (} "}")))) (expression_statement "local_24 = &local_44;" (assignment_expression "local_24 = &local_44" (identifier "local_24") (= "=") (pointer_expression "&local_44" (& "&") (identifier "local_44"))) (; ";")) (expression_statement "local_30 = param_3;" (assignment_expression "local_30 = param_3" (identifier "local_30") (= "=") (identifier "param_3")) (; ";")) (expression_statement "local_38 = param_1;" (assignment_expression "local_38 = param_1" (identifier "local_38") (= "=") (identifier "param_1")) (; ";")) (expression_statement "local_34 = param_2;" (assignment_expression "local_34 = param_2" (identifier "local_34") (= "=") (identifier "param_2")) (; ";")) (expression_statement "local_28 = 1;" (assignment_expression "local_28 = 1" (identifier "local_28") (= "=") (number_literal "1")) (; ";")) (expression_statement "local_2c = uVar2;" (assignment_expression "local_2c = uVar2" (identifier "local_2c") (= "=") (identifier "uVar2")) (; ";")) (expression_statement "GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);" (call_expression "GOMP_parallel(FUN_000bd900,&local_38,iVar4,0)" (identifier "GOMP_parallel") (argument_list "(FUN_000bd900,&local_38,iVar4,0)" (( "(") (identifier "FUN_000bd900") (, ",") (pointer_expression "&local_38" (& "&") (identifier "local_38")) (, ",") (identifier "iVar4") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "DestroyCacheView(uVar2);" (call_expression "DestroyCacheView(uVar2)" (identifier "DestroyCacheView") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "param_1[0x9e] = 2;" (assignment_expression "param_1[0x9e] = 2" (subscript_expression "param_1[0x9e]" (identifier "param_1") ([ "[") (number_literal "0x9e") (] "]")) (= "=") (number_literal "2")) (; ";")) (expression_statement "param_1[0x8b] = param_2;" (assignment_expression "param_1[0x8b] = param_2" (subscript_expression "param_1[0x8b]" (identifier "param_1") ([ "[") (number_literal "0x8b") (] "]")) (= "=") (identifier "param_2")) (; ";")) (if_statement "if ((param_2 - 6U & 0xfffffffd) == 0) {\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }\n  else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }" (if "if") (parenthesized_expression "((param_2 - 6U & 0xfffffffd) == 0)" (( "(") (binary_expression "(param_2 - 6U & 0xfffffffd) == 0" (parenthesized_expression "(param_2 - 6U & 0xfffffffd)" (( "(") (binary_expression "param_2 - 6U & 0xfffffffd" (binary_expression "param_2 - 6U" (identifier "param_2") (- "-") (number_literal "6U")) (& "&") (number_literal "0xfffffffd")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = SetImageColorspace(param_1,0x21,param_3);\n  }" ({ "{") (expression_statement "uVar2 = SetImageColorspace(param_1,0x21,param_3);" (assignment_expression "uVar2 = SetImageColorspace(param_1,0x21,param_3)" (identifier "uVar2") (= "=") (call_expression "SetImageColorspace(param_1,0x21,param_3)" (identifier "SetImageColorspace") (argument_list "(param_1,0x21,param_3)" (( "(") (identifier "param_1") (, ",") (number_literal "0x21") (, ",") (identifier "param_3") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }" (else "else") (compound_statement "{\n    uVar2 = SetImageColorspace(param_1,3,param_3);\n  }" ({ "{") (expression_statement "uVar2 = SetImageColorspace(param_1,3,param_3);" (assignment_expression "uVar2 = SetImageColorspace(param_1,3,param_3)" (identifier "uVar2") (= "=") (call_expression "SetImageColorspace(param_1,3,param_3)" (identifier "SetImageColorspace") (argument_list "(param_1,3,param_3)" (( "(") (identifier "param_1") (, ",") (number_literal "3") (, ",") (identifier "param_3") () ")")))) (; ";")) (} "}")))) (labeled_statement "LAB_000c9378:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_002decd0();\n  }" (statement_identifier "LAB_000c9378") (: ":") (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_002decd0();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_002decd0();\n  }" ({ "{") (expression_statement "FUN_002decd0();" (call_expression "FUN_002decd0()" (identifier "FUN_002decd0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": Some values do not have unique names */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "PixelChannel": Some values do not have unique names */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */
/* WARNING: Enum "LogEventType": Some values do not have unique names */

type_1 function_1(type_2 *var_2,type_3 var_21,type_4 *exception)

{
  size_t var_16;
  bool bVar2;
  type_5 *cache_view;
  type_6 var_12;
  size_t sVar4;
  type_1 var_8;
  int var_17;
  int var_1;
  type_7 var_18;
  type_8 progress;
  type_2 *local_38;
  type_3 local_34;
  type_4 *local_30;
  type_5 *local_2c;
  type_9 local_28;
  type_8 *local_24;
  int var_24;
  type_9 uStack_14;
  
  uStack_14 = 0xc91d9;
  var_24 = *(int *)(var_1 + 0x14);
  if (var_2 == (type_2 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"GrayscaleImage");
  }
  if (var_2->signature != 0xabacadab) {
                    /* WARNING: Subroutine does not return */
    var_3("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,
                  "GrayscaleImage");
  }
  if (var_2->debug != var_4) {
    var_5(TraceEvent,"MagickCore/enhance.c","GrayscaleImage",0x9b3,"%s",var_2->filename);
  }
  if (var_2->storage_class == var_6) {
    var_8 = var_7(var_2,exception);
    if (var_8 == var_4) {
      var_8 = var_4;
      goto LAB_000c9378;
    }
    var_8 = var_9(var_2,DirectClass,exception);
    if (var_8 == var_4) {
      var_8 = var_4;
      goto LAB_000c9378;
    }
  }
  progress._0_4_ = 0;
  progress._4_4_ = 0;
  cache_view = var_10(var_2,exception);
  var_12 = var_11(var_2);
  if (((var_12 == var_13) || (var_12 = var_11(var_2), var_12 == var_14)) &&
     ((var_12 = var_11(var_2), var_12 == var_13 ||
      (var_12 = var_11(var_2), var_12 == var_14)))) {
    var_18 = var_15(ThreadResource);
    var_16 = var_2->rows;
    sVar4 = var_16 + 0x3f;
    if (-1 < (int)var_16) {
      sVar4 = var_16;
    }
    bVar2 = 0x7f < (int)var_16;
    if ((int)var_18 < (int)sVar4 >> 6) {
      var_18 = var_15(ThreadResource);
      bVar2 = 1 < (int)var_18;
    }
    if (bVar2) {
      var_18 = var_15(ThreadResource);
      var_16 = var_2->rows;
      sVar4 = var_16 + 0x3f;
      if (-1 < (int)var_16) {
        sVar4 = var_16;
      }
      var_17 = (int)sVar4 >> 6;
      if ((int)var_18 < var_17) {
        var_18 = var_15(ThreadResource);
        var_17 = (int)var_18;
      }
    }
    else {
LAB_000c9305:
      var_17 = 1;
    }
  }
  else {
    var_18 = var_15(ThreadResource);
    if (((int)(var_18 >> 0x20) == 0) && ((type_10)var_18 < 2)) {
      var_18 = var_15(ThreadResource);
      if (((int)(var_18 >> 0x20) == 0) && ((type_10)var_18 < 2)) goto LAB_000c9305;
    }
    var_18 = var_15(ThreadResource);
    if (((int)(var_18 >> 0x20) == 0) && ((type_10)var_18 < 2)) {
      var_18 = var_15(ThreadResource);
      var_17 = (int)var_18;
    }
    else {
      var_17 = 2;
    }
  }
  local_24 = &progress;
  local_30 = exception;
  local_38 = var_2;
  local_34 = var_21;
  local_28 = 1;
  local_2c = cache_view;
  var_19(GrayscaleImage__omp_fn_7,&local_38,var_17,0);
  var_20(cache_view);
  var_2->type = GrayscaleType;
  var_2->intensity = var_21;
  if ((var_21 - var_22 & 0xfffffffd) == 0) {
    var_8 = var_23(var_2,LinearGRAYColorspace,exception);
  }
  else {
    var_8 = var_23(var_2,GRAYColorspace,exception);
  }
LAB_000c9378:
  if (var_24 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_25();
  }
  return var_8;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content)) (string_literal (string_content)) (number_literal) (pointer_expression argument: (identifier)) (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (parenthesized_expression (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (number_literal) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (number_literal) right: (identifier)))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal)))))))) alternative: (else_clause (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))))) consequence: (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (identifier) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier)))))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 MASKED(int *param_1,int param_2,undefined4 param_3)

{
  bool bVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int in_GS_OFFSET;
  undefined8 uVar6;
  undefined4 local_44;
  undefined4 local_40;
  int *local_38;
  int local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0xc91d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image != (Image *) NULL","MagickCore/enhance.c",0x9b0,"MASKED");
  }
  if (param_1[0xcd1] != -0x54535255) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image->signature == MagickCoreSignature","MagickCore/enhance.c",0x9b1,
                  "MASKED");
  }
  if (param_1[0xcca] != 0) {
    LogMagickEvent(0x8000,"MagickCore/enhance.c","MASKED",0x9b3,&DAT_002f75ae,param_1 + 0xc6
                  );
  }
  if (*param_1 == 2) {
    iVar3 = SyncImage(param_1,param_3);
    if (iVar3 == 0) {
      uVar2 = 0;
      goto LAB_000c9378;
    }
    iVar3 = SetImageStorageClass(param_1,1,param_3);
    if (iVar3 == 0) {
      uVar2 = 0;
      goto LAB_000c9378;
    }
  }
  local_44 = 0;
  local_40 = 0;
  uVar2 = AcquireAuthenticCacheView(param_1,param_3);
  iVar3 = GetImagePixelCacheType(param_1);
  if (((iVar3 == 4) || (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)) &&
     ((iVar3 = GetImagePixelCacheType(param_1), iVar3 == 4 ||
      (iVar3 = GetImagePixelCacheType(param_1), iVar3 == 3)))) {
    iVar5 = GetMagickResourceLimit(7);
    iVar3 = param_1[7];
    iVar4 = iVar3 + 0x3f;
    if (-1 < iVar3) {
      iVar4 = iVar3;
    }
    bVar1 = 0x7f < iVar3;
    if (iVar5 < iVar4 >> 6) {
      iVar3 = GetMagickResourceLimit(7);
      bVar1 = 1 < iVar3;
    }
    if (bVar1) {
      iVar5 = GetMagickResourceLimit(7);
      iVar3 = param_1[7];
      iVar4 = iVar3 + 0x3f;
      if (-1 < iVar3) {
        iVar4 = iVar3;
      }
      iVar4 = iVar4 >> 6;
      if (iVar5 < iVar4) {
        iVar4 = GetMagickResourceLimit(7);
      }
    }
    else {
LAB_000c9305:
      iVar4 = 1;
    }
  }
  else {
    uVar6 = GetMagickResourceLimit(7);
    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {
      uVar6 = GetMagickResourceLimit(7);
      if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) goto LAB_000c9305;
    }
    uVar6 = GetMagickResourceLimit(7);
    if (((int)((ulonglong)uVar6 >> 0x20) == 0) && ((uint)uVar6 < 2)) {
      iVar4 = GetMagickResourceLimit(7);
    }
    else {
      iVar4 = 2;
    }
  }
  local_24 = &local_44;
  local_30 = param_3;
  local_38 = param_1;
  local_34 = param_2;
  local_28 = 1;
  local_2c = uVar2;
  GOMP_parallel(FUN_000bd900,&local_38,iVar4,0);
  DestroyCacheView(uVar2);
  param_1[0x9e] = 2;
  param_1[0x8b] = param_2;
  if ((param_2 - 6U & 0xfffffffd) == 0) {
    uVar2 = SetImageColorspace(param_1,0x21,param_3);
  }
  else {
    uVar2 = SetImageColorspace(param_1,3,param_3);
  }
LAB_000c9378:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_002decd0();
  }
  return uVar2;
}

