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

int __deregister_frame_info_bases(int *param_1)

{
  int *__ptr;
  undefined *puVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  
  puVar1 = PTR___pthread_key_create_0038ef24;
  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {
    return 0;
  }
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    pthread_mutex_lock((pthread_mutex_t *)object_mutex);
  }
  if (unseen_objects == 0) {
LAB_0027f80e:
    if (seen_objects != 0) {
      puVar3 = &seen_objects;
      iVar4 = seen_objects;
      do {
        __ptr = *(int **)(iVar4 + 0xc);
        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {
          if (param_1 == __ptr) {
            *puVar3 = *(undefined4 *)(iVar4 + 0x14);
            goto LAB_0027f850;
          }
        }
        else if (param_1 == (int *)*__ptr) {
          *puVar3 = *(undefined4 *)(iVar4 + 0x14);
          free(__ptr);
          goto LAB_0027f850;
        }
        puVar3 = (undefined4 *)(iVar4 + 0x14);
        iVar4 = *(int *)(iVar4 + 0x14);
      } while (iVar4 != 0);
    }
    if (puVar1 != (undefined *)0x0) {
      pthread_mutex_unlock((pthread_mutex_t *)object_mutex);
    }
                    /* WARNING: Subroutine does not return */
    abort();
  }
  iVar4 = unseen_objects;
  if (param_1 == *(int **)(unseen_objects + 0xc)) {
    puVar3 = &unseen_objects;
  }
  else {
    do {
      iVar2 = iVar4;
      iVar4 = *(int *)(iVar2 + 0x14);
      if (iVar4 == 0) goto LAB_0027f80e;
    } while (param_1 != *(int **)(iVar4 + 0xc));
    puVar3 = (undefined4 *)(iVar2 + 0x14);
  }
  *puVar3 = *(undefined4 *)(iVar4 + 0x14);
LAB_0027f850:
  if (puVar1 != (undefined *)0x0) {
    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);
  }
  return iVar4;
}



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

int FUN_0027f7a0(int *param_1)

{
  int *__ptr;
  undefined *puVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  
  puVar1 = PTR___pthread_key_create_0038ef24;
  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {
    return 0;
  }
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);
  }
  if (DAT_00398140 == 0) {
LAB_0027f80e:
    if (DAT_0039813c != 0) {
      puVar3 = &DAT_0039813c;
      iVar4 = DAT_0039813c;
      do {
        __ptr = *(int **)(iVar4 + 0xc);
        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {
          if (param_1 == __ptr) {
            *puVar3 = *(undefined4 *)(iVar4 + 0x14);
            goto LAB_0027f850;
          }
        }
        else if (param_1 == (int *)*__ptr) {
          *puVar3 = *(undefined4 *)(iVar4 + 0x14);
          free(__ptr);
          goto LAB_0027f850;
        }
        puVar3 = (undefined4 *)(iVar4 + 0x14);
        iVar4 = *(int *)(iVar4 + 0x14);
      } while (iVar4 != 0);
    }
    if (puVar1 != (undefined *)0x0) {
      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);
    }
                    /* WARNING: Subroutine does not return */
    abort();
  }
  iVar4 = DAT_00398140;
  if (param_1 == *(int **)(DAT_00398140 + 0xc)) {
    puVar3 = &DAT_00398140;
  }
  else {
    do {
      iVar2 = iVar4;
      iVar4 = *(int *)(iVar2 + 0x14);
      if (iVar4 == 0) goto LAB_0027f80e;
    } while (param_1 != *(int **)(iVar4 + 0xc));
    puVar3 = (undefined4 *)(iVar2 + 0x14);
  }
  *puVar3 = *(undefined4 *)(iVar4 + 0x14);
LAB_0027f850:
  if (puVar1 != (undefined *)0x0) {
    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);
  }
  return iVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x10f857
SUB ESP,0xc
MOV EDI,dword ptr [ESP + 0x20]
TEST EDI,EDI
JZ 0x0027f870
MOV EAX,dword ptr [EDI]
TEST EAX,EAX
JZ 0x0027f870
MOV EBP,dword ptr [EBX + 0xffffff24]
TEST EBP,EBP
JZ 0x0027f7e4
SUB ESP,0xc
LEA EAX,[EBX + 0x9120]
PUSH EAX
CALL 0x000297c0
ADD ESP,0x10
MOV EAX,dword ptr [EBX + 0x9140]
TEST EAX,EAX
JZ 0x0027f80e
CMP EDI,dword ptr [EAX + 0xc]
JNZ 0x0027f807
JMP 0x0027f8b3
CMP EDI,dword ptr [ESI + 0xc]
JZ 0x0027f848
MOV EAX,ESI
MOV ESI,dword ptr [EAX + 0x14]
TEST ESI,ESI
JNZ 0x0027f800
MOV ESI,dword ptr [EBX + 0x913c]
TEST ESI,ESI
JZ 0x0027f880
LEA EDX,[EBX + 0x913c]
JMP 0x0027f82e
CMP EDI,dword ptr [EAX]
JZ 0x0027f8a0
LEA EDX,[ESI + 0x14]
MOV ESI,dword ptr [ESI + 0x14]
TEST ESI,ESI
JZ 0x0027f880
MOV EAX,dword ptr [ESI + 0xc]
TEST byte ptr [ESI + 0x10],0x1
JNZ 0x0027f820
CMP EDI,EAX
JNZ 0x0027f824
MOV EAX,dword ptr [ESI + 0x14]
MOV dword ptr [EDX],EAX
JMP 0x0027f850
ADD EAX,0x14
MOV EDX,dword ptr [ESI + 0x14]
MOV dword ptr [EAX],EDX
TEST EBP,EBP
JZ 0x0027f866
SUB ESP,0xc
LEA EAX,[EBX + 0x9120]
PUSH EAX
CALL 0x00029500
ADD ESP,0x10
ADD ESP,0xc
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0xc
XOR ESI,ESI
POP EBX
MOV EAX,ESI
POP ESI
POP EDI
POP EBP
RET
TEST EBP,EBP
JZ 0x0027f896
SUB ESP,0xc
LEA EAX,[EBX + 0x9120]
PUSH EAX
CALL 0x00029500
ADD ESP,0x10
CALL 0x00029080
MOV ECX,dword ptr [ESI + 0x14]
SUB ESP,0xc
MOV dword ptr [EDX],ECX
PUSH EAX
CALL 0x00029410
ADD ESP,0x10
JMP 0x0027f850
MOV ESI,EAX
LEA EAX,[EBX + 0x9140]
JMP 0x0027f84b
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0027f7a0(int *param_1)\n\n{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  iVar4 = DAT_00398140;\n  if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return iVar4;\n}\n\n" comment (function_definition "int FUN_0027f7a0(int *param_1)\n\n{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  iVar4 = DAT_00398140;\n  if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_0027f7a0(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  iVar4 = DAT_00398140;\n  if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return iVar4;\n}" { (declaration "int *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar1 = PTR___pthread_key_create_0038ef24" identifier = identifier) ;) (if_statement "if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }" if (parenthesized_expression "((param_1 == (int *)0x0) || (*param_1 == 0))" ( (binary_expression "(param_1 == (int *)0x0) || (*param_1 == 0)" (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*param_1 == 0)" ( (binary_expression "*param_1 == 0" (pointer_expression "*param_1" * identifier) == number_literal) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" { (expression_statement "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120)" identifier (argument_list "((pthread_mutex_t *)&DAT_00398120)" ( (cast_expression "(pthread_mutex_t *)&DAT_00398120" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00398120" & identifier)) ))) ;) })) (if_statement "if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }" if (parenthesized_expression "(DAT_00398140 == 0)" ( (binary_expression "DAT_00398140 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }" { (labeled_statement "LAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" statement_identifier : (if_statement "if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" if (parenthesized_expression "(DAT_0039813c != 0)" ( (binary_expression "DAT_0039813c != 0" identifier != number_literal) )) (compound_statement "{\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" { (expression_statement "puVar3 = &DAT_0039813c;" (assignment_expression "puVar3 = &DAT_0039813c" identifier = (pointer_expression "&DAT_0039813c" & identifier)) ;) (expression_statement "iVar4 = DAT_0039813c;" (assignment_expression "iVar4 = DAT_0039813c" identifier = identifier) ;) (do_statement "do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);" do (compound_statement "{\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      }" { (expression_statement "__ptr = *(int **)(iVar4 + 0xc);" (assignment_expression "__ptr = *(int **)(iVar4 + 0xc)" identifier = (pointer_expression "*(int **)(iVar4 + 0xc)" * (cast_expression "(int **)(iVar4 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 0xc)" ( (binary_expression "iVar4 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" if (parenthesized_expression "((*(byte *)(iVar4 + 0x10) & 1) == 0)" ( (binary_expression "(*(byte *)(iVar4 + 0x10) & 1) == 0" (parenthesized_expression "(*(byte *)(iVar4 + 0x10) & 1)" ( (binary_expression "*(byte *)(iVar4 + 0x10) & 1" (pointer_expression "*(byte *)(iVar4 + 0x10)" * (cast_expression "(byte *)(iVar4 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x10)" ( (binary_expression "iVar4 + 0x10" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }" { (if_statement "if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }" if (parenthesized_expression "(param_1 == __ptr)" ( (binary_expression "param_1 == __ptr" identifier == identifier) )) (compound_statement "{\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }" { (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" * (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_0027f850;" goto statement_identifier ;) })) }) (else_clause "else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" else (if_statement "if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" if (parenthesized_expression "(param_1 == (int *)*__ptr)" ( (binary_expression "param_1 == (int *)*__ptr" identifier == (cast_expression "(int *)*__ptr" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*__ptr" * identifier))) )) (compound_statement "{\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" { (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" * (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (goto_statement "goto LAB_0027f850;" goto statement_identifier ;) })))) (expression_statement "puVar3 = (undefined4 *)(iVar4 + 0x14);" (assignment_expression "puVar3 = (undefined4 *)(iVar4 + 0x14)" identifier = (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) )))) ;) (expression_statement "iVar4 = *(int *)(iVar4 + 0x14);" (assignment_expression "iVar4 = *(int *)(iVar4 + 0x14)" identifier = (pointer_expression "*(int *)(iVar4 + 0x14)" * (cast_expression "(int *)(iVar4 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) }))) (if_statement "if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }" { (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120)" identifier (argument_list "((pthread_mutex_t *)&DAT_00398120)" ( (cast_expression "(pthread_mutex_t *)&DAT_00398120" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00398120" & identifier)) ))) ;) })) comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar4 = DAT_00398140;" (assignment_expression "iVar4 = DAT_00398140" identifier = identifier) ;) (if_statement "if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" if (parenthesized_expression "(param_1 == *(int **)(DAT_00398140 + 0xc))" ( (binary_expression "param_1 == *(int **)(DAT_00398140 + 0xc)" identifier == (pointer_expression "*(int **)(DAT_00398140 + 0xc)" * (cast_expression "(int **)(DAT_00398140 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(DAT_00398140 + 0xc)" ( (binary_expression "DAT_00398140 + 0xc" identifier + number_literal) ))))) )) (compound_statement "{\n    puVar3 = &DAT_00398140;\n  }" { (expression_statement "puVar3 = &DAT_00398140;" (assignment_expression "puVar3 = &DAT_00398140" identifier = (pointer_expression "&DAT_00398140" & identifier)) ;) }) (else_clause "else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" else (compound_statement "{\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" { (do_statement "do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));" do (compound_statement "{\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    }" { (expression_statement "iVar2 = iVar4;" (assignment_expression "iVar2 = iVar4" identifier = identifier) ;) (expression_statement "iVar4 = *(int *)(iVar2 + 0x14);" (assignment_expression "iVar4 = *(int *)(iVar2 + 0x14)" identifier = (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 == 0) goto LAB_0027f80e;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0027f80e;" goto statement_identifier ;)) }) while (parenthesized_expression "(param_1 != *(int **)(iVar4 + 0xc))" ( (binary_expression "param_1 != *(int **)(iVar4 + 0xc)" identifier != (pointer_expression "*(int **)(iVar4 + 0xc)" * (cast_expression "(int **)(iVar4 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 0xc)" ( (binary_expression "iVar4 + 0xc" identifier + number_literal) ))))) )) ;) (expression_statement "puVar3 = (undefined4 *)(iVar2 + 0x14);" (assignment_expression "puVar3 = (undefined4 *)(iVar2 + 0x14)" identifier = (cast_expression "(undefined4 *)(iVar2 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) ;) }))) (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" * (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) (labeled_statement "LAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" statement_identifier : (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" { (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120)" identifier (argument_list "((pthread_mutex_t *)&DAT_00398120)" ( (cast_expression "(pthread_mutex_t *)&DAT_00398120" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00398120" & identifier)) ))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __deregister_frame_info_bases(int *param_1)\n\n{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)object_mutex);\n  }\n  if (unseen_objects == 0) {\nLAB_0027f80e:\n    if (seen_objects != 0) {\n      puVar3 = &seen_objects;\n      iVar4 = seen_objects;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n    }\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  iVar4 = unseen_objects;\n  if (param_1 == *(int **)(unseen_objects + 0xc)) {\n    puVar3 = &unseen_objects;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }\n  return iVar4;\n}\n\n" comment (function_definition "int __deregister_frame_info_bases(int *param_1)\n\n{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)object_mutex);\n  }\n  if (unseen_objects == 0) {\nLAB_0027f80e:\n    if (seen_objects != 0) {\n      puVar3 = &seen_objects;\n      iVar4 = seen_objects;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n    }\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  iVar4 = unseen_objects;\n  if (param_1 == *(int **)(unseen_objects + 0xc)) {\n    puVar3 = &unseen_objects;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }\n  return iVar4;\n}" primitive_type (function_declarator "__deregister_frame_info_bases(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)object_mutex);\n  }\n  if (unseen_objects == 0) {\nLAB_0027f80e:\n    if (seen_objects != 0) {\n      puVar3 = &seen_objects;\n      iVar4 = seen_objects;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n    }\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  iVar4 = unseen_objects;\n  if (param_1 == *(int **)(unseen_objects + 0xc)) {\n    puVar3 = &unseen_objects;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }\n  return iVar4;\n}" { (declaration "int *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar1 = PTR___pthread_key_create_0038ef24" identifier = identifier) ;) (if_statement "if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }" if (parenthesized_expression "((param_1 == (int *)0x0) || (*param_1 == 0))" ( (binary_expression "(param_1 == (int *)0x0) || (*param_1 == 0)" (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*param_1 == 0)" ( (binary_expression "*param_1 == 0" (pointer_expression "*param_1" * identifier) == number_literal) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)object_mutex);\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_lock((pthread_mutex_t *)object_mutex);\n  }" { (expression_statement "pthread_mutex_lock((pthread_mutex_t *)object_mutex);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)object_mutex)" identifier (argument_list "((pthread_mutex_t *)object_mutex)" ( (cast_expression "(pthread_mutex_t *)object_mutex" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) })) (if_statement "if (unseen_objects == 0) {\nLAB_0027f80e:\n    if (seen_objects != 0) {\n      puVar3 = &seen_objects;\n      iVar4 = seen_objects;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n    }\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }" if (parenthesized_expression "(unseen_objects == 0)" ( (binary_expression "unseen_objects == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0027f80e:\n    if (seen_objects != 0) {\n      puVar3 = &seen_objects;\n      iVar4 = seen_objects;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n    }\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }" { (labeled_statement "LAB_0027f80e:\n    if (seen_objects != 0) {\n      puVar3 = &seen_objects;\n      iVar4 = seen_objects;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" statement_identifier : (if_statement "if (seen_objects != 0) {\n      puVar3 = &seen_objects;\n      iVar4 = seen_objects;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" if (parenthesized_expression "(seen_objects != 0)" ( (binary_expression "seen_objects != 0" identifier != number_literal) )) (compound_statement "{\n      puVar3 = &seen_objects;\n      iVar4 = seen_objects;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" { (expression_statement "puVar3 = &seen_objects;" (assignment_expression "puVar3 = &seen_objects" identifier = (pointer_expression "&seen_objects" & identifier)) ;) (expression_statement "iVar4 = seen_objects;" (assignment_expression "iVar4 = seen_objects" identifier = identifier) ;) (do_statement "do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);" do (compound_statement "{\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      }" { (expression_statement "__ptr = *(int **)(iVar4 + 0xc);" (assignment_expression "__ptr = *(int **)(iVar4 + 0xc)" identifier = (pointer_expression "*(int **)(iVar4 + 0xc)" * (cast_expression "(int **)(iVar4 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 0xc)" ( (binary_expression "iVar4 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" if (parenthesized_expression "((*(byte *)(iVar4 + 0x10) & 1) == 0)" ( (binary_expression "(*(byte *)(iVar4 + 0x10) & 1) == 0" (parenthesized_expression "(*(byte *)(iVar4 + 0x10) & 1)" ( (binary_expression "*(byte *)(iVar4 + 0x10) & 1" (pointer_expression "*(byte *)(iVar4 + 0x10)" * (cast_expression "(byte *)(iVar4 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x10)" ( (binary_expression "iVar4 + 0x10" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }" { (if_statement "if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }" if (parenthesized_expression "(param_1 == __ptr)" ( (binary_expression "param_1 == __ptr" identifier == identifier) )) (compound_statement "{\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }" { (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" * (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_0027f850;" goto statement_identifier ;) })) }) (else_clause "else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" else (if_statement "if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" if (parenthesized_expression "(param_1 == (int *)*__ptr)" ( (binary_expression "param_1 == (int *)*__ptr" identifier == (cast_expression "(int *)*__ptr" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*__ptr" * identifier))) )) (compound_statement "{\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" { (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" * (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (goto_statement "goto LAB_0027f850;" goto statement_identifier ;) })))) (expression_statement "puVar3 = (undefined4 *)(iVar4 + 0x14);" (assignment_expression "puVar3 = (undefined4 *)(iVar4 + 0x14)" identifier = (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) )))) ;) (expression_statement "iVar4 = *(int *)(iVar4 + 0x14);" (assignment_expression "iVar4 = *(int *)(iVar4 + 0x14)" identifier = (pointer_expression "*(int *)(iVar4 + 0x14)" * (cast_expression "(int *)(iVar4 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) }))) (if_statement "if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n    }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n    }" { (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)object_mutex);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)object_mutex)" identifier (argument_list "((pthread_mutex_t *)object_mutex)" ( (cast_expression "(pthread_mutex_t *)object_mutex" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) })) comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar4 = unseen_objects;" (assignment_expression "iVar4 = unseen_objects" identifier = identifier) ;) (if_statement "if (param_1 == *(int **)(unseen_objects + 0xc)) {\n    puVar3 = &unseen_objects;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" if (parenthesized_expression "(param_1 == *(int **)(unseen_objects + 0xc))" ( (binary_expression "param_1 == *(int **)(unseen_objects + 0xc)" identifier == (pointer_expression "*(int **)(unseen_objects + 0xc)" * (cast_expression "(int **)(unseen_objects + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unseen_objects + 0xc)" ( (binary_expression "unseen_objects + 0xc" identifier + number_literal) ))))) )) (compound_statement "{\n    puVar3 = &unseen_objects;\n  }" { (expression_statement "puVar3 = &unseen_objects;" (assignment_expression "puVar3 = &unseen_objects" identifier = (pointer_expression "&unseen_objects" & identifier)) ;) }) (else_clause "else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" else (compound_statement "{\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" { (do_statement "do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));" do (compound_statement "{\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    }" { (expression_statement "iVar2 = iVar4;" (assignment_expression "iVar2 = iVar4" identifier = identifier) ;) (expression_statement "iVar4 = *(int *)(iVar2 + 0x14);" (assignment_expression "iVar4 = *(int *)(iVar2 + 0x14)" identifier = (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 == 0) goto LAB_0027f80e;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0027f80e;" goto statement_identifier ;)) }) while (parenthesized_expression "(param_1 != *(int **)(iVar4 + 0xc))" ( (binary_expression "param_1 != *(int **)(iVar4 + 0xc)" identifier != (pointer_expression "*(int **)(iVar4 + 0xc)" * (cast_expression "(int **)(iVar4 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 0xc)" ( (binary_expression "iVar4 + 0xc" identifier + number_literal) ))))) )) ;) (expression_statement "puVar3 = (undefined4 *)(iVar2 + 0x14);" (assignment_expression "puVar3 = (undefined4 *)(iVar2 + 0x14)" identifier = (cast_expression "(undefined4 *)(iVar2 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) ;) }))) (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" * (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) (labeled_statement "LAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }" statement_identifier : (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }" { (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)object_mutex);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)object_mutex)" identifier (argument_list "((pthread_mutex_t *)object_mutex)" ( (cast_expression "(pthread_mutex_t *)object_mutex" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "int FUN_0027f7a0(int *param_1)\n\n{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    \n    abort();\n  }\n  iVar4 = DAT_00398140;\n  if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return iVar4;\n}\n\n" (function_definition "int FUN_0027f7a0(int *param_1)\n\n{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    \n    abort();\n  }\n  iVar4 = DAT_00398140;\n  if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_0027f7a0(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    \n    abort();\n  }\n  iVar4 = DAT_00398140;\n  if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return iVar4;\n}" { (declaration "int *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar1 = PTR___pthread_key_create_0038ef24" identifier = identifier) ;) (if_statement "if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }" if (parenthesized_expression "((param_1 == (int *)0x0) || (*param_1 == 0))" ( (binary_expression "(param_1 == (int *)0x0) || (*param_1 == 0)" (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*param_1 == 0)" ( (binary_expression "*param_1 == 0" (pointer_expression "*param_1" * identifier) == number_literal) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" { (expression_statement "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120)" identifier (argument_list "((pthread_mutex_t *)&DAT_00398120)" ( (cast_expression "(pthread_mutex_t *)&DAT_00398120" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00398120" & identifier)) ))) ;) })) (if_statement "if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    \n    abort();\n  }" if (parenthesized_expression "(DAT_00398140 == 0)" ( (binary_expression "DAT_00398140 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    \n    abort();\n  }" { (labeled_statement "LAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" statement_identifier : (if_statement "if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" if (parenthesized_expression "(DAT_0039813c != 0)" ( (binary_expression "DAT_0039813c != 0" identifier != number_literal) )) (compound_statement "{\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" { (expression_statement "puVar3 = &DAT_0039813c;" (assignment_expression "puVar3 = &DAT_0039813c" identifier = (pointer_expression "&DAT_0039813c" & identifier)) ;) (expression_statement "iVar4 = DAT_0039813c;" (assignment_expression "iVar4 = DAT_0039813c" identifier = identifier) ;) (do_statement "do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);" do (compound_statement "{\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      }" { (expression_statement "__ptr = *(int **)(iVar4 + 0xc);" (assignment_expression "__ptr = *(int **)(iVar4 + 0xc)" identifier = (pointer_expression "*(int **)(iVar4 + 0xc)" * (cast_expression "(int **)(iVar4 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 0xc)" ( (binary_expression "iVar4 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" if (parenthesized_expression "((*(byte *)(iVar4 + 0x10) & 1) == 0)" ( (binary_expression "(*(byte *)(iVar4 + 0x10) & 1) == 0" (parenthesized_expression "(*(byte *)(iVar4 + 0x10) & 1)" ( (binary_expression "*(byte *)(iVar4 + 0x10) & 1" (pointer_expression "*(byte *)(iVar4 + 0x10)" * (cast_expression "(byte *)(iVar4 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x10)" ( (binary_expression "iVar4 + 0x10" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }" { (if_statement "if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }" if (parenthesized_expression "(param_1 == __ptr)" ( (binary_expression "param_1 == __ptr" identifier == identifier) )) (compound_statement "{\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }" { (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" * (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_0027f850;" goto statement_identifier ;) })) }) (else_clause "else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" else (if_statement "if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" if (parenthesized_expression "(param_1 == (int *)*__ptr)" ( (binary_expression "param_1 == (int *)*__ptr" identifier == (cast_expression "(int *)*__ptr" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*__ptr" * identifier))) )) (compound_statement "{\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" { (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" * (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (goto_statement "goto LAB_0027f850;" goto statement_identifier ;) })))) (expression_statement "puVar3 = (undefined4 *)(iVar4 + 0x14);" (assignment_expression "puVar3 = (undefined4 *)(iVar4 + 0x14)" identifier = (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) )))) ;) (expression_statement "iVar4 = *(int *)(iVar4 + 0x14);" (assignment_expression "iVar4 = *(int *)(iVar4 + 0x14)" identifier = (pointer_expression "*(int *)(iVar4 + 0x14)" * (cast_expression "(int *)(iVar4 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) }))) (if_statement "if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }" { (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120)" identifier (argument_list "((pthread_mutex_t *)&DAT_00398120)" ( (cast_expression "(pthread_mutex_t *)&DAT_00398120" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00398120" & identifier)) ))) ;) })) (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar4 = DAT_00398140;" (assignment_expression "iVar4 = DAT_00398140" identifier = identifier) ;) (if_statement "if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" if (parenthesized_expression "(param_1 == *(int **)(DAT_00398140 + 0xc))" ( (binary_expression "param_1 == *(int **)(DAT_00398140 + 0xc)" identifier == (pointer_expression "*(int **)(DAT_00398140 + 0xc)" * (cast_expression "(int **)(DAT_00398140 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(DAT_00398140 + 0xc)" ( (binary_expression "DAT_00398140 + 0xc" identifier + number_literal) ))))) )) (compound_statement "{\n    puVar3 = &DAT_00398140;\n  }" { (expression_statement "puVar3 = &DAT_00398140;" (assignment_expression "puVar3 = &DAT_00398140" identifier = (pointer_expression "&DAT_00398140" & identifier)) ;) }) (else_clause "else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" else (compound_statement "{\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" { (do_statement "do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));" do (compound_statement "{\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    }" { (expression_statement "iVar2 = iVar4;" (assignment_expression "iVar2 = iVar4" identifier = identifier) ;) (expression_statement "iVar4 = *(int *)(iVar2 + 0x14);" (assignment_expression "iVar4 = *(int *)(iVar2 + 0x14)" identifier = (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 == 0) goto LAB_0027f80e;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0027f80e;" goto statement_identifier ;)) }) while (parenthesized_expression "(param_1 != *(int **)(iVar4 + 0xc))" ( (binary_expression "param_1 != *(int **)(iVar4 + 0xc)" identifier != (pointer_expression "*(int **)(iVar4 + 0xc)" * (cast_expression "(int **)(iVar4 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 0xc)" ( (binary_expression "iVar4 + 0xc" identifier + number_literal) ))))) )) ;) (expression_statement "puVar3 = (undefined4 *)(iVar2 + 0x14);" (assignment_expression "puVar3 = (undefined4 *)(iVar2 + 0x14)" identifier = (cast_expression "(undefined4 *)(iVar2 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) ;) }))) (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" * (cast_expression "(undefined4 *)(iVar4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) ))))) ;) (labeled_statement "LAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" statement_identifier : (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" { (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120)" identifier (argument_list "((pthread_mutex_t *)&DAT_00398120)" ( (cast_expression "(pthread_mutex_t *)&DAT_00398120" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00398120" & identifier)) ))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) ))) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT)) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT)) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) }) while (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT)) ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int FUN_0027f7a0(int *param_1)\n\n{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    \n    abort();\n  }\n  iVar4 = DAT_00398140;\n  if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return iVar4;\n}" (primitive_type "int") (function_declarator "FUN_0027f7a0(int *param_1)" (identifier "FUN_0027f7a0") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int *__ptr;\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    \n    abort();\n  }\n  iVar4 = DAT_00398140;\n  if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }\n  *puVar3 = *(undefined4 *)(iVar4 + 0x14);\nLAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return iVar4;\n}" ({ "{") (declaration "int *__ptr;" (primitive_type "int") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "puVar1 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar1 = PTR___pthread_key_create_0038ef24" (identifier "puVar1") (= "=") (identifier "PTR___pthread_key_create_0038ef24")) (; ";")) (if_statement "if ((param_1 == (int *)0x0) || (*param_1 == 0)) {\n    return 0;\n  }" (if "if") (parenthesized_expression "((param_1 == (int *)0x0) || (*param_1 == 0))" (( "(") (binary_expression "(param_1 == (int *)0x0) || (*param_1 == 0)" (parenthesized_expression "(param_1 == (int *)0x0)" (( "(") (binary_expression "param_1 == (int *)0x0" (identifier "param_1") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(*param_1 == 0)" (( "(") (binary_expression "*param_1 == 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_0038ef24 != (undefined *)0x0" (identifier "PTR___pthread_key_create_0038ef24") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" ({ "{") (expression_statement "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120)" (identifier "pthread_mutex_lock") (argument_list "((pthread_mutex_t *)&DAT_00398120)" (( "(") (cast_expression "(pthread_mutex_t *)&DAT_00398120" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_00398120" (& "&") (identifier "DAT_00398120"))) () ")"))) (; ";")) (} "}"))) (if_statement "if (DAT_00398140 == 0) {\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    \n    abort();\n  }" (if "if") (parenthesized_expression "(DAT_00398140 == 0)" (( "(") (binary_expression "DAT_00398140 == 0" (identifier "DAT_00398140") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }\n    if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }\n                    \n    abort();\n  }" ({ "{") (labeled_statement "LAB_0027f80e:\n    if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" (statement_identifier "LAB_0027f80e") (: ":") (if_statement "if (DAT_0039813c != 0) {\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" (if "if") (parenthesized_expression "(DAT_0039813c != 0)" (( "(") (binary_expression "DAT_0039813c != 0" (identifier "DAT_0039813c") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      puVar3 = &DAT_0039813c;\n      iVar4 = DAT_0039813c;\n      do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);\n    }" ({ "{") (expression_statement "puVar3 = &DAT_0039813c;" (assignment_expression "puVar3 = &DAT_0039813c" (identifier "puVar3") (= "=") (pointer_expression "&DAT_0039813c" (& "&") (identifier "DAT_0039813c"))) (; ";")) (expression_statement "iVar4 = DAT_0039813c;" (assignment_expression "iVar4 = DAT_0039813c" (identifier "iVar4") (= "=") (identifier "DAT_0039813c")) (; ";")) (do_statement "do {\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      } while (iVar4 != 0);" (do "do") (compound_statement "{\n        __ptr = *(int **)(iVar4 + 0xc);\n        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }\n        puVar3 = (undefined4 *)(iVar4 + 0x14);\n        iVar4 = *(int *)(iVar4 + 0x14);\n      }" ({ "{") (expression_statement "__ptr = *(int **)(iVar4 + 0xc);" (assignment_expression "__ptr = *(int **)(iVar4 + 0xc)" (identifier "__ptr") (= "=") (pointer_expression "*(int **)(iVar4 + 0xc)" (* "*") (cast_expression "(int **)(iVar4 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar4 + 0xc)" (( "(") (binary_expression "iVar4 + 0xc" (identifier "iVar4") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }\n        else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" (if "if") (parenthesized_expression "((*(byte *)(iVar4 + 0x10) & 1) == 0)" (( "(") (binary_expression "(*(byte *)(iVar4 + 0x10) & 1) == 0" (parenthesized_expression "(*(byte *)(iVar4 + 0x10) & 1)" (( "(") (binary_expression "*(byte *)(iVar4 + 0x10) & 1" (pointer_expression "*(byte *)(iVar4 + 0x10)" (* "*") (cast_expression "(byte *)(iVar4 + 0x10)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x10)" (( "(") (binary_expression "iVar4 + 0x10" (identifier "iVar4") (+ "+") (number_literal "0x10")) () ")")))) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }\n        }" ({ "{") (if_statement "if (param_1 == __ptr) {\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }" (if "if") (parenthesized_expression "(param_1 == __ptr)" (( "(") (binary_expression "param_1 == __ptr" (identifier "param_1") (== "==") (identifier "__ptr")) () ")")) (compound_statement "{\n            *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n            goto LAB_0027f850;\n          }" ({ "{") (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x14)" (( "(") (binary_expression "iVar4 + 0x14" (identifier "iVar4") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (goto_statement "goto LAB_0027f850;" (goto "goto") (statement_identifier "LAB_0027f850") (; ";")) (} "}"))) (} "}")) (else_clause "else if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" (else "else") (if_statement "if (param_1 == (int *)*__ptr) {\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" (if "if") (parenthesized_expression "(param_1 == (int *)*__ptr)" (( "(") (binary_expression "param_1 == (int *)*__ptr" (identifier "param_1") (== "==") (cast_expression "(int *)*__ptr" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*__ptr" (* "*") (identifier "__ptr")))) () ")")) (compound_statement "{\n          *puVar3 = *(undefined4 *)(iVar4 + 0x14);\n          free(__ptr);\n          goto LAB_0027f850;\n        }" ({ "{") (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x14)" (( "(") (binary_expression "iVar4 + 0x14" (identifier "iVar4") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (goto_statement "goto LAB_0027f850;" (goto "goto") (statement_identifier "LAB_0027f850") (; ";")) (} "}"))))) (expression_statement "puVar3 = (undefined4 *)(iVar4 + 0x14);" (assignment_expression "puVar3 = (undefined4 *)(iVar4 + 0x14)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(iVar4 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x14)" (( "(") (binary_expression "iVar4 + 0x14" (identifier "iVar4") (+ "+") (number_literal "0x14")) () ")")))) (; ";")) (expression_statement "iVar4 = *(int *)(iVar4 + 0x14);" (assignment_expression "iVar4 = *(int *)(iVar4 + 0x14)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(iVar4 + 0x14)" (* "*") (cast_expression "(int *)(iVar4 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x14)" (( "(") (binary_expression "iVar4 + 0x14" (identifier "iVar4") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}")))) (if_statement "if (puVar1 != (undefined *)0x0) {\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }" (if "if") (parenthesized_expression "(puVar1 != (undefined *)0x0)" (( "(") (binary_expression "puVar1 != (undefined *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n    }" ({ "{") (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120)" (identifier "pthread_mutex_unlock") (argument_list "((pthread_mutex_t *)&DAT_00398120)" (( "(") (cast_expression "(pthread_mutex_t *)&DAT_00398120" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_00398120" (& "&") (identifier "DAT_00398120"))) () ")"))) (; ";")) (} "}"))) (expression_statement "abort();" (call_expression "abort()" (identifier "abort") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar4 = DAT_00398140;" (assignment_expression "iVar4 = DAT_00398140" (identifier "iVar4") (= "=") (identifier "DAT_00398140")) (; ";")) (if_statement "if (param_1 == *(int **)(DAT_00398140 + 0xc)) {\n    puVar3 = &DAT_00398140;\n  }\n  else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" (if "if") (parenthesized_expression "(param_1 == *(int **)(DAT_00398140 + 0xc))" (( "(") (binary_expression "param_1 == *(int **)(DAT_00398140 + 0xc)" (identifier "param_1") (== "==") (pointer_expression "*(int **)(DAT_00398140 + 0xc)" (* "*") (cast_expression "(int **)(DAT_00398140 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(DAT_00398140 + 0xc)" (( "(") (binary_expression "DAT_00398140 + 0xc" (identifier "DAT_00398140") (+ "+") (number_literal "0xc")) () ")"))))) () ")")) (compound_statement "{\n    puVar3 = &DAT_00398140;\n  }" ({ "{") (expression_statement "puVar3 = &DAT_00398140;" (assignment_expression "puVar3 = &DAT_00398140" (identifier "puVar3") (= "=") (pointer_expression "&DAT_00398140" (& "&") (identifier "DAT_00398140"))) (; ";")) (} "}")) (else_clause "else {\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" (else "else") (compound_statement "{\n    do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));\n    puVar3 = (undefined4 *)(iVar2 + 0x14);\n  }" ({ "{") (do_statement "do {\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    } while (param_1 != *(int **)(iVar4 + 0xc));" (do "do") (compound_statement "{\n      iVar2 = iVar4;\n      iVar4 = *(int *)(iVar2 + 0x14);\n      if (iVar4 == 0) goto LAB_0027f80e;\n    }" ({ "{") (expression_statement "iVar2 = iVar4;" (assignment_expression "iVar2 = iVar4" (identifier "iVar2") (= "=") (identifier "iVar4")) (; ";")) (expression_statement "iVar4 = *(int *)(iVar2 + 0x14);" (assignment_expression "iVar4 = *(int *)(iVar2 + 0x14)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(iVar2 + 0x14)" (* "*") (cast_expression "(int *)(iVar2 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x14)" (( "(") (binary_expression "iVar2 + 0x14" (identifier "iVar2") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (iVar4 == 0) goto LAB_0027f80e;" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0027f80e;" (goto "goto") (statement_identifier "LAB_0027f80e") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(param_1 != *(int **)(iVar4 + 0xc))" (( "(") (binary_expression "param_1 != *(int **)(iVar4 + 0xc)" (identifier "param_1") (!= "!=") (pointer_expression "*(int **)(iVar4 + 0xc)" (* "*") (cast_expression "(int **)(iVar4 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar4 + 0xc)" (( "(") (binary_expression "iVar4 + 0xc" (identifier "iVar4") (+ "+") (number_literal "0xc")) () ")"))))) () ")")) (; ";")) (expression_statement "puVar3 = (undefined4 *)(iVar2 + 0x14);" (assignment_expression "puVar3 = (undefined4 *)(iVar2 + 0x14)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(iVar2 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x14)" (( "(") (binary_expression "iVar2 + 0x14" (identifier "iVar2") (+ "+") (number_literal "0x14")) () ")")))) (; ";")) (} "}")))) (expression_statement "*puVar3 = *(undefined4 *)(iVar4 + 0x14);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar4 + 0x14)" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "*(undefined4 *)(iVar4 + 0x14)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x14)" (( "(") (binary_expression "iVar4 + 0x14" (identifier "iVar4") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (labeled_statement "LAB_0027f850:\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" (statement_identifier "LAB_0027f850") (: ":") (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" (if "if") (parenthesized_expression "(puVar1 != (undefined *)0x0)" (( "(") (binary_expression "puVar1 != (undefined *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" ({ "{") (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120)" (identifier "pthread_mutex_unlock") (argument_list "((pthread_mutex_t *)&DAT_00398120)" (( "(") (cast_expression "(pthread_mutex_t *)&DAT_00398120" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_00398120" (& "&") (identifier "DAT_00398120"))) () ")"))) (; ";")) (} "}")))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

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

int function_1(int *var_1)

{
  int *var_7;
  type_1 *var_9;
  int var_12;
  type_2 *puVar3;
  int var_6;
  
  var_9 = var_2;
  if ((var_1 == (int *)0x0) || (*var_1 == 0)) {
    return 0;
  }
  if (var_2 != (type_1 *)0x0) {
    var_3((type_3 *)object_mutex);
  }
  if (var_4 == 0) {
LAB_0027f80e:
    if (var_5 != 0) {
      puVar3 = &var_5;
      var_6 = var_5;
      do {
        var_7 = *(int **)(var_6 + 0xc);
        if ((*(type_4 *)(var_6 + 0x10) & 1) == 0) {
          if (var_1 == var_7) {
            *puVar3 = *(type_2 *)(var_6 + 0x14);
            goto LAB_0027f850;
          }
        }
        else if (var_1 == (int *)*var_7) {
          *puVar3 = *(type_2 *)(var_6 + 0x14);
          var_8(var_7);
          goto LAB_0027f850;
        }
        puVar3 = (type_2 *)(var_6 + 0x14);
        var_6 = *(int *)(var_6 + 0x14);
      } while (var_6 != 0);
    }
    if (var_9 != (type_1 *)0x0) {
      var_10((type_3 *)object_mutex);
    }
                    /* WARNING: Subroutine does not return */
    var_11();
  }
  var_6 = var_4;
  if (var_1 == *(int **)(var_4 + 0xc)) {
    puVar3 = &var_4;
  }
  else {
    do {
      var_12 = var_6;
      var_6 = *(int *)(var_12 + 0x14);
      if (var_6 == 0) goto LAB_0027f80e;
    } while (var_1 != *(int **)(var_6 + 0xc));
    puVar3 = (type_2 *)(var_12 + 0x14);
  }
  *puVar3 = *(type_2 *)(var_6 + 0x14);
LAB_0027f850:
  if (var_9 != (type_1 *)0x0) {
    var_10((type_3 *)object_mutex);
  }
  return var_6;
}


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

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

int MASKED(int *param_1)

{
  int *__ptr;
  undefined *puVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  
  puVar1 = PTR___pthread_key_create_0038ef24;
  if ((param_1 == (int *)0x0) || (*param_1 == 0)) {
    return 0;
  }
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);
  }
  if (DAT_00398140 == 0) {
LAB_0027f80e:
    if (DAT_0039813c != 0) {
      puVar3 = &DAT_0039813c;
      iVar4 = DAT_0039813c;
      do {
        __ptr = *(int **)(iVar4 + 0xc);
        if ((*(byte *)(iVar4 + 0x10) & 1) == 0) {
          if (param_1 == __ptr) {
            *puVar3 = *(undefined4 *)(iVar4 + 0x14);
            goto LAB_0027f850;
          }
        }
        else if (param_1 == (int *)*__ptr) {
          *puVar3 = *(undefined4 *)(iVar4 + 0x14);
          free(__ptr);
          goto LAB_0027f850;
        }
        puVar3 = (undefined4 *)(iVar4 + 0x14);
        iVar4 = *(int *)(iVar4 + 0x14);
      } while (iVar4 != 0);
    }
    if (puVar1 != (undefined *)0x0) {
      pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);
    }
                    /* WARNING: Subroutine does not return */
    abort();
  }
  iVar4 = DAT_00398140;
  if (param_1 == *(int **)(DAT_00398140 + 0xc)) {
    puVar3 = &DAT_00398140;
  }
  else {
    do {
      iVar2 = iVar4;
      iVar4 = *(int *)(iVar2 + 0x14);
      if (iVar4 == 0) goto LAB_0027f80e;
    } while (param_1 != *(int **)(iVar4 + 0xc));
    puVar3 = (undefined4 *)(iVar2 + 0x14);
  }
  *puVar3 = *(undefined4 *)(iVar4 + 0x14);
LAB_0027f850:
  if (puVar1 != (undefined *)0x0) {
    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);
  }
  return iVar4;
}

