
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* std::Catalogs::_M_erase(int) */

void __thiscall std::Catalogs::_M_erase(Catalogs *this,int param_1)

{
  int *piVar1;
  undefined *puVar2;
  int iVar3;
  undefined4 *__src;
  undefined4 *puVar4;
  int iVar5;
  
  puVar2 = PTR___pthread_key_create_0038ef24;
  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&
     (iVar3 = pthread_mutex_lock((pthread_mutex_t *)this), iVar3 != 0)) {
    __throw_concurrence_lock_error();
LAB_0022f4d4:
    puVar4 = (undefined4 *)__cxa_allocate_exception(4);
    *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */
    __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);
  }
  puVar4 = *(undefined4 **)(this + 0x1c);
  for (iVar3 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar3;
      iVar3 = (iVar3 - iVar5) + -1) {
    while( true ) {
      iVar5 = iVar3 >> 1;
      if (*(int *)puVar4[iVar5] < param_1) break;
      iVar3 = iVar5;
      if (iVar5 == 0) goto LAB_0022f3c3;
    }
    puVar4 = puVar4 + iVar5 + 1;
  }
LAB_0022f3c3:
  if ((puVar4 == *(undefined4 **)(this + 0x20)) || (piVar1 = (int *)*puVar4, *piVar1 != param_1)) {
    if ((puVar2 != (undefined *)0x0) &&
       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) goto LAB_0022f4d4;
  }
  else {
    free((void *)piVar1[1]);
    locale::~locale((locale *)(piVar1 + 2));
    operator_delete(piVar1);
    __src = puVar4 + 1;
    if (*(undefined4 **)(this + 0x20) != __src) {
      memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);
      __src = *(undefined4 **)(this + 0x20);
    }
    *(undefined4 **)(this + 0x20) = __src + -1;
    if (*(int *)(this + 0x18) + -1 == param_1) {
      *(int *)(this + 0x18) = param_1;
    }
    if ((puVar2 != (undefined *)0x0) &&
       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) {
      puVar4 = (undefined4 *)__cxa_allocate_exception(4);
      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */
      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);
    }
  }
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

void FUN_0022f340(pthread_mutex_t *param_1,int param_2)

{
  undefined *puVar1;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  int *__dest;
  int iVar5;
  
  puVar1 = PTR___pthread_key_create_0038ef24;
  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&
     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)) {
    FUN_001e68a0();
LAB_0022f4d4:
    puVar4 = (undefined4 *)FUN_001e6be0(4);
    *puVar4 = &PTR_FUN_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */
    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);
  }
  __dest = *(int **)((int)param_1 + 0x1c);
  for (iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;
      iVar2 = (iVar2 - iVar5) + -1) {
    while( true ) {
      iVar5 = iVar2 >> 1;
      if (*(int *)__dest[iVar5] < param_2) break;
      iVar2 = iVar5;
      if (iVar5 == 0) goto LAB_0022f3c3;
    }
    __dest = __dest + iVar5 + 1;
  }
LAB_0022f3c3:
  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {
    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))
    goto LAB_0022f4d4;
  }
  else {
    free((void *)piVar3[1]);
    FUN_001e9510(piVar3 + 2);
    FUN_001e6db0(piVar3);
    piVar3 = __dest + 1;
    if (*(int **)((int)param_1 + 0x20) != piVar3) {
      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);
      piVar3 = *(int **)((int)param_1 + 0x20);
    }
    *(int **)((int)param_1 + 0x20) = piVar3 + -1;
    if (param_1[1].__data.__lock + -1 == param_2) {
      param_1[1].__data.__lock = param_2;
    }
    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {
      puVar4 = (undefined4 *)FUN_001e6be0(4);
      *puVar4 = &PTR_FUN_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */
      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);
    }
  }
  return;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
PUSH ESI
CALL 0x000559ea
ADD ESI,0x15fcb6
PUSH EBX
SUB ESP,0x1c
MOV EDI,dword ptr [EBP + 0xc]
MOV EAX,dword ptr [ESI + 0xffffff24]
MOV dword ptr [EBP + -0x24],EAX
TEST EAX,EAX
JZ 0x0022f37c
SUB ESP,0xc
PUSH dword ptr [EBP + 0x8]
MOV EBX,ESI
CALL 0x000297c0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0022f4cf
MOV EAX,dword ptr [EBP + 0x8]
MOV EBX,dword ptr [EAX + 0x20]
MOV EDX,dword ptr [EAX + 0x1c]
MOV EAX,EBX
MOV ECX,EDX
SUB EAX,EDX
SAR EAX,0x2
JMP 0x0022f39b
SUB EAX,EDX
MOV EBX,dword ptr [EBP + -0x20]
ADD ECX,0x4
SUB EAX,0x1
TEST EAX,EAX
JLE 0x0022f3c0
MOV dword ptr [EBP + -0x1c],ECX
MOV dword ptr [EBP + -0x20],EBX
MOV EDX,EAX
MOV ECX,dword ptr [EBP + -0x1c]
SAR EDX,0x1
LEA ECX,[ECX + EDX*0x4]
MOV EBX,dword ptr [ECX]
CMP dword ptr [EBX],EDI
JL 0x0022f390
MOV EAX,EDX
TEST EDX,EDX
JNZ 0x0022f3a5
MOV EBX,dword ptr [EBP + -0x20]
JMP 0x0022f3c3
MOV dword ptr [EBP + -0x1c],ECX
MOV EAX,dword ptr [EBP + -0x1c]
CMP EAX,EBX
JZ 0x0022f3d0
MOV EAX,dword ptr [EAX]
CMP dword ptr [EAX],EDI
JZ 0x0022f400
MOV EDX,dword ptr [EBP + -0x24]
TEST EDX,EDX
JZ 0x0022f3ef
SUB ESP,0xc
PUSH dword ptr [EBP + 0x8]
MOV EBX,ESI
CALL 0x00029500
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0022f4d4
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [EAX + 0x4]
MOV EBX,ESI
MOV dword ptr [EBP + -0x20],EAX
CALL 0x00029410
MOV EAX,dword ptr [EBP + -0x20]
LEA EDX,[EAX + 0x8]
MOV dword ptr [ESP],EDX
CALL 0x001e9510
MOV EAX,dword ptr [EBP + -0x20]
MOV dword ptr [ESP],EAX
CALL 0x001e6db0
MOV EAX,dword ptr [EBP + 0x8]
MOV EBX,dword ptr [EBP + -0x1c]
ADD ESP,0x10
MOV EDX,dword ptr [EAX + 0x20]
LEA EAX,[EBX + 0x4]
CMP EDX,EAX
JZ 0x0022f454
SUB ESP,0x4
SUB EDX,EAX
PUSH EDX
PUSH EAX
PUSH EBX
MOV EBX,ESI
CALL 0x000298a0
MOV EAX,dword ptr [EBP + 0x8]
ADD ESP,0x10
MOV EAX,dword ptr [EAX + 0x20]
MOV EBX,dword ptr [EBP + 0x8]
SUB EAX,0x4
MOV dword ptr [EBX + 0x20],EAX
MOV EAX,dword ptr [EBX + 0x18]
MOV dword ptr [EBP + -0x1c],EAX
SUB EAX,0x1
CMP EAX,EDI
JZ 0x0022f4c0
MOV EAX,dword ptr [EBP + -0x24]
TEST EAX,EAX
JZ 0x0022f3ef
SUB ESP,0xc
PUSH dword ptr [EBP + 0x8]
MOV EBX,ESI
CALL 0x00029500
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0022f3ef
SUB ESP,0xc
PUSH 0x4
CALL 0x001e6be0
LEA EDX,[ESI + 0xffffcfa8]
ADD ESP,0xc
ADD EDX,0x8
MOV dword ptr [EAX],EDX
PUSH dword ptr [ESI + 0xffffffdc]
PUSH dword ptr [ESI + 0xfffffbc0]
PUSH EAX
CALL 0x001e5630
MOV EAX,dword ptr [EBP + -0x24]
MOV dword ptr [EBX + 0x18],EDI
TEST EAX,EAX
JNZ 0x0022f475
JMP 0x0022f3ef
CALL 0x001e68a0
SUB ESP,0xc
PUSH 0x4
CALL 0x001e6be0
LEA EDX,[ESI + 0xffffcfa8]
ADD ESP,0xc
ADD EDX,0x8
MOV dword ptr [EAX],EDX
PUSH dword ptr [ESI + 0xffffffdc]
PUSH dword ptr [ESI + 0xfffffbc0]
PUSH EAX
CALL 0x001e5630
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nvoid FUN_0022f340(pthread_mutex_t *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  int *__dest;\n  int iVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */\n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }\n  __dest = *(int **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_0022f340(pthread_mutex_t *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  int *__dest;\n  int iVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */\n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }\n  __dest = *(int **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0022f340(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  int *piVar3;\n  undefined4 *puVar4;\n  int *__dest;\n  int iVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */\n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }\n  __dest = *(int **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar5;" primitive_type 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), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */\n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }" if (parenthesized_expression "((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0))" ( (binary_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)" (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)) )) && (parenthesized_expression "(iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)" ( (comma_expression "iVar2 = pthread_mutex_lock(param_1), iVar2 != 0" (assignment_expression "iVar2 = pthread_mutex_lock(param_1)" identifier = (call_expression "pthread_mutex_lock(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */\n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }" { (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" identifier (argument_list "()" ( ))) ;) (labeled_statement "LAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);" statement_identifier : (expression_statement "puVar4 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar4 = (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 "*puVar4 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar4 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR_FUN_0038bfb0" & identifier)) ;) comment comment (expression_statement "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" identifier (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "__dest = *(int **)((int)param_1 + 0x1c);" (assignment_expression "__dest = *(int **)((int)param_1 + 0x1c)" identifier = (pointer_expression "*(int **)((int)param_1 + 0x1c)" * (cast_expression "(int **)((int)param_1 + 0x1c)" ( (type_descriptor "int **" primitive_type (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)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }" for ( (assignment_expression "iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2" identifier = (binary_expression "(int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2" (binary_expression "(int)*(int **)((int)param_1 + 0x20) - (int)__dest" (cast_expression "(int)*(int **)((int)param_1 + 0x20)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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)__dest" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ; (binary_expression "0 < iVar2" number_literal < identifier) ; (assignment_expression "iVar2 = (iVar2 - iVar5) + -1" identifier = (binary_expression "(iVar2 - iVar5) + -1" (parenthesized_expression "(iVar2 - iVar5)" ( (binary_expression "iVar2 - iVar5" identifier - identifier) )) + number_literal)) ) (compound_statement "{\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }" { (while_statement "while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }" { (expression_statement "iVar5 = iVar2 >> 1;" (assignment_expression "iVar5 = iVar2 >> 1" identifier = (binary_expression "iVar2 >> 1" identifier >> number_literal)) ;) (if_statement "if (*(int *)__dest[iVar5] < param_2) break;" if (parenthesized_expression "(*(int *)__dest[iVar5] < param_2)" ( (binary_expression "*(int *)__dest[iVar5] < param_2" (pointer_expression "*(int *)__dest[iVar5]" * (cast_expression "(int *)__dest[iVar5]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "__dest[iVar5]" identifier [ identifier ]))) < identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar2 = iVar5;" (assignment_expression "iVar2 = iVar5" identifier = identifier) ;) (if_statement "if (iVar5 == 0) goto LAB_0022f3c3;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0022f3c3;" goto statement_identifier ;)) })) (expression_statement "__dest = __dest + iVar5 + 1;" (assignment_expression "__dest = __dest + iVar5 + 1" identifier = (binary_expression "__dest + iVar5 + 1" (binary_expression "__dest + iVar5" identifier + identifier) + number_literal)) ;) })) (labeled_statement "LAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" statement_identifier : (if_statement "if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" if (parenthesized_expression "((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2))" ( (binary_expression "(__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)" (parenthesized_expression "(__dest == *(int **)((int)param_1 + 0x20))" ( (binary_expression "__dest == *(int **)((int)param_1 + 0x20)" identifier == (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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) ))))) )) || (parenthesized_expression "(piVar3 = (int *)*__dest, *piVar3 != param_2)" ( (comma_expression "piVar3 = (int *)*__dest, *piVar3 != param_2" (assignment_expression "piVar3 = (int *)*__dest" identifier = (cast_expression "(int *)*__dest" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*__dest" * identifier))) , (binary_expression "*piVar3 != param_2" (pointer_expression "*piVar3" * identifier) != identifier)) ))) )) (compound_statement "{\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }" { (if_statement "if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;" if (parenthesized_expression "((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))" ( (binary_expression "(puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" (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)) )) && (parenthesized_expression "(iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" ( (comma_expression "iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0" (assignment_expression "iVar2 = pthread_mutex_unlock(param_1)" identifier = (call_expression "pthread_mutex_unlock(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (goto_statement "goto LAB_0022f4d4;" goto statement_identifier ;)) }) (else_clause "else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" else (compound_statement "{\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" { (expression_statement "free((void *)piVar3[1]);" (call_expression "free((void *)piVar3[1])" identifier (argument_list "((void *)piVar3[1])" ( (cast_expression "(void *)piVar3[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[1]" identifier [ number_literal ])) ))) ;) (expression_statement "FUN_001e9510(piVar3 + 2);" (call_expression "FUN_001e9510(piVar3 + 2)" identifier (argument_list "(piVar3 + 2)" ( (binary_expression "piVar3 + 2" identifier + number_literal) ))) ;) (expression_statement "FUN_001e6db0(piVar3);" (call_expression "FUN_001e6db0(piVar3)" identifier (argument_list "(piVar3)" ( identifier ))) ;) (expression_statement "piVar3 = __dest + 1;" (assignment_expression "piVar3 = __dest + 1" identifier = (binary_expression "__dest + 1" identifier + number_literal)) ;) (if_statement "if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }" if (parenthesized_expression "(*(int **)((int)param_1 + 0x20) != piVar3)" ( (binary_expression "*(int **)((int)param_1 + 0x20) != piVar3" (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }" { (expression_statement "memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);" (call_expression "memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3)" identifier (argument_list "(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3)" ( identifier , identifier , (binary_expression "(int)*(int **)((int)param_1 + 0x20) - (int)piVar3" (cast_expression "(int)*(int **)((int)param_1 + 0x20)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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)piVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (expression_statement "piVar3 = *(int **)((int)param_1 + 0x20);" (assignment_expression "piVar3 = *(int **)((int)param_1 + 0x20)" identifier = (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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) ))))) ;) })) (expression_statement "*(int **)((int)param_1 + 0x20) = piVar3 + -1;" (assignment_expression "*(int **)((int)param_1 + 0x20) = piVar3 + -1" (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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) )))) = (binary_expression "piVar3 + -1" identifier + number_literal)) ;) (if_statement "if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }" if (parenthesized_expression "(param_1[1].__data.__lock + -1 == param_2)" ( (binary_expression "param_1[1].__data.__lock + -1 == param_2" (binary_expression "param_1[1].__data.__lock + -1" (field_expression "param_1[1].__data.__lock" (field_expression "param_1[1].__data" (subscript_expression "param_1[1]" identifier [ number_literal ]) . field_identifier) . field_identifier) + number_literal) == identifier) )) (compound_statement "{\n      param_1[1].__data.__lock = param_2;\n    }" { (expression_statement "param_1[1].__data.__lock = param_2;" (assignment_expression "param_1[1].__data.__lock = param_2" (field_expression "param_1[1].__data.__lock" (field_expression "param_1[1].__data" (subscript_expression "param_1[1]" identifier [ number_literal ]) . field_identifier) . field_identifier) = identifier) ;) })) (if_statement "if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" if (parenthesized_expression "((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))" ( (binary_expression "(puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" (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)) )) && (parenthesized_expression "(iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" ( (comma_expression "iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0" (assignment_expression "iVar2 = pthread_mutex_unlock(param_1)" identifier = (call_expression "pthread_mutex_unlock(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" { (expression_statement "puVar4 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar4 = (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 "*puVar4 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar4 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR_FUN_0038bfb0" & identifier)) ;) comment comment (expression_statement "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" identifier (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" ( identifier , identifier , identifier ))) ;) })) })))) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* std::Catalogs::_M_erase(int) */\n\nvoid __thiscall std::Catalogs::_M_erase(Catalogs *this,int param_1)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 *__src;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  puVar2 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar3 = pthread_mutex_lock((pthread_mutex_t *)this), iVar3 != 0)) {\n    __throw_concurrence_lock_error();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n    *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */\n    __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n  }\n  puVar4 = *(undefined4 **)(this + 0x1c);\n  for (iVar3 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar3;\n      iVar3 = (iVar3 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar3 >> 1;\n      if (*(int *)puVar4[iVar5] < param_1) break;\n      iVar3 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    puVar4 = puVar4 + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((puVar4 == *(undefined4 **)(this + 0x20)) || (piVar1 = (int *)*puVar4, *piVar1 != param_1)) {\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar1[1]);\n    locale::~locale((locale *)(piVar1 + 2));\n    operator_delete(piVar1);\n    __src = puVar4 + 1;\n    if (*(undefined4 **)(this + 0x20) != __src) {\n      memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);\n      __src = *(undefined4 **)(this + 0x20);\n    }\n    *(undefined4 **)(this + 0x20) = __src + -1;\n    if (*(int *)(this + 0x18) + -1 == param_1) {\n      *(int *)(this + 0x18) = param_1;\n    }\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) {\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }\n  return;\n}\n\n" comment comment (function_definition "void __thiscall std::Catalogs::_M_erase(Catalogs *this,int param_1)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 *__src;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  puVar2 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar3 = pthread_mutex_lock((pthread_mutex_t *)this), iVar3 != 0)) {\n    __throw_concurrence_lock_error();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n    *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */\n    __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n  }\n  puVar4 = *(undefined4 **)(this + 0x1c);\n  for (iVar3 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar3;\n      iVar3 = (iVar3 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar3 >> 1;\n      if (*(int *)puVar4[iVar5] < param_1) break;\n      iVar3 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    puVar4 = puVar4 + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((puVar4 == *(undefined4 **)(this + 0x20)) || (piVar1 = (int *)*puVar4, *piVar1 != param_1)) {\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar1[1]);\n    locale::~locale((locale *)(piVar1 + 2));\n    operator_delete(piVar1);\n    __src = puVar4 + 1;\n    if (*(undefined4 **)(this + 0x20) != __src) {\n      memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);\n      __src = *(undefined4 **)(this + 0x20);\n    }\n    *(undefined4 **)(this + 0x20) = __src + -1;\n    if (*(int *)(this + 0x18) + -1 == param_1) {\n      *(int *)(this + 0x18) = param_1;\n    }\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) {\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::Catalogs::" identifier : : identifier : :) (function_declarator "_M_erase(Catalogs *this,int param_1)" identifier (parameter_list "(Catalogs *this,int param_1)" ( (parameter_declaration "Catalogs *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 *__src;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  puVar2 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar3 = pthread_mutex_lock((pthread_mutex_t *)this), iVar3 != 0)) {\n    __throw_concurrence_lock_error();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n    *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */\n    __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n  }\n  puVar4 = *(undefined4 **)(this + 0x1c);\n  for (iVar3 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar3;\n      iVar3 = (iVar3 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar3 >> 1;\n      if (*(int *)puVar4[iVar5] < param_1) break;\n      iVar3 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    puVar4 = puVar4 + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((puVar4 == *(undefined4 **)(this + 0x20)) || (piVar1 = (int *)*puVar4, *piVar1 != param_1)) {\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar1[1]);\n    locale::~locale((locale *)(piVar1 + 2));\n    operator_delete(piVar1);\n    __src = puVar4 + 1;\n    if (*(undefined4 **)(this + 0x20) != __src) {\n      memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);\n      __src = *(undefined4 **)(this + 0x20);\n    }\n    *(undefined4 **)(this + 0x20) = __src + -1;\n    if (*(int *)(this + 0x18) + -1 == param_1) {\n      *(int *)(this + 0x18) = param_1;\n    }\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) {\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *__src;" type_identifier (pointer_declarator "*__src" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "puVar2 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar2 = PTR___pthread_key_create_0038ef24" identifier = identifier) ;) (if_statement "if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar3 = pthread_mutex_lock((pthread_mutex_t *)this), iVar3 != 0)) {\n    __throw_concurrence_lock_error();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n    *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */\n    __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n  }" if (parenthesized_expression "((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar3 = pthread_mutex_lock((pthread_mutex_t *)this), iVar3 != 0))" ( (binary_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar3 = pthread_mutex_lock((pthread_mutex_t *)this), iVar3 != 0)" (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)) )) && (parenthesized_expression "(iVar3 = pthread_mutex_lock((pthread_mutex_t *)this), iVar3 != 0)" ( (comma_expression "iVar3 = pthread_mutex_lock((pthread_mutex_t *)this), iVar3 != 0" (assignment_expression "iVar3 = 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) )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    __throw_concurrence_lock_error();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n    *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */\n    __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n  }" { (expression_statement "__throw_concurrence_lock_error();" (call_expression "__throw_concurrence_lock_error()" identifier (argument_list "()" ( ))) ;) (labeled_statement "LAB_0022f4d4:\n    puVar4 = (undefined4 *)__cxa_allocate_exception(4);" statement_identifier : (expression_statement "puVar4 = (undefined4 *)__cxa_allocate_exception(4);" (assignment_expression "puVar4 = (undefined4 *)__cxa_allocate_exception(4)" identifier = (cast_expression "(undefined4 *)__cxa_allocate_exception(4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "__cxa_allocate_exception(4)" identifier (argument_list "(4)" ( number_literal ))))) ;)) (expression_statement "*puVar4 = &PTR____concurrence_unlock_error_0038bfb0;" (assignment_expression "*puVar4 = &PTR____concurrence_unlock_error_0038bfb0" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR____concurrence_unlock_error_0038bfb0" & identifier)) ;) comment comment (expression_statement "__cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);" (call_expression "__cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc)" identifier (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc)" ( identifier , identifier , 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 (iVar3 = (int)*(undefined4 **)(this + 0x20) - (int)puVar4 >> 2; 0 < iVar3;\n      iVar3 = (iVar3 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar3 >> 1;\n      if (*(int *)puVar4[iVar5] < param_1) break;\n      iVar3 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    puVar4 = puVar4 + iVar5 + 1;\n  }" for ( (assignment_expression "iVar3 = (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 < iVar3" number_literal < identifier) ; (assignment_expression "iVar3 = (iVar3 - iVar5) + -1" identifier = (binary_expression "(iVar3 - iVar5) + -1" (parenthesized_expression "(iVar3 - iVar5)" ( (binary_expression "iVar3 - iVar5" identifier - identifier) )) + number_literal)) ) (compound_statement "{\n    while( true ) {\n      iVar5 = iVar3 >> 1;\n      if (*(int *)puVar4[iVar5] < param_1) break;\n      iVar3 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    puVar4 = puVar4 + iVar5 + 1;\n  }" { (while_statement "while( true ) {\n      iVar5 = iVar3 >> 1;\n      if (*(int *)puVar4[iVar5] < param_1) break;\n      iVar3 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar5 = iVar3 >> 1;\n      if (*(int *)puVar4[iVar5] < param_1) break;\n      iVar3 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }" { (expression_statement "iVar5 = iVar3 >> 1;" (assignment_expression "iVar5 = iVar3 >> 1" identifier = (binary_expression "iVar3 >> 1" identifier >> number_literal)) ;) (if_statement "if (*(int *)puVar4[iVar5] < param_1) break;" if (parenthesized_expression "(*(int *)puVar4[iVar5] < param_1)" ( (binary_expression "*(int *)puVar4[iVar5] < param_1" (pointer_expression "*(int *)puVar4[iVar5]" * (cast_expression "(int *)puVar4[iVar5]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar4[iVar5]" identifier [ identifier ]))) < identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar5;" (assignment_expression "iVar3 = iVar5" identifier = identifier) ;) (if_statement "if (iVar5 == 0) goto LAB_0022f3c3;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0022f3c3;" goto statement_identifier ;)) })) (expression_statement "puVar4 = puVar4 + iVar5 + 1;" (assignment_expression "puVar4 = puVar4 + iVar5 + 1" identifier = (binary_expression "puVar4 + iVar5 + 1" (binary_expression "puVar4 + iVar5" identifier + identifier) + number_literal)) ;) })) (labeled_statement "LAB_0022f3c3:\n  if ((puVar4 == *(undefined4 **)(this + 0x20)) || (piVar1 = (int *)*puVar4, *piVar1 != param_1)) {\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar1[1]);\n    locale::~locale((locale *)(piVar1 + 2));\n    operator_delete(piVar1);\n    __src = puVar4 + 1;\n    if (*(undefined4 **)(this + 0x20) != __src) {\n      memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);\n      __src = *(undefined4 **)(this + 0x20);\n    }\n    *(undefined4 **)(this + 0x20) = __src + -1;\n    if (*(int *)(this + 0x18) + -1 == param_1) {\n      *(int *)(this + 0x18) = param_1;\n    }\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) {\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }" statement_identifier : (if_statement "if ((puVar4 == *(undefined4 **)(this + 0x20)) || (piVar1 = (int *)*puVar4, *piVar1 != param_1)) {\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar1[1]);\n    locale::~locale((locale *)(piVar1 + 2));\n    operator_delete(piVar1);\n    __src = puVar4 + 1;\n    if (*(undefined4 **)(this + 0x20) != __src) {\n      memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);\n      __src = *(undefined4 **)(this + 0x20);\n    }\n    *(undefined4 **)(this + 0x20) = __src + -1;\n    if (*(int *)(this + 0x18) + -1 == param_1) {\n      *(int *)(this + 0x18) = param_1;\n    }\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) {\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }" if (parenthesized_expression "((puVar4 == *(undefined4 **)(this + 0x20)) || (piVar1 = (int *)*puVar4, *piVar1 != param_1))" ( (binary_expression "(puVar4 == *(undefined4 **)(this + 0x20)) || (piVar1 = (int *)*puVar4, *piVar1 != param_1)" (parenthesized_expression "(puVar4 == *(undefined4 **)(this + 0x20))" ( (binary_expression "puVar4 == *(undefined4 **)(this + 0x20)" identifier == (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) ))))) )) || (parenthesized_expression "(piVar1 = (int *)*puVar4, *piVar1 != param_1)" ( (comma_expression "piVar1 = (int *)*puVar4, *piVar1 != param_1" (assignment_expression "piVar1 = (int *)*puVar4" identifier = (cast_expression "(int *)*puVar4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar4" * identifier))) , (binary_expression "*piVar1 != param_1" (pointer_expression "*piVar1" * identifier) != identifier)) ))) )) (compound_statement "{\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) goto LAB_0022f4d4;\n  }" { (if_statement "if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) goto LAB_0022f4d4;" if (parenthesized_expression "((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0))" ( (binary_expression "(puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)" (parenthesized_expression "(puVar2 != (undefined *)0x0)" ( (binary_expression "puVar2 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)" ( (comma_expression "iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0" (assignment_expression "iVar3 = 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) )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (goto_statement "goto LAB_0022f4d4;" goto statement_identifier ;)) }) (else_clause "else {\n    free((void *)piVar1[1]);\n    locale::~locale((locale *)(piVar1 + 2));\n    operator_delete(piVar1);\n    __src = puVar4 + 1;\n    if (*(undefined4 **)(this + 0x20) != __src) {\n      memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);\n      __src = *(undefined4 **)(this + 0x20);\n    }\n    *(undefined4 **)(this + 0x20) = __src + -1;\n    if (*(int *)(this + 0x18) + -1 == param_1) {\n      *(int *)(this + 0x18) = param_1;\n    }\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) {\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }" else (compound_statement "{\n    free((void *)piVar1[1]);\n    locale::~locale((locale *)(piVar1 + 2));\n    operator_delete(piVar1);\n    __src = puVar4 + 1;\n    if (*(undefined4 **)(this + 0x20) != __src) {\n      memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);\n      __src = *(undefined4 **)(this + 0x20);\n    }\n    *(undefined4 **)(this + 0x20) = __src + -1;\n    if (*(int *)(this + 0x18) + -1 == param_1) {\n      *(int *)(this + 0x18) = param_1;\n    }\n    if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) {\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }" { (expression_statement "free((void *)piVar1[1]);" (call_expression "free((void *)piVar1[1])" identifier (argument_list "((void *)piVar1[1])" ( (cast_expression "(void *)piVar1[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar1[1]" identifier [ number_literal ])) ))) ;) (labeled_statement "locale::~locale((locale *)(piVar1 + 2));" statement_identifier : (ERROR ":" :) (expression_statement "~locale((locale *)(piVar1 + 2));" (unary_expression "~locale((locale *)(piVar1 + 2))" ~ (call_expression "locale((locale *)(piVar1 + 2))" identifier (argument_list "((locale *)(piVar1 + 2))" ( (cast_expression "(locale *)(piVar1 + 2)" ( (type_descriptor "locale *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 2)" ( (binary_expression "piVar1 + 2" identifier + number_literal) ))) )))) ;)) (expression_statement "operator_delete(piVar1);" (call_expression "operator_delete(piVar1)" identifier (argument_list "(piVar1)" ( identifier ))) ;) (expression_statement "__src = puVar4 + 1;" (assignment_expression "__src = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) (if_statement "if (*(undefined4 **)(this + 0x20) != __src) {\n      memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);\n      __src = *(undefined4 **)(this + 0x20);\n    }" if (parenthesized_expression "(*(undefined4 **)(this + 0x20) != __src)" ( (binary_expression "*(undefined4 **)(this + 0x20) != __src" (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      memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);\n      __src = *(undefined4 **)(this + 0x20);\n    }" { (expression_statement "memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src);" (call_expression "memmove(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src)" identifier (argument_list "(puVar4,__src,(int)*(undefined4 **)(this + 0x20) - (int)__src)" ( identifier , identifier , (binary_expression "(int)*(undefined4 **)(this + 0x20) - (int)__src" (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)__src" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (expression_statement "__src = *(undefined4 **)(this + 0x20);" (assignment_expression "__src = *(undefined4 **)(this + 0x20)" identifier = (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) ))))) ;) })) (expression_statement "*(undefined4 **)(this + 0x20) = __src + -1;" (assignment_expression "*(undefined4 **)(this + 0x20) = __src + -1" (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) )))) = (binary_expression "__src + -1" identifier + number_literal)) ;) (if_statement "if (*(int *)(this + 0x18) + -1 == param_1) {\n      *(int *)(this + 0x18) = param_1;\n    }" if (parenthesized_expression "(*(int *)(this + 0x18) + -1 == param_1)" ( (binary_expression "*(int *)(this + 0x18) + -1 == param_1" (binary_expression "*(int *)(this + 0x18) + -1" (pointer_expression "*(int *)(this + 0x18)" * (cast_expression "(int *)(this + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) + number_literal) == identifier) )) (compound_statement "{\n      *(int *)(this + 0x18) = param_1;\n    }" { (expression_statement "*(int *)(this + 0x18) = param_1;" (assignment_expression "*(int *)(this + 0x18) = param_1" (pointer_expression "*(int *)(this + 0x18)" * (cast_expression "(int *)(this + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) = identifier) ;) })) (if_statement "if ((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)) {\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }" if (parenthesized_expression "((puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0))" ( (binary_expression "(puVar2 != (undefined *)0x0) &&\n       (iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)" (parenthesized_expression "(puVar2 != (undefined *)0x0)" ( (binary_expression "puVar2 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0)" ( (comma_expression "iVar3 = pthread_mutex_unlock((pthread_mutex_t *)this), iVar3 != 0" (assignment_expression "iVar3 = 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) )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }" { (expression_statement "puVar4 = (undefined4 *)__cxa_allocate_exception(4);" (assignment_expression "puVar4 = (undefined4 *)__cxa_allocate_exception(4)" identifier = (cast_expression "(undefined4 *)__cxa_allocate_exception(4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "__cxa_allocate_exception(4)" identifier (argument_list "(4)" ( number_literal ))))) ;) (expression_statement "*puVar4 = &PTR____concurrence_unlock_error_0038bfb0;" (assignment_expression "*puVar4 = &PTR____concurrence_unlock_error_0038bfb0" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR____concurrence_unlock_error_0038bfb0" & identifier)) ;) comment comment (expression_statement "__cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);" (call_expression "__cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc)" identifier (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc)" ( identifier , identifier , identifier ))) ;) })) })))) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0022f340(pthread_mutex_t *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  int *__dest;\n  int iVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }\n  __dest = *(int **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_0022f340(pthread_mutex_t *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  int *__dest;\n  int iVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }\n  __dest = *(int **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0022f340(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  int *piVar3;\n  undefined4 *puVar4;\n  int *__dest;\n  int iVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }\n  __dest = *(int **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar5;" primitive_type 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), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }" if (parenthesized_expression "((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0))" ( (binary_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)" (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)) )) && (parenthesized_expression "(iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)" ( (comma_expression "iVar2 = pthread_mutex_lock(param_1), iVar2 != 0" (assignment_expression "iVar2 = pthread_mutex_lock(param_1)" identifier = (call_expression "pthread_mutex_lock(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }" { (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" identifier (argument_list "()" ( ))) ;) (labeled_statement "LAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);" statement_identifier : (expression_statement "puVar4 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar4 = (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 "*puVar4 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar4 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR_FUN_0038bfb0" & identifier)) ;) (expression_statement "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" identifier (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "__dest = *(int **)((int)param_1 + 0x1c);" (assignment_expression "__dest = *(int **)((int)param_1 + 0x1c)" identifier = (pointer_expression "*(int **)((int)param_1 + 0x1c)" * (cast_expression "(int **)((int)param_1 + 0x1c)" ( (type_descriptor "int **" primitive_type (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)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }" for ( (assignment_expression "iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2" identifier = (binary_expression "(int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2" (binary_expression "(int)*(int **)((int)param_1 + 0x20) - (int)__dest" (cast_expression "(int)*(int **)((int)param_1 + 0x20)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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)__dest" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ; (binary_expression "0 < iVar2" number_literal < identifier) ; (assignment_expression "iVar2 = (iVar2 - iVar5) + -1" identifier = (binary_expression "(iVar2 - iVar5) + -1" (parenthesized_expression "(iVar2 - iVar5)" ( (binary_expression "iVar2 - iVar5" identifier - identifier) )) + number_literal)) ) (compound_statement "{\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }" { (while_statement "while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }" { (expression_statement "iVar5 = iVar2 >> 1;" (assignment_expression "iVar5 = iVar2 >> 1" identifier = (binary_expression "iVar2 >> 1" identifier >> number_literal)) ;) (if_statement "if (*(int *)__dest[iVar5] < param_2) break;" if (parenthesized_expression "(*(int *)__dest[iVar5] < param_2)" ( (binary_expression "*(int *)__dest[iVar5] < param_2" (pointer_expression "*(int *)__dest[iVar5]" * (cast_expression "(int *)__dest[iVar5]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "__dest[iVar5]" identifier [ identifier ]))) < identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar2 = iVar5;" (assignment_expression "iVar2 = iVar5" identifier = identifier) ;) (if_statement "if (iVar5 == 0) goto LAB_0022f3c3;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0022f3c3;" goto statement_identifier ;)) })) (expression_statement "__dest = __dest + iVar5 + 1;" (assignment_expression "__dest = __dest + iVar5 + 1" identifier = (binary_expression "__dest + iVar5 + 1" (binary_expression "__dest + iVar5" identifier + identifier) + number_literal)) ;) })) (labeled_statement "LAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" statement_identifier : (if_statement "if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" if (parenthesized_expression "((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2))" ( (binary_expression "(__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)" (parenthesized_expression "(__dest == *(int **)((int)param_1 + 0x20))" ( (binary_expression "__dest == *(int **)((int)param_1 + 0x20)" identifier == (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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) ))))) )) || (parenthesized_expression "(piVar3 = (int *)*__dest, *piVar3 != param_2)" ( (comma_expression "piVar3 = (int *)*__dest, *piVar3 != param_2" (assignment_expression "piVar3 = (int *)*__dest" identifier = (cast_expression "(int *)*__dest" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*__dest" * identifier))) , (binary_expression "*piVar3 != param_2" (pointer_expression "*piVar3" * identifier) != identifier)) ))) )) (compound_statement "{\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }" { (if_statement "if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;" if (parenthesized_expression "((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))" ( (binary_expression "(puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" (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)) )) && (parenthesized_expression "(iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" ( (comma_expression "iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0" (assignment_expression "iVar2 = pthread_mutex_unlock(param_1)" identifier = (call_expression "pthread_mutex_unlock(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (goto_statement "goto LAB_0022f4d4;" goto statement_identifier ;)) }) (else_clause "else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" else (compound_statement "{\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" { (expression_statement "free((void *)piVar3[1]);" (call_expression "free((void *)piVar3[1])" identifier (argument_list "((void *)piVar3[1])" ( (cast_expression "(void *)piVar3[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[1]" identifier [ number_literal ])) ))) ;) (expression_statement "FUN_001e9510(piVar3 + 2);" (call_expression "FUN_001e9510(piVar3 + 2)" identifier (argument_list "(piVar3 + 2)" ( (binary_expression "piVar3 + 2" identifier + number_literal) ))) ;) (expression_statement "FUN_001e6db0(piVar3);" (call_expression "FUN_001e6db0(piVar3)" identifier (argument_list "(piVar3)" ( identifier ))) ;) (expression_statement "piVar3 = __dest + 1;" (assignment_expression "piVar3 = __dest + 1" identifier = (binary_expression "__dest + 1" identifier + number_literal)) ;) (if_statement "if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }" if (parenthesized_expression "(*(int **)((int)param_1 + 0x20) != piVar3)" ( (binary_expression "*(int **)((int)param_1 + 0x20) != piVar3" (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }" { (expression_statement "memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);" (call_expression "memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3)" identifier (argument_list "(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3)" ( identifier , identifier , (binary_expression "(int)*(int **)((int)param_1 + 0x20) - (int)piVar3" (cast_expression "(int)*(int **)((int)param_1 + 0x20)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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)piVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (expression_statement "piVar3 = *(int **)((int)param_1 + 0x20);" (assignment_expression "piVar3 = *(int **)((int)param_1 + 0x20)" identifier = (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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) ))))) ;) })) (expression_statement "*(int **)((int)param_1 + 0x20) = piVar3 + -1;" (assignment_expression "*(int **)((int)param_1 + 0x20) = piVar3 + -1" (pointer_expression "*(int **)((int)param_1 + 0x20)" * (cast_expression "(int **)((int)param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (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) )))) = (binary_expression "piVar3 + -1" identifier + number_literal)) ;) (if_statement "if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }" if (parenthesized_expression "(param_1[1].__data.__lock + -1 == param_2)" ( (binary_expression "param_1[1].__data.__lock + -1 == param_2" (binary_expression "param_1[1].__data.__lock + -1" (field_expression "param_1[1].__data.__lock" (field_expression "param_1[1].__data" (subscript_expression "param_1[1]" identifier [ number_literal ]) . field_identifier) . field_identifier) + number_literal) == identifier) )) (compound_statement "{\n      param_1[1].__data.__lock = param_2;\n    }" { (expression_statement "param_1[1].__data.__lock = param_2;" (assignment_expression "param_1[1].__data.__lock = param_2" (field_expression "param_1[1].__data.__lock" (field_expression "param_1[1].__data" (subscript_expression "param_1[1]" identifier [ number_literal ]) . field_identifier) . field_identifier) = identifier) ;) })) (if_statement "if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" if (parenthesized_expression "((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))" ( (binary_expression "(puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" (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)) )) && (parenthesized_expression "(iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" ( (comma_expression "iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0" (assignment_expression "iVar2 = pthread_mutex_unlock(param_1)" identifier = (call_expression "pthread_mutex_unlock(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" { (expression_statement "puVar4 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar4 = (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 "*puVar4 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar4 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR_FUN_0038bfb0" & identifier)) ;) (expression_statement "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" identifier (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" ( identifier , identifier , identifier ))) ;) })) })))) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (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 (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (labeled_statement statement_identifier : (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 ))) ;) })) (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 (parenthesized_expression ( (binary_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) ))))) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) , (binary_expression (pointer_expression * IDENT) != IDENT)) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression IDENT != LIT)) ))) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (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 * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (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)) ))) ;) (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) ))))) ;) })) (expression_statement (assignment_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) )))) = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (field_expression (field_expression (subscript_expression IDENT [ LIT ]) . field_identifier) . field_identifier) + LIT) == IDENT) )) (compound_statement { (expression_statement (assignment_expression (field_expression (field_expression (subscript_expression IDENT [ LIT ]) . field_identifier) . field_identifier) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (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 ;) })))
(function_definition "void FUN_0022f340(pthread_mutex_t *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  int *__dest;\n  int iVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }\n  __dest = *(int **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0022f340(pthread_mutex_t *param_1,int param_2)" (identifier "FUN_0022f340") (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  int *piVar3;\n  undefined4 *puVar4;\n  int *__dest;\n  int iVar5;\n  \n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }\n  __dest = *(int **)((int)param_1 + 0x1c);\n  for (iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }\nLAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int *__dest;" (primitive_type "int") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (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), iVar2 != 0)) {\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }" (if "if") (parenthesized_expression "((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0))" (( "(") (binary_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&\n     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)" (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"))) () ")")) (&& "&&") (parenthesized_expression "(iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)" (( "(") (comma_expression "iVar2 = pthread_mutex_lock(param_1), iVar2 != 0" (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") () ")")))) (, ",") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    FUN_001e68a0();\nLAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);\n    *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n  }" ({ "{") (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" (identifier "FUN_001e68a0") (argument_list "()" (( "(") () ")"))) (; ";")) (labeled_statement "LAB_0022f4d4:\n    puVar4 = (undefined4 *)FUN_001e6be0(4);" (statement_identifier "LAB_0022f4d4") (: ":") (expression_statement "puVar4 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar4 = (undefined4 *)FUN_001e6be0(4)" (identifier "puVar4") (= "=") (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 "*puVar4 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar4 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (pointer_expression "&PTR_FUN_0038bfb0" (& "&") (identifier "PTR_FUN_0038bfb0"))) (; ";")) (expression_statement "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" (identifier "FUN_001e5630") (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" (( "(") (identifier "puVar4") (, ",") (identifier "PTR_PTR_0038ebc0") (, ",") (identifier "PTR_FUN_0038efdc") () ")"))) (; ";")) (} "}"))) (expression_statement "__dest = *(int **)((int)param_1 + 0x1c);" (assignment_expression "__dest = *(int **)((int)param_1 + 0x1c)" (identifier "__dest") (= "=") (pointer_expression "*(int **)((int)param_1 + 0x1c)" (* "*") (cast_expression "(int **)((int)param_1 + 0x1c)" (( "(") (type_descriptor "int **" (primitive_type "int") (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)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;\n      iVar2 = (iVar2 - iVar5) + -1) {\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }" (for "for") (( "(") (assignment_expression "iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2" (identifier "iVar2") (= "=") (binary_expression "(int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2" (binary_expression "(int)*(int **)((int)param_1 + 0x20) - (int)__dest" (cast_expression "(int)*(int **)((int)param_1 + 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(int **)((int)param_1 + 0x20)" (* "*") (cast_expression "(int **)((int)param_1 + 0x20)" (( "(") (type_descriptor "int **" (primitive_type "int") (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)__dest" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__dest"))) (>> ">>") (number_literal "2"))) (; ";") (binary_expression "0 < iVar2" (number_literal "0") (< "<") (identifier "iVar2")) (; ";") (assignment_expression "iVar2 = (iVar2 - iVar5) + -1" (identifier "iVar2") (= "=") (binary_expression "(iVar2 - iVar5) + -1" (parenthesized_expression "(iVar2 - iVar5)" (( "(") (binary_expression "iVar2 - iVar5" (identifier "iVar2") (- "-") (identifier "iVar5")) () ")")) (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n    while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }\n    __dest = __dest + iVar5 + 1;\n  }" ({ "{") (while_statement "while( true ) {\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      iVar5 = iVar2 >> 1;\n      if (*(int *)__dest[iVar5] < param_2) break;\n      iVar2 = iVar5;\n      if (iVar5 == 0) goto LAB_0022f3c3;\n    }" ({ "{") (expression_statement "iVar5 = iVar2 >> 1;" (assignment_expression "iVar5 = iVar2 >> 1" (identifier "iVar5") (= "=") (binary_expression "iVar2 >> 1" (identifier "iVar2") (>> ">>") (number_literal "1"))) (; ";")) (if_statement "if (*(int *)__dest[iVar5] < param_2) break;" (if "if") (parenthesized_expression "(*(int *)__dest[iVar5] < param_2)" (( "(") (binary_expression "*(int *)__dest[iVar5] < param_2" (pointer_expression "*(int *)__dest[iVar5]" (* "*") (cast_expression "(int *)__dest[iVar5]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "__dest[iVar5]" (identifier "__dest") ([ "[") (identifier "iVar5") (] "]")))) (< "<") (identifier "param_2")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar2 = iVar5;" (assignment_expression "iVar2 = iVar5" (identifier "iVar2") (= "=") (identifier "iVar5")) (; ";")) (if_statement "if (iVar5 == 0) goto LAB_0022f3c3;" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0022f3c3;" (goto "goto") (statement_identifier "LAB_0022f3c3") (; ";"))) (} "}"))) (expression_statement "__dest = __dest + iVar5 + 1;" (assignment_expression "__dest = __dest + iVar5 + 1" (identifier "__dest") (= "=") (binary_expression "__dest + iVar5 + 1" (binary_expression "__dest + iVar5" (identifier "__dest") (+ "+") (identifier "iVar5")) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (labeled_statement "LAB_0022f3c3:\n  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" (statement_identifier "LAB_0022f3c3") (: ":") (if_statement "if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }\n  else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" (if "if") (parenthesized_expression "((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2))" (( "(") (binary_expression "(__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)" (parenthesized_expression "(__dest == *(int **)((int)param_1 + 0x20))" (( "(") (binary_expression "__dest == *(int **)((int)param_1 + 0x20)" (identifier "__dest") (== "==") (pointer_expression "*(int **)((int)param_1 + 0x20)" (* "*") (cast_expression "(int **)((int)param_1 + 0x20)" (( "(") (type_descriptor "int **" (primitive_type "int") (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")) () ")"))))) () ")")) (|| "||") (parenthesized_expression "(piVar3 = (int *)*__dest, *piVar3 != param_2)" (( "(") (comma_expression "piVar3 = (int *)*__dest, *piVar3 != param_2" (assignment_expression "piVar3 = (int *)*__dest" (identifier "piVar3") (= "=") (cast_expression "(int *)*__dest" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*__dest" (* "*") (identifier "__dest")))) (, ",") (binary_expression "*piVar3 != param_2" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (!= "!=") (identifier "param_2"))) () ")"))) () ")")) (compound_statement "{\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;\n  }" ({ "{") (if_statement "if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))\n    goto LAB_0022f4d4;" (if "if") (parenthesized_expression "((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))" (( "(") (binary_expression "(puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" (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"))) () ")")) (&& "&&") (parenthesized_expression "(iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" (( "(") (comma_expression "iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0" (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") () ")")))) (, ",") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (goto_statement "goto LAB_0022f4d4;" (goto "goto") (statement_identifier "LAB_0022f4d4") (; ";"))) (} "}")) (else_clause "else {\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" (else "else") (compound_statement "{\n    free((void *)piVar3[1]);\n    FUN_001e9510(piVar3 + 2);\n    FUN_001e6db0(piVar3);\n    piVar3 = __dest + 1;\n    if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }\n    *(int **)((int)param_1 + 0x20) = piVar3 + -1;\n    if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }\n    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" ({ "{") (expression_statement "free((void *)piVar3[1]);" (call_expression "free((void *)piVar3[1])" (identifier "free") (argument_list "((void *)piVar3[1])" (( "(") (cast_expression "(void *)piVar3[1]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar3[1]" (identifier "piVar3") ([ "[") (number_literal "1") (] "]"))) () ")"))) (; ";")) (expression_statement "FUN_001e9510(piVar3 + 2);" (call_expression "FUN_001e9510(piVar3 + 2)" (identifier "FUN_001e9510") (argument_list "(piVar3 + 2)" (( "(") (binary_expression "piVar3 + 2" (identifier "piVar3") (+ "+") (number_literal "2")) () ")"))) (; ";")) (expression_statement "FUN_001e6db0(piVar3);" (call_expression "FUN_001e6db0(piVar3)" (identifier "FUN_001e6db0") (argument_list "(piVar3)" (( "(") (identifier "piVar3") () ")"))) (; ";")) (expression_statement "piVar3 = __dest + 1;" (assignment_expression "piVar3 = __dest + 1" (identifier "piVar3") (= "=") (binary_expression "__dest + 1" (identifier "__dest") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (*(int **)((int)param_1 + 0x20) != piVar3) {\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }" (if "if") (parenthesized_expression "(*(int **)((int)param_1 + 0x20) != piVar3)" (( "(") (binary_expression "*(int **)((int)param_1 + 0x20) != piVar3" (pointer_expression "*(int **)((int)param_1 + 0x20)" (* "*") (cast_expression "(int **)((int)param_1 + 0x20)" (( "(") (type_descriptor "int **" (primitive_type "int") (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 "piVar3")) () ")")) (compound_statement "{\n      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);\n      piVar3 = *(int **)((int)param_1 + 0x20);\n    }" ({ "{") (expression_statement "memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);" (call_expression "memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3)" (identifier "memmove") (argument_list "(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3)" (( "(") (identifier "__dest") (, ",") (identifier "piVar3") (, ",") (binary_expression "(int)*(int **)((int)param_1 + 0x20) - (int)piVar3" (cast_expression "(int)*(int **)((int)param_1 + 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(int **)((int)param_1 + 0x20)" (* "*") (cast_expression "(int **)((int)param_1 + 0x20)" (( "(") (type_descriptor "int **" (primitive_type "int") (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)piVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar3"))) () ")"))) (; ";")) (expression_statement "piVar3 = *(int **)((int)param_1 + 0x20);" (assignment_expression "piVar3 = *(int **)((int)param_1 + 0x20)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)((int)param_1 + 0x20)" (* "*") (cast_expression "(int **)((int)param_1 + 0x20)" (( "(") (type_descriptor "int **" (primitive_type "int") (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")) () ")"))))) (; ";")) (} "}"))) (expression_statement "*(int **)((int)param_1 + 0x20) = piVar3 + -1;" (assignment_expression "*(int **)((int)param_1 + 0x20) = piVar3 + -1" (pointer_expression "*(int **)((int)param_1 + 0x20)" (* "*") (cast_expression "(int **)((int)param_1 + 0x20)" (( "(") (type_descriptor "int **" (primitive_type "int") (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")) () ")")))) (= "=") (binary_expression "piVar3 + -1" (identifier "piVar3") (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (param_1[1].__data.__lock + -1 == param_2) {\n      param_1[1].__data.__lock = param_2;\n    }" (if "if") (parenthesized_expression "(param_1[1].__data.__lock + -1 == param_2)" (( "(") (binary_expression "param_1[1].__data.__lock + -1 == param_2" (binary_expression "param_1[1].__data.__lock + -1" (field_expression "param_1[1].__data.__lock" (field_expression "param_1[1].__data" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (. ".") (field_identifier "__data")) (. ".") (field_identifier "__lock")) (+ "+") (number_literal "-1")) (== "==") (identifier "param_2")) () ")")) (compound_statement "{\n      param_1[1].__data.__lock = param_2;\n    }" ({ "{") (expression_statement "param_1[1].__data.__lock = param_2;" (assignment_expression "param_1[1].__data.__lock = param_2" (field_expression "param_1[1].__data.__lock" (field_expression "param_1[1].__data" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (. ".") (field_identifier "__data")) (. ".") (field_identifier "__lock")) (= "=") (identifier "param_2")) (; ";")) (} "}"))) (if_statement "if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" (if "if") (parenthesized_expression "((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))" (( "(") (binary_expression "(puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" (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"))) () ")")) (&& "&&") (parenthesized_expression "(iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)" (( "(") (comma_expression "iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0" (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") () ")")))) (, ",") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" ({ "{") (expression_statement "puVar4 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar4 = (undefined4 *)FUN_001e6be0(4)" (identifier "puVar4") (= "=") (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 "*puVar4 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar4 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (pointer_expression "&PTR_FUN_0038bfb0" (& "&") (identifier "PTR_FUN_0038bfb0"))) (; ";")) (expression_statement "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" (identifier "FUN_001e5630") (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" (( "(") (identifier "puVar4") (, ",") (identifier "PTR_PTR_0038ebc0") (, ",") (identifier "PTR_FUN_0038efdc") () ")"))) (; ";")) (} "}"))) (} "}"))))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* std::Catalogs::_M_erase(int) */

void __thiscall std::type_1::function_1(type_1 *var_7,int var_9)

{
  int *var_15;
  type_2 *var_11;
  int var_3;
  type_3 *var_17;
  type_3 *var_10;
  int var_8;
  
  var_11 = var_1;
  if ((var_1 != (type_2 *)0x0) &&
     (var_3 = var_2((type_4 *)var_7), var_3 != 0)) {
    var_4();
LAB_0022f4d4:
    var_10 = (type_3 *)var_5(4);
    *var_10 = &PTR____concurrence_unlock_error_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */
    var_6(var_10,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);
  }
  var_10 = *(type_3 **)(var_7 + 0x1c);
  for (var_3 = (int)*(type_3 **)(var_7 + 0x20) - (int)var_10 >> 2; 0 < var_3;
      var_3 = (var_3 - var_8) + -1) {
    while( true ) {
      var_8 = var_3 >> 1;
      if (*(int *)var_10[var_8] < var_9) break;
      var_3 = var_8;
      if (var_8 == 0) goto LAB_0022f3c3;
    }
    var_10 = var_10 + var_8 + 1;
  }
LAB_0022f3c3:
  if ((var_10 == *(type_3 **)(var_7 + 0x20)) || (var_15 = (int *)*var_10, *var_15 != var_9)) {
    if ((var_11 != (type_2 *)0x0) &&
       (var_3 = var_12((type_4 *)var_7), var_3 != 0)) goto LAB_0022f4d4;
  }
  else {
    var_13((void *)var_15[1]);
    locale::~var_14((var_14 *)(var_15 + 2));
    var_16(var_15);
    var_17 = var_10 + 1;
    if (*(type_3 **)(var_7 + 0x20) != var_17) {
      var_18(var_10,var_17,(int)*(type_3 **)(var_7 + 0x20) - (int)var_17);
      var_17 = *(type_3 **)(var_7 + 0x20);
    }
    *(type_3 **)(var_7 + 0x20) = var_17 + -1;
    if (*(int *)(var_7 + 0x18) + -1 == var_9) {
      *(int *)(var_7 + 0x18) = var_9;
    }
    if ((var_11 != (type_2 *)0x0) &&
       (var_3 = var_12((type_4 *)var_7), var_3 != 0)) {
      var_10 = (type_3 *)var_5(4);
      *var_10 = &PTR____concurrence_unlock_error_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */
      var_6(var_10,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);
    }
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) 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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (labeled_statement label: (statement_identifier) (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)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (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: (primitive_type) 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: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (goto_statement label: (statement_identifier)))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (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 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 (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (field_expression argument: (field_expression argument: (subscript_expression argument: (identifier) index: (number_literal)) field: (field_identifier)) field: (field_identifier)) right: (number_literal)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (field_expression argument: (field_expression argument: (subscript_expression argument: (identifier) index: (number_literal)) field: (field_identifier)) field: (field_identifier)) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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))))

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

void MASKED(pthread_mutex_t *param_1,int param_2)

{
  undefined *puVar1;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  int *__dest;
  int iVar5;
  
  puVar1 = PTR___pthread_key_create_0038ef24;
  if ((PTR___pthread_key_create_0038ef24 != (undefined *)0x0) &&
     (iVar2 = pthread_mutex_lock(param_1), iVar2 != 0)) {
    FUN_001e68a0();
LAB_0022f4d4:
    puVar4 = (undefined4 *)FUN_001e6be0(4);
    *puVar4 = &PTR_FUN_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f4f9 to 0022f4fd has its CatchHandler @ 0022f503 */
    FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);
  }
  __dest = *(int **)((int)param_1 + 0x1c);
  for (iVar2 = (int)*(int **)((int)param_1 + 0x20) - (int)__dest >> 2; 0 < iVar2;
      iVar2 = (iVar2 - iVar5) + -1) {
    while( true ) {
      iVar5 = iVar2 >> 1;
      if (*(int *)__dest[iVar5] < param_2) break;
      iVar2 = iVar5;
      if (iVar5 == 0) goto LAB_0022f3c3;
    }
    __dest = __dest + iVar5 + 1;
  }
LAB_0022f3c3:
  if ((__dest == *(int **)((int)param_1 + 0x20)) || (piVar3 = (int *)*__dest, *piVar3 != param_2)) {
    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0))
    goto LAB_0022f4d4;
  }
  else {
    free((void *)piVar3[1]);
    FUN_001e9510(piVar3 + 2);
    FUN_001e6db0(piVar3);
    piVar3 = __dest + 1;
    if (*(int **)((int)param_1 + 0x20) != piVar3) {
      memmove(__dest,piVar3,(int)*(int **)((int)param_1 + 0x20) - (int)piVar3);
      piVar3 = *(int **)((int)param_1 + 0x20);
    }
    *(int **)((int)param_1 + 0x20) = piVar3 + -1;
    if (param_1[1].__data.__lock + -1 == param_2) {
      param_1[1].__data.__lock = param_2;
    }
    if ((puVar1 != (undefined *)0x0) && (iVar2 = pthread_mutex_unlock(param_1), iVar2 != 0)) {
      puVar4 = (undefined4 *)FUN_001e6be0(4);
      *puVar4 = &PTR_FUN_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0022f4b2 to 0022f4b6 has its CatchHandler @ 0022f4fe */
      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);
    }
  }
  return;
}

