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

ColorInfo ** GetColorInfoList(char *pattern,size_t *number_colors,ExceptionInfo *exception)

{
  ColorInfo *pCVar1;
  size_t sVar2;
  ColorInfo **__base;
  MagickBooleanType MVar3;
  ColorInfo **ppCVar4;
  size_t local_28;
  
  if (pattern == (char *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");
  }
  LogMagickEvent(TraceEvent,"MagickCore/color.c","GetColorInfoList",0x512,"%s",pattern);
  if (number_colors != (size_t *)0x0) {
    *number_colors = 0;
    pCVar1 = GetColorInfo("*",exception);
    if (pCVar1 != (ColorInfo *)0x0) {
      sVar2 = GetNumberOfElementsInLinkedList(color_cache);
      __base = (ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4);
      if (__base != (ColorInfo **)0x0) {
        LockSemaphoreInfo(color_semaphore);
        ResetLinkedListIterator(color_cache);
        pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);
        if (pCVar1 == (ColorInfo *)0x0) {
          local_28 = 0;
          ppCVar4 = __base;
        }
        else {
          local_28 = 0;
          do {
            ppCVar4 = __base + local_28;
            if (pCVar1->stealth == MagickFalse) {
              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);
              if (MVar3 != MagickFalse) {
                *ppCVar4 = pCVar1;
                ppCVar4 = __base + local_28 + 1;
                local_28 = local_28 + 1;
              }
            }
            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);
          } while (pCVar1 != (ColorInfo *)0x0);
        }
        UnlockSemaphoreInfo(color_semaphore);
        qsort(__base,local_28,4,ColorInfoCompare);
        *ppCVar4 = (ColorInfo *)0x0;
        *number_colors = local_28;
        return __base;
      }
    }
    return (ColorInfo **)0x0;
  }
                    /* WARNING: Subroutine does not return */
  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");
}



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

int * GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)

{
  int iVar1;
  int *__base;
  int iVar2;
  int *piVar3;
  size_t local_28;
  
  if (param_1 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");
  }
  LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);
  if (param_2 != (size_t *)0x0) {
    *param_2 = 0;
    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);
    if (iVar1 != 0) {
      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);
      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);
      if (__base != (int *)0x0) {
        LockSemaphoreInfo(DAT_00422788);
        ResetLinkedListIterator(DAT_0042278c);
        iVar1 = GetNextValueInLinkedList(DAT_0042278c);
        if (iVar1 == 0) {
          local_28 = 0;
          piVar3 = __base;
        }
        else {
          local_28 = 0;
          do {
            piVar3 = __base + local_28;
            if (*(int *)(iVar1 + 0x60) == 0) {
              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);
              if (iVar2 != 0) {
                *piVar3 = iVar1;
                piVar3 = __base + local_28 + 1;
                local_28 = local_28 + 1;
              }
            }
            iVar1 = GetNextValueInLinkedList(DAT_0042278c);
          } while (iVar1 != 0);
        }
        UnlockSemaphoreInfo(DAT_00422788);
        qsort(__base,local_28,4,FUN_0005ff30);
        *piVar3 = 0;
        *param_2 = local_28;
        return __base;
      }
    }
    return (int *)0x0;
  }
                    /* WARNING: Subroutine does not return */
  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00039d70
ADD EBX,0x3bac77
SUB ESP,0x1c
MOV EAX,dword ptr [ESP + 0x30]
TEST EAX,EAX
JZ 0x00063524
LEA EAX,[EBX + 0xffed95ae]
SUB ESP,0x8
PUSH dword ptr [ESP + 0x38]
LEA ESI,[EBX + 0xffec47b1]
PUSH EAX
LEA EAX,[EBX + 0xffec4b20]
PUSH 0x512
PUSH EAX
PUSH ESI
PUSH 0x8000
CALL 0x000323b0
ADD ESP,0x20
MOV EBP,dword ptr [ESP + 0x34]
TEST EBP,EBP
JZ 0x00063543
MOV EAX,dword ptr [ESP + 0x34]
SUB ESP,0x8
MOV dword ptr [EAX],0x0
LEA EAX,[EBX + 0xffedbe35]
PUSH dword ptr [ESP + 0x40]
PUSH EAX
CALL 0x000315e0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00063508
SUB ESP,0xc
PUSH dword ptr [EBX + 0x478c]
CALL 0x00031bd0
POP ESI
POP EDI
ADD EAX,0x1
PUSH 0x4
PUSH EAX
CALL 0x000317b0
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JZ 0x00063508
SUB ESP,0xc
PUSH dword ptr [EBX + 0x4788]
CALL 0x00031050
POP EDX
PUSH dword ptr [EBX + 0x478c]
CALL 0x00031700
POP ECX
PUSH dword ptr [EBX + 0x478c]
CALL 0x00031f60
ADD ESP,0x10
MOV EDX,EAX
TEST EAX,EAX
JZ 0x00063518
XOR ESI,ESI
LEA ESI,[ESI]
MOV EAX,dword ptr [EDX + 0x60]
LEA ECX,[ESI*0x4 + 0x0]
MOV dword ptr [ESP + 0x4],ESI
LEA EBP,[EDI + ECX*0x1]
MOV dword ptr [ESP + 0x8],ECX
TEST EAX,EAX
JNZ 0x000634ab
SUB ESP,0x4
PUSH 0x0
PUSH dword ptr [ESP + 0x38]
PUSH dword ptr [EDX + 0x4]
MOV dword ptr [ESP + 0x1c],EDX
CALL 0x000312d0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000634ab
MOV EDX,dword ptr [ESP + 0xc]
ADD ESI,0x1
MOV ECX,dword ptr [ESP + 0x8]
MOV dword ptr [ESP + 0x4],ESI
MOV dword ptr [EBP],EDX
LEA EBP,[EDI + ECX*0x1 + 0x4]
SUB ESP,0xc
PUSH dword ptr [EBX + 0x478c]
CALL 0x00031f60
ADD ESP,0x10
MOV EDX,EAX
TEST EAX,EAX
JNZ 0x00063460
SUB ESP,0xc
PUSH dword ptr [EBX + 0x4788]
CALL 0x00031da0
LEA EAX,[EBX + 0xffc41f30]
ADD ESP,0x10
PUSH EAX
PUSH 0x4
MOV ESI,dword ptr [ESP + 0xc]
PUSH ESI
PUSH EDI
CALL 0x00030920
MOV EAX,dword ptr [ESP + 0x44]
ADD ESP,0x10
MOV dword ptr [EBP],0x0
MOV dword ptr [EAX],ESI
ADD ESP,0x1c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0x1c
XOR EDI,EDI
POP EBX
MOV EAX,EDI
POP ESI
POP EDI
POP EBP
RET
MOV EBP,EDI
MOV dword ptr [ESP + 0x4],0x0
JMP 0x000634c2
LEA EAX,[EBX + 0xffec4b34]
PUSH EAX
LEA EAX,[EBX + 0xffec47b1]
PUSH 0x511
PUSH EAX
LEA EAX,[EBX + 0xffec4390]
PUSH EAX
CALL 0x000313d0
LEA EAX,[EBX + 0xffec4b34]
PUSH EAX
LEA EAX,[EBX + 0xffeca0d4]
PUSH 0x513
PUSH ESI
PUSH EAX
CALL 0x000313d0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *__base;\n  int iVar2;\n  int *piVar3;\n  size_t local_28;\n  \n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);\n  if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}\n\n" comment (function_definition "int * GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *__base;\n  int iVar2;\n  int *piVar3;\n  size_t local_28;\n  \n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);\n  if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}" primitive_type (pointer_declarator "* GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)" * (function_declarator "GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,size_t *param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "size_t *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  int *__base;\n  int iVar2;\n  int *piVar3;\n  size_t local_28;\n  \n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);\n  if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *__base;" primitive_type (pointer_declarator "*__base" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "size_t local_28;" primitive_type identifier ;) (if_statement "if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }" { comment (expression_statement "__assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");" (call_expression "__assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList")" identifier (argument_list "("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList")" ( (string_literal ""pattern != (char *) NULL"" " string_content ") , (string_literal ""MagickCore/color.c"" " string_content ") , number_literal , (string_literal ""GetColorInfoList"" " string_content ") ))) ;) })) (expression_statement "LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);" (call_expression "LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1)" identifier (argument_list "(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1)" ( number_literal , (string_literal ""MagickCore/color.c"" " string_content ") , (string_literal ""GetColorInfoList"" " string_content ") , number_literal , (pointer_expression "&DAT_002f75ae" & identifier) , identifier ))) ;) (if_statement "if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }" if (parenthesized_expression "(param_2 != (size_t *)0x0)" ( (binary_expression "param_2 != (size_t *)0x0" identifier != (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }" { (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "iVar1 = GetColorInfo(&DAT_002f9e35,param_3);" (assignment_expression "iVar1 = GetColorInfo(&DAT_002f9e35,param_3)" identifier = (call_expression "GetColorInfo(&DAT_002f9e35,param_3)" identifier (argument_list "(&DAT_002f9e35,param_3)" ( (pointer_expression "&DAT_002f9e35" & identifier) , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }" { (expression_statement "iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);" (assignment_expression "iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c)" identifier = (call_expression "GetNumberOfElementsInLinkedList(DAT_0042278c)" identifier (argument_list "(DAT_0042278c)" ( identifier )))) ;) (expression_statement "__base = (int *)AcquireQuantumMemory(iVar1 + 1,4);" (assignment_expression "__base = (int *)AcquireQuantumMemory(iVar1 + 1,4)" identifier = (cast_expression "(int *)AcquireQuantumMemory(iVar1 + 1,4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "AcquireQuantumMemory(iVar1 + 1,4)" identifier (argument_list "(iVar1 + 1,4)" ( (binary_expression "iVar1 + 1" identifier + number_literal) , number_literal ))))) ;) (if_statement "if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }" if (parenthesized_expression "(__base != (int *)0x0)" ( (binary_expression "__base != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }" { (expression_statement "LockSemaphoreInfo(DAT_00422788);" (call_expression "LockSemaphoreInfo(DAT_00422788)" identifier (argument_list "(DAT_00422788)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(DAT_0042278c);" (call_expression "ResetLinkedListIterator(DAT_0042278c)" identifier (argument_list "(DAT_0042278c)" ( identifier ))) ;) (expression_statement "iVar1 = GetNextValueInLinkedList(DAT_0042278c);" (assignment_expression "iVar1 = GetNextValueInLinkedList(DAT_0042278c)" identifier = (call_expression "GetNextValueInLinkedList(DAT_0042278c)" identifier (argument_list "(DAT_0042278c)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          local_28 = 0;\n          piVar3 = __base;\n        }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "piVar3 = __base;" (assignment_expression "piVar3 = __base" identifier = identifier) ;) }) (else_clause "else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }" else (compound_statement "{\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (do_statement "do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);" do (compound_statement "{\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          }" { (expression_statement "piVar3 = __base + local_28;" (assignment_expression "piVar3 = __base + local_28" identifier = (binary_expression "__base + local_28" identifier + identifier)) ;) (if_statement "if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }" if (parenthesized_expression "(*(int *)(iVar1 + 0x60) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x60) == 0" (pointer_expression "*(int *)(iVar1 + 0x60)" * (cast_expression "(int *)(iVar1 + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x60)" ( (binary_expression "iVar1 + 0x60" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }" { (expression_statement "iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);" (assignment_expression "iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0)" identifier = (call_expression "GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0)" identifier (argument_list "(*(undefined4 *)(iVar1 + 4),param_1,0)" ( (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) , identifier , number_literal )))) ;) (if_statement "if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }" { (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "piVar3 = __base + local_28 + 1;" (assignment_expression "piVar3 = __base + local_28 + 1" identifier = (binary_expression "__base + local_28 + 1" (binary_expression "__base + local_28" identifier + identifier) + number_literal)) ;) (expression_statement "local_28 = local_28 + 1;" (assignment_expression "local_28 = local_28 + 1" identifier = (binary_expression "local_28 + 1" identifier + number_literal)) ;) })) })) (expression_statement "iVar1 = GetNextValueInLinkedList(DAT_0042278c);" (assignment_expression "iVar1 = GetNextValueInLinkedList(DAT_0042278c)" identifier = (call_expression "GetNextValueInLinkedList(DAT_0042278c)" identifier (argument_list "(DAT_0042278c)" ( identifier )))) ;) }) while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) ;) }))) (expression_statement "UnlockSemaphoreInfo(DAT_00422788);" (call_expression "UnlockSemaphoreInfo(DAT_00422788)" identifier (argument_list "(DAT_00422788)" ( identifier ))) ;) (expression_statement "qsort(__base,local_28,4,FUN_0005ff30);" (call_expression "qsort(__base,local_28,4,FUN_0005ff30)" identifier (argument_list "(__base,local_28,4,FUN_0005ff30)" ( identifier , identifier , number_literal , identifier ))) ;) (expression_statement "*piVar3 = 0;" (assignment_expression "*piVar3 = 0" (pointer_expression "*piVar3" * identifier) = number_literal) ;) (expression_statement "*param_2 = local_28;" (assignment_expression "*param_2 = local_28" (pointer_expression "*param_2" * identifier) = identifier) ;) (return_statement "return __base;" return identifier ;) })) })) (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) comment (expression_statement "__assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");" (call_expression "__assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList")" identifier (argument_list "("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList")" ( (string_literal ""number_colors != (size_t *) NULL"" " string_content ") , (string_literal ""MagickCore/color.c"" " string_content ") , number_literal , (string_literal ""GetColorInfoList"" " string_content ") ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "ExceptionType": Some values do not have unique names */\n/* WARNING: Enum "ComplianceType": Some values do not have unique names */\n/* WARNING: Enum "LogEventType": Some values do not have unique names */\n\nColorInfo ** GetColorInfoList(char *pattern,size_t *number_colors,ExceptionInfo *exception)\n\n{\n  ColorInfo *pCVar1;\n  size_t sVar2;\n  ColorInfo **__base;\n  MagickBooleanType MVar3;\n  ColorInfo **ppCVar4;\n  size_t local_28;\n  \n  if (pattern == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(TraceEvent,"MagickCore/color.c","GetColorInfoList",0x512,"%s",pattern);\n  if (number_colors != (size_t *)0x0) {\n    *number_colors = 0;\n    pCVar1 = GetColorInfo("*",exception);\n    if (pCVar1 != (ColorInfo *)0x0) {\n      sVar2 = GetNumberOfElementsInLinkedList(color_cache);\n      __base = (ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4);\n      if (__base != (ColorInfo **)0x0) {\n        LockSemaphoreInfo(color_semaphore);\n        ResetLinkedListIterator(color_cache);\n        pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n        if (pCVar1 == (ColorInfo *)0x0) {\n          local_28 = 0;\n          ppCVar4 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }\n        UnlockSemaphoreInfo(color_semaphore);\n        qsort(__base,local_28,4,ColorInfoCompare);\n        *ppCVar4 = (ColorInfo *)0x0;\n        *number_colors = local_28;\n        return __base;\n      }\n    }\n    return (ColorInfo **)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}\n\n" comment comment comment comment comment (function_definition "ColorInfo ** GetColorInfoList(char *pattern,size_t *number_colors,ExceptionInfo *exception)\n\n{\n  ColorInfo *pCVar1;\n  size_t sVar2;\n  ColorInfo **__base;\n  MagickBooleanType MVar3;\n  ColorInfo **ppCVar4;\n  size_t local_28;\n  \n  if (pattern == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(TraceEvent,"MagickCore/color.c","GetColorInfoList",0x512,"%s",pattern);\n  if (number_colors != (size_t *)0x0) {\n    *number_colors = 0;\n    pCVar1 = GetColorInfo("*",exception);\n    if (pCVar1 != (ColorInfo *)0x0) {\n      sVar2 = GetNumberOfElementsInLinkedList(color_cache);\n      __base = (ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4);\n      if (__base != (ColorInfo **)0x0) {\n        LockSemaphoreInfo(color_semaphore);\n        ResetLinkedListIterator(color_cache);\n        pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n        if (pCVar1 == (ColorInfo *)0x0) {\n          local_28 = 0;\n          ppCVar4 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }\n        UnlockSemaphoreInfo(color_semaphore);\n        qsort(__base,local_28,4,ColorInfoCompare);\n        *ppCVar4 = (ColorInfo *)0x0;\n        *number_colors = local_28;\n        return __base;\n      }\n    }\n    return (ColorInfo **)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}" type_identifier (pointer_declarator "** GetColorInfoList(char *pattern,size_t *number_colors,ExceptionInfo *exception)" * (pointer_declarator "* GetColorInfoList(char *pattern,size_t *number_colors,ExceptionInfo *exception)" * (function_declarator "GetColorInfoList(char *pattern,size_t *number_colors,ExceptionInfo *exception)" identifier (parameter_list "(char *pattern,size_t *number_colors,ExceptionInfo *exception)" ( (parameter_declaration "char *pattern" primitive_type (pointer_declarator "*pattern" * identifier)) , (parameter_declaration "size_t *number_colors" primitive_type (pointer_declarator "*number_colors" * identifier)) , (parameter_declaration "ExceptionInfo *exception" type_identifier (pointer_declarator "*exception" * identifier)) ))))) (compound_statement "{\n  ColorInfo *pCVar1;\n  size_t sVar2;\n  ColorInfo **__base;\n  MagickBooleanType MVar3;\n  ColorInfo **ppCVar4;\n  size_t local_28;\n  \n  if (pattern == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(TraceEvent,"MagickCore/color.c","GetColorInfoList",0x512,"%s",pattern);\n  if (number_colors != (size_t *)0x0) {\n    *number_colors = 0;\n    pCVar1 = GetColorInfo("*",exception);\n    if (pCVar1 != (ColorInfo *)0x0) {\n      sVar2 = GetNumberOfElementsInLinkedList(color_cache);\n      __base = (ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4);\n      if (__base != (ColorInfo **)0x0) {\n        LockSemaphoreInfo(color_semaphore);\n        ResetLinkedListIterator(color_cache);\n        pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n        if (pCVar1 == (ColorInfo *)0x0) {\n          local_28 = 0;\n          ppCVar4 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }\n        UnlockSemaphoreInfo(color_semaphore);\n        qsort(__base,local_28,4,ColorInfoCompare);\n        *ppCVar4 = (ColorInfo *)0x0;\n        *number_colors = local_28;\n        return __base;\n      }\n    }\n    return (ColorInfo **)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}" { (declaration "ColorInfo *pCVar1;" type_identifier (pointer_declarator "*pCVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "ColorInfo **__base;" type_identifier (pointer_declarator "**__base" * (pointer_declarator "*__base" * identifier)) ;) (declaration "MagickBooleanType MVar3;" type_identifier identifier ;) (declaration "ColorInfo **ppCVar4;" type_identifier (pointer_declarator "**ppCVar4" * (pointer_declarator "*ppCVar4" * identifier)) ;) (declaration "size_t local_28;" primitive_type identifier ;) (if_statement "if (pattern == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }" if (parenthesized_expression "(pattern == (char *)0x0)" ( (binary_expression "pattern == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }" { comment (expression_statement "__assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");" (call_expression "__assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList")" identifier (argument_list "("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList")" ( (string_literal ""pattern != (char *) NULL"" " string_content ") , (string_literal ""MagickCore/color.c"" " string_content ") , number_literal , (string_literal ""GetColorInfoList"" " string_content ") ))) ;) })) (expression_statement "LogMagickEvent(TraceEvent,"MagickCore/color.c","GetColorInfoList",0x512,"%s",pattern);" (call_expression "LogMagickEvent(TraceEvent,"MagickCore/color.c","GetColorInfoList",0x512,"%s",pattern)" identifier (argument_list "(TraceEvent,"MagickCore/color.c","GetColorInfoList",0x512,"%s",pattern)" ( identifier , (string_literal ""MagickCore/color.c"" " string_content ") , (string_literal ""GetColorInfoList"" " string_content ") , number_literal , (string_literal ""%s"" " string_content ") , identifier ))) ;) (if_statement "if (number_colors != (size_t *)0x0) {\n    *number_colors = 0;\n    pCVar1 = GetColorInfo("*",exception);\n    if (pCVar1 != (ColorInfo *)0x0) {\n      sVar2 = GetNumberOfElementsInLinkedList(color_cache);\n      __base = (ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4);\n      if (__base != (ColorInfo **)0x0) {\n        LockSemaphoreInfo(color_semaphore);\n        ResetLinkedListIterator(color_cache);\n        pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n        if (pCVar1 == (ColorInfo *)0x0) {\n          local_28 = 0;\n          ppCVar4 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }\n        UnlockSemaphoreInfo(color_semaphore);\n        qsort(__base,local_28,4,ColorInfoCompare);\n        *ppCVar4 = (ColorInfo *)0x0;\n        *number_colors = local_28;\n        return __base;\n      }\n    }\n    return (ColorInfo **)0x0;\n  }" if (parenthesized_expression "(number_colors != (size_t *)0x0)" ( (binary_expression "number_colors != (size_t *)0x0" identifier != (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *number_colors = 0;\n    pCVar1 = GetColorInfo("*",exception);\n    if (pCVar1 != (ColorInfo *)0x0) {\n      sVar2 = GetNumberOfElementsInLinkedList(color_cache);\n      __base = (ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4);\n      if (__base != (ColorInfo **)0x0) {\n        LockSemaphoreInfo(color_semaphore);\n        ResetLinkedListIterator(color_cache);\n        pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n        if (pCVar1 == (ColorInfo *)0x0) {\n          local_28 = 0;\n          ppCVar4 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }\n        UnlockSemaphoreInfo(color_semaphore);\n        qsort(__base,local_28,4,ColorInfoCompare);\n        *ppCVar4 = (ColorInfo *)0x0;\n        *number_colors = local_28;\n        return __base;\n      }\n    }\n    return (ColorInfo **)0x0;\n  }" { (expression_statement "*number_colors = 0;" (assignment_expression "*number_colors = 0" (pointer_expression "*number_colors" * identifier) = number_literal) ;) (expression_statement "pCVar1 = GetColorInfo("*",exception);" (assignment_expression "pCVar1 = GetColorInfo("*",exception)" identifier = (call_expression "GetColorInfo("*",exception)" identifier (argument_list "("*",exception)" ( (string_literal ""*"" " string_content ") , identifier )))) ;) (if_statement "if (pCVar1 != (ColorInfo *)0x0) {\n      sVar2 = GetNumberOfElementsInLinkedList(color_cache);\n      __base = (ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4);\n      if (__base != (ColorInfo **)0x0) {\n        LockSemaphoreInfo(color_semaphore);\n        ResetLinkedListIterator(color_cache);\n        pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n        if (pCVar1 == (ColorInfo *)0x0) {\n          local_28 = 0;\n          ppCVar4 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }\n        UnlockSemaphoreInfo(color_semaphore);\n        qsort(__base,local_28,4,ColorInfoCompare);\n        *ppCVar4 = (ColorInfo *)0x0;\n        *number_colors = local_28;\n        return __base;\n      }\n    }" if (parenthesized_expression "(pCVar1 != (ColorInfo *)0x0)" ( (binary_expression "pCVar1 != (ColorInfo *)0x0" identifier != (cast_expression "(ColorInfo *)0x0" ( (type_descriptor "ColorInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      sVar2 = GetNumberOfElementsInLinkedList(color_cache);\n      __base = (ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4);\n      if (__base != (ColorInfo **)0x0) {\n        LockSemaphoreInfo(color_semaphore);\n        ResetLinkedListIterator(color_cache);\n        pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n        if (pCVar1 == (ColorInfo *)0x0) {\n          local_28 = 0;\n          ppCVar4 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }\n        UnlockSemaphoreInfo(color_semaphore);\n        qsort(__base,local_28,4,ColorInfoCompare);\n        *ppCVar4 = (ColorInfo *)0x0;\n        *number_colors = local_28;\n        return __base;\n      }\n    }" { (expression_statement "sVar2 = GetNumberOfElementsInLinkedList(color_cache);" (assignment_expression "sVar2 = GetNumberOfElementsInLinkedList(color_cache)" identifier = (call_expression "GetNumberOfElementsInLinkedList(color_cache)" identifier (argument_list "(color_cache)" ( identifier )))) ;) (expression_statement "__base = (ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4);" (assignment_expression "__base = (ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4)" identifier = (cast_expression "(ColorInfo **)AcquireQuantumMemory(sVar2 + 1,4)" ( (type_descriptor "ColorInfo **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "AcquireQuantumMemory(sVar2 + 1,4)" identifier (argument_list "(sVar2 + 1,4)" ( (binary_expression "sVar2 + 1" identifier + number_literal) , number_literal ))))) ;) (if_statement "if (__base != (ColorInfo **)0x0) {\n        LockSemaphoreInfo(color_semaphore);\n        ResetLinkedListIterator(color_cache);\n        pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n        if (pCVar1 == (ColorInfo *)0x0) {\n          local_28 = 0;\n          ppCVar4 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }\n        UnlockSemaphoreInfo(color_semaphore);\n        qsort(__base,local_28,4,ColorInfoCompare);\n        *ppCVar4 = (ColorInfo *)0x0;\n        *number_colors = local_28;\n        return __base;\n      }" if (parenthesized_expression "(__base != (ColorInfo **)0x0)" ( (binary_expression "__base != (ColorInfo **)0x0" identifier != (cast_expression "(ColorInfo **)0x0" ( (type_descriptor "ColorInfo **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n        LockSemaphoreInfo(color_semaphore);\n        ResetLinkedListIterator(color_cache);\n        pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n        if (pCVar1 == (ColorInfo *)0x0) {\n          local_28 = 0;\n          ppCVar4 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }\n        UnlockSemaphoreInfo(color_semaphore);\n        qsort(__base,local_28,4,ColorInfoCompare);\n        *ppCVar4 = (ColorInfo *)0x0;\n        *number_colors = local_28;\n        return __base;\n      }" { (expression_statement "LockSemaphoreInfo(color_semaphore);" (call_expression "LockSemaphoreInfo(color_semaphore)" identifier (argument_list "(color_semaphore)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(color_cache);" (call_expression "ResetLinkedListIterator(color_cache)" identifier (argument_list "(color_cache)" ( identifier ))) ;) (expression_statement "pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);" (assignment_expression "pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache)" identifier = (cast_expression "(ColorInfo *)GetNextValueInLinkedList(color_cache)" ( (type_descriptor "ColorInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "GetNextValueInLinkedList(color_cache)" identifier (argument_list "(color_cache)" ( identifier ))))) ;) (if_statement "if (pCVar1 == (ColorInfo *)0x0) {\n          local_28 = 0;\n          ppCVar4 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }" if (parenthesized_expression "(pCVar1 == (ColorInfo *)0x0)" ( (binary_expression "pCVar1 == (ColorInfo *)0x0" identifier == (cast_expression "(ColorInfo *)0x0" ( (type_descriptor "ColorInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          local_28 = 0;\n          ppCVar4 = __base;\n        }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "ppCVar4 = __base;" (assignment_expression "ppCVar4 = __base" identifier = identifier) ;) }) (else_clause "else {\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }" else (compound_statement "{\n          local_28 = 0;\n          do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);\n        }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (do_statement "do {\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          } while (pCVar1 != (ColorInfo *)0x0);" do (compound_statement "{\n            ppCVar4 = __base + local_28;\n            if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);\n          }" { (expression_statement "ppCVar4 = __base + local_28;" (assignment_expression "ppCVar4 = __base + local_28" identifier = (binary_expression "__base + local_28" identifier + identifier)) ;) (if_statement "if (pCVar1->stealth == MagickFalse) {\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }" if (parenthesized_expression "(pCVar1->stealth == MagickFalse)" ( (binary_expression "pCVar1->stealth == MagickFalse" (field_expression "pCVar1->stealth" identifier -> field_identifier) == identifier) )) (compound_statement "{\n              MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);\n              if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }" { (expression_statement "MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse);" (assignment_expression "MVar3 = GlobExpression(pCVar1->name,pattern,MagickFalse)" identifier = (call_expression "GlobExpression(pCVar1->name,pattern,MagickFalse)" identifier (argument_list "(pCVar1->name,pattern,MagickFalse)" ( (field_expression "pCVar1->name" identifier -> field_identifier) , identifier , identifier )))) ;) (if_statement "if (MVar3 != MagickFalse) {\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }" if (parenthesized_expression "(MVar3 != MagickFalse)" ( (binary_expression "MVar3 != MagickFalse" identifier != identifier) )) (compound_statement "{\n                *ppCVar4 = pCVar1;\n                ppCVar4 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }" { (expression_statement "*ppCVar4 = pCVar1;" (assignment_expression "*ppCVar4 = pCVar1" (pointer_expression "*ppCVar4" * identifier) = identifier) ;) (expression_statement "ppCVar4 = __base + local_28 + 1;" (assignment_expression "ppCVar4 = __base + local_28 + 1" identifier = (binary_expression "__base + local_28 + 1" (binary_expression "__base + local_28" identifier + identifier) + number_literal)) ;) (expression_statement "local_28 = local_28 + 1;" (assignment_expression "local_28 = local_28 + 1" identifier = (binary_expression "local_28 + 1" identifier + number_literal)) ;) })) })) (expression_statement "pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache);" (assignment_expression "pCVar1 = (ColorInfo *)GetNextValueInLinkedList(color_cache)" identifier = (cast_expression "(ColorInfo *)GetNextValueInLinkedList(color_cache)" ( (type_descriptor "ColorInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "GetNextValueInLinkedList(color_cache)" identifier (argument_list "(color_cache)" ( identifier ))))) ;) }) while (parenthesized_expression "(pCVar1 != (ColorInfo *)0x0)" ( (binary_expression "pCVar1 != (ColorInfo *)0x0" identifier != (cast_expression "(ColorInfo *)0x0" ( (type_descriptor "ColorInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) }))) (expression_statement "UnlockSemaphoreInfo(color_semaphore);" (call_expression "UnlockSemaphoreInfo(color_semaphore)" identifier (argument_list "(color_semaphore)" ( identifier ))) ;) (expression_statement "qsort(__base,local_28,4,ColorInfoCompare);" (call_expression "qsort(__base,local_28,4,ColorInfoCompare)" identifier (argument_list "(__base,local_28,4,ColorInfoCompare)" ( identifier , identifier , number_literal , identifier ))) ;) (expression_statement "*ppCVar4 = (ColorInfo *)0x0;" (assignment_expression "*ppCVar4 = (ColorInfo *)0x0" (pointer_expression "*ppCVar4" * identifier) = (cast_expression "(ColorInfo *)0x0" ( (type_descriptor "ColorInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "*number_colors = local_28;" (assignment_expression "*number_colors = local_28" (pointer_expression "*number_colors" * identifier) = identifier) ;) (return_statement "return __base;" return identifier ;) })) })) (return_statement "return (ColorInfo **)0x0;" return (cast_expression "(ColorInfo **)0x0" ( (type_descriptor "ColorInfo **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) ;) })) comment (expression_statement "__assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");" (call_expression "__assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList")" identifier (argument_list "("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList")" ( (string_literal ""number_colors != (size_t *) NULL"" " string_content ") , (string_literal ""MagickCore/color.c"" " string_content ") , number_literal , (string_literal ""GetColorInfoList"" " string_content ") ))) ;) })))
(translation_unit "int * GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *__base;\n  int iVar2;\n  int *piVar3;\n  size_t local_28;\n  \n  if (param_1 == 0) {\n                    \n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);\n  if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }\n                    \n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}\n\n" (function_definition "int * GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *__base;\n  int iVar2;\n  int *piVar3;\n  size_t local_28;\n  \n  if (param_1 == 0) {\n                    \n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);\n  if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }\n                    \n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}" primitive_type (pointer_declarator "* GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)" * (function_declarator "GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,size_t *param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "size_t *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  int *__base;\n  int iVar2;\n  int *piVar3;\n  size_t local_28;\n  \n  if (param_1 == 0) {\n                    \n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);\n  if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }\n                    \n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *__base;" primitive_type (pointer_declarator "*__base" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "size_t local_28;" primitive_type identifier ;) (if_statement "if (param_1 == 0) {\n                    \n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }" { (expression_statement "__assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");" (call_expression "__assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList")" identifier (argument_list "("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList")" ( (string_literal ""pattern != (char *) NULL"" " string_content ") , (string_literal ""MagickCore/color.c"" " string_content ") , number_literal , (string_literal ""GetColorInfoList"" " string_content ") ))) ;) })) (expression_statement "LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);" (call_expression "LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1)" identifier (argument_list "(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1)" ( number_literal , (string_literal ""MagickCore/color.c"" " string_content ") , (string_literal ""GetColorInfoList"" " string_content ") , number_literal , (pointer_expression "&DAT_002f75ae" & identifier) , identifier ))) ;) (if_statement "if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }" if (parenthesized_expression "(param_2 != (size_t *)0x0)" ( (binary_expression "param_2 != (size_t *)0x0" identifier != (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }" { (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "iVar1 = GetColorInfo(&DAT_002f9e35,param_3);" (assignment_expression "iVar1 = GetColorInfo(&DAT_002f9e35,param_3)" identifier = (call_expression "GetColorInfo(&DAT_002f9e35,param_3)" identifier (argument_list "(&DAT_002f9e35,param_3)" ( (pointer_expression "&DAT_002f9e35" & identifier) , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }" { (expression_statement "iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);" (assignment_expression "iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c)" identifier = (call_expression "GetNumberOfElementsInLinkedList(DAT_0042278c)" identifier (argument_list "(DAT_0042278c)" ( identifier )))) ;) (expression_statement "__base = (int *)AcquireQuantumMemory(iVar1 + 1,4);" (assignment_expression "__base = (int *)AcquireQuantumMemory(iVar1 + 1,4)" identifier = (cast_expression "(int *)AcquireQuantumMemory(iVar1 + 1,4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "AcquireQuantumMemory(iVar1 + 1,4)" identifier (argument_list "(iVar1 + 1,4)" ( (binary_expression "iVar1 + 1" identifier + number_literal) , number_literal ))))) ;) (if_statement "if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }" if (parenthesized_expression "(__base != (int *)0x0)" ( (binary_expression "__base != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }" { (expression_statement "LockSemaphoreInfo(DAT_00422788);" (call_expression "LockSemaphoreInfo(DAT_00422788)" identifier (argument_list "(DAT_00422788)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(DAT_0042278c);" (call_expression "ResetLinkedListIterator(DAT_0042278c)" identifier (argument_list "(DAT_0042278c)" ( identifier ))) ;) (expression_statement "iVar1 = GetNextValueInLinkedList(DAT_0042278c);" (assignment_expression "iVar1 = GetNextValueInLinkedList(DAT_0042278c)" identifier = (call_expression "GetNextValueInLinkedList(DAT_0042278c)" identifier (argument_list "(DAT_0042278c)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          local_28 = 0;\n          piVar3 = __base;\n        }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "piVar3 = __base;" (assignment_expression "piVar3 = __base" identifier = identifier) ;) }) (else_clause "else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }" else (compound_statement "{\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (do_statement "do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);" do (compound_statement "{\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          }" { (expression_statement "piVar3 = __base + local_28;" (assignment_expression "piVar3 = __base + local_28" identifier = (binary_expression "__base + local_28" identifier + identifier)) ;) (if_statement "if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }" if (parenthesized_expression "(*(int *)(iVar1 + 0x60) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x60) == 0" (pointer_expression "*(int *)(iVar1 + 0x60)" * (cast_expression "(int *)(iVar1 + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x60)" ( (binary_expression "iVar1 + 0x60" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }" { (expression_statement "iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);" (assignment_expression "iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0)" identifier = (call_expression "GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0)" identifier (argument_list "(*(undefined4 *)(iVar1 + 4),param_1,0)" ( (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) , identifier , number_literal )))) ;) (if_statement "if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }" { (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "piVar3 = __base + local_28 + 1;" (assignment_expression "piVar3 = __base + local_28 + 1" identifier = (binary_expression "__base + local_28 + 1" (binary_expression "__base + local_28" identifier + identifier) + number_literal)) ;) (expression_statement "local_28 = local_28 + 1;" (assignment_expression "local_28 = local_28 + 1" identifier = (binary_expression "local_28 + 1" identifier + number_literal)) ;) })) })) (expression_statement "iVar1 = GetNextValueInLinkedList(DAT_0042278c);" (assignment_expression "iVar1 = GetNextValueInLinkedList(DAT_0042278c)" identifier = (call_expression "GetNextValueInLinkedList(DAT_0042278c)" identifier (argument_list "(DAT_0042278c)" ( identifier )))) ;) }) while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) ;) }))) (expression_statement "UnlockSemaphoreInfo(DAT_00422788);" (call_expression "UnlockSemaphoreInfo(DAT_00422788)" identifier (argument_list "(DAT_00422788)" ( identifier ))) ;) (expression_statement "qsort(__base,local_28,4,FUN_0005ff30);" (call_expression "qsort(__base,local_28,4,FUN_0005ff30)" identifier (argument_list "(__base,local_28,4,FUN_0005ff30)" ( identifier , identifier , number_literal , identifier ))) ;) (expression_statement "*piVar3 = 0;" (assignment_expression "*piVar3 = 0" (pointer_expression "*piVar3" * identifier) = number_literal) ;) (expression_statement "*param_2 = local_28;" (assignment_expression "*param_2 = local_28" (pointer_expression "*param_2" * identifier) = identifier) ;) (return_statement "return __base;" return identifier ;) })) })) (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "__assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");" (call_expression "__assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList")" identifier (argument_list "("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList")" ( (string_literal ""number_colors != (size_t *) NULL"" " string_content ") , (string_literal ""MagickCore/color.c"" " string_content ") , number_literal , (string_literal ""GetColorInfoList"" " string_content ") ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , (pointer_expression & IDENT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , 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 ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return IDENT ;) })) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })))
(function_definition "int * GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *__base;\n  int iVar2;\n  int *piVar3;\n  size_t local_28;\n  \n  if (param_1 == 0) {\n                    \n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);\n  if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }\n                    \n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}" (primitive_type "int") (pointer_declarator "* GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)" (* "*") (function_declarator "GetColorInfoList(int param_1,size_t *param_2,undefined4 param_3)" (identifier "GetColorInfoList") (parameter_list "(int param_1,size_t *param_2,undefined4 param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "size_t *param_2" (primitive_type "size_t") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")")))) (compound_statement "{\n  int iVar1;\n  int *__base;\n  int iVar2;\n  int *piVar3;\n  size_t local_28;\n  \n  if (param_1 == 0) {\n                    \n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }\n  LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);\n  if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }\n                    \n  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *__base;" (primitive_type "int") (pointer_declarator "*__base" (* "*") (identifier "__base")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "size_t local_28;" (primitive_type "size_t") (identifier "local_28") (; ";")) (if_statement "if (param_1 == 0) {\n                    \n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");\n  }" ({ "{") (expression_statement "__assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");" (call_expression "__assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList")" (identifier "__assert_fail") (argument_list "("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList")" (( "(") (string_literal ""pattern != (char *) NULL"" (" """) (string_content "pattern != (char *) NULL") (" """)) (, ",") (string_literal ""MagickCore/color.c"" (" """) (string_content "MagickCore/color.c") (" """)) (, ",") (number_literal "0x511") (, ",") (string_literal ""GetColorInfoList"" (" """) (string_content "GetColorInfoList") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1);" (call_expression "LogMagickEvent(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1)" (identifier "LogMagickEvent") (argument_list "(0x8000,"MagickCore/color.c","GetColorInfoList",0x512,&DAT_002f75ae,param_1)" (( "(") (number_literal "0x8000") (, ",") (string_literal ""MagickCore/color.c"" (" """) (string_content "MagickCore/color.c") (" """)) (, ",") (string_literal ""GetColorInfoList"" (" """) (string_content "GetColorInfoList") (" """)) (, ",") (number_literal "0x512") (, ",") (pointer_expression "&DAT_002f75ae" (& "&") (identifier "DAT_002f75ae")) (, ",") (identifier "param_1") () ")"))) (; ";")) (if_statement "if (param_2 != (size_t *)0x0) {\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }" (if "if") (parenthesized_expression "(param_2 != (size_t *)0x0)" (( "(") (binary_expression "param_2 != (size_t *)0x0" (identifier "param_2") (!= "!=") (cast_expression "(size_t *)0x0" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *param_2 = 0;\n    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);\n    if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }\n    return (int *)0x0;\n  }" ({ "{") (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = GetColorInfo(&DAT_002f9e35,param_3);" (assignment_expression "iVar1 = GetColorInfo(&DAT_002f9e35,param_3)" (identifier "iVar1") (= "=") (call_expression "GetColorInfo(&DAT_002f9e35,param_3)" (identifier "GetColorInfo") (argument_list "(&DAT_002f9e35,param_3)" (( "(") (pointer_expression "&DAT_002f9e35" (& "&") (identifier "DAT_002f9e35")) (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);\n      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);\n      if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }\n    }" ({ "{") (expression_statement "iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);" (assignment_expression "iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c)" (identifier "iVar1") (= "=") (call_expression "GetNumberOfElementsInLinkedList(DAT_0042278c)" (identifier "GetNumberOfElementsInLinkedList") (argument_list "(DAT_0042278c)" (( "(") (identifier "DAT_0042278c") () ")")))) (; ";")) (expression_statement "__base = (int *)AcquireQuantumMemory(iVar1 + 1,4);" (assignment_expression "__base = (int *)AcquireQuantumMemory(iVar1 + 1,4)" (identifier "__base") (= "=") (cast_expression "(int *)AcquireQuantumMemory(iVar1 + 1,4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "AcquireQuantumMemory(iVar1 + 1,4)" (identifier "AcquireQuantumMemory") (argument_list "(iVar1 + 1,4)" (( "(") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) (, ",") (number_literal "4") () ")"))))) (; ";")) (if_statement "if (__base != (int *)0x0) {\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }" (if "if") (parenthesized_expression "(__base != (int *)0x0)" (( "(") (binary_expression "__base != (int *)0x0" (identifier "__base") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        LockSemaphoreInfo(DAT_00422788);\n        ResetLinkedListIterator(DAT_0042278c);\n        iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n        if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }\n        UnlockSemaphoreInfo(DAT_00422788);\n        qsort(__base,local_28,4,FUN_0005ff30);\n        *piVar3 = 0;\n        *param_2 = local_28;\n        return __base;\n      }" ({ "{") (expression_statement "LockSemaphoreInfo(DAT_00422788);" (call_expression "LockSemaphoreInfo(DAT_00422788)" (identifier "LockSemaphoreInfo") (argument_list "(DAT_00422788)" (( "(") (identifier "DAT_00422788") () ")"))) (; ";")) (expression_statement "ResetLinkedListIterator(DAT_0042278c);" (call_expression "ResetLinkedListIterator(DAT_0042278c)" (identifier "ResetLinkedListIterator") (argument_list "(DAT_0042278c)" (( "(") (identifier "DAT_0042278c") () ")"))) (; ";")) (expression_statement "iVar1 = GetNextValueInLinkedList(DAT_0042278c);" (assignment_expression "iVar1 = GetNextValueInLinkedList(DAT_0042278c)" (identifier "iVar1") (= "=") (call_expression "GetNextValueInLinkedList(DAT_0042278c)" (identifier "GetNextValueInLinkedList") (argument_list "(DAT_0042278c)" (( "(") (identifier "DAT_0042278c") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n          local_28 = 0;\n          piVar3 = __base;\n        }\n        else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          local_28 = 0;\n          piVar3 = __base;\n        }" ({ "{") (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar3 = __base;" (assignment_expression "piVar3 = __base" (identifier "piVar3") (= "=") (identifier "__base")) (; ";")) (} "}")) (else_clause "else {\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }" (else "else") (compound_statement "{\n          local_28 = 0;\n          do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);\n        }" ({ "{") (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          } while (iVar1 != 0);" (do "do") (compound_statement "{\n            piVar3 = __base + local_28;\n            if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }\n            iVar1 = GetNextValueInLinkedList(DAT_0042278c);\n          }" ({ "{") (expression_statement "piVar3 = __base + local_28;" (assignment_expression "piVar3 = __base + local_28" (identifier "piVar3") (= "=") (binary_expression "__base + local_28" (identifier "__base") (+ "+") (identifier "local_28"))) (; ";")) (if_statement "if (*(int *)(iVar1 + 0x60) == 0) {\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0x60) == 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0x60) == 0" (pointer_expression "*(int *)(iVar1 + 0x60)" (* "*") (cast_expression "(int *)(iVar1 + 0x60)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x60)" (( "(") (binary_expression "iVar1 + 0x60" (identifier "iVar1") (+ "+") (number_literal "0x60")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);\n              if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }\n            }" ({ "{") (expression_statement "iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);" (assignment_expression "iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0)" (identifier "iVar2") (= "=") (call_expression "GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0)" (identifier "GlobExpression") (argument_list "(*(undefined4 *)(iVar1 + 4),param_1,0)" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 4)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (, ",") (identifier "param_1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n                *piVar3 = iVar1;\n                piVar3 = __base + local_28 + 1;\n                local_28 = local_28 + 1;\n              }" ({ "{") (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "piVar3 = __base + local_28 + 1;" (assignment_expression "piVar3 = __base + local_28 + 1" (identifier "piVar3") (= "=") (binary_expression "__base + local_28 + 1" (binary_expression "__base + local_28" (identifier "__base") (+ "+") (identifier "local_28")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "local_28 = local_28 + 1;" (assignment_expression "local_28 = local_28 + 1" (identifier "local_28") (= "=") (binary_expression "local_28 + 1" (identifier "local_28") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar1 = GetNextValueInLinkedList(DAT_0042278c);" (assignment_expression "iVar1 = GetNextValueInLinkedList(DAT_0042278c)" (identifier "iVar1") (= "=") (call_expression "GetNextValueInLinkedList(DAT_0042278c)" (identifier "GetNextValueInLinkedList") (argument_list "(DAT_0042278c)" (( "(") (identifier "DAT_0042278c") () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}")))) (expression_statement "UnlockSemaphoreInfo(DAT_00422788);" (call_expression "UnlockSemaphoreInfo(DAT_00422788)" (identifier "UnlockSemaphoreInfo") (argument_list "(DAT_00422788)" (( "(") (identifier "DAT_00422788") () ")"))) (; ";")) (expression_statement "qsort(__base,local_28,4,FUN_0005ff30);" (call_expression "qsort(__base,local_28,4,FUN_0005ff30)" (identifier "qsort") (argument_list "(__base,local_28,4,FUN_0005ff30)" (( "(") (identifier "__base") (, ",") (identifier "local_28") (, ",") (number_literal "4") (, ",") (identifier "FUN_0005ff30") () ")"))) (; ";")) (expression_statement "*piVar3 = 0;" (assignment_expression "*piVar3 = 0" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_2 = local_28;" (assignment_expression "*param_2 = local_28" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "local_28")) (; ";")) (return_statement "return __base;" (return "return") (identifier "__base") (; ";")) (} "}"))) (} "}"))) (return_statement "return (int *)0x0;" (return "return") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "__assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");" (call_expression "__assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList")" (identifier "__assert_fail") (argument_list "("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList")" (( "(") (string_literal ""number_colors != (size_t *) NULL"" (" """) (string_content "number_colors != (size_t *) NULL") (" """)) (, ",") (string_literal ""MagickCore/color.c"" (" """) (string_content "MagickCore/color.c") (" """)) (, ",") (number_literal "0x513") (, ",") (string_literal ""GetColorInfoList"" (" """) (string_content "GetColorInfoList") (" """)) () ")"))) (; ";")) (} "}")))

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

type_1 ** function_1(char *var_1,size_t *var_4,type_2 *exception)

{
  type_1 *var_6;
  size_t var_9;
  type_1 **var_10;
  type_3 var_17;
  type_1 **ppCVar4;
  size_t var_14;
  
  if (var_1 == (char *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_2("pattern != (char *) NULL","MagickCore/color.c",0x511,"GetColorInfoList");
  }
  var_3(TraceEvent,"MagickCore/color.c","GetColorInfoList",0x512,"%s",var_1);
  if (var_4 != (size_t *)0x0) {
    *var_4 = 0;
    var_6 = var_5("*",exception);
    if (var_6 != (type_1 *)0x0) {
      var_9 = var_7(color_cache);
      var_10 = (type_1 **)var_8(var_9 + 1,4);
      if (var_10 != (type_1 **)0x0) {
        var_11(color_semaphore);
        var_12(color_cache);
        var_6 = (type_1 *)var_13(color_cache);
        if (var_6 == (type_1 *)0x0) {
          var_14 = 0;
          ppCVar4 = var_10;
        }
        else {
          var_14 = 0;
          do {
            ppCVar4 = var_10 + var_14;
            if (var_6->stealth == var_15) {
              var_17 = var_16(var_6->name,var_1,var_15);
              if (var_17 != var_15) {
                *ppCVar4 = var_6;
                ppCVar4 = var_10 + var_14 + 1;
                var_14 = var_14 + 1;
              }
            }
            var_6 = (type_1 *)var_13(color_cache);
          } while (var_6 != (type_1 *)0x0);
        }
        var_18(color_semaphore);
        var_19(var_10,var_14,4,ColorInfoCompare);
        *ppCVar4 = (type_1 *)0x0;
        *var_4 = var_14;
        return var_10;
      }
    }
    return (type_1 **)0x0;
  }
                    /* WARNING: Subroutine does not return */
  var_2("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"GetColorInfoList");
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) 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))))))) (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)) (identifier)))) (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 (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (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 (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement (identifier)))))) (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))))

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

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

{
  int iVar1;
  int *__base;
  int iVar2;
  int *piVar3;
  size_t local_28;
  
  if (param_1 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("pattern != (char *) NULL","MagickCore/color.c",0x511,"MASKED");
  }
  LogMagickEvent(0x8000,"MagickCore/color.c","MASKED",0x512,&DAT_002f75ae,param_1);
  if (param_2 != (size_t *)0x0) {
    *param_2 = 0;
    iVar1 = GetColorInfo(&DAT_002f9e35,param_3);
    if (iVar1 != 0) {
      iVar1 = GetNumberOfElementsInLinkedList(DAT_0042278c);
      __base = (int *)AcquireQuantumMemory(iVar1 + 1,4);
      if (__base != (int *)0x0) {
        LockSemaphoreInfo(DAT_00422788);
        ResetLinkedListIterator(DAT_0042278c);
        iVar1 = GetNextValueInLinkedList(DAT_0042278c);
        if (iVar1 == 0) {
          local_28 = 0;
          piVar3 = __base;
        }
        else {
          local_28 = 0;
          do {
            piVar3 = __base + local_28;
            if (*(int *)(iVar1 + 0x60) == 0) {
              iVar2 = GlobExpression(*(undefined4 *)(iVar1 + 4),param_1,0);
              if (iVar2 != 0) {
                *piVar3 = iVar1;
                piVar3 = __base + local_28 + 1;
                local_28 = local_28 + 1;
              }
            }
            iVar1 = GetNextValueInLinkedList(DAT_0042278c);
          } while (iVar1 != 0);
        }
        UnlockSemaphoreInfo(DAT_00422788);
        qsort(__base,local_28,4,FUN_0005ff30);
        *piVar3 = 0;
        *param_2 = local_28;
        return __base;
      }
    }
    return (int *)0x0;
  }
                    /* WARNING: Subroutine does not return */
  __assert_fail("number_colors != (size_t *) NULL","MagickCore/color.c",0x513,"MASKED");
}

