
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::Catalogs::_M_get(int) const */

int * __thiscall std::Catalogs::_M_get(Catalogs *this,int param_1)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  undefined **this_00;
  undefined4 *puVar4;
  undefined *puVar5;
  
  this_00 = &_GLOBAL_OFFSET_TABLE_;
  puVar5 = PTR___pthread_key_create_0038ef24;
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);
    if (iVar1 != 0) {
      __throw_concurrence_lock_error();
                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */
      piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5);
      return piVar3;
    }
  }
  puVar4 = *(undefined4 **)(this + 0x1c);
  for (iVar1 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar1;
      iVar1 = (iVar1 - iVar2) + -1) {
    while( true ) {
      iVar2 = iVar1 >> 1;
      if (*(int *)puVar4[iVar2] < param_1) break;
      iVar1 = iVar2;
      if (iVar2 == 0) goto LAB_0022f587;
    }
    puVar4 = puVar4 + iVar2 + 1;
  }
LAB_0022f587:
  if (*(undefined4 **)(this + 0x20) == puVar4) {
    piVar3 = (int *)0x0;
  }
  else {
    piVar3 = (int *)*puVar4;
    if (*piVar3 != param_1) {
      piVar3 = (int *)0x0;
    }
  }
  if (puVar5 != (undefined *)0x0) {
    iVar1 = pthread_mutex_unlock((pthread_mutex_t *)this);
    if (iVar1 != 0) {
      piVar3 = (int *)__cxa_allocate_exception(4);
      *piVar3 = (int)((int)this_00 + -0x3050);
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */
      __cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),
                  *(undefined **)((int)this_00 + -0x24));
    }
  }
  return piVar3;
}



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

int * FUN_0022f510(pthread_mutex_t *param_1,int param_2)

{
  undefined *puVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  int *piVar5;
  
  puVar1 = PTR___pthread_key_create_0038ef24;
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    iVar2 = pthread_mutex_lock(param_1);
    if (iVar2 != 0) {
      FUN_001e68a0();
                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */
      piVar5 = (int *)FUN_0003330a();
      return piVar5;
    }
  }
  puVar3 = *(undefined4 **)((int)param_1 + 0x1c);
  for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;
      iVar2 = (iVar2 - iVar4) + -1) {
    while( true ) {
      iVar4 = iVar2 >> 1;
      if (*(int *)puVar3[iVar4] < param_2) break;
      iVar2 = iVar4;
      if (iVar4 == 0) goto LAB_0022f587;
    }
    puVar3 = puVar3 + iVar4 + 1;
  }
LAB_0022f587:
  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {
    piVar5 = (int *)0x0;
  }
  else {
    piVar5 = (int *)*puVar3;
    if (*piVar5 != param_2) {
      piVar5 = (int *)0x0;
    }
  }
  if (puVar1 != (undefined *)0x0) {
    iVar2 = pthread_mutex_unlock(param_1);
    if (iVar2 != 0) {
      puVar3 = (undefined4 *)FUN_001e6be0(4);
      *puVar3 = &PTR_FUN_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */
      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);
    }
  }
  return piVar5;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x15fae5
SUB ESP,0x1c
MOV ESI,dword ptr [EBP + 0xc]
MOV EAX,dword ptr [EBX + 0xffffff24]
MOV dword ptr [EBP + -0x24],EBX
MOV dword ptr [EBP + -0x20],EAX
TEST EAX,EAX
JZ 0x0022f54d
SUB ESP,0xc
PUSH dword ptr [EBP + 0x8]
CALL 0x000297c0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0022f5fb
MOV EAX,dword ptr [EBP + 0x8]
MOV EDI,dword ptr [EBP + 0x8]
MOV EAX,dword ptr [EAX + 0x20]
MOV EBX,dword ptr [EDI + 0x1c]
MOV dword ptr [EBP + -0x1c],EAX
SUB EAX,EBX
SAR EAX,0x2
JMP 0x0022f570
SUB EAX,EDX
LEA EBX,[ECX + 0x4]
SUB EAX,0x1
TEST EAX,EAX
JLE 0x0022f587
MOV EDX,EAX
SAR EDX,0x1
LEA ECX,[EBX + EDX*0x4]
MOV EDI,dword ptr [ECX]
CMP dword ptr [EDI],ESI
JL 0x0022f568
MOV EAX,EDX
TEST EDX,EDX
JNZ 0x0022f574
CMP dword ptr [EBP + -0x1c],EBX
JZ 0x0022f5c8
MOV EDX,dword ptr [EBX]
MOV EAX,0x0
CMP dword ptr [EDX],ESI
CMOVNZ EDX,EAX
MOV EAX,dword ptr [EBP + -0x20]
TEST EAX,EAX
JZ 0x0022f5ba
SUB ESP,0xc
PUSH dword ptr [EBP + 0x8]
MOV EBX,dword ptr [EBP + -0x24]
MOV dword ptr [EBP + -0x1c],EDX
CALL 0x00029500
ADD ESP,0x10
MOV EDX,dword ptr [EBP + -0x1c]
TEST EAX,EAX
JNZ 0x0022f5cc
LEA ESP,[EBP + -0xc]
MOV EAX,EDX
POP EBX
POP ESI
POP EDI
POP EBP
RET
XOR EDX,EDX
JMP 0x0022f598
SUB ESP,0xc
MOV EDI,dword ptr [EBP + -0x24]
PUSH 0x4
MOV EBX,EDI
CALL 0x001e6be0
LEA EDX,[EDI + 0xffffcfa8]
ADD ESP,0xc
ADD EDX,0x8
MOV dword ptr [EAX],EDX
PUSH dword ptr [EDI + 0xffffffdc]
PUSH dword ptr [EDI + 0xfffffbc0]
PUSH EAX
CALL 0x001e5630
MOV EBX,dword ptr [EBP + -0x24]
CALL 0x001e68a0
JMP 0x0003330a
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * FUN_0022f510(pthread_mutex_t *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }\n  puVar3 = *(undefined4 **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return piVar5;\n}\n\n" comment (function_definition "int * FUN_0022f510(pthread_mutex_t *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }\n  puVar3 = *(undefined4 **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return piVar5;\n}" primitive_type (pointer_declarator "* FUN_0022f510(pthread_mutex_t *param_1,int param_2)" * (function_declarator "FUN_0022f510(pthread_mutex_t *param_1,int param_2)" identifier (parameter_list "(pthread_mutex_t *param_1,int param_2)" ( (parameter_declaration "pthread_mutex_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }\n  puVar3 = *(undefined4 **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return piVar5;\n}" { (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 ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (expression_statement "puVar1 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar1 = PTR___pthread_key_create_0038ef24" identifier = identifier) ;) (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\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    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_lock(param_1);" (assignment_expression "iVar2 = pthread_mutex_lock(param_1)" identifier = (call_expression "pthread_mutex_lock(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      FUN_001e68a0();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_001e68a0();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }" { (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" identifier (argument_list "()" ( ))) ;) comment (expression_statement "piVar5 = (int *)FUN_0003330a();" (assignment_expression "piVar5 = (int *)FUN_0003330a()" identifier = (cast_expression "(int *)FUN_0003330a()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003330a()" identifier (argument_list "()" ( ))))) ;) (return_statement "return piVar5;" return identifier ;) })) })) (expression_statement "puVar3 = *(undefined4 **)((int)param_1 + 0x1c);" (assignment_expression "puVar3 = *(undefined4 **)((int)param_1 + 0x1c)" identifier = (pointer_expression "*(undefined4 **)((int)param_1 + 0x1c)" * (cast_expression "(undefined4 **)((int)param_1 + 0x1c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0x1c)" ( (binary_expression "(int)param_1 + 0x1c" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (for_statement "for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }" for ( (assignment_expression "iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2" identifier = (binary_expression "(int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2" (binary_expression "(int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3" (cast_expression "(int)*(undefined4 **)((int)param_1 + 0x20)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(undefined4 **)((int)param_1 + 0x20)" * (cast_expression "(undefined4 **)((int)param_1 + 0x20)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0x20)" ( (binary_expression "(int)param_1 + 0x20" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) - (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ; (binary_expression "0 < iVar2" number_literal < identifier) ; (assignment_expression "iVar2 = (iVar2 - iVar4) + -1" identifier = (binary_expression "(iVar2 - iVar4) + -1" (parenthesized_expression "(iVar2 - iVar4)" ( (binary_expression "iVar2 - iVar4" identifier - identifier) )) + number_literal)) ) (compound_statement "{\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }" { (while_statement "while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }" { (expression_statement "iVar4 = iVar2 >> 1;" (assignment_expression "iVar4 = iVar2 >> 1" identifier = (binary_expression "iVar2 >> 1" identifier >> number_literal)) ;) (if_statement "if (*(int *)puVar3[iVar4] < param_2) break;" if (parenthesized_expression "(*(int *)puVar3[iVar4] < param_2)" ( (binary_expression "*(int *)puVar3[iVar4] < param_2" (pointer_expression "*(int *)puVar3[iVar4]" * (cast_expression "(int *)puVar3[iVar4]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[iVar4]" identifier [ identifier ]))) < identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar2 = iVar4;" (assignment_expression "iVar2 = iVar4" identifier = identifier) ;) (if_statement "if (iVar4 == 0) goto LAB_0022f587;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0022f587;" goto statement_identifier ;)) })) (expression_statement "puVar3 = puVar3 + iVar4 + 1;" (assignment_expression "puVar3 = puVar3 + iVar4 + 1" identifier = (binary_expression "puVar3 + iVar4 + 1" (binary_expression "puVar3 + iVar4" identifier + identifier) + number_literal)) ;) })) (labeled_statement "LAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" statement_identifier : (if_statement "if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" if (parenthesized_expression "(*(undefined4 **)((int)param_1 + 0x20) == puVar3)" ( (binary_expression "*(undefined4 **)((int)param_1 + 0x20) == puVar3" (pointer_expression "*(undefined4 **)((int)param_1 + 0x20)" * (cast_expression "(undefined4 **)((int)param_1 + 0x20)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0x20)" ( (binary_expression "(int)param_1 + 0x20" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == identifier) )) (compound_statement "{\n    piVar5 = (int *)0x0;\n  }" { (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" else (compound_statement "{\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" { (expression_statement "piVar5 = (int *)*puVar3;" (assignment_expression "piVar5 = (int *)*puVar3" identifier = (cast_expression "(int *)*puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar3" * identifier))) ;) (if_statement "if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }" if (parenthesized_expression "(*piVar5 != param_2)" ( (binary_expression "*piVar5 != param_2" (pointer_expression "*piVar5" * identifier) != identifier) )) (compound_statement "{\n      piVar5 = (int *)0x0;\n    }" { (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) })))) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\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    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_unlock(param_1);" (assignment_expression "iVar2 = pthread_mutex_unlock(param_1)" identifier = (call_expression "pthread_mutex_unlock(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" { (expression_statement "puVar3 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar3 = (undefined4 *)FUN_001e6be0(4)" identifier = (cast_expression "(undefined4 *)FUN_001e6be0(4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001e6be0(4)" identifier (argument_list "(4)" ( number_literal ))))) ;) (expression_statement "*puVar3 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar3 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar3" * identifier) = (pointer_expression "&PTR_FUN_0038bfb0" & identifier)) ;) comment comment (expression_statement "FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" identifier (argument_list "(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" ( identifier , identifier , identifier ))) ;) })) })) (return_statement "return piVar5;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::Catalogs::_M_get(int) const */\n\nint * __thiscall std::Catalogs::_M_get(Catalogs *this,int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined **this_00;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  this_00 = &_GLOBAL_OFFSET_TABLE_;\n  puVar5 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      __throw_concurrence_lock_error();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5);\n      return piVar3;\n    }\n  }\n  puVar4 = *(undefined4 **)(this + 0x1c);\n  for (iVar1 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar1;\n      iVar1 = (iVar1 - iVar2) + -1) {\n    while( true ) {\n      iVar2 = iVar1 >> 1;\n      if (*(int *)puVar4[iVar2] < param_1) break;\n      iVar1 = iVar2;\n      if (iVar2 == 0) goto LAB_0022f587;\n    }\n    puVar4 = puVar4 + iVar2 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)(this + 0x20) == puVar4) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = (int *)*puVar4;\n    if (*piVar3 != param_1) {\n      piVar3 = (int *)0x0;\n    }\n  }\n  if (puVar5 != (undefined *)0x0) {\n    iVar1 = pthread_mutex_unlock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      piVar3 = (int *)__cxa_allocate_exception(4);\n      *piVar3 = (int)((int)this_00 + -0x3050);\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      __cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24));\n    }\n  }\n  return piVar3;\n}\n\n" comment comment (declaration "int * __thiscall" primitive_type (pointer_declarator "* __thiscall" * identifier) ;) (labeled_statement "std::Catalogs::_M_get(Catalogs *this,int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined **this_00;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  this_00 = &_GLOBAL_OFFSET_TABLE_;\n  puVar5 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      __throw_concurrence_lock_error();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5);\n      return piVar3;\n    }\n  }\n  puVar4 = *(undefined4 **)(this + 0x1c);\n  for (iVar1 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar1;\n      iVar1 = (iVar1 - iVar2) + -1) {\n    while( true ) {\n      iVar2 = iVar1 >> 1;\n      if (*(int *)puVar4[iVar2] < param_1) break;\n      iVar1 = iVar2;\n      if (iVar2 == 0) goto LAB_0022f587;\n    }\n    puVar4 = puVar4 + iVar2 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)(this + 0x20) == puVar4) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = (int *)*puVar4;\n    if (*piVar3 != param_1) {\n      piVar3 = (int *)0x0;\n    }\n  }\n  if (puVar5 != (undefined *)0x0) {\n    iVar1 = pthread_mutex_unlock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      piVar3 = (int *)__cxa_allocate_exception(4);\n      *piVar3 = (int)((int)this_00 + -0x3050);\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      __cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24));\n    }\n  }\n  return piVar3;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "Catalogs::_M_get(Catalogs *this,int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined **this_00;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  this_00 = &_GLOBAL_OFFSET_TABLE_;\n  puVar5 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      __throw_concurrence_lock_error();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5);\n      return piVar3;\n    }\n  }\n  puVar4 = *(undefined4 **)(this + 0x1c);\n  for (iVar1 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar1;\n      iVar1 = (iVar1 - iVar2) + -1) {\n    while( true ) {\n      iVar2 = iVar1 >> 1;\n      if (*(int *)puVar4[iVar2] < param_1) break;\n      iVar1 = iVar2;\n      if (iVar2 == 0) goto LAB_0022f587;\n    }\n    puVar4 = puVar4 + iVar2 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)(this + 0x20) == puVar4) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = (int *)*puVar4;\n    if (*piVar3 != param_1) {\n      piVar3 = (int *)0x0;\n    }\n  }\n  if (puVar5 != (undefined *)0x0) {\n    iVar1 = pthread_mutex_unlock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      piVar3 = (int *)__cxa_allocate_exception(4);\n      *piVar3 = (int)((int)this_00 + -0x3050);\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      __cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24));\n    }\n  }\n  return piVar3;\n}" statement_identifier : (ERROR ":_M_get(Catalogs *this,int param_1)" : (call_expression "_M_get(Catalogs *this,int param_1)" identifier (argument_list "(Catalogs *this,int param_1)" ( (binary_expression "Catalogs *this" identifier * identifier) , (ERROR "int" identifier) identifier )))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined **this_00;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  this_00 = &_GLOBAL_OFFSET_TABLE_;\n  puVar5 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      __throw_concurrence_lock_error();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5);\n      return piVar3;\n    }\n  }\n  puVar4 = *(undefined4 **)(this + 0x1c);\n  for (iVar1 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar1;\n      iVar1 = (iVar1 - iVar2) + -1) {\n    while( true ) {\n      iVar2 = iVar1 >> 1;\n      if (*(int *)puVar4[iVar2] < param_1) break;\n      iVar1 = iVar2;\n      if (iVar2 == 0) goto LAB_0022f587;\n    }\n    puVar4 = puVar4 + iVar2 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)(this + 0x20) == puVar4) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = (int *)*puVar4;\n    if (*piVar3 != param_1) {\n      piVar3 = (int *)0x0;\n    }\n  }\n  if (puVar5 != (undefined *)0x0) {\n    iVar1 = pthread_mutex_unlock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      piVar3 = (int *)__cxa_allocate_exception(4);\n      *piVar3 = (int)((int)this_00 + -0x3050);\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      __cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24));\n    }\n  }\n  return piVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined **this_00;" type_identifier (pointer_declarator "**this_00" * (pointer_declarator "*this_00" * identifier)) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (expression_statement "this_00 = &_GLOBAL_OFFSET_TABLE_;" (assignment_expression "this_00 = &_GLOBAL_OFFSET_TABLE_" identifier = (pointer_expression "&_GLOBAL_OFFSET_TABLE_" & identifier)) ;) (expression_statement "puVar5 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar5 = PTR___pthread_key_create_0038ef24" identifier = identifier) ;) (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      __throw_concurrence_lock_error();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5);\n      return piVar3;\n    }\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    iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      __throw_concurrence_lock_error();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5);\n      return piVar3;\n    }\n  }" { (expression_statement "iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);" (assignment_expression "iVar1 = pthread_mutex_lock((pthread_mutex_t *)this)" identifier = (call_expression "pthread_mutex_lock((pthread_mutex_t *)this)" identifier (argument_list "((pthread_mutex_t *)this)" ( (cast_expression "(pthread_mutex_t *)this" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (iVar1 != 0) {\n      __throw_concurrence_lock_error();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5);\n      return piVar3;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      __throw_concurrence_lock_error();\n                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */\n      piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5);\n      return piVar3;\n    }" { (expression_statement "__throw_concurrence_lock_error();" (call_expression "__throw_concurrence_lock_error()" identifier (argument_list "()" ( ))) ;) comment (expression_statement "piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5);" (assignment_expression "piVar3 = (int *)_M_get((Catalogs *)this_00,(int)puVar5)" identifier = (cast_expression "(int *)_M_get((Catalogs *)this_00,(int)puVar5)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "_M_get((Catalogs *)this_00,(int)puVar5)" identifier (argument_list "((Catalogs *)this_00,(int)puVar5)" ( (cast_expression "(Catalogs *)this_00" ( (type_descriptor "Catalogs *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) ))))) ;) (return_statement "return piVar3;" return identifier ;) })) })) (expression_statement "puVar4 = *(undefined4 **)(this + 0x1c);" (assignment_expression "puVar4 = *(undefined4 **)(this + 0x1c)" identifier = (pointer_expression "*(undefined4 **)(this + 0x1c)" * (cast_expression "(undefined4 **)(this + 0x1c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x1c)" ( (binary_expression "this + 0x1c" identifier + number_literal) ))))) ;) (for_statement "for (iVar1 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar1;\n      iVar1 = (iVar1 - iVar2) + -1) {\n    while( true ) {\n      iVar2 = iVar1 >> 1;\n      if (*(int *)puVar4[iVar2] < param_1) break;\n      iVar1 = iVar2;\n      if (iVar2 == 0) goto LAB_0022f587;\n    }\n    puVar4 = puVar4 + iVar2 + 1;\n  }" for ( (assignment_expression "iVar1 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2" identifier = (binary_expression "(int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2" (binary_expression "(int)*(undefined4 **)(this + 0x20) - (int)puVar4" (cast_expression "(int)*(undefined4 **)(this + 0x20)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(undefined4 **)(this + 0x20)" * (cast_expression "(undefined4 **)(this + 0x20)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) ))))) - (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ; (binary_expression "0 < iVar1" number_literal < identifier) ; (assignment_expression "iVar1 = (iVar1 - iVar2) + -1" identifier = (binary_expression "(iVar1 - iVar2) + -1" (parenthesized_expression "(iVar1 - iVar2)" ( (binary_expression "iVar1 - iVar2" identifier - identifier) )) + number_literal)) ) (compound_statement "{\n    while( true ) {\n      iVar2 = iVar1 >> 1;\n      if (*(int *)puVar4[iVar2] < param_1) break;\n      iVar1 = iVar2;\n      if (iVar2 == 0) goto LAB_0022f587;\n    }\n    puVar4 = puVar4 + iVar2 + 1;\n  }" { (while_statement "while( true ) {\n      iVar2 = iVar1 >> 1;\n      if (*(int *)puVar4[iVar2] < param_1) break;\n      iVar1 = iVar2;\n      if (iVar2 == 0) goto LAB_0022f587;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar2 = iVar1 >> 1;\n      if (*(int *)puVar4[iVar2] < param_1) break;\n      iVar1 = iVar2;\n      if (iVar2 == 0) goto LAB_0022f587;\n    }" { (expression_statement "iVar2 = iVar1 >> 1;" (assignment_expression "iVar2 = iVar1 >> 1" identifier = (binary_expression "iVar1 >> 1" identifier >> number_literal)) ;) (if_statement "if (*(int *)puVar4[iVar2] < param_1) break;" if (parenthesized_expression "(*(int *)puVar4[iVar2] < param_1)" ( (binary_expression "*(int *)puVar4[iVar2] < param_1" (pointer_expression "*(int *)puVar4[iVar2]" * (cast_expression "(int *)puVar4[iVar2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar4[iVar2]" identifier [ identifier ]))) < identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = iVar2;" (assignment_expression "iVar1 = iVar2" identifier = identifier) ;) (if_statement "if (iVar2 == 0) goto LAB_0022f587;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0022f587;" goto statement_identifier ;)) })) (expression_statement "puVar4 = puVar4 + iVar2 + 1;" (assignment_expression "puVar4 = puVar4 + iVar2 + 1" identifier = (binary_expression "puVar4 + iVar2 + 1" (binary_expression "puVar4 + iVar2" identifier + identifier) + number_literal)) ;) })) (labeled_statement "LAB_0022f587:\n  if (*(undefined4 **)(this + 0x20) == puVar4) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = (int *)*puVar4;\n    if (*piVar3 != param_1) {\n      piVar3 = (int *)0x0;\n    }\n  }" statement_identifier : (if_statement "if (*(undefined4 **)(this + 0x20) == puVar4) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = (int *)*puVar4;\n    if (*piVar3 != param_1) {\n      piVar3 = (int *)0x0;\n    }\n  }" if (parenthesized_expression "(*(undefined4 **)(this + 0x20) == puVar4)" ( (binary_expression "*(undefined4 **)(this + 0x20) == puVar4" (pointer_expression "*(undefined4 **)(this + 0x20)" * (cast_expression "(undefined4 **)(this + 0x20)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) )))) == identifier) )) (compound_statement "{\n    piVar3 = (int *)0x0;\n  }" { (expression_statement "piVar3 = (int *)0x0;" (assignment_expression "piVar3 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    piVar3 = (int *)*puVar4;\n    if (*piVar3 != param_1) {\n      piVar3 = (int *)0x0;\n    }\n  }" else (compound_statement "{\n    piVar3 = (int *)*puVar4;\n    if (*piVar3 != param_1) {\n      piVar3 = (int *)0x0;\n    }\n  }" { (expression_statement "piVar3 = (int *)*puVar4;" (assignment_expression "piVar3 = (int *)*puVar4" identifier = (cast_expression "(int *)*puVar4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar4" * identifier))) ;) (if_statement "if (*piVar3 != param_1) {\n      piVar3 = (int *)0x0;\n    }" if (parenthesized_expression "(*piVar3 != param_1)" ( (binary_expression "*piVar3 != param_1" (pointer_expression "*piVar3" * identifier) != identifier) )) (compound_statement "{\n      piVar3 = (int *)0x0;\n    }" { (expression_statement "piVar3 = (int *)0x0;" (assignment_expression "piVar3 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) })))) (if_statement "if (puVar5 != (undefined *)0x0) {\n    iVar1 = pthread_mutex_unlock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      piVar3 = (int *)__cxa_allocate_exception(4);\n      *piVar3 = (int)((int)this_00 + -0x3050);\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      __cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24));\n    }\n  }" if (parenthesized_expression "(puVar5 != (undefined *)0x0)" ( (binary_expression "puVar5 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = pthread_mutex_unlock((pthread_mutex_t *)this);\n    if (iVar1 != 0) {\n      piVar3 = (int *)__cxa_allocate_exception(4);\n      *piVar3 = (int)((int)this_00 + -0x3050);\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      __cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24));\n    }\n  }" { (expression_statement "iVar1 = pthread_mutex_unlock((pthread_mutex_t *)this);" (assignment_expression "iVar1 = pthread_mutex_unlock((pthread_mutex_t *)this)" identifier = (call_expression "pthread_mutex_unlock((pthread_mutex_t *)this)" identifier (argument_list "((pthread_mutex_t *)this)" ( (cast_expression "(pthread_mutex_t *)this" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (iVar1 != 0) {\n      piVar3 = (int *)__cxa_allocate_exception(4);\n      *piVar3 = (int)((int)this_00 + -0x3050);\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      __cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24));\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      piVar3 = (int *)__cxa_allocate_exception(4);\n      *piVar3 = (int)((int)this_00 + -0x3050);\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */\n      __cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24));\n    }" { (expression_statement "piVar3 = (int *)__cxa_allocate_exception(4);" (assignment_expression "piVar3 = (int *)__cxa_allocate_exception(4)" identifier = (cast_expression "(int *)__cxa_allocate_exception(4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "__cxa_allocate_exception(4)" identifier (argument_list "(4)" ( number_literal ))))) ;) (expression_statement "*piVar3 = (int)((int)this_00 + -0x3050);" (assignment_expression "*piVar3 = (int)((int)this_00 + -0x3050)" (pointer_expression "*piVar3" * identifier) = (cast_expression "(int)((int)this_00 + -0x3050)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((int)this_00 + -0x3050)" ( (binary_expression "(int)this_00 + -0x3050" (cast_expression "(int)this_00" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) comment comment (expression_statement "__cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24));" (call_expression "__cxa_throw(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24))" identifier (argument_list "(piVar3,*(undefined **)((int)this_00 + -0x440),\n                  *(undefined **)((int)this_00 + -0x24))" ( identifier , (pointer_expression "*(undefined **)((int)this_00 + -0x440)" * (cast_expression "(undefined **)((int)this_00 + -0x440)" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)this_00 + -0x440)" ( (binary_expression "(int)this_00 + -0x440" (cast_expression "(int)this_00" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) , (pointer_expression "*(undefined **)((int)this_00 + -0x24)" * (cast_expression "(undefined **)((int)this_00 + -0x24)" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)this_00 + -0x24)" ( (binary_expression "(int)this_00 + -0x24" (cast_expression "(int)this_00" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) })) (return_statement "return piVar3;" return identifier ;) }))))
(translation_unit "int * FUN_0022f510(pthread_mutex_t *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }\n  puVar3 = *(undefined4 **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return piVar5;\n}\n\n" (function_definition "int * FUN_0022f510(pthread_mutex_t *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }\n  puVar3 = *(undefined4 **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return piVar5;\n}" primitive_type (pointer_declarator "* FUN_0022f510(pthread_mutex_t *param_1,int param_2)" * (function_declarator "FUN_0022f510(pthread_mutex_t *param_1,int param_2)" identifier (parameter_list "(pthread_mutex_t *param_1,int param_2)" ( (parameter_declaration "pthread_mutex_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }\n  puVar3 = *(undefined4 **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return piVar5;\n}" { (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 ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (expression_statement "puVar1 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar1 = PTR___pthread_key_create_0038ef24" identifier = identifier) ;) (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\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    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_lock(param_1);" (assignment_expression "iVar2 = pthread_mutex_lock(param_1)" identifier = (call_expression "pthread_mutex_lock(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }" { (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar5 = (int *)FUN_0003330a();" (assignment_expression "piVar5 = (int *)FUN_0003330a()" identifier = (cast_expression "(int *)FUN_0003330a()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003330a()" identifier (argument_list "()" ( ))))) ;) (return_statement "return piVar5;" return identifier ;) })) })) (expression_statement "puVar3 = *(undefined4 **)((int)param_1 + 0x1c);" (assignment_expression "puVar3 = *(undefined4 **)((int)param_1 + 0x1c)" identifier = (pointer_expression "*(undefined4 **)((int)param_1 + 0x1c)" * (cast_expression "(undefined4 **)((int)param_1 + 0x1c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0x1c)" ( (binary_expression "(int)param_1 + 0x1c" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (for_statement "for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }" for ( (assignment_expression "iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2" identifier = (binary_expression "(int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2" (binary_expression "(int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3" (cast_expression "(int)*(undefined4 **)((int)param_1 + 0x20)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(undefined4 **)((int)param_1 + 0x20)" * (cast_expression "(undefined4 **)((int)param_1 + 0x20)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0x20)" ( (binary_expression "(int)param_1 + 0x20" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) - (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ; (binary_expression "0 < iVar2" number_literal < identifier) ; (assignment_expression "iVar2 = (iVar2 - iVar4) + -1" identifier = (binary_expression "(iVar2 - iVar4) + -1" (parenthesized_expression "(iVar2 - iVar4)" ( (binary_expression "iVar2 - iVar4" identifier - identifier) )) + number_literal)) ) (compound_statement "{\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }" { (while_statement "while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }" { (expression_statement "iVar4 = iVar2 >> 1;" (assignment_expression "iVar4 = iVar2 >> 1" identifier = (binary_expression "iVar2 >> 1" identifier >> number_literal)) ;) (if_statement "if (*(int *)puVar3[iVar4] < param_2) break;" if (parenthesized_expression "(*(int *)puVar3[iVar4] < param_2)" ( (binary_expression "*(int *)puVar3[iVar4] < param_2" (pointer_expression "*(int *)puVar3[iVar4]" * (cast_expression "(int *)puVar3[iVar4]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[iVar4]" identifier [ identifier ]))) < identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar2 = iVar4;" (assignment_expression "iVar2 = iVar4" identifier = identifier) ;) (if_statement "if (iVar4 == 0) goto LAB_0022f587;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0022f587;" goto statement_identifier ;)) })) (expression_statement "puVar3 = puVar3 + iVar4 + 1;" (assignment_expression "puVar3 = puVar3 + iVar4 + 1" identifier = (binary_expression "puVar3 + iVar4 + 1" (binary_expression "puVar3 + iVar4" identifier + identifier) + number_literal)) ;) })) (labeled_statement "LAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" statement_identifier : (if_statement "if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" if (parenthesized_expression "(*(undefined4 **)((int)param_1 + 0x20) == puVar3)" ( (binary_expression "*(undefined4 **)((int)param_1 + 0x20) == puVar3" (pointer_expression "*(undefined4 **)((int)param_1 + 0x20)" * (cast_expression "(undefined4 **)((int)param_1 + 0x20)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0x20)" ( (binary_expression "(int)param_1 + 0x20" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == identifier) )) (compound_statement "{\n    piVar5 = (int *)0x0;\n  }" { (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" else (compound_statement "{\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" { (expression_statement "piVar5 = (int *)*puVar3;" (assignment_expression "piVar5 = (int *)*puVar3" identifier = (cast_expression "(int *)*puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar3" * identifier))) ;) (if_statement "if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }" if (parenthesized_expression "(*piVar5 != param_2)" ( (binary_expression "*piVar5 != param_2" (pointer_expression "*piVar5" * identifier) != identifier) )) (compound_statement "{\n      piVar5 = (int *)0x0;\n    }" { (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) })))) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\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    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_unlock(param_1);" (assignment_expression "iVar2 = pthread_mutex_unlock(param_1)" identifier = (call_expression "pthread_mutex_unlock(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" { (expression_statement "puVar3 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar3 = (undefined4 *)FUN_001e6be0(4)" identifier = (cast_expression "(undefined4 *)FUN_001e6be0(4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001e6be0(4)" identifier (argument_list "(4)" ( number_literal ))))) ;) (expression_statement "*puVar3 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar3 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar3" * identifier) = (pointer_expression "&PTR_FUN_0038bfb0" & identifier)) ;) (expression_statement "FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" identifier (argument_list "(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" ( identifier , identifier , identifier ))) ;) })) })) (return_statement "return piVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (return_statement return IDENT ;) })) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ))))) ;) (for_statement for ( (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ))))) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT)) ; (binary_expression LIT < IDENT) ; (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - IDENT) )) + LIT)) ) (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ IDENT ]))) < IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) + LIT)) ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) })) })))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "int * FUN_0022f510(pthread_mutex_t *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }\n  puVar3 = *(undefined4 **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return piVar5;\n}" (primitive_type "int") (pointer_declarator "* FUN_0022f510(pthread_mutex_t *param_1,int param_2)" (* "*") (function_declarator "FUN_0022f510(pthread_mutex_t *param_1,int param_2)" (identifier "FUN_0022f510") (parameter_list "(pthread_mutex_t *param_1,int param_2)" (( "(") (parameter_declaration "pthread_mutex_t *param_1" (type_identifier "pthread_mutex_t") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")")))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }\n  puVar3 = *(undefined4 **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }\nLAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return piVar5;\n}" ({ "{") (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") (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (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 (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\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    iVar2 = pthread_mutex_lock(param_1);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }\n  }" ({ "{") (expression_statement "iVar2 = pthread_mutex_lock(param_1);" (assignment_expression "iVar2 = pthread_mutex_lock(param_1)" (identifier "iVar2") (= "=") (call_expression "pthread_mutex_lock(param_1)" (identifier "pthread_mutex_lock") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_001e68a0();\n                    \n      piVar5 = (int *)FUN_0003330a();\n      return piVar5;\n    }" ({ "{") (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" (identifier "FUN_001e68a0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar5 = (int *)FUN_0003330a();" (assignment_expression "piVar5 = (int *)FUN_0003330a()" (identifier "piVar5") (= "=") (cast_expression "(int *)FUN_0003330a()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0003330a()" (identifier "FUN_0003330a") (argument_list "()" (( "(") () ")"))))) (; ";")) (return_statement "return piVar5;" (return "return") (identifier "piVar5") (; ";")) (} "}"))) (} "}"))) (expression_statement "puVar3 = *(undefined4 **)((int)param_1 + 0x1c);" (assignment_expression "puVar3 = *(undefined4 **)((int)param_1 + 0x1c)" (identifier "puVar3") (= "=") (pointer_expression "*(undefined4 **)((int)param_1 + 0x1c)" (* "*") (cast_expression "(undefined4 **)((int)param_1 + 0x1c)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 0x1c)" (( "(") (binary_expression "(int)param_1 + 0x1c" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (for_statement "for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar4) + -1) {\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }" (for "for") (( "(") (assignment_expression "iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2" (identifier "iVar2") (= "=") (binary_expression "(int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2" (binary_expression "(int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3" (cast_expression "(int)*(undefined4 **)((int)param_1 + 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(undefined4 **)((int)param_1 + 0x20)" (* "*") (cast_expression "(undefined4 **)((int)param_1 + 0x20)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 0x20)" (( "(") (binary_expression "(int)param_1 + 0x20" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x20")) () ")"))))) (- "-") (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3"))) (>> ">>") (number_literal "2"))) (; ";") (binary_expression "0 < iVar2" (number_literal "0") (< "<") (identifier "iVar2")) (; ";") (assignment_expression "iVar2 = (iVar2 - iVar4) + -1" (identifier "iVar2") (= "=") (binary_expression "(iVar2 - iVar4) + -1" (parenthesized_expression "(iVar2 - iVar4)" (( "(") (binary_expression "iVar2 - iVar4" (identifier "iVar2") (- "-") (identifier "iVar4")) () ")")) (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n    while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }\n    puVar3 = puVar3 + iVar4 + 1;\n  }" ({ "{") (while_statement "while( true ) {\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      iVar4 = iVar2 >> 1;\n      if (*(int *)puVar3[iVar4] < param_2) break;\n      iVar2 = iVar4;\n      if (iVar4 == 0) goto LAB_0022f587;\n    }" ({ "{") (expression_statement "iVar4 = iVar2 >> 1;" (assignment_expression "iVar4 = iVar2 >> 1" (identifier "iVar4") (= "=") (binary_expression "iVar2 >> 1" (identifier "iVar2") (>> ">>") (number_literal "1"))) (; ";")) (if_statement "if (*(int *)puVar3[iVar4] < param_2) break;" (if "if") (parenthesized_expression "(*(int *)puVar3[iVar4] < param_2)" (( "(") (binary_expression "*(int *)puVar3[iVar4] < param_2" (pointer_expression "*(int *)puVar3[iVar4]" (* "*") (cast_expression "(int *)puVar3[iVar4]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar3[iVar4]" (identifier "puVar3") ([ "[") (identifier "iVar4") (] "]")))) (< "<") (identifier "param_2")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar2 = iVar4;" (assignment_expression "iVar2 = iVar4" (identifier "iVar2") (= "=") (identifier "iVar4")) (; ";")) (if_statement "if (iVar4 == 0) goto LAB_0022f587;" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0022f587;" (goto "goto") (statement_identifier "LAB_0022f587") (; ";"))) (} "}"))) (expression_statement "puVar3 = puVar3 + iVar4 + 1;" (assignment_expression "puVar3 = puVar3 + iVar4 + 1" (identifier "puVar3") (= "=") (binary_expression "puVar3 + iVar4 + 1" (binary_expression "puVar3 + iVar4" (identifier "puVar3") (+ "+") (identifier "iVar4")) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (labeled_statement "LAB_0022f587:\n  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" (statement_identifier "LAB_0022f587") (: ":") (if_statement "if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {\n    piVar5 = (int *)0x0;\n  }\n  else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" (if "if") (parenthesized_expression "(*(undefined4 **)((int)param_1 + 0x20) == puVar3)" (( "(") (binary_expression "*(undefined4 **)((int)param_1 + 0x20) == puVar3" (pointer_expression "*(undefined4 **)((int)param_1 + 0x20)" (* "*") (cast_expression "(undefined4 **)((int)param_1 + 0x20)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 0x20)" (( "(") (binary_expression "(int)param_1 + 0x20" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x20")) () ")")))) (== "==") (identifier "puVar3")) () ")")) (compound_statement "{\n    piVar5 = (int *)0x0;\n  }" ({ "{") (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" (identifier "piVar5") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" (else "else") (compound_statement "{\n    piVar5 = (int *)*puVar3;\n    if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }\n  }" ({ "{") (expression_statement "piVar5 = (int *)*puVar3;" (assignment_expression "piVar5 = (int *)*puVar3" (identifier "piVar5") (= "=") (cast_expression "(int *)*puVar3" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar3" (* "*") (identifier "puVar3")))) (; ";")) (if_statement "if (*piVar5 != param_2) {\n      piVar5 = (int *)0x0;\n    }" (if "if") (parenthesized_expression "(*piVar5 != param_2)" (( "(") (binary_expression "*piVar5 != param_2" (pointer_expression "*piVar5" (* "*") (identifier "piVar5")) (!= "!=") (identifier "param_2")) () ")")) (compound_statement "{\n      piVar5 = (int *)0x0;\n    }" ({ "{") (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" (identifier "piVar5") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}"))) (} "}"))))) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\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    iVar2 = pthread_mutex_unlock(param_1);\n    if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" ({ "{") (expression_statement "iVar2 = pthread_mutex_unlock(param_1);" (assignment_expression "iVar2 = pthread_mutex_unlock(param_1)" (identifier "iVar2") (= "=") (call_expression "pthread_mutex_unlock(param_1)" (identifier "pthread_mutex_unlock") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      puVar3 = (undefined4 *)FUN_001e6be0(4);\n      *puVar3 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" ({ "{") (expression_statement "puVar3 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar3 = (undefined4 *)FUN_001e6be0(4)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)FUN_001e6be0(4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_001e6be0(4)" (identifier "FUN_001e6be0") (argument_list "(4)" (( "(") (number_literal "4") () ")"))))) (; ";")) (expression_statement "*puVar3 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar3 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "&PTR_FUN_0038bfb0" (& "&") (identifier "PTR_FUN_0038bfb0"))) (; ";")) (expression_statement "FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" (identifier "FUN_001e5630") (argument_list "(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" (( "(") (identifier "puVar3") (, ",") (identifier "PTR_PTR_0038ebc0") (, ",") (identifier "PTR_FUN_0038efdc") () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return piVar5;" (return "return") (identifier "piVar5") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::Catalogs::_M_get(int) const */

int * __thiscall std::Catalogs::var_5(type_4 *var_6,int var_8)

{
  int var_3;
  int var_7;
  int *piVar3;
  type_1 **this_00;
  type_2 *var_9;
  type_1 *var_10;
  
  this_00 = &_GLOBAL_OFFSET_TABLE_;
  var_10 = var_1;
  if (var_1 != (type_1 *)0x0) {
    var_3 = var_2((type_3 *)var_6);
    if (var_3 != 0) {
      var_4();
                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */
      piVar3 = (int *)var_5((type_4 *)this_00,(int)var_10);
      return piVar3;
    }
  }
  var_9 = *(type_2 **)(var_6 + 0x1c);
  for (var_3 = (int)*(type_2 **)(var_6 + 0x20) - (int)var_9 >> 2; 0 < var_3;
      var_3 = (var_3 - var_7) + -1) {
    while( true ) {
      var_7 = var_3 >> 1;
      if (*(int *)var_9[var_7] < var_8) break;
      var_3 = var_7;
      if (var_7 == 0) goto LAB_0022f587;
    }
    var_9 = var_9 + var_7 + 1;
  }
LAB_0022f587:
  if (*(type_2 **)(var_6 + 0x20) == var_9) {
    piVar3 = (int *)0x0;
  }
  else {
    piVar3 = (int *)*var_9;
    if (*piVar3 != var_8) {
      piVar3 = (int *)0x0;
    }
  }
  if (var_10 != (type_1 *)0x0) {
    var_3 = var_11((type_3 *)var_6);
    if (var_3 != 0) {
      piVar3 = (int *)var_12(4);
      *piVar3 = (int)((int)this_00 + -0x3050);
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */
      var_13(piVar3,*(type_1 **)((int)this_00 + -0x440),
                  *(type_1 **)((int)this_00 + -0x24));
    }
  }
  return piVar3;
}


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

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

int * MASKED(pthread_mutex_t *param_1,int param_2)

{
  undefined *puVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  int *piVar5;
  
  puVar1 = PTR___pthread_key_create_0038ef24;
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    iVar2 = pthread_mutex_lock(param_1);
    if (iVar2 != 0) {
      FUN_001e68a0();
                    /* catch() { ... } // from try @ 0022f5f6 with catch @ 0022f603 */
      piVar5 = (int *)FUN_0003330a();
      return piVar5;
    }
  }
  puVar3 = *(undefined4 **)((int)param_1 + 0x1c);
  for (iVar2 = (int)*(undefined4 **)((int)param_1 + 0x20) - (int)puVar3 >> 2; 0 < iVar2;
      iVar2 = (iVar2 - iVar4) + -1) {
    while( true ) {
      iVar4 = iVar2 >> 1;
      if (*(int *)puVar3[iVar4] < param_2) break;
      iVar2 = iVar4;
      if (iVar4 == 0) goto LAB_0022f587;
    }
    puVar3 = puVar3 + iVar4 + 1;
  }
LAB_0022f587:
  if (*(undefined4 **)((int)param_1 + 0x20) == puVar3) {
    piVar5 = (int *)0x0;
  }
  else {
    piVar5 = (int *)*puVar3;
    if (*piVar5 != param_2) {
      piVar5 = (int *)0x0;
    }
  }
  if (puVar1 != (undefined *)0x0) {
    iVar2 = pthread_mutex_unlock(param_1);
    if (iVar2 != 0) {
      puVar3 = (undefined4 *)FUN_001e6be0(4);
      *puVar3 = &PTR_FUN_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f5f6 to 0022f5fa has its CatchHandler @ 0022f603 */
      FUN_001e5630(puVar3,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);
    }
  }
  return piVar5;
}

