
/* WARNING: Enum "ExceptionType": Some values do not have unique names */

MagicInfo * GetMagicInfo(uchar *magic,size_t length,ExceptionInfo *exception)

{
  long lVar1;
  MagickBooleanType MVar2;
  int iVar3;
  MagicInfo *pMVar4;
  
  if (exception == (ExceptionInfo *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");
  }
  MVar2 = IsMagicListInstantiated(exception);
  if (MVar2 == MagickFalse) {
    pMVar4 = (MagicInfo *)0x0;
  }
  else {
    if (magic_cache == (LinkedListInfo *)0x0) {
      if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {
        ActivateSemaphoreInfo(&magic_cache_semaphore);
      }
      LockSemaphoreInfo(magic_cache_semaphore);
      if (magic_cache == (LinkedListInfo *)0x0) {
        magic_cache = NewLinkedList(0);
      }
      UnlockSemaphoreInfo(magic_cache_semaphore);
      if (magic_cache == (LinkedListInfo *)0x0) {
        return (MagicInfo *)0x0;
      }
    }
    if (magic == (uchar *)0x0) {
      LockSemaphoreInfo(magic_list_semaphore);
      ResetLinkedListIterator(magic_list);
      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);
      UnlockSemaphoreInfo(magic_list_semaphore);
    }
    else {
      LockSemaphoreInfo(magic_cache_semaphore);
      ResetLinkedListIterator(magic_cache);
      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);
      while (pMVar4 != (MagicInfo *)0x0) {
        if ((pMVar4->offset + pMVar4->length <= length) &&
           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {
          UnlockSemaphoreInfo(magic_cache_semaphore);
          if (pMVar4 != (MagicInfo *)0x0) {
            return pMVar4;
          }
          LockSemaphoreInfo(magic_list_semaphore);
          ResetLinkedListIterator(magic_list);
          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);
          goto LAB_0022ef9d;
        }
        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);
      }
      UnlockSemaphoreInfo(magic_cache_semaphore);
      LockSemaphoreInfo(magic_list_semaphore);
      ResetLinkedListIterator(magic_list);
      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);
LAB_0022ef9d:
      if (pMVar4 == (MagicInfo *)0x0) {
LAB_0022f19a:
        UnlockSemaphoreInfo(magic_list_semaphore);
        pMVar4 = (MagicInfo *)0x0;
      }
      else {
        lVar1 = pMVar4->offset;
        while( true ) {
          if (lVar1 < 0) {
                    /* WARNING: Subroutine does not return */
            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");
          }
          if ((lVar1 + pMVar4->length <= length) &&
             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;
          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);
          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;
          lVar1 = pMVar4->offset;
        }
        UnlockSemaphoreInfo(magic_list_semaphore);
        if (pMVar4 != (MagicInfo *)0x0) {
          LockSemaphoreInfo(magic_cache_semaphore);
          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);
          UnlockSemaphoreInfo(magic_cache_semaphore);
        }
      }
    }
  }
  return pMVar4;
}



long GetMagicInfo(long param_1,ulong param_2,long param_3)

{
  long lVar1;
  int iVar2;
  long lVar3;
  
  if (param_3 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");
  }
  iVar2 = FUN_0022ecb6(param_3);
  if (iVar2 == 0) {
    lVar3 = 0;
  }
  else {
    if (DAT_00726140 == 0) {
      if (DAT_00726130 == 0) {
        ActivateSemaphoreInfo(&DAT_00726130);
      }
      LockSemaphoreInfo(DAT_00726130);
      if (DAT_00726140 == 0) {
        DAT_00726140 = NewLinkedList(0);
      }
      UnlockSemaphoreInfo(DAT_00726130);
      if (DAT_00726140 == 0) {
        return 0;
      }
    }
    if (param_1 == 0) {
      LockSemaphoreInfo(DAT_00726128);
      ResetLinkedListIterator(DAT_00726138);
      lVar3 = GetNextValueInLinkedList(DAT_00726138);
      UnlockSemaphoreInfo(DAT_00726128);
    }
    else {
      LockSemaphoreInfo(DAT_00726130);
      ResetLinkedListIterator(DAT_00726140);
      lVar3 = GetNextValueInLinkedList(DAT_00726140);
      while (lVar3 != 0) {
        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&
           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),
                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {
          UnlockSemaphoreInfo(DAT_00726130);
          if (lVar3 != 0) {
            return lVar3;
          }
          LockSemaphoreInfo(DAT_00726128);
          ResetLinkedListIterator(DAT_00726138);
          lVar3 = GetNextValueInLinkedList(DAT_00726138);
          goto LAB_0022ef9d;
        }
        lVar3 = GetNextValueInLinkedList(DAT_00726140);
      }
      UnlockSemaphoreInfo(DAT_00726130);
      LockSemaphoreInfo(DAT_00726128);
      ResetLinkedListIterator(DAT_00726138);
      lVar3 = GetNextValueInLinkedList(DAT_00726138);
LAB_0022ef9d:
      if (lVar3 == 0) {
LAB_0022f19a:
        UnlockSemaphoreInfo(DAT_00726128);
        lVar3 = 0;
      }
      else {
        lVar1 = *(long *)(lVar3 + 0x28);
        while( true ) {
          if (lVar1 < 0) {
                    /* WARNING: Subroutine does not return */
            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");
          }
          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&
             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),
                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;
          lVar3 = GetNextValueInLinkedList(DAT_00726138);
          if (lVar3 == 0) goto LAB_0022f19a;
          lVar1 = *(long *)(lVar3 + 0x28);
        }
        UnlockSemaphoreInfo(DAT_00726128);
        if (lVar3 != 0) {
          LockSemaphoreInfo(DAT_00726130);
          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);
          UnlockSemaphoreInfo(DAT_00726130);
        }
      }
    }
  }
  return lVar3;
}


PUSH R12
PUSH RBP
PUSH RBX
TEST RDX,RDX
JZ 0x0022efd2
MOV R12,RDI
MOV RBP,RSI
MOV RDI,RDX
CALL 0x0022ecb6
TEST EAX,EAX
JZ 0x0022f158
CMP qword ptr [0x00726140],0x0
JZ 0x0022eff1
TEST R12,R12
JZ 0x0022f15f
MOV RDI,qword ptr [0x00726130]
CALL 0x0014a710
MOV RDI,qword ptr [0x00726140]
CALL 0x0014ae50
MOV RDI,qword ptr [0x00726140]
CALL 0x0014b870
MOV RBX,RAX
TEST RAX,RAX
JNZ 0x0022f06e
MOV RDI,qword ptr [0x00726130]
CALL 0x0014b660
MOV RDI,qword ptr [0x00726128]
CALL 0x0014a710
MOV RDI,qword ptr [0x00726138]
CALL 0x0014ae50
MOV RDI,qword ptr [0x00726138]
CALL 0x0014b870
MOV RBX,RAX
TEST RBX,RBX
JZ 0x0022f19a
MOV RDI,qword ptr [RBX + 0x28]
TEST RDI,RDI
JNS 0x0022f0f5
LEA RCX,[0x422d68]
MOV EDX,0x143
LEA RSI,[0x4229f8]
LEA RDI,[0x422a0b]
CALL 0x0014a360
LEA RCX,[0x422d68]
MOV EDX,0x11e
LEA RSI,[0x4229f8]
LEA RDI,[0x3fa748]
CALL 0x0014a360
CMP qword ptr [0x00726130],0x0
JZ 0x0022f035
MOV RDI,qword ptr [0x00726130]
CALL 0x0014a710
CMP qword ptr [0x00726140],0x0
JZ 0x0022f043
MOV RDI,qword ptr [0x00726130]
CALL 0x0014b660
CMP qword ptr [0x00726140],0x0
JNZ 0x0022ef31
MOV EBX,0x0
JMP 0x0022f192
LEA RDI,[0x726130]
CALL 0x0014b000
JMP 0x0022effb
MOV EDI,0x0
CALL 0x0014d260
MOV qword ptr [0x00726140],RAX
JMP 0x0022f011
MOV RDI,qword ptr [0x00726140]
CALL 0x0014b870
MOV RBX,RAX
TEST RAX,RAX
JZ 0x0022ef6a
MOV RDI,qword ptr [RBX + 0x28]
MOV RDX,qword ptr [RBX + 0x20]
LEA RAX,[RDI + RDX*0x1]
CMP RAX,RBP
JA 0x0022f056
MOV RSI,qword ptr [RBX + 0x18]
ADD RDI,R12
CALL 0x0014cbc0
TEST EAX,EAX
JNZ 0x0022f056
MOV RDI,qword ptr [0x00726130]
CALL 0x0014b660
TEST RBX,RBX
JNZ 0x0022f192
MOV RDI,qword ptr [0x00726128]
CALL 0x0014a710
MOV RDI,qword ptr [0x00726138]
CALL 0x0014ae50
MOV RDI,qword ptr [0x00726138]
CALL 0x0014b870
MOV RBX,RAX
JMP 0x0022ef9d
MOV RDI,qword ptr [0x00726138]
CALL 0x0014b870
MOV RBX,RAX
TEST RAX,RAX
JZ 0x0022f19a
MOV RDI,qword ptr [RBX + 0x28]
TEST RDI,RDI
JS 0x0022efb3
MOV RDX,qword ptr [RBX + 0x20]
LEA RAX,[RDI + RDX*0x1]
CMP RAX,RBP
JA 0x0022f0d0
MOV RSI,qword ptr [RBX + 0x18]
ADD RDI,R12
CALL 0x0014cbc0
TEST EAX,EAX
JNZ 0x0022f0d0
MOV RDI,qword ptr [0x00726128]
CALL 0x0014b660
TEST RBX,RBX
JZ 0x0022f192
MOV RDI,qword ptr [0x00726130]
CALL 0x0014a710
MOV RCX,RBX
MOV EDX,0x0
LEA RSI,[0x22ec89]
MOV RDI,qword ptr [0x00726140]
CALL 0x0014bb50
MOV RDI,qword ptr [0x00726130]
CALL 0x0014b660
JMP 0x0022f192
MOV EBX,0x0
JMP 0x0022f192
MOV RDI,qword ptr [0x00726128]
CALL 0x0014a710
MOV RDI,qword ptr [0x00726138]
CALL 0x0014ae50
MOV RDI,qword ptr [0x00726138]
CALL 0x0014b870
MOV RBX,RAX
MOV RDI,qword ptr [0x00726128]
CALL 0x0014b660
MOV RAX,RBX
POP RBX
POP RBP
POP R12
RET
MOV RDI,qword ptr [0x00726128]
CALL 0x0014b660
MOV EBX,0x0
JMP 0x0022f192
(translation_unit "long GetMagicInfo(long param_1,ulong param_2,long param_3)\n\n{\n  long lVar1;\n  int iVar2;\n  long lVar3;\n  \n  if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  iVar2 = FUN_0022ecb6(param_3);\n  if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }\n  return lVar3;\n}\n\n" (function_definition "long GetMagicInfo(long param_1,ulong param_2,long param_3)\n\n{\n  long lVar1;\n  int iVar2;\n  long lVar3;\n  \n  if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  iVar2 = FUN_0022ecb6(param_3);\n  if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }\n  return lVar3;\n}" (sized_type_specifier "long" long) (function_declarator "GetMagicInfo(long param_1,ulong param_2,long param_3)" identifier (parameter_list "(long param_1,ulong param_2,long param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  long lVar3;\n  \n  if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  iVar2 = FUN_0022ecb6(param_3);\n  if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }\n  return lVar3;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }" { comment (expression_statement "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");" (call_expression "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo")" identifier (argument_list "("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo")" ( (string_literal ""exception != (ExceptionInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/magic.c"" " string_content ") , number_literal , (string_literal ""GetMagicInfo"" " string_content ") ))) ;) })) (expression_statement "iVar2 = FUN_0022ecb6(param_3);" (assignment_expression "iVar2 = FUN_0022ecb6(param_3)" identifier = (call_expression "FUN_0022ecb6(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    lVar3 = 0;\n  }" { (expression_statement "lVar3 = 0;" (assignment_expression "lVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }" else (compound_statement "{\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }" { (if_statement "if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }" if (parenthesized_expression "(DAT_00726140 == 0)" ( (binary_expression "DAT_00726140 == 0" identifier == number_literal) )) (compound_statement "{\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }" { (if_statement "if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }" if (parenthesized_expression "(DAT_00726130 == 0)" ( (binary_expression "DAT_00726130 == 0" identifier == number_literal) )) (compound_statement "{\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }" { (expression_statement "ActivateSemaphoreInfo(&DAT_00726130);" (call_expression "ActivateSemaphoreInfo(&DAT_00726130)" identifier (argument_list "(&DAT_00726130)" ( (pointer_expression "&DAT_00726130" & identifier) ))) ;) })) (expression_statement "LockSemaphoreInfo(DAT_00726130);" (call_expression "LockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (if_statement "if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }" if (parenthesized_expression "(DAT_00726140 == 0)" ( (binary_expression "DAT_00726140 == 0" identifier == number_literal) )) (compound_statement "{\n        DAT_00726140 = NewLinkedList(0);\n      }" { (expression_statement "DAT_00726140 = NewLinkedList(0);" (assignment_expression "DAT_00726140 = NewLinkedList(0)" identifier = (call_expression "NewLinkedList(0)" identifier (argument_list "(0)" ( number_literal )))) ;) })) (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (if_statement "if (DAT_00726140 == 0) {\n        return 0;\n      }" if (parenthesized_expression "(DAT_00726140 == 0)" ( (binary_expression "DAT_00726140 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) })) (if_statement "if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }" { (expression_statement "LockSemaphoreInfo(DAT_00726128);" (call_expression "LockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(DAT_00726138);" (call_expression "ResetLinkedListIterator(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier ))) ;) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier )))) ;) (expression_statement "UnlockSemaphoreInfo(DAT_00726128);" (call_expression "UnlockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;) }) (else_clause "else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }" else (compound_statement "{\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }" { (expression_statement "LockSemaphoreInfo(DAT_00726130);" (call_expression "LockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(DAT_00726140);" (call_expression "ResetLinkedListIterator(DAT_00726140)" identifier (argument_list "(DAT_00726140)" ( identifier ))) ;) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726140);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726140)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726140)" identifier (argument_list "(DAT_00726140)" ( identifier )))) ;) (while_statement "while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }" while (parenthesized_expression "(lVar3 != 0)" ( (binary_expression "lVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }" { (if_statement "if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }" if (parenthesized_expression "((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0))" ( (binary_expression "(*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" (parenthesized_expression "(*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2)" ( (binary_expression "*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2" (binary_expression "*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20)" (pointer_expression "*(long *)(lVar3 + 0x28)" * (cast_expression "(long *)(lVar3 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) )))) + (pointer_expression "*(size_t *)(lVar3 + 0x20)" * (cast_expression "(size_t *)(lVar3 + 0x20)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x20)" ( (binary_expression "lVar3 + 0x20" identifier + number_literal) ))))) <= identifier) )) && (parenthesized_expression "(iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" ( (comma_expression "iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0" (assignment_expression "iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20))" identifier = (call_expression "memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20))" identifier (argument_list "((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20))" ( (cast_expression "(void *)(*(long *)(lVar3 + 0x28) + param_1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(lVar3 + 0x28) + param_1)" ( (binary_expression "*(long *)(lVar3 + 0x28) + param_1" (pointer_expression "*(long *)(lVar3 + 0x28)" * (cast_expression "(long *)(lVar3 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) )))) + identifier) ))) , (pointer_expression "*(void **)(lVar3 + 0x18)" * (cast_expression "(void **)(lVar3 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar3 + 0x18)" ( (binary_expression "lVar3 + 0x18" identifier + number_literal) )))) , (pointer_expression "*(size_t *)(lVar3 + 0x20)" * (cast_expression "(size_t *)(lVar3 + 0x20)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x20)" ( (binary_expression "lVar3 + 0x20" identifier + number_literal) )))) )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }" { (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (if_statement "if (lVar3 != 0) {\n            return lVar3;\n          }" if (parenthesized_expression "(lVar3 != 0)" ( (binary_expression "lVar3 != 0" identifier != number_literal) )) (compound_statement "{\n            return lVar3;\n          }" { (return_statement "return lVar3;" return identifier ;) })) (expression_statement "LockSemaphoreInfo(DAT_00726128);" (call_expression "LockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(DAT_00726138);" (call_expression "ResetLinkedListIterator(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier ))) ;) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier )))) ;) (goto_statement "goto LAB_0022ef9d;" goto statement_identifier ;) })) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726140);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726140)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726140)" identifier (argument_list "(DAT_00726140)" ( identifier )))) ;) })) (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (expression_statement "LockSemaphoreInfo(DAT_00726128);" (call_expression "LockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(DAT_00726138);" (call_expression "ResetLinkedListIterator(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier ))) ;) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier )))) ;) (labeled_statement "LAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" statement_identifier : (if_statement "if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }" { (labeled_statement "LAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);" statement_identifier : (expression_statement "UnlockSemaphoreInfo(DAT_00726128);" (call_expression "UnlockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;)) (expression_statement "lVar3 = 0;" (assignment_expression "lVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" else (compound_statement "{\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" { (expression_statement "lVar1 = *(long *)(lVar3 + 0x28);" (assignment_expression "lVar1 = *(long *)(lVar3 + 0x28)" identifier = (pointer_expression "*(long *)(lVar3 + 0x28)" * (cast_expression "(long *)(lVar3 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) ))))) ;) (while_statement "while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }" { (if_statement "if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }" if (parenthesized_expression "(lVar1 < 0)" ( (binary_expression "lVar1 < 0" identifier < number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }" { comment (expression_statement "__assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");" (call_expression "__assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo")" identifier (argument_list "("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo")" ( (string_literal ""p->offset >= 0"" " string_content ") , (string_literal ""MagickCore/magic.c"" " string_content ") , number_literal , (string_literal ""GetMagicInfo"" " string_content ") ))) ;) })) (if_statement "if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;" if (parenthesized_expression "((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0))" ( (binary_expression "(lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" (parenthesized_expression "(lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2)" ( (binary_expression "lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2" (binary_expression "lVar1 + *(size_t *)(lVar3 + 0x20)" identifier + (pointer_expression "*(size_t *)(lVar3 + 0x20)" * (cast_expression "(size_t *)(lVar3 + 0x20)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x20)" ( (binary_expression "lVar3 + 0x20" identifier + number_literal) ))))) <= identifier) )) && (parenthesized_expression "(iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" ( (comma_expression "iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0" (assignment_expression "iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20))" identifier = (call_expression "memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20))" identifier (argument_list "((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20))" ( (cast_expression "(void *)(lVar1 + param_1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + param_1)" ( (binary_expression "lVar1 + param_1" identifier + identifier) ))) , (pointer_expression "*(void **)(lVar3 + 0x18)" * (cast_expression "(void **)(lVar3 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar3 + 0x18)" ( (binary_expression "lVar3 + 0x18" identifier + number_literal) )))) , (pointer_expression "*(size_t *)(lVar3 + 0x20)" * (cast_expression "(size_t *)(lVar3 + 0x20)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x20)" ( (binary_expression "lVar3 + 0x20" identifier + number_literal) )))) )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) (break_statement "break;" break ;)) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier )))) ;) (if_statement "if (lVar3 == 0) goto LAB_0022f19a;" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0022f19a;" goto statement_identifier ;)) (expression_statement "lVar1 = *(long *)(lVar3 + 0x28);" (assignment_expression "lVar1 = *(long *)(lVar3 + 0x28)" identifier = (pointer_expression "*(long *)(lVar3 + 0x28)" * (cast_expression "(long *)(lVar3 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) ))))) ;) })) (expression_statement "UnlockSemaphoreInfo(DAT_00726128);" (call_expression "UnlockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;) (if_statement "if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }" if (parenthesized_expression "(lVar3 != 0)" ( (binary_expression "lVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }" { (expression_statement "LockSemaphoreInfo(DAT_00726130);" (call_expression "LockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (expression_statement "InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);" (call_expression "InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3)" identifier (argument_list "(DAT_00726140,FUN_0022ec89,0,lVar3)" ( identifier , identifier , number_literal , identifier ))) ;) (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) })) })))) }))) }))) (return_statement "return lVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Enum "ExceptionType": Some values do not have unique names */\n\nMagicInfo * GetMagicInfo(uchar *magic,size_t length,ExceptionInfo *exception)\n\n{\n  long lVar1;\n  MagickBooleanType MVar2;\n  int iVar3;\n  MagicInfo *pMVar4;\n  \n  if (exception == (ExceptionInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  MVar2 = IsMagicListInstantiated(exception);\n  if (MVar2 == MagickFalse) {\n    pMVar4 = (MagicInfo *)0x0;\n  }\n  else {\n    if (magic_cache == (LinkedListInfo *)0x0) {\n      if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n        ActivateSemaphoreInfo(&magic_cache_semaphore);\n      }\n      LockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        magic_cache = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        return (MagicInfo *)0x0;\n      }\n    }\n    if (magic == (uchar *)0x0) {\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n      UnlockSemaphoreInfo(magic_list_semaphore);\n    }\n    else {\n      LockSemaphoreInfo(magic_cache_semaphore);\n      ResetLinkedListIterator(magic_cache);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      while (pMVar4 != (MagicInfo *)0x0) {\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\nLAB_0022ef9d:\n      if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }\n    }\n  }\n  return pMVar4;\n}\n\n" comment (function_definition "MagicInfo * GetMagicInfo(uchar *magic,size_t length,ExceptionInfo *exception)\n\n{\n  long lVar1;\n  MagickBooleanType MVar2;\n  int iVar3;\n  MagicInfo *pMVar4;\n  \n  if (exception == (ExceptionInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  MVar2 = IsMagicListInstantiated(exception);\n  if (MVar2 == MagickFalse) {\n    pMVar4 = (MagicInfo *)0x0;\n  }\n  else {\n    if (magic_cache == (LinkedListInfo *)0x0) {\n      if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n        ActivateSemaphoreInfo(&magic_cache_semaphore);\n      }\n      LockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        magic_cache = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        return (MagicInfo *)0x0;\n      }\n    }\n    if (magic == (uchar *)0x0) {\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n      UnlockSemaphoreInfo(magic_list_semaphore);\n    }\n    else {\n      LockSemaphoreInfo(magic_cache_semaphore);\n      ResetLinkedListIterator(magic_cache);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      while (pMVar4 != (MagicInfo *)0x0) {\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\nLAB_0022ef9d:\n      if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }\n    }\n  }\n  return pMVar4;\n}" type_identifier (pointer_declarator "* GetMagicInfo(uchar *magic,size_t length,ExceptionInfo *exception)" * (function_declarator "GetMagicInfo(uchar *magic,size_t length,ExceptionInfo *exception)" identifier (parameter_list "(uchar *magic,size_t length,ExceptionInfo *exception)" ( (parameter_declaration "uchar *magic" type_identifier (pointer_declarator "*magic" * identifier)) , (parameter_declaration "size_t length" primitive_type identifier) , (parameter_declaration "ExceptionInfo *exception" type_identifier (pointer_declarator "*exception" * identifier)) )))) (compound_statement "{\n  long lVar1;\n  MagickBooleanType MVar2;\n  int iVar3;\n  MagicInfo *pMVar4;\n  \n  if (exception == (ExceptionInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  MVar2 = IsMagicListInstantiated(exception);\n  if (MVar2 == MagickFalse) {\n    pMVar4 = (MagicInfo *)0x0;\n  }\n  else {\n    if (magic_cache == (LinkedListInfo *)0x0) {\n      if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n        ActivateSemaphoreInfo(&magic_cache_semaphore);\n      }\n      LockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        magic_cache = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        return (MagicInfo *)0x0;\n      }\n    }\n    if (magic == (uchar *)0x0) {\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n      UnlockSemaphoreInfo(magic_list_semaphore);\n    }\n    else {\n      LockSemaphoreInfo(magic_cache_semaphore);\n      ResetLinkedListIterator(magic_cache);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      while (pMVar4 != (MagicInfo *)0x0) {\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\nLAB_0022ef9d:\n      if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }\n    }\n  }\n  return pMVar4;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "MagickBooleanType MVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "MagicInfo *pMVar4;" type_identifier (pointer_declarator "*pMVar4" * identifier) ;) (if_statement "if (exception == (ExceptionInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }" if (parenthesized_expression "(exception == (ExceptionInfo *)0x0)" ( (binary_expression "exception == (ExceptionInfo *)0x0" identifier == (cast_expression "(ExceptionInfo *)0x0" ( (type_descriptor "ExceptionInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }" { comment (expression_statement "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");" (call_expression "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo")" identifier (argument_list "("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo")" ( (string_literal ""exception != (ExceptionInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/magic.c"" " string_content ") , number_literal , (string_literal ""GetMagicInfo"" " string_content ") ))) ;) })) (expression_statement "MVar2 = IsMagicListInstantiated(exception);" (assignment_expression "MVar2 = IsMagicListInstantiated(exception)" identifier = (call_expression "IsMagicListInstantiated(exception)" identifier (argument_list "(exception)" ( identifier )))) ;) (if_statement "if (MVar2 == MagickFalse) {\n    pMVar4 = (MagicInfo *)0x0;\n  }\n  else {\n    if (magic_cache == (LinkedListInfo *)0x0) {\n      if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n        ActivateSemaphoreInfo(&magic_cache_semaphore);\n      }\n      LockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        magic_cache = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        return (MagicInfo *)0x0;\n      }\n    }\n    if (magic == (uchar *)0x0) {\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n      UnlockSemaphoreInfo(magic_list_semaphore);\n    }\n    else {\n      LockSemaphoreInfo(magic_cache_semaphore);\n      ResetLinkedListIterator(magic_cache);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      while (pMVar4 != (MagicInfo *)0x0) {\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\nLAB_0022ef9d:\n      if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }\n    }\n  }" if (parenthesized_expression "(MVar2 == MagickFalse)" ( (binary_expression "MVar2 == MagickFalse" identifier == identifier) )) (compound_statement "{\n    pMVar4 = (MagicInfo *)0x0;\n  }" { (expression_statement "pMVar4 = (MagicInfo *)0x0;" (assignment_expression "pMVar4 = (MagicInfo *)0x0" identifier = (cast_expression "(MagicInfo *)0x0" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    if (magic_cache == (LinkedListInfo *)0x0) {\n      if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n        ActivateSemaphoreInfo(&magic_cache_semaphore);\n      }\n      LockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        magic_cache = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        return (MagicInfo *)0x0;\n      }\n    }\n    if (magic == (uchar *)0x0) {\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n      UnlockSemaphoreInfo(magic_list_semaphore);\n    }\n    else {\n      LockSemaphoreInfo(magic_cache_semaphore);\n      ResetLinkedListIterator(magic_cache);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      while (pMVar4 != (MagicInfo *)0x0) {\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\nLAB_0022ef9d:\n      if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }\n    }\n  }" else (compound_statement "{\n    if (magic_cache == (LinkedListInfo *)0x0) {\n      if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n        ActivateSemaphoreInfo(&magic_cache_semaphore);\n      }\n      LockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        magic_cache = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        return (MagicInfo *)0x0;\n      }\n    }\n    if (magic == (uchar *)0x0) {\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n      UnlockSemaphoreInfo(magic_list_semaphore);\n    }\n    else {\n      LockSemaphoreInfo(magic_cache_semaphore);\n      ResetLinkedListIterator(magic_cache);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      while (pMVar4 != (MagicInfo *)0x0) {\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\nLAB_0022ef9d:\n      if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }\n    }\n  }" { (if_statement "if (magic_cache == (LinkedListInfo *)0x0) {\n      if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n        ActivateSemaphoreInfo(&magic_cache_semaphore);\n      }\n      LockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        magic_cache = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        return (MagicInfo *)0x0;\n      }\n    }" if (parenthesized_expression "(magic_cache == (LinkedListInfo *)0x0)" ( (binary_expression "magic_cache == (LinkedListInfo *)0x0" identifier == (cast_expression "(LinkedListInfo *)0x0" ( (type_descriptor "LinkedListInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n        ActivateSemaphoreInfo(&magic_cache_semaphore);\n      }\n      LockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        magic_cache = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      if (magic_cache == (LinkedListInfo *)0x0) {\n        return (MagicInfo *)0x0;\n      }\n    }" { (if_statement "if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n        ActivateSemaphoreInfo(&magic_cache_semaphore);\n      }" if (parenthesized_expression "(magic_cache_semaphore == (SemaphoreInfo *)0x0)" ( (binary_expression "magic_cache_semaphore == (SemaphoreInfo *)0x0" identifier == (cast_expression "(SemaphoreInfo *)0x0" ( (type_descriptor "SemaphoreInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        ActivateSemaphoreInfo(&magic_cache_semaphore);\n      }" { (expression_statement "ActivateSemaphoreInfo(&magic_cache_semaphore);" (call_expression "ActivateSemaphoreInfo(&magic_cache_semaphore)" identifier (argument_list "(&magic_cache_semaphore)" ( (pointer_expression "&magic_cache_semaphore" & identifier) ))) ;) })) (expression_statement "LockSemaphoreInfo(magic_cache_semaphore);" (call_expression "LockSemaphoreInfo(magic_cache_semaphore)" identifier (argument_list "(magic_cache_semaphore)" ( identifier ))) ;) (if_statement "if (magic_cache == (LinkedListInfo *)0x0) {\n        magic_cache = NewLinkedList(0);\n      }" if (parenthesized_expression "(magic_cache == (LinkedListInfo *)0x0)" ( (binary_expression "magic_cache == (LinkedListInfo *)0x0" identifier == (cast_expression "(LinkedListInfo *)0x0" ( (type_descriptor "LinkedListInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        magic_cache = NewLinkedList(0);\n      }" { (expression_statement "magic_cache = NewLinkedList(0);" (assignment_expression "magic_cache = NewLinkedList(0)" identifier = (call_expression "NewLinkedList(0)" identifier (argument_list "(0)" ( number_literal )))) ;) })) (expression_statement "UnlockSemaphoreInfo(magic_cache_semaphore);" (call_expression "UnlockSemaphoreInfo(magic_cache_semaphore)" identifier (argument_list "(magic_cache_semaphore)" ( identifier ))) ;) (if_statement "if (magic_cache == (LinkedListInfo *)0x0) {\n        return (MagicInfo *)0x0;\n      }" if (parenthesized_expression "(magic_cache == (LinkedListInfo *)0x0)" ( (binary_expression "magic_cache == (LinkedListInfo *)0x0" identifier == (cast_expression "(LinkedListInfo *)0x0" ( (type_descriptor "LinkedListInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return (MagicInfo *)0x0;\n      }" { (return_statement "return (MagicInfo *)0x0;" return (cast_expression "(MagicInfo *)0x0" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) })) (if_statement "if (magic == (uchar *)0x0) {\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n      UnlockSemaphoreInfo(magic_list_semaphore);\n    }\n    else {\n      LockSemaphoreInfo(magic_cache_semaphore);\n      ResetLinkedListIterator(magic_cache);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      while (pMVar4 != (MagicInfo *)0x0) {\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\nLAB_0022ef9d:\n      if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }\n    }" if (parenthesized_expression "(magic == (uchar *)0x0)" ( (binary_expression "magic == (uchar *)0x0" identifier == (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n      UnlockSemaphoreInfo(magic_list_semaphore);\n    }" { (expression_statement "LockSemaphoreInfo(magic_list_semaphore);" (call_expression "LockSemaphoreInfo(magic_list_semaphore)" identifier (argument_list "(magic_list_semaphore)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(magic_list);" (call_expression "ResetLinkedListIterator(magic_list)" identifier (argument_list "(magic_list)" ( identifier ))) ;) (expression_statement "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);" (assignment_expression "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list)" identifier = (cast_expression "(MagicInfo *)GetNextValueInLinkedList(magic_list)" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "GetNextValueInLinkedList(magic_list)" identifier (argument_list "(magic_list)" ( identifier ))))) ;) (expression_statement "UnlockSemaphoreInfo(magic_list_semaphore);" (call_expression "UnlockSemaphoreInfo(magic_list_semaphore)" identifier (argument_list "(magic_list_semaphore)" ( identifier ))) ;) }) (else_clause "else {\n      LockSemaphoreInfo(magic_cache_semaphore);\n      ResetLinkedListIterator(magic_cache);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      while (pMVar4 != (MagicInfo *)0x0) {\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\nLAB_0022ef9d:\n      if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }\n    }" else (compound_statement "{\n      LockSemaphoreInfo(magic_cache_semaphore);\n      ResetLinkedListIterator(magic_cache);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      while (pMVar4 != (MagicInfo *)0x0) {\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }\n      UnlockSemaphoreInfo(magic_cache_semaphore);\n      LockSemaphoreInfo(magic_list_semaphore);\n      ResetLinkedListIterator(magic_list);\n      pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\nLAB_0022ef9d:\n      if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }\n    }" { (expression_statement "LockSemaphoreInfo(magic_cache_semaphore);" (call_expression "LockSemaphoreInfo(magic_cache_semaphore)" identifier (argument_list "(magic_cache_semaphore)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(magic_cache);" (call_expression "ResetLinkedListIterator(magic_cache)" identifier (argument_list "(magic_cache)" ( identifier ))) ;) (expression_statement "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);" (assignment_expression "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache)" identifier = (cast_expression "(MagicInfo *)GetNextValueInLinkedList(magic_cache)" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "GetNextValueInLinkedList(magic_cache)" identifier (argument_list "(magic_cache)" ( identifier ))))) ;) (while_statement "while (pMVar4 != (MagicInfo *)0x0) {\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }" while (parenthesized_expression "(pMVar4 != (MagicInfo *)0x0)" ( (binary_expression "pMVar4 != (MagicInfo *)0x0" identifier != (cast_expression "(MagicInfo *)0x0" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }\n        pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);\n      }" { (if_statement "if ((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)) {\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }" if (parenthesized_expression "((pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0))" ( (binary_expression "(pMVar4->offset + pMVar4->length <= length) &&\n           (iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)" (parenthesized_expression "(pMVar4->offset + pMVar4->length <= length)" ( (binary_expression "pMVar4->offset + pMVar4->length <= length" (binary_expression "pMVar4->offset + pMVar4->length" (field_expression "pMVar4->offset" identifier -> field_identifier) + (field_expression "pMVar4->length" identifier -> field_identifier)) <= identifier) )) && (parenthesized_expression "(iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0)" ( (comma_expression "iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length), iVar3 == 0" (assignment_expression "iVar3 = memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length)" identifier = (call_expression "memcmp(magic + pMVar4->offset,pMVar4->magic,pMVar4->length)" identifier (argument_list "(magic + pMVar4->offset,pMVar4->magic,pMVar4->length)" ( (binary_expression "magic + pMVar4->offset" identifier + (field_expression "pMVar4->offset" identifier -> field_identifier)) , (field_expression "pMVar4->magic" identifier -> field_identifier) , (field_expression "pMVar4->length" identifier -> field_identifier) )))) , (binary_expression "iVar3 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n          if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }\n          LockSemaphoreInfo(magic_list_semaphore);\n          ResetLinkedListIterator(magic_list);\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          goto LAB_0022ef9d;\n        }" { (expression_statement "UnlockSemaphoreInfo(magic_cache_semaphore);" (call_expression "UnlockSemaphoreInfo(magic_cache_semaphore)" identifier (argument_list "(magic_cache_semaphore)" ( identifier ))) ;) (if_statement "if (pMVar4 != (MagicInfo *)0x0) {\n            return pMVar4;\n          }" if (parenthesized_expression "(pMVar4 != (MagicInfo *)0x0)" ( (binary_expression "pMVar4 != (MagicInfo *)0x0" identifier != (cast_expression "(MagicInfo *)0x0" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            return pMVar4;\n          }" { (return_statement "return pMVar4;" return identifier ;) })) (expression_statement "LockSemaphoreInfo(magic_list_semaphore);" (call_expression "LockSemaphoreInfo(magic_list_semaphore)" identifier (argument_list "(magic_list_semaphore)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(magic_list);" (call_expression "ResetLinkedListIterator(magic_list)" identifier (argument_list "(magic_list)" ( identifier ))) ;) (expression_statement "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);" (assignment_expression "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list)" identifier = (cast_expression "(MagicInfo *)GetNextValueInLinkedList(magic_list)" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "GetNextValueInLinkedList(magic_list)" identifier (argument_list "(magic_list)" ( identifier ))))) ;) (goto_statement "goto LAB_0022ef9d;" goto statement_identifier ;) })) (expression_statement "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache);" (assignment_expression "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_cache)" identifier = (cast_expression "(MagicInfo *)GetNextValueInLinkedList(magic_cache)" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "GetNextValueInLinkedList(magic_cache)" identifier (argument_list "(magic_cache)" ( identifier ))))) ;) })) (expression_statement "UnlockSemaphoreInfo(magic_cache_semaphore);" (call_expression "UnlockSemaphoreInfo(magic_cache_semaphore)" identifier (argument_list "(magic_cache_semaphore)" ( identifier ))) ;) (expression_statement "LockSemaphoreInfo(magic_list_semaphore);" (call_expression "LockSemaphoreInfo(magic_list_semaphore)" identifier (argument_list "(magic_list_semaphore)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(magic_list);" (call_expression "ResetLinkedListIterator(magic_list)" identifier (argument_list "(magic_list)" ( identifier ))) ;) (expression_statement "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);" (assignment_expression "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list)" identifier = (cast_expression "(MagicInfo *)GetNextValueInLinkedList(magic_list)" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "GetNextValueInLinkedList(magic_list)" identifier (argument_list "(magic_list)" ( identifier ))))) ;) (labeled_statement "LAB_0022ef9d:\n      if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }" statement_identifier : (if_statement "if (pMVar4 == (MagicInfo *)0x0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }\n      else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }" if (parenthesized_expression "(pMVar4 == (MagicInfo *)0x0)" ( (binary_expression "pMVar4 == (MagicInfo *)0x0" identifier == (cast_expression "(MagicInfo *)0x0" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        pMVar4 = (MagicInfo *)0x0;\n      }" { (labeled_statement "LAB_0022f19a:\n        UnlockSemaphoreInfo(magic_list_semaphore);" statement_identifier : (expression_statement "UnlockSemaphoreInfo(magic_list_semaphore);" (call_expression "UnlockSemaphoreInfo(magic_list_semaphore)" identifier (argument_list "(magic_list_semaphore)" ( identifier ))) ;)) (expression_statement "pMVar4 = (MagicInfo *)0x0;" (assignment_expression "pMVar4 = (MagicInfo *)0x0" identifier = (cast_expression "(MagicInfo *)0x0" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }" else (compound_statement "{\n        lVar1 = pMVar4->offset;\n        while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }\n        UnlockSemaphoreInfo(magic_list_semaphore);\n        if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }\n      }" { (expression_statement "lVar1 = pMVar4->offset;" (assignment_expression "lVar1 = pMVar4->offset" identifier = (field_expression "pMVar4->offset" identifier -> field_identifier)) ;) (while_statement "while( true ) {\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;\n          pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);\n          if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;\n          lVar1 = pMVar4->offset;\n        }" { (if_statement "if (lVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }" if (parenthesized_expression "(lVar1 < 0)" ( (binary_expression "lVar1 < 0" identifier < number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }" { comment (expression_statement "__assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");" (call_expression "__assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo")" identifier (argument_list "("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo")" ( (string_literal ""p->offset >= 0"" " string_content ") , (string_literal ""MagickCore/magic.c"" " string_content ") , number_literal , (string_literal ""GetMagicInfo"" " string_content ") ))) ;) })) (if_statement "if ((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)) break;" if (parenthesized_expression "((lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0))" ( (binary_expression "(lVar1 + pMVar4->length <= length) &&\n             (iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)" (parenthesized_expression "(lVar1 + pMVar4->length <= length)" ( (binary_expression "lVar1 + pMVar4->length <= length" (binary_expression "lVar1 + pMVar4->length" identifier + (field_expression "pMVar4->length" identifier -> field_identifier)) <= identifier) )) && (parenthesized_expression "(iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0)" ( (comma_expression "iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length), iVar3 == 0" (assignment_expression "iVar3 = memcmp(magic + lVar1,pMVar4->magic,pMVar4->length)" identifier = (call_expression "memcmp(magic + lVar1,pMVar4->magic,pMVar4->length)" identifier (argument_list "(magic + lVar1,pMVar4->magic,pMVar4->length)" ( (binary_expression "magic + lVar1" identifier + identifier) , (field_expression "pMVar4->magic" identifier -> field_identifier) , (field_expression "pMVar4->length" identifier -> field_identifier) )))) , (binary_expression "iVar3 == 0" identifier == number_literal)) ))) )) (break_statement "break;" break ;)) (expression_statement "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list);" (assignment_expression "pMVar4 = (MagicInfo *)GetNextValueInLinkedList(magic_list)" identifier = (cast_expression "(MagicInfo *)GetNextValueInLinkedList(magic_list)" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "GetNextValueInLinkedList(magic_list)" identifier (argument_list "(magic_list)" ( identifier ))))) ;) (if_statement "if (pMVar4 == (MagicInfo *)0x0) goto LAB_0022f19a;" if (parenthesized_expression "(pMVar4 == (MagicInfo *)0x0)" ( (binary_expression "pMVar4 == (MagicInfo *)0x0" identifier == (cast_expression "(MagicInfo *)0x0" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0022f19a;" goto statement_identifier ;)) (expression_statement "lVar1 = pMVar4->offset;" (assignment_expression "lVar1 = pMVar4->offset" identifier = (field_expression "pMVar4->offset" identifier -> field_identifier)) ;) })) (expression_statement "UnlockSemaphoreInfo(magic_list_semaphore);" (call_expression "UnlockSemaphoreInfo(magic_list_semaphore)" identifier (argument_list "(magic_list_semaphore)" ( identifier ))) ;) (if_statement "if (pMVar4 != (MagicInfo *)0x0) {\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }" if (parenthesized_expression "(pMVar4 != (MagicInfo *)0x0)" ( (binary_expression "pMVar4 != (MagicInfo *)0x0" identifier != (cast_expression "(MagicInfo *)0x0" ( (type_descriptor "MagicInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          LockSemaphoreInfo(magic_cache_semaphore);\n          InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);\n          UnlockSemaphoreInfo(magic_cache_semaphore);\n        }" { (expression_statement "LockSemaphoreInfo(magic_cache_semaphore);" (call_expression "LockSemaphoreInfo(magic_cache_semaphore)" identifier (argument_list "(magic_cache_semaphore)" ( identifier ))) ;) (expression_statement "InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4);" (call_expression "InsertValueInSortedLinkedList(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4)" identifier (argument_list "(magic_cache,CompareMagickInfoSize,(void **)0x0,pMVar4)" ( identifier , identifier , (cast_expression "(void **)0x0" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) , identifier ))) ;) (expression_statement "UnlockSemaphoreInfo(magic_cache_semaphore);" (call_expression "UnlockSemaphoreInfo(magic_cache_semaphore)" identifier (argument_list "(magic_cache_semaphore)" ( identifier ))) ;) })) })))) }))) }))) (return_statement "return pMVar4;" return identifier ;) })))
(translation_unit "long GetMagicInfo(long param_1,ulong param_2,long param_3)\n\n{\n  long lVar1;\n  int iVar2;\n  long lVar3;\n  \n  if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  iVar2 = FUN_0022ecb6(param_3);\n  if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }\n  return lVar3;\n}\n\n" (function_definition "long GetMagicInfo(long param_1,ulong param_2,long param_3)\n\n{\n  long lVar1;\n  int iVar2;\n  long lVar3;\n  \n  if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  iVar2 = FUN_0022ecb6(param_3);\n  if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }\n  return lVar3;\n}" (sized_type_specifier "long" long) (function_declarator "GetMagicInfo(long param_1,ulong param_2,long param_3)" identifier (parameter_list "(long param_1,ulong param_2,long param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  long lVar3;\n  \n  if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  iVar2 = FUN_0022ecb6(param_3);\n  if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }\n  return lVar3;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }" { (expression_statement "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");" (call_expression "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo")" identifier (argument_list "("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo")" ( (string_literal ""exception != (ExceptionInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/magic.c"" " string_content ") , number_literal , (string_literal ""GetMagicInfo"" " string_content ") ))) ;) })) (expression_statement "iVar2 = FUN_0022ecb6(param_3);" (assignment_expression "iVar2 = FUN_0022ecb6(param_3)" identifier = (call_expression "FUN_0022ecb6(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    lVar3 = 0;\n  }" { (expression_statement "lVar3 = 0;" (assignment_expression "lVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }" else (compound_statement "{\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }" { (if_statement "if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }" if (parenthesized_expression "(DAT_00726140 == 0)" ( (binary_expression "DAT_00726140 == 0" identifier == number_literal) )) (compound_statement "{\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }" { (if_statement "if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }" if (parenthesized_expression "(DAT_00726130 == 0)" ( (binary_expression "DAT_00726130 == 0" identifier == number_literal) )) (compound_statement "{\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }" { (expression_statement "ActivateSemaphoreInfo(&DAT_00726130);" (call_expression "ActivateSemaphoreInfo(&DAT_00726130)" identifier (argument_list "(&DAT_00726130)" ( (pointer_expression "&DAT_00726130" & identifier) ))) ;) })) (expression_statement "LockSemaphoreInfo(DAT_00726130);" (call_expression "LockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (if_statement "if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }" if (parenthesized_expression "(DAT_00726140 == 0)" ( (binary_expression "DAT_00726140 == 0" identifier == number_literal) )) (compound_statement "{\n        DAT_00726140 = NewLinkedList(0);\n      }" { (expression_statement "DAT_00726140 = NewLinkedList(0);" (assignment_expression "DAT_00726140 = NewLinkedList(0)" identifier = (call_expression "NewLinkedList(0)" identifier (argument_list "(0)" ( number_literal )))) ;) })) (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (if_statement "if (DAT_00726140 == 0) {\n        return 0;\n      }" if (parenthesized_expression "(DAT_00726140 == 0)" ( (binary_expression "DAT_00726140 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) })) (if_statement "if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }" { (expression_statement "LockSemaphoreInfo(DAT_00726128);" (call_expression "LockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(DAT_00726138);" (call_expression "ResetLinkedListIterator(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier ))) ;) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier )))) ;) (expression_statement "UnlockSemaphoreInfo(DAT_00726128);" (call_expression "UnlockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;) }) (else_clause "else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }" else (compound_statement "{\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }" { (expression_statement "LockSemaphoreInfo(DAT_00726130);" (call_expression "LockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(DAT_00726140);" (call_expression "ResetLinkedListIterator(DAT_00726140)" identifier (argument_list "(DAT_00726140)" ( identifier ))) ;) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726140);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726140)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726140)" identifier (argument_list "(DAT_00726140)" ( identifier )))) ;) (while_statement "while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }" while (parenthesized_expression "(lVar3 != 0)" ( (binary_expression "lVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }" { (if_statement "if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }" if (parenthesized_expression "((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0))" ( (binary_expression "(*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" (parenthesized_expression "(*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2)" ( (binary_expression "*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2" (binary_expression "*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20)" (pointer_expression "*(long *)(lVar3 + 0x28)" * (cast_expression "(long *)(lVar3 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) )))) + (pointer_expression "*(size_t *)(lVar3 + 0x20)" * (cast_expression "(size_t *)(lVar3 + 0x20)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x20)" ( (binary_expression "lVar3 + 0x20" identifier + number_literal) ))))) <= identifier) )) && (parenthesized_expression "(iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" ( (comma_expression "iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0" (assignment_expression "iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20))" identifier = (call_expression "memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20))" identifier (argument_list "((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20))" ( (cast_expression "(void *)(*(long *)(lVar3 + 0x28) + param_1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(lVar3 + 0x28) + param_1)" ( (binary_expression "*(long *)(lVar3 + 0x28) + param_1" (pointer_expression "*(long *)(lVar3 + 0x28)" * (cast_expression "(long *)(lVar3 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) )))) + identifier) ))) , (pointer_expression "*(void **)(lVar3 + 0x18)" * (cast_expression "(void **)(lVar3 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar3 + 0x18)" ( (binary_expression "lVar3 + 0x18" identifier + number_literal) )))) , (pointer_expression "*(size_t *)(lVar3 + 0x20)" * (cast_expression "(size_t *)(lVar3 + 0x20)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x20)" ( (binary_expression "lVar3 + 0x20" identifier + number_literal) )))) )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }" { (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (if_statement "if (lVar3 != 0) {\n            return lVar3;\n          }" if (parenthesized_expression "(lVar3 != 0)" ( (binary_expression "lVar3 != 0" identifier != number_literal) )) (compound_statement "{\n            return lVar3;\n          }" { (return_statement "return lVar3;" return identifier ;) })) (expression_statement "LockSemaphoreInfo(DAT_00726128);" (call_expression "LockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(DAT_00726138);" (call_expression "ResetLinkedListIterator(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier ))) ;) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier )))) ;) (goto_statement "goto LAB_0022ef9d;" goto statement_identifier ;) })) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726140);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726140)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726140)" identifier (argument_list "(DAT_00726140)" ( identifier )))) ;) })) (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (expression_statement "LockSemaphoreInfo(DAT_00726128);" (call_expression "LockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;) (expression_statement "ResetLinkedListIterator(DAT_00726138);" (call_expression "ResetLinkedListIterator(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier ))) ;) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier )))) ;) (labeled_statement "LAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" statement_identifier : (if_statement "if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }" { (labeled_statement "LAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);" statement_identifier : (expression_statement "UnlockSemaphoreInfo(DAT_00726128);" (call_expression "UnlockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;)) (expression_statement "lVar3 = 0;" (assignment_expression "lVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" else (compound_statement "{\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" { (expression_statement "lVar1 = *(long *)(lVar3 + 0x28);" (assignment_expression "lVar1 = *(long *)(lVar3 + 0x28)" identifier = (pointer_expression "*(long *)(lVar3 + 0x28)" * (cast_expression "(long *)(lVar3 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) ))))) ;) (while_statement "while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }" { (if_statement "if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }" if (parenthesized_expression "(lVar1 < 0)" ( (binary_expression "lVar1 < 0" identifier < number_literal) )) (compound_statement "{\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }" { (expression_statement "__assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");" (call_expression "__assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo")" identifier (argument_list "("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo")" ( (string_literal ""p->offset >= 0"" " string_content ") , (string_literal ""MagickCore/magic.c"" " string_content ") , number_literal , (string_literal ""GetMagicInfo"" " string_content ") ))) ;) })) (if_statement "if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;" if (parenthesized_expression "((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0))" ( (binary_expression "(lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" (parenthesized_expression "(lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2)" ( (binary_expression "lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2" (binary_expression "lVar1 + *(size_t *)(lVar3 + 0x20)" identifier + (pointer_expression "*(size_t *)(lVar3 + 0x20)" * (cast_expression "(size_t *)(lVar3 + 0x20)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x20)" ( (binary_expression "lVar3 + 0x20" identifier + number_literal) ))))) <= identifier) )) && (parenthesized_expression "(iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" ( (comma_expression "iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0" (assignment_expression "iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20))" identifier = (call_expression "memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20))" identifier (argument_list "((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20))" ( (cast_expression "(void *)(lVar1 + param_1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + param_1)" ( (binary_expression "lVar1 + param_1" identifier + identifier) ))) , (pointer_expression "*(void **)(lVar3 + 0x18)" * (cast_expression "(void **)(lVar3 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar3 + 0x18)" ( (binary_expression "lVar3 + 0x18" identifier + number_literal) )))) , (pointer_expression "*(size_t *)(lVar3 + 0x20)" * (cast_expression "(size_t *)(lVar3 + 0x20)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x20)" ( (binary_expression "lVar3 + 0x20" identifier + number_literal) )))) )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) (break_statement "break;" break ;)) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" identifier = (call_expression "GetNextValueInLinkedList(DAT_00726138)" identifier (argument_list "(DAT_00726138)" ( identifier )))) ;) (if_statement "if (lVar3 == 0) goto LAB_0022f19a;" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0022f19a;" goto statement_identifier ;)) (expression_statement "lVar1 = *(long *)(lVar3 + 0x28);" (assignment_expression "lVar1 = *(long *)(lVar3 + 0x28)" identifier = (pointer_expression "*(long *)(lVar3 + 0x28)" * (cast_expression "(long *)(lVar3 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) ))))) ;) })) (expression_statement "UnlockSemaphoreInfo(DAT_00726128);" (call_expression "UnlockSemaphoreInfo(DAT_00726128)" identifier (argument_list "(DAT_00726128)" ( identifier ))) ;) (if_statement "if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }" if (parenthesized_expression "(lVar3 != 0)" ( (binary_expression "lVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }" { (expression_statement "LockSemaphoreInfo(DAT_00726130);" (call_expression "LockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) (expression_statement "InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);" (call_expression "InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3)" identifier (argument_list "(DAT_00726140,FUN_0022ec89,0,lVar3)" ( identifier , identifier , number_literal , identifier ))) ;) (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" identifier (argument_list "(DAT_00726130)" ( identifier ))) ;) })) })))) }))) }))) (return_statement "return lVar3;" return identifier ;) })))
(translation_unit (function_definition (sized_type_specifier long) (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) 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 (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) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == 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 )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (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 )))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) <= IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT) ))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (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 )))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (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 )))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (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 ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) <= IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) , (binary_expression IDENT == LIT)) ))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) })))) }))) }))) (return_statement return IDENT ;) })))
(function_definition "long GetMagicInfo(long param_1,ulong param_2,long param_3)\n\n{\n  long lVar1;\n  int iVar2;\n  long lVar3;\n  \n  if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  iVar2 = FUN_0022ecb6(param_3);\n  if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }\n  return lVar3;\n}" (sized_type_specifier "long" (long "long")) (function_declarator "GetMagicInfo(long param_1,ulong param_2,long param_3)" (identifier "GetMagicInfo") (parameter_list "(long param_1,ulong param_2,long param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "ulong param_2" (type_identifier "ulong") (identifier "param_2")) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) () ")"))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  long lVar3;\n  \n  if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }\n  iVar2 = FUN_0022ecb6(param_3);\n  if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }\n  return lVar3;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (if_statement "if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");\n  }" ({ "{") (expression_statement "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");" (call_expression "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo")" (identifier "__assert_fail") (argument_list "("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo")" (( "(") (string_literal ""exception != (ExceptionInfo *) NULL"" (" """) (string_content "exception != (ExceptionInfo *) NULL") (" """)) (, ",") (string_literal ""MagickCore/magic.c"" (" """) (string_content "MagickCore/magic.c") (" """)) (, ",") (number_literal "0x11e") (, ",") (string_literal ""GetMagicInfo"" (" """) (string_content "GetMagicInfo") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar2 = FUN_0022ecb6(param_3);" (assignment_expression "iVar2 = FUN_0022ecb6(param_3)" (identifier "iVar2") (= "=") (call_expression "FUN_0022ecb6(param_3)" (identifier "FUN_0022ecb6") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    lVar3 = 0;\n  }\n  else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    lVar3 = 0;\n  }" ({ "{") (expression_statement "lVar3 = 0;" (assignment_expression "lVar3 = 0" (identifier "lVar3") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }" (else "else") (compound_statement "{\n    if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }\n    if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }\n  }" ({ "{") (if_statement "if (DAT_00726140 == 0) {\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }" (if "if") (parenthesized_expression "(DAT_00726140 == 0)" (( "(") (binary_expression "DAT_00726140 == 0" (identifier "DAT_00726140") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }\n      LockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      if (DAT_00726140 == 0) {\n        return 0;\n      }\n    }" ({ "{") (if_statement "if (DAT_00726130 == 0) {\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }" (if "if") (parenthesized_expression "(DAT_00726130 == 0)" (( "(") (binary_expression "DAT_00726130 == 0" (identifier "DAT_00726130") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        ActivateSemaphoreInfo(&DAT_00726130);\n      }" ({ "{") (expression_statement "ActivateSemaphoreInfo(&DAT_00726130);" (call_expression "ActivateSemaphoreInfo(&DAT_00726130)" (identifier "ActivateSemaphoreInfo") (argument_list "(&DAT_00726130)" (( "(") (pointer_expression "&DAT_00726130" (& "&") (identifier "DAT_00726130")) () ")"))) (; ";")) (} "}"))) (expression_statement "LockSemaphoreInfo(DAT_00726130);" (call_expression "LockSemaphoreInfo(DAT_00726130)" (identifier "LockSemaphoreInfo") (argument_list "(DAT_00726130)" (( "(") (identifier "DAT_00726130") () ")"))) (; ";")) (if_statement "if (DAT_00726140 == 0) {\n        DAT_00726140 = NewLinkedList(0);\n      }" (if "if") (parenthesized_expression "(DAT_00726140 == 0)" (( "(") (binary_expression "DAT_00726140 == 0" (identifier "DAT_00726140") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        DAT_00726140 = NewLinkedList(0);\n      }" ({ "{") (expression_statement "DAT_00726140 = NewLinkedList(0);" (assignment_expression "DAT_00726140 = NewLinkedList(0)" (identifier "DAT_00726140") (= "=") (call_expression "NewLinkedList(0)" (identifier "NewLinkedList") (argument_list "(0)" (( "(") (number_literal "0") () ")")))) (; ";")) (} "}"))) (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" (identifier "UnlockSemaphoreInfo") (argument_list "(DAT_00726130)" (( "(") (identifier "DAT_00726130") () ")"))) (; ";")) (if_statement "if (DAT_00726140 == 0) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(DAT_00726140 == 0)" (( "(") (binary_expression "DAT_00726140 == 0" (identifier "DAT_00726140") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}"))) (if_statement "if (param_1 == 0) {\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }\n    else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\n      UnlockSemaphoreInfo(DAT_00726128);\n    }" ({ "{") (expression_statement "LockSemaphoreInfo(DAT_00726128);" (call_expression "LockSemaphoreInfo(DAT_00726128)" (identifier "LockSemaphoreInfo") (argument_list "(DAT_00726128)" (( "(") (identifier "DAT_00726128") () ")"))) (; ";")) (expression_statement "ResetLinkedListIterator(DAT_00726138);" (call_expression "ResetLinkedListIterator(DAT_00726138)" (identifier "ResetLinkedListIterator") (argument_list "(DAT_00726138)" (( "(") (identifier "DAT_00726138") () ")"))) (; ";")) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" (identifier "lVar3") (= "=") (call_expression "GetNextValueInLinkedList(DAT_00726138)" (identifier "GetNextValueInLinkedList") (argument_list "(DAT_00726138)" (( "(") (identifier "DAT_00726138") () ")")))) (; ";")) (expression_statement "UnlockSemaphoreInfo(DAT_00726128);" (call_expression "UnlockSemaphoreInfo(DAT_00726128)" (identifier "UnlockSemaphoreInfo") (argument_list "(DAT_00726128)" (( "(") (identifier "DAT_00726128") () ")"))) (; ";")) (} "}")) (else_clause "else {\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }" (else "else") (compound_statement "{\n      LockSemaphoreInfo(DAT_00726130);\n      ResetLinkedListIterator(DAT_00726140);\n      lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }\n      UnlockSemaphoreInfo(DAT_00726130);\n      LockSemaphoreInfo(DAT_00726128);\n      ResetLinkedListIterator(DAT_00726138);\n      lVar3 = GetNextValueInLinkedList(DAT_00726138);\nLAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }\n    }" ({ "{") (expression_statement "LockSemaphoreInfo(DAT_00726130);" (call_expression "LockSemaphoreInfo(DAT_00726130)" (identifier "LockSemaphoreInfo") (argument_list "(DAT_00726130)" (( "(") (identifier "DAT_00726130") () ")"))) (; ";")) (expression_statement "ResetLinkedListIterator(DAT_00726140);" (call_expression "ResetLinkedListIterator(DAT_00726140)" (identifier "ResetLinkedListIterator") (argument_list "(DAT_00726140)" (( "(") (identifier "DAT_00726140") () ")"))) (; ";")) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726140);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726140)" (identifier "lVar3") (= "=") (call_expression "GetNextValueInLinkedList(DAT_00726140)" (identifier "GetNextValueInLinkedList") (argument_list "(DAT_00726140)" (( "(") (identifier "DAT_00726140") () ")")))) (; ";")) (while_statement "while (lVar3 != 0) {\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }" (while "while") (parenthesized_expression "(lVar3 != 0)" (( "(") (binary_expression "lVar3 != 0" (identifier "lVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }\n        lVar3 = GetNextValueInLinkedList(DAT_00726140);\n      }" ({ "{") (if_statement "if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }" (if "if") (parenthesized_expression "((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0))" (( "(") (binary_expression "(*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" (parenthesized_expression "(*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2)" (( "(") (binary_expression "*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2" (binary_expression "*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20)" (pointer_expression "*(long *)(lVar3 + 0x28)" (* "*") (cast_expression "(long *)(lVar3 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x28)" (( "(") (binary_expression "lVar3 + 0x28" (identifier "lVar3") (+ "+") (number_literal "0x28")) () ")")))) (+ "+") (pointer_expression "*(size_t *)(lVar3 + 0x20)" (* "*") (cast_expression "(size_t *)(lVar3 + 0x20)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x20)" (( "(") (binary_expression "lVar3 + 0x20" (identifier "lVar3") (+ "+") (number_literal "0x20")) () ")"))))) (<= "<=") (identifier "param_2")) () ")")) (&& "&&") (parenthesized_expression "(iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" (( "(") (comma_expression "iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0" (assignment_expression "iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20))" (identifier "iVar2") (= "=") (call_expression "memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20))" (identifier "memcmp") (argument_list "((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),\n                           *(size_t *)(lVar3 + 0x20))" (( "(") (cast_expression "(void *)(*(long *)(lVar3 + 0x28) + param_1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(lVar3 + 0x28) + param_1)" (( "(") (binary_expression "*(long *)(lVar3 + 0x28) + param_1" (pointer_expression "*(long *)(lVar3 + 0x28)" (* "*") (cast_expression "(long *)(lVar3 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x28)" (( "(") (binary_expression "lVar3 + 0x28" (identifier "lVar3") (+ "+") (number_literal "0x28")) () ")")))) (+ "+") (identifier "param_1")) () ")"))) (, ",") (pointer_expression "*(void **)(lVar3 + 0x18)" (* "*") (cast_expression "(void **)(lVar3 + 0x18)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(lVar3 + 0x18)" (( "(") (binary_expression "lVar3 + 0x18" (identifier "lVar3") (+ "+") (number_literal "0x18")) () ")")))) (, ",") (pointer_expression "*(size_t *)(lVar3 + 0x20)" (* "*") (cast_expression "(size_t *)(lVar3 + 0x20)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x20)" (( "(") (binary_expression "lVar3 + 0x20" (identifier "lVar3") (+ "+") (number_literal "0x20")) () ")")))) () ")")))) (, ",") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n          UnlockSemaphoreInfo(DAT_00726130);\n          if (lVar3 != 0) {\n            return lVar3;\n          }\n          LockSemaphoreInfo(DAT_00726128);\n          ResetLinkedListIterator(DAT_00726138);\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          goto LAB_0022ef9d;\n        }" ({ "{") (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" (identifier "UnlockSemaphoreInfo") (argument_list "(DAT_00726130)" (( "(") (identifier "DAT_00726130") () ")"))) (; ";")) (if_statement "if (lVar3 != 0) {\n            return lVar3;\n          }" (if "if") (parenthesized_expression "(lVar3 != 0)" (( "(") (binary_expression "lVar3 != 0" (identifier "lVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            return lVar3;\n          }" ({ "{") (return_statement "return lVar3;" (return "return") (identifier "lVar3") (; ";")) (} "}"))) (expression_statement "LockSemaphoreInfo(DAT_00726128);" (call_expression "LockSemaphoreInfo(DAT_00726128)" (identifier "LockSemaphoreInfo") (argument_list "(DAT_00726128)" (( "(") (identifier "DAT_00726128") () ")"))) (; ";")) (expression_statement "ResetLinkedListIterator(DAT_00726138);" (call_expression "ResetLinkedListIterator(DAT_00726138)" (identifier "ResetLinkedListIterator") (argument_list "(DAT_00726138)" (( "(") (identifier "DAT_00726138") () ")"))) (; ";")) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" (identifier "lVar3") (= "=") (call_expression "GetNextValueInLinkedList(DAT_00726138)" (identifier "GetNextValueInLinkedList") (argument_list "(DAT_00726138)" (( "(") (identifier "DAT_00726138") () ")")))) (; ";")) (goto_statement "goto LAB_0022ef9d;" (goto "goto") (statement_identifier "LAB_0022ef9d") (; ";")) (} "}"))) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726140);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726140)" (identifier "lVar3") (= "=") (call_expression "GetNextValueInLinkedList(DAT_00726140)" (identifier "GetNextValueInLinkedList") (argument_list "(DAT_00726140)" (( "(") (identifier "DAT_00726140") () ")")))) (; ";")) (} "}"))) (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" (identifier "UnlockSemaphoreInfo") (argument_list "(DAT_00726130)" (( "(") (identifier "DAT_00726130") () ")"))) (; ";")) (expression_statement "LockSemaphoreInfo(DAT_00726128);" (call_expression "LockSemaphoreInfo(DAT_00726128)" (identifier "LockSemaphoreInfo") (argument_list "(DAT_00726128)" (( "(") (identifier "DAT_00726128") () ")"))) (; ";")) (expression_statement "ResetLinkedListIterator(DAT_00726138);" (call_expression "ResetLinkedListIterator(DAT_00726138)" (identifier "ResetLinkedListIterator") (argument_list "(DAT_00726138)" (( "(") (identifier "DAT_00726138") () ")"))) (; ";")) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" (identifier "lVar3") (= "=") (call_expression "GetNextValueInLinkedList(DAT_00726138)" (identifier "GetNextValueInLinkedList") (argument_list "(DAT_00726138)" (( "(") (identifier "DAT_00726138") () ")")))) (; ";")) (labeled_statement "LAB_0022ef9d:\n      if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" (statement_identifier "LAB_0022ef9d") (: ":") (if_statement "if (lVar3 == 0) {\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }\n      else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" (if "if") (parenthesized_expression "(lVar3 == 0)" (( "(") (binary_expression "lVar3 == 0" (identifier "lVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);\n        lVar3 = 0;\n      }" ({ "{") (labeled_statement "LAB_0022f19a:\n        UnlockSemaphoreInfo(DAT_00726128);" (statement_identifier "LAB_0022f19a") (: ":") (expression_statement "UnlockSemaphoreInfo(DAT_00726128);" (call_expression "UnlockSemaphoreInfo(DAT_00726128)" (identifier "UnlockSemaphoreInfo") (argument_list "(DAT_00726128)" (( "(") (identifier "DAT_00726128") () ")"))) (; ";"))) (expression_statement "lVar3 = 0;" (assignment_expression "lVar3 = 0" (identifier "lVar3") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" (else "else") (compound_statement "{\n        lVar1 = *(long *)(lVar3 + 0x28);\n        while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }\n        UnlockSemaphoreInfo(DAT_00726128);\n        if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }\n      }" ({ "{") (expression_statement "lVar1 = *(long *)(lVar3 + 0x28);" (assignment_expression "lVar1 = *(long *)(lVar3 + 0x28)" (identifier "lVar1") (= "=") (pointer_expression "*(long *)(lVar3 + 0x28)" (* "*") (cast_expression "(long *)(lVar3 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x28)" (( "(") (binary_expression "lVar3 + 0x28" (identifier "lVar3") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (while_statement "while( true ) {\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n          if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }\n          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;\n          lVar3 = GetNextValueInLinkedList(DAT_00726138);\n          if (lVar3 == 0) goto LAB_0022f19a;\n          lVar1 = *(long *)(lVar3 + 0x28);\n        }" ({ "{") (if_statement "if (lVar1 < 0) {\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }" (if "if") (parenthesized_expression "(lVar1 < 0)" (( "(") (binary_expression "lVar1 < 0" (identifier "lVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n                    \n            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");\n          }" ({ "{") (expression_statement "__assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");" (call_expression "__assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo")" (identifier "__assert_fail") (argument_list "("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo")" (( "(") (string_literal ""p->offset >= 0"" (" """) (string_content "p->offset >= 0") (" """)) (, ",") (string_literal ""MagickCore/magic.c"" (" """) (string_content "MagickCore/magic.c") (" """)) (, ",") (number_literal "0x143") (, ",") (string_literal ""GetMagicInfo"" (" """) (string_content "GetMagicInfo") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;" (if "if") (parenthesized_expression "((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0))" (( "(") (binary_expression "(lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&\n             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" (parenthesized_expression "(lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2)" (( "(") (binary_expression "lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2" (binary_expression "lVar1 + *(size_t *)(lVar3 + 0x20)" (identifier "lVar1") (+ "+") (pointer_expression "*(size_t *)(lVar3 + 0x20)" (* "*") (cast_expression "(size_t *)(lVar3 + 0x20)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x20)" (( "(") (binary_expression "lVar3 + 0x20" (identifier "lVar3") (+ "+") (number_literal "0x20")) () ")"))))) (<= "<=") (identifier "param_2")) () ")")) (&& "&&") (parenthesized_expression "(iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)" (( "(") (comma_expression "iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0" (assignment_expression "iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20))" (identifier "iVar2") (= "=") (call_expression "memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20))" (identifier "memcmp") (argument_list "((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),\n                             *(size_t *)(lVar3 + 0x20))" (( "(") (cast_expression "(void *)(lVar1 + param_1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + param_1)" (( "(") (binary_expression "lVar1 + param_1" (identifier "lVar1") (+ "+") (identifier "param_1")) () ")"))) (, ",") (pointer_expression "*(void **)(lVar3 + 0x18)" (* "*") (cast_expression "(void **)(lVar3 + 0x18)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(lVar3 + 0x18)" (( "(") (binary_expression "lVar3 + 0x18" (identifier "lVar3") (+ "+") (number_literal "0x18")) () ")")))) (, ",") (pointer_expression "*(size_t *)(lVar3 + 0x20)" (* "*") (cast_expression "(size_t *)(lVar3 + 0x20)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x20)" (( "(") (binary_expression "lVar3 + 0x20" (identifier "lVar3") (+ "+") (number_literal "0x20")) () ")")))) () ")")))) (, ",") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0"))) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar3 = GetNextValueInLinkedList(DAT_00726138);" (assignment_expression "lVar3 = GetNextValueInLinkedList(DAT_00726138)" (identifier "lVar3") (= "=") (call_expression "GetNextValueInLinkedList(DAT_00726138)" (identifier "GetNextValueInLinkedList") (argument_list "(DAT_00726138)" (( "(") (identifier "DAT_00726138") () ")")))) (; ";")) (if_statement "if (lVar3 == 0) goto LAB_0022f19a;" (if "if") (parenthesized_expression "(lVar3 == 0)" (( "(") (binary_expression "lVar3 == 0" (identifier "lVar3") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0022f19a;" (goto "goto") (statement_identifier "LAB_0022f19a") (; ";"))) (expression_statement "lVar1 = *(long *)(lVar3 + 0x28);" (assignment_expression "lVar1 = *(long *)(lVar3 + 0x28)" (identifier "lVar1") (= "=") (pointer_expression "*(long *)(lVar3 + 0x28)" (* "*") (cast_expression "(long *)(lVar3 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x28)" (( "(") (binary_expression "lVar3 + 0x28" (identifier "lVar3") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (} "}"))) (expression_statement "UnlockSemaphoreInfo(DAT_00726128);" (call_expression "UnlockSemaphoreInfo(DAT_00726128)" (identifier "UnlockSemaphoreInfo") (argument_list "(DAT_00726128)" (( "(") (identifier "DAT_00726128") () ")"))) (; ";")) (if_statement "if (lVar3 != 0) {\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }" (if "if") (parenthesized_expression "(lVar3 != 0)" (( "(") (binary_expression "lVar3 != 0" (identifier "lVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          LockSemaphoreInfo(DAT_00726130);\n          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);\n          UnlockSemaphoreInfo(DAT_00726130);\n        }" ({ "{") (expression_statement "LockSemaphoreInfo(DAT_00726130);" (call_expression "LockSemaphoreInfo(DAT_00726130)" (identifier "LockSemaphoreInfo") (argument_list "(DAT_00726130)" (( "(") (identifier "DAT_00726130") () ")"))) (; ";")) (expression_statement "InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);" (call_expression "InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3)" (identifier "InsertValueInSortedLinkedList") (argument_list "(DAT_00726140,FUN_0022ec89,0,lVar3)" (( "(") (identifier "DAT_00726140") (, ",") (identifier "FUN_0022ec89") (, ",") (number_literal "0") (, ",") (identifier "lVar3") () ")"))) (; ";")) (expression_statement "UnlockSemaphoreInfo(DAT_00726130);" (call_expression "UnlockSemaphoreInfo(DAT_00726130)" (identifier "UnlockSemaphoreInfo") (argument_list "(DAT_00726130)" (( "(") (identifier "DAT_00726130") () ")"))) (; ";")) (} "}"))) (} "}"))))) (} "}")))) (} "}")))) (return_statement "return lVar3;" (return "return") (identifier "lVar3") (; ";")) (} "}")))

/* WARNING: Enum "ExceptionType": Some values do not have unique names */

type_1 * function_1(type_2 *var_12,size_t var_16,type_3 *var_1)

{
  long var_19;
  type_4 var_4;
  int var_18;
  type_1 *var_15;
  
  if (var_1 == (type_3 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_2("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"GetMagicInfo");
  }
  var_4 = var_3(var_1);
  if (var_4 == var_5) {
    var_15 = (type_1 *)0x0;
  }
  else {
    if (var_6 == (type_5 *)0x0) {
      if (var_7 == (type_6 *)0x0) {
        var_8(&var_7);
      }
      var_9(var_7);
      if (var_6 == (type_5 *)0x0) {
        var_6 = var_10(0);
      }
      var_11(var_7);
      if (var_6 == (type_5 *)0x0) {
        return (type_1 *)0x0;
      }
    }
    if (var_12 == (type_2 *)0x0) {
      var_9(magic_list_semaphore);
      var_13(magic_list);
      var_15 = (type_1 *)var_14(magic_list);
      var_11(magic_list_semaphore);
    }
    else {
      var_9(var_7);
      var_13(var_6);
      var_15 = (type_1 *)var_14(var_6);
      while (var_15 != (type_1 *)0x0) {
        if ((var_15->offset + var_15->var_16 <= var_16) &&
           (var_18 = var_17(var_12 + var_15->offset,var_15->var_12,var_15->var_16), var_18 == 0)) {
          var_11(var_7);
          if (var_15 != (type_1 *)0x0) {
            return var_15;
          }
          var_9(magic_list_semaphore);
          var_13(magic_list);
          var_15 = (type_1 *)var_14(magic_list);
          goto LAB_0022ef9d;
        }
        var_15 = (type_1 *)var_14(var_6);
      }
      var_11(var_7);
      var_9(magic_list_semaphore);
      var_13(magic_list);
      var_15 = (type_1 *)var_14(magic_list);
LAB_0022ef9d:
      if (var_15 == (type_1 *)0x0) {
LAB_0022f19a:
        var_11(magic_list_semaphore);
        var_15 = (type_1 *)0x0;
      }
      else {
        var_19 = var_15->offset;
        while( true ) {
          if (var_19 < 0) {
                    /* WARNING: Subroutine does not return */
            var_2("p->offset >= 0","MagickCore/magic.c",0x143,"GetMagicInfo");
          }
          if ((var_19 + var_15->var_16 <= var_16) &&
             (var_18 = var_17(var_12 + var_19,var_15->var_12,var_15->var_16), var_18 == 0)) break;
          var_15 = (type_1 *)var_14(magic_list);
          if (var_15 == (type_1 *)0x0) goto LAB_0022f19a;
          var_19 = var_15->offset;
        }
        var_11(magic_list_semaphore);
        if (var_15 != (type_1 *)0x0) {
          var_9(var_7);
          var_20(var_6,CompareMagickInfoSize,(void **)0x0,var_15);
          var_11(var_7);
        }
      }
    }
  }
  return var_15;
}


(translation_unit (function_definition type: (sized_type_specifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (sized_type_specifier) 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 (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)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier))))))) (expression_statement (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: (call_expression function: (identifier) arguments: (argument_list (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (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))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) alternative: (else_clause (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))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) right: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))) (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (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: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))) (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))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (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))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) right: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (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: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (break_statement)) (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: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (expression_statement (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 (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))))))))))))) (return_statement (identifier)))))

long MASKED(long param_1,ulong param_2,long param_3)

{
  long lVar1;
  int iVar2;
  long lVar3;
  
  if (param_3 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/magic.c",0x11e,"MASKED");
  }
  iVar2 = FUN_0022ecb6(param_3);
  if (iVar2 == 0) {
    lVar3 = 0;
  }
  else {
    if (DAT_00726140 == 0) {
      if (DAT_00726130 == 0) {
        ActivateSemaphoreInfo(&DAT_00726130);
      }
      LockSemaphoreInfo(DAT_00726130);
      if (DAT_00726140 == 0) {
        DAT_00726140 = NewLinkedList(0);
      }
      UnlockSemaphoreInfo(DAT_00726130);
      if (DAT_00726140 == 0) {
        return 0;
      }
    }
    if (param_1 == 0) {
      LockSemaphoreInfo(DAT_00726128);
      ResetLinkedListIterator(DAT_00726138);
      lVar3 = GetNextValueInLinkedList(DAT_00726138);
      UnlockSemaphoreInfo(DAT_00726128);
    }
    else {
      LockSemaphoreInfo(DAT_00726130);
      ResetLinkedListIterator(DAT_00726140);
      lVar3 = GetNextValueInLinkedList(DAT_00726140);
      while (lVar3 != 0) {
        if ((*(long *)(lVar3 + 0x28) + *(size_t *)(lVar3 + 0x20) <= param_2) &&
           (iVar2 = memcmp((void *)(*(long *)(lVar3 + 0x28) + param_1),*(void **)(lVar3 + 0x18),
                           *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) {
          UnlockSemaphoreInfo(DAT_00726130);
          if (lVar3 != 0) {
            return lVar3;
          }
          LockSemaphoreInfo(DAT_00726128);
          ResetLinkedListIterator(DAT_00726138);
          lVar3 = GetNextValueInLinkedList(DAT_00726138);
          goto LAB_0022ef9d;
        }
        lVar3 = GetNextValueInLinkedList(DAT_00726140);
      }
      UnlockSemaphoreInfo(DAT_00726130);
      LockSemaphoreInfo(DAT_00726128);
      ResetLinkedListIterator(DAT_00726138);
      lVar3 = GetNextValueInLinkedList(DAT_00726138);
LAB_0022ef9d:
      if (lVar3 == 0) {
LAB_0022f19a:
        UnlockSemaphoreInfo(DAT_00726128);
        lVar3 = 0;
      }
      else {
        lVar1 = *(long *)(lVar3 + 0x28);
        while( true ) {
          if (lVar1 < 0) {
                    /* WARNING: Subroutine does not return */
            __assert_fail("p->offset >= 0","MagickCore/magic.c",0x143,"MASKED");
          }
          if ((lVar1 + *(size_t *)(lVar3 + 0x20) <= param_2) &&
             (iVar2 = memcmp((void *)(lVar1 + param_1),*(void **)(lVar3 + 0x18),
                             *(size_t *)(lVar3 + 0x20)), iVar2 == 0)) break;
          lVar3 = GetNextValueInLinkedList(DAT_00726138);
          if (lVar3 == 0) goto LAB_0022f19a;
          lVar1 = *(long *)(lVar3 + 0x28);
        }
        UnlockSemaphoreInfo(DAT_00726128);
        if (lVar3 != 0) {
          LockSemaphoreInfo(DAT_00726130);
          InsertValueInSortedLinkedList(DAT_00726140,FUN_0022ec89,0,lVar3);
          UnlockSemaphoreInfo(DAT_00726130);
        }
      }
    }
  }
  return lVar3;
}

