
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* std::locale::global(std::locale const&) */

locale * __thiscall std::locale::global(locale *this,locale *param_1)

{
  undefined *puVar1;
  _Impl *p_Var2;
  pthread_mutex_t *__mutex;
  int iVar3;
  undefined4 *puVar4;
  char *local_34 [2];
  char local_2c [28];
  
  _S_initialize();
  __mutex = (pthread_mutex_t *)::(anonymous_namespace)::get_locale_mutex();
  puVar1 = PTR___pthread_key_create_0038ef24;
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    iVar3 = pthread_mutex_lock(__mutex);
    if (iVar3 != 0) {
      __throw_concurrence_lock_error();
      goto LAB_002382c7;
    }
  }
  p_Var2 = _S_global;
  _S_global = *(_Impl **)param_1;
  if (puVar1 == (undefined *)0x0) {
    *(int *)_S_global = *(int *)_S_global + 1;
  }
  else {
    LOCK();
    *(int *)_S_global = *(int *)_S_global + 1;
    UNLOCK();
    _S_global = *(_Impl **)param_1;
  }
                    /* try { // try from 00238233 to 00238237 has its CatchHandler @ 002382f1 */
  name_abi_cxx11_();
  iVar3 = std::string::compare((string *)local_34,"*");
  if (iVar3 != 0) {
    setlocale(6,local_34[0]);
  }
  if (local_34[0] != local_2c) {
    operator_delete(local_34[0]);
  }
  if (puVar1 != (undefined *)0x0) {
    iVar3 = pthread_mutex_unlock(__mutex);
    if (iVar3 != 0) {
LAB_002382c7:
      puVar4 = (undefined4 *)__cxa_allocate_exception(4);
      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */
      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);
    }
  }
  locale(this,p_Var2);
  return this;
}



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

undefined4 FUN_002381c0(undefined4 param_1,undefined4 *param_2)

{
  undefined *puVar1;
  int iVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  undefined4 uStack_50;
  undefined1 auStack_4c [8];
  int *local_44;
  char **local_40;
  pthread_mutex_t *local_38;
  char *local_34 [2];
  char local_2c [28];
  
  puVar4 = (undefined4 *)auStack_4c;
  uStack_50 = 0x2381db;
  FUN_00238010();
  uStack_50 = 0x2381e0;
  local_38 = (pthread_mutex_t *)FUN_00236fc0();
  puVar1 = PTR___pthread_key_create_0038ef24;
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    iVar2 = pthread_mutex_lock(local_38);
    if (iVar2 != 0) {
      uStack_50 = 0x2382c7;
      FUN_001e68a0();
      goto LAB_002382c7;
    }
  }
  local_44 = DAT_00396314;
  DAT_00396314 = (int *)*param_2;
  if (puVar1 == (undefined *)0x0) {
    *DAT_00396314 = *DAT_00396314 + 1;
  }
  else {
    LOCK();
    *DAT_00396314 = *DAT_00396314 + 1;
    UNLOCK();
    DAT_00396314 = (int *)*param_2;
  }
  local_40 = local_34;
                    /* try { // try from 00238233 to 00238237 has its CatchHandler @ 002382f1 */
  FUN_001e8d90(local_40,param_2);
  iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);
  if (iVar2 != 0) {
    setlocale(6,local_34[0]);
  }
  puVar4 = &uStack_50;
  if (local_34[0] != local_2c) {
    FUN_001e6db0(local_34[0]);
  }
  if (puVar1 != (undefined *)0x0) {
    iVar2 = pthread_mutex_unlock(local_38);
    if (iVar2 != 0) {
LAB_002382c7:
      *(undefined4 *)((int)puVar4 + -0x10) = 4;
      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;
      puVar3 = (undefined4 *)FUN_001e6be0();
      *puVar3 = &PTR_FUN_0038bfb0;
      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;
      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;
      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */
      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;
      FUN_001e5630();
    }
  }
  FUN_001e8d80(param_1,local_44);
  return param_1;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
PUSH ESI
CALL 0x000559ea
ADD ESI,0x156e36
PUSH EBX
SUB ESP,0x3c
MOV EBX,ESI
CALL 0x00238010
CALL 0x00236fc0
MOV EDI,dword ptr [ESI + 0xffffff24]
MOV dword ptr [EBP + -0x34],EAX
TEST EDI,EDI
JZ 0x00238201
SUB ESP,0xc
PUSH EAX
CALL 0x000297c0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x002382c2
LEA EDX,[ESI + 0x7314]
MOV EAX,dword ptr [EDX]
MOV dword ptr [EBP + -0x40],EAX
MOV EAX,dword ptr [EBP + 0xc]
MOV EAX,dword ptr [EAX]
TEST EDI,EDI
JZ 0x002382a0
ADD.LOCK dword ptr [EAX],0x1
MOV EAX,dword ptr [EBP + 0xc]
MOV EAX,dword ptr [EAX]
MOV dword ptr [EDX],EAX
SUB ESP,0x8
LEA EAX,[EBP + -0x30]
MOV EBX,ESI
PUSH dword ptr [EBP + 0xc]
PUSH EAX
MOV dword ptr [EBP + -0x3c],EAX
CALL 0x001e8d90
LEA EAX,[ESI + 0xfff11d44]
MOV dword ptr [ESP],EAX
PUSH dword ptr [EBP + -0x3c]
CALL 0x001f1370
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x002382b0
MOV EAX,dword ptr [EBP + -0x30]
LEA EDX,[EBP + -0x28]
CMP EAX,EDX
JZ 0x00238268
SUB ESP,0xc
MOV EBX,ESI
PUSH EAX
CALL 0x001e6db0
ADD ESP,0x10
TEST EDI,EDI
JZ 0x00238280
SUB ESP,0xc
PUSH dword ptr [EBP + -0x34]
MOV EBX,ESI
CALL 0x00029500
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x002382c7
SUB ESP,0x8
PUSH dword ptr [EBP + -0x40]
MOV EBX,ESI
PUSH dword ptr [EBP + 0x8]
CALL 0x001e8d80
MOV EAX,dword ptr [EBP + 0x8]
ADD ESP,0x10
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET 0x4
ADD dword ptr [EAX],0x1
JMP 0x00238222
SUB ESP,0x8
PUSH dword ptr [EBP + -0x30]
PUSH 0x6
CALL 0x00029660
ADD ESP,0x10
JMP 0x00238250
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\nundefined4 FUN_002381c0(undefined4 param_1,undefined4 *param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  undefined4 uStack_50;\n  undefined1 auStack_4c [8];\n  int *local_44;\n  char **local_40;\n  pthread_mutex_t *local_38;\n  char *local_34 [2];\n  char local_2c [28];\n  \n  puVar4 = (undefined4 *)auStack_4c;\n  uStack_50 = 0x2381db;\n  FUN_00238010();\n  uStack_50 = 0x2381e0;\n  local_38 = (pthread_mutex_t *)FUN_00236fc0();\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }\n  local_44 = DAT_00396314;\n  DAT_00396314 = (int *)*param_2;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }\n  local_40 = local_34;\n                    /* try { // try from 00238233 to 00238237 has its CatchHandler @ 002382f1 */\n  FUN_001e8d90(local_40,param_2);\n  iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);\n  if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }\n  puVar4 = &uStack_50;\n  if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }\n  FUN_001e8d80(param_1,local_44);\n  return param_1;\n}\n\n" comment (function_definition "undefined4 FUN_002381c0(undefined4 param_1,undefined4 *param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  undefined4 uStack_50;\n  undefined1 auStack_4c [8];\n  int *local_44;\n  char **local_40;\n  pthread_mutex_t *local_38;\n  char *local_34 [2];\n  char local_2c [28];\n  \n  puVar4 = (undefined4 *)auStack_4c;\n  uStack_50 = 0x2381db;\n  FUN_00238010();\n  uStack_50 = 0x2381e0;\n  local_38 = (pthread_mutex_t *)FUN_00236fc0();\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }\n  local_44 = DAT_00396314;\n  DAT_00396314 = (int *)*param_2;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }\n  local_40 = local_34;\n                    /* try { // try from 00238233 to 00238237 has its CatchHandler @ 002382f1 */\n  FUN_001e8d90(local_40,param_2);\n  iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);\n  if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }\n  puVar4 = &uStack_50;\n  if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }\n  FUN_001e8d80(param_1,local_44);\n  return param_1;\n}" type_identifier (function_declarator "FUN_002381c0(undefined4 param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  undefined4 uStack_50;\n  undefined1 auStack_4c [8];\n  int *local_44;\n  char **local_40;\n  pthread_mutex_t *local_38;\n  char *local_34 [2];\n  char local_2c [28];\n  \n  puVar4 = (undefined4 *)auStack_4c;\n  uStack_50 = 0x2381db;\n  FUN_00238010();\n  uStack_50 = 0x2381e0;\n  local_38 = (pthread_mutex_t *)FUN_00236fc0();\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }\n  local_44 = DAT_00396314;\n  DAT_00396314 = (int *)*param_2;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }\n  local_40 = local_34;\n                    /* try { // try from 00238233 to 00238237 has its CatchHandler @ 002382f1 */\n  FUN_001e8d90(local_40,param_2);\n  iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);\n  if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }\n  puVar4 = &uStack_50;\n  if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }\n  FUN_001e8d80(param_1,local_44);\n  return param_1;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined4 uStack_50;" type_identifier identifier ;) (declaration "undefined1 auStack_4c [8];" type_identifier (array_declarator "auStack_4c [8]" identifier [ number_literal ]) ;) (declaration "int *local_44;" primitive_type (pointer_declarator "*local_44" * identifier) ;) (declaration "char **local_40;" primitive_type (pointer_declarator "**local_40" * (pointer_declarator "*local_40" * identifier)) ;) (declaration "pthread_mutex_t *local_38;" type_identifier (pointer_declarator "*local_38" * identifier) ;) (declaration "char *local_34 [2];" primitive_type (pointer_declarator "*local_34 [2]" * (array_declarator "local_34 [2]" identifier [ number_literal ])) ;) (declaration "char local_2c [28];" primitive_type (array_declarator "local_2c [28]" identifier [ number_literal ]) ;) (expression_statement "puVar4 = (undefined4 *)auStack_4c;" (assignment_expression "puVar4 = (undefined4 *)auStack_4c" identifier = (cast_expression "(undefined4 *)auStack_4c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "uStack_50 = 0x2381db;" (assignment_expression "uStack_50 = 0x2381db" identifier = number_literal) ;) (expression_statement "FUN_00238010();" (call_expression "FUN_00238010()" identifier (argument_list "()" ( ))) ;) (expression_statement "uStack_50 = 0x2381e0;" (assignment_expression "uStack_50 = 0x2381e0" identifier = number_literal) ;) (expression_statement "local_38 = (pthread_mutex_t *)FUN_00236fc0();" (assignment_expression "local_38 = (pthread_mutex_t *)FUN_00236fc0()" identifier = (cast_expression "(pthread_mutex_t *)FUN_00236fc0()" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00236fc0()" identifier (argument_list "()" ( ))))) ;) (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(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_lock(local_38);" (assignment_expression "iVar2 = pthread_mutex_lock(local_38)" identifier = (call_expression "pthread_mutex_lock(local_38)" identifier (argument_list "(local_38)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }" { (expression_statement "uStack_50 = 0x2382c7;" (assignment_expression "uStack_50 = 0x2382c7" identifier = number_literal) ;) (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_002382c7;" goto statement_identifier ;) })) })) (expression_statement "local_44 = DAT_00396314;" (assignment_expression "local_44 = DAT_00396314" identifier = identifier) ;) (expression_statement "DAT_00396314 = (int *)*param_2;" (assignment_expression "DAT_00396314 = (int *)*param_2" identifier = (cast_expression "(int *)*param_2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (if_statement "if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }" if (parenthesized_expression "(puVar1 == (undefined *)0x0)" ( (binary_expression "puVar1 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }" { (expression_statement "*DAT_00396314 = *DAT_00396314 + 1;" (assignment_expression "*DAT_00396314 = *DAT_00396314 + 1" (pointer_expression "*DAT_00396314" * identifier) = (binary_expression "*DAT_00396314 + 1" (pointer_expression "*DAT_00396314" * identifier) + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }" else (compound_statement "{\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*DAT_00396314 = *DAT_00396314 + 1;" (assignment_expression "*DAT_00396314 = *DAT_00396314 + 1" (pointer_expression "*DAT_00396314" * identifier) = (binary_expression "*DAT_00396314 + 1" (pointer_expression "*DAT_00396314" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "DAT_00396314 = (int *)*param_2;" (assignment_expression "DAT_00396314 = (int *)*param_2" identifier = (cast_expression "(int *)*param_2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) }))) (expression_statement "local_40 = local_34;" (assignment_expression "local_40 = local_34" identifier = identifier) ;) comment (expression_statement "FUN_001e8d90(local_40,param_2);" (call_expression "FUN_001e8d90(local_40,param_2)" identifier (argument_list "(local_40,param_2)" ( identifier , identifier ))) ;) (expression_statement "iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);" (assignment_expression "iVar2 = FUN_001f1370(local_40,&DAT_002a0d44)" identifier = (call_expression "FUN_001f1370(local_40,&DAT_002a0d44)" identifier (argument_list "(local_40,&DAT_002a0d44)" ( identifier , (pointer_expression "&DAT_002a0d44" & identifier) )))) ;) (if_statement "if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    setlocale(6,local_34[0]);\n  }" { (expression_statement "setlocale(6,local_34[0]);" (call_expression "setlocale(6,local_34[0])" identifier (argument_list "(6,local_34[0])" ( number_literal , (subscript_expression "local_34[0]" identifier [ number_literal ]) ))) ;) })) (expression_statement "puVar4 = &uStack_50;" (assignment_expression "puVar4 = &uStack_50" identifier = (pointer_expression "&uStack_50" & identifier)) ;) (if_statement "if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }" if (parenthesized_expression "(local_34[0] != local_2c)" ( (binary_expression "local_34[0] != local_2c" (subscript_expression "local_34[0]" identifier [ number_literal ]) != identifier) )) (compound_statement "{\n    FUN_001e6db0(local_34[0]);\n  }" { (expression_statement "FUN_001e6db0(local_34[0]);" (call_expression "FUN_001e6db0(local_34[0])" identifier (argument_list "(local_34[0])" ( (subscript_expression "local_34[0]" identifier [ number_literal ]) ))) ;) })) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_unlock(local_38);" (assignment_expression "iVar2 = pthread_mutex_unlock(local_38)" identifier = (call_expression "pthread_mutex_unlock(local_38)" identifier (argument_list "(local_38)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }" { (labeled_statement "LAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;" statement_identifier : (expression_statement "*(undefined4 *)((int)puVar4 + -0x10) = 4;" (assignment_expression "*(undefined4 *)((int)puVar4 + -0x10) = 4" (pointer_expression "*(undefined4 *)((int)puVar4 + -0x10)" * (cast_expression "(undefined4 *)((int)puVar4 + -0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + -0x10)" ( (binary_expression "(int)puVar4 + -0x10" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;)) (expression_statement "*(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;" (assignment_expression "*(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1" (pointer_expression "*(undefined4 *)((int)puVar4 + -0x14)" * (cast_expression "(undefined4 *)((int)puVar4 + -0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + -0x14)" ( (binary_expression "(int)puVar4 + -0x14" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "puVar3 = (undefined4 *)FUN_001e6be0();" (assignment_expression "puVar3 = (undefined4 *)FUN_001e6be0()" identifier = (cast_expression "(undefined4 *)FUN_001e6be0()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001e6be0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "*puVar3 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar3 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar3" * identifier) = (pointer_expression "&PTR_FUN_0038bfb0" & identifier)) ;) (expression_statement "*(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;" (assignment_expression "*(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc" (pointer_expression "*(undefined **)((int)puVar4 + -8)" * (cast_expression "(undefined **)((int)puVar4 + -8)" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)puVar4 + -8)" ( (binary_expression "(int)puVar4 + -8" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;" (assignment_expression "*(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0" (pointer_expression "*(undefined **)((int)puVar4 + -0xc)" * (cast_expression "(undefined **)((int)puVar4 + -0xc)" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)puVar4 + -0xc)" ( (binary_expression "(int)puVar4 + -0xc" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 **)((int)puVar4 + -0x10) = puVar3;" (assignment_expression "*(undefined4 **)((int)puVar4 + -0x10) = puVar3" (pointer_expression "*(undefined4 **)((int)puVar4 + -0x10)" * (cast_expression "(undefined4 **)((int)puVar4 + -0x10)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)puVar4 + -0x10)" ( (binary_expression "(int)puVar4 + -0x10" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) comment comment (expression_statement "*(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;" (assignment_expression "*(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1" (pointer_expression "*(undefined1 **)((int)puVar4 + -0x14)" * (cast_expression "(undefined1 **)((int)puVar4 + -0x14)" ( (type_descriptor "undefined1 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)puVar4 + -0x14)" ( (binary_expression "(int)puVar4 + -0x14" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (pointer_expression "&LAB_002382f1" & identifier)) ;) (expression_statement "FUN_001e5630();" (call_expression "FUN_001e5630()" identifier (argument_list "()" ( ))) ;) })) })) (expression_statement "FUN_001e8d80(param_1,local_44);" (call_expression "FUN_001e8d80(param_1,local_44)" identifier (argument_list "(param_1,local_44)" ( identifier , identifier ))) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* std::locale::global(std::locale const&) */\n\nlocale * __thiscall std::locale::global(locale *this,locale *param_1)\n\n{\n  undefined *puVar1;\n  _Impl *p_Var2;\n  pthread_mutex_t *__mutex;\n  int iVar3;\n  undefined4 *puVar4;\n  char *local_34 [2];\n  char local_2c [28];\n  \n  _S_initialize();\n  __mutex = (pthread_mutex_t *)::(anonymous_namespace)::get_locale_mutex();\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar3 = pthread_mutex_lock(__mutex);\n    if (iVar3 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_002382c7;\n    }\n  }\n  p_Var2 = _S_global;\n  _S_global = *(_Impl **)param_1;\n  if (puVar1 == (undefined *)0x0) {\n    *(int *)_S_global = *(int *)_S_global + 1;\n  }\n  else {\n    LOCK();\n    *(int *)_S_global = *(int *)_S_global + 1;\n    UNLOCK();\n    _S_global = *(_Impl **)param_1;\n  }\n                    /* try { // try from 00238233 to 00238237 has its CatchHandler @ 002382f1 */\n  name_abi_cxx11_();\n  iVar3 = std::string::compare((string *)local_34,"*");\n  if (iVar3 != 0) {\n    setlocale(6,local_34[0]);\n  }\n  if (local_34[0] != local_2c) {\n    operator_delete(local_34[0]);\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar3 = pthread_mutex_unlock(__mutex);\n    if (iVar3 != 0) {\nLAB_002382c7:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }\n  locale(this,p_Var2);\n  return this;\n}\n\n" comment comment (ERROR "locale * __thiscall std::locale::global(locale *this,locale *param_1)" (binary_expression "locale * __thiscall std::locale::global(locale *this,locale *param_1" (binary_expression "locale * __thiscall std::locale::global(locale *this" (binary_expression "locale * __thiscall" identifier * identifier) (ERROR "std::locale::global(locale" identifier : : identifier : : identifier ( identifier) * identifier) (ERROR ",locale" , identifier) * identifier) )) (compound_statement "{\n  undefined *puVar1;\n  _Impl *p_Var2;\n  pthread_mutex_t *__mutex;\n  int iVar3;\n  undefined4 *puVar4;\n  char *local_34 [2];\n  char local_2c [28];\n  \n  _S_initialize();\n  __mutex = (pthread_mutex_t *)::(anonymous_namespace)::get_locale_mutex();\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar3 = pthread_mutex_lock(__mutex);\n    if (iVar3 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_002382c7;\n    }\n  }\n  p_Var2 = _S_global;\n  _S_global = *(_Impl **)param_1;\n  if (puVar1 == (undefined *)0x0) {\n    *(int *)_S_global = *(int *)_S_global + 1;\n  }\n  else {\n    LOCK();\n    *(int *)_S_global = *(int *)_S_global + 1;\n    UNLOCK();\n    _S_global = *(_Impl **)param_1;\n  }\n                    /* try { // try from 00238233 to 00238237 has its CatchHandler @ 002382f1 */\n  name_abi_cxx11_();\n  iVar3 = std::string::compare((string *)local_34,"*");\n  if (iVar3 != 0) {\n    setlocale(6,local_34[0]);\n  }\n  if (local_34[0] != local_2c) {\n    operator_delete(local_34[0]);\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar3 = pthread_mutex_unlock(__mutex);\n    if (iVar3 != 0) {\nLAB_002382c7:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }\n  locale(this,p_Var2);\n  return this;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "_Impl *p_Var2;" type_identifier (pointer_declarator "*p_Var2" * identifier) ;) (declaration "pthread_mutex_t *__mutex;" type_identifier (pointer_declarator "*__mutex" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "char *local_34 [2];" primitive_type (pointer_declarator "*local_34 [2]" * (array_declarator "local_34 [2]" identifier [ number_literal ])) ;) (declaration "char local_2c [28];" primitive_type (array_declarator "local_2c [28]" identifier [ number_literal ]) ;) (expression_statement "_S_initialize();" (call_expression "_S_initialize()" identifier (argument_list "()" ( ))) ;) (labeled_statement "__mutex = (pthread_mutex_t *)::(anonymous_namespace)::get_locale_mutex();" statement_identifier (ERROR "= (pthread_mutex_t *)::(anonymous_namespace):" = ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) : : (parenthesized_expression "(anonymous_namespace)" ( identifier )) :) : (expression_statement "get_locale_mutex();" (call_expression "get_locale_mutex()" identifier (argument_list "()" ( ))) ;)) (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    iVar3 = pthread_mutex_lock(__mutex);\n    if (iVar3 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_002382c7;\n    }\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar3 = pthread_mutex_lock(__mutex);\n    if (iVar3 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_002382c7;\n    }\n  }" { (expression_statement "iVar3 = pthread_mutex_lock(__mutex);" (assignment_expression "iVar3 = pthread_mutex_lock(__mutex)" identifier = (call_expression "pthread_mutex_lock(__mutex)" identifier (argument_list "(__mutex)" ( identifier )))) ;) (if_statement "if (iVar3 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_002382c7;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      __throw_concurrence_lock_error();\n      goto LAB_002382c7;\n    }" { (expression_statement "__throw_concurrence_lock_error();" (call_expression "__throw_concurrence_lock_error()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_002382c7;" goto statement_identifier ;) })) })) (expression_statement "p_Var2 = _S_global;" (assignment_expression "p_Var2 = _S_global" identifier = identifier) ;) (expression_statement "_S_global = *(_Impl **)param_1;" (assignment_expression "_S_global = *(_Impl **)param_1" identifier = (pointer_expression "*(_Impl **)param_1" * (cast_expression "(_Impl **)param_1" ( (type_descriptor "_Impl **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (puVar1 == (undefined *)0x0) {\n    *(int *)_S_global = *(int *)_S_global + 1;\n  }\n  else {\n    LOCK();\n    *(int *)_S_global = *(int *)_S_global + 1;\n    UNLOCK();\n    _S_global = *(_Impl **)param_1;\n  }" if (parenthesized_expression "(puVar1 == (undefined *)0x0)" ( (binary_expression "puVar1 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *(int *)_S_global = *(int *)_S_global + 1;\n  }" { (expression_statement "*(int *)_S_global = *(int *)_S_global + 1;" (assignment_expression "*(int *)_S_global = *(int *)_S_global + 1" (pointer_expression "*(int *)_S_global" * (cast_expression "(int *)_S_global" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "*(int *)_S_global + 1" (pointer_expression "*(int *)_S_global" * (cast_expression "(int *)_S_global" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    *(int *)_S_global = *(int *)_S_global + 1;\n    UNLOCK();\n    _S_global = *(_Impl **)param_1;\n  }" else (compound_statement "{\n    LOCK();\n    *(int *)_S_global = *(int *)_S_global + 1;\n    UNLOCK();\n    _S_global = *(_Impl **)param_1;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(int *)_S_global = *(int *)_S_global + 1;" (assignment_expression "*(int *)_S_global = *(int *)_S_global + 1" (pointer_expression "*(int *)_S_global" * (cast_expression "(int *)_S_global" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "*(int *)_S_global + 1" (pointer_expression "*(int *)_S_global" * (cast_expression "(int *)_S_global" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "_S_global = *(_Impl **)param_1;" (assignment_expression "_S_global = *(_Impl **)param_1" identifier = (pointer_expression "*(_Impl **)param_1" * (cast_expression "(_Impl **)param_1" ( (type_descriptor "_Impl **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) }))) comment (expression_statement "name_abi_cxx11_();" (call_expression "name_abi_cxx11_()" identifier (argument_list "()" ( ))) ;) (ERROR "iVar3 = std::" (assignment_expression "iVar3 = std" identifier = identifier) : :) (labeled_statement "string::compare((string *)local_34,"*");" statement_identifier : (ERROR ":" :) (expression_statement "compare((string *)local_34,"*");" (call_expression "compare((string *)local_34,"*")" identifier (argument_list "((string *)local_34,"*")" ( (cast_expression "(string *)local_34" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (string_literal ""*"" " string_content ") ))) ;)) (if_statement "if (iVar3 != 0) {\n    setlocale(6,local_34[0]);\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    setlocale(6,local_34[0]);\n  }" { (expression_statement "setlocale(6,local_34[0]);" (call_expression "setlocale(6,local_34[0])" identifier (argument_list "(6,local_34[0])" ( number_literal , (subscript_expression "local_34[0]" identifier [ number_literal ]) ))) ;) })) (if_statement "if (local_34[0] != local_2c) {\n    operator_delete(local_34[0]);\n  }" if (parenthesized_expression "(local_34[0] != local_2c)" ( (binary_expression "local_34[0] != local_2c" (subscript_expression "local_34[0]" identifier [ number_literal ]) != identifier) )) (compound_statement "{\n    operator_delete(local_34[0]);\n  }" { (expression_statement "operator_delete(local_34[0]);" (call_expression "operator_delete(local_34[0])" identifier (argument_list "(local_34[0])" ( (subscript_expression "local_34[0]" identifier [ number_literal ]) ))) ;) })) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar3 = pthread_mutex_unlock(__mutex);\n    if (iVar3 != 0) {\nLAB_002382c7:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar3 = pthread_mutex_unlock(__mutex);\n    if (iVar3 != 0) {\nLAB_002382c7:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }" { (expression_statement "iVar3 = pthread_mutex_unlock(__mutex);" (assignment_expression "iVar3 = pthread_mutex_unlock(__mutex)" identifier = (call_expression "pthread_mutex_unlock(__mutex)" identifier (argument_list "(__mutex)" ( identifier )))) ;) (if_statement "if (iVar3 != 0) {\nLAB_002382c7:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_002382c7:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }" { (labeled_statement "LAB_002382c7:\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 "locale(this,p_Var2);" (call_expression "locale(this,p_Var2)" identifier (argument_list "(this,p_Var2)" ( identifier , identifier ))) ;) (return_statement "return this;" return identifier ;) }))
(translation_unit "undefined4 FUN_002381c0(undefined4 param_1,undefined4 *param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  undefined4 uStack_50;\n  undefined1 auStack_4c [8];\n  int *local_44;\n  char **local_40;\n  pthread_mutex_t *local_38;\n  char *local_34 [2];\n  char local_2c [28];\n  \n  puVar4 = (undefined4 *)auStack_4c;\n  uStack_50 = 0x2381db;\n  FUN_00238010();\n  uStack_50 = 0x2381e0;\n  local_38 = (pthread_mutex_t *)FUN_00236fc0();\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }\n  local_44 = DAT_00396314;\n  DAT_00396314 = (int *)*param_2;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }\n  local_40 = local_34;\n                    \n  FUN_001e8d90(local_40,param_2);\n  iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);\n  if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }\n  puVar4 = &uStack_50;\n  if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }\n  FUN_001e8d80(param_1,local_44);\n  return param_1;\n}\n\n" (function_definition "undefined4 FUN_002381c0(undefined4 param_1,undefined4 *param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  undefined4 uStack_50;\n  undefined1 auStack_4c [8];\n  int *local_44;\n  char **local_40;\n  pthread_mutex_t *local_38;\n  char *local_34 [2];\n  char local_2c [28];\n  \n  puVar4 = (undefined4 *)auStack_4c;\n  uStack_50 = 0x2381db;\n  FUN_00238010();\n  uStack_50 = 0x2381e0;\n  local_38 = (pthread_mutex_t *)FUN_00236fc0();\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }\n  local_44 = DAT_00396314;\n  DAT_00396314 = (int *)*param_2;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }\n  local_40 = local_34;\n                    \n  FUN_001e8d90(local_40,param_2);\n  iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);\n  if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }\n  puVar4 = &uStack_50;\n  if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }\n  FUN_001e8d80(param_1,local_44);\n  return param_1;\n}" type_identifier (function_declarator "FUN_002381c0(undefined4 param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  undefined4 uStack_50;\n  undefined1 auStack_4c [8];\n  int *local_44;\n  char **local_40;\n  pthread_mutex_t *local_38;\n  char *local_34 [2];\n  char local_2c [28];\n  \n  puVar4 = (undefined4 *)auStack_4c;\n  uStack_50 = 0x2381db;\n  FUN_00238010();\n  uStack_50 = 0x2381e0;\n  local_38 = (pthread_mutex_t *)FUN_00236fc0();\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }\n  local_44 = DAT_00396314;\n  DAT_00396314 = (int *)*param_2;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }\n  local_40 = local_34;\n                    \n  FUN_001e8d90(local_40,param_2);\n  iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);\n  if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }\n  puVar4 = &uStack_50;\n  if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }\n  FUN_001e8d80(param_1,local_44);\n  return param_1;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined4 uStack_50;" type_identifier identifier ;) (declaration "undefined1 auStack_4c [8];" type_identifier (array_declarator "auStack_4c [8]" identifier [ number_literal ]) ;) (declaration "int *local_44;" primitive_type (pointer_declarator "*local_44" * identifier) ;) (declaration "char **local_40;" primitive_type (pointer_declarator "**local_40" * (pointer_declarator "*local_40" * identifier)) ;) (declaration "pthread_mutex_t *local_38;" type_identifier (pointer_declarator "*local_38" * identifier) ;) (declaration "char *local_34 [2];" primitive_type (pointer_declarator "*local_34 [2]" * (array_declarator "local_34 [2]" identifier [ number_literal ])) ;) (declaration "char local_2c [28];" primitive_type (array_declarator "local_2c [28]" identifier [ number_literal ]) ;) (expression_statement "puVar4 = (undefined4 *)auStack_4c;" (assignment_expression "puVar4 = (undefined4 *)auStack_4c" identifier = (cast_expression "(undefined4 *)auStack_4c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "uStack_50 = 0x2381db;" (assignment_expression "uStack_50 = 0x2381db" identifier = number_literal) ;) (expression_statement "FUN_00238010();" (call_expression "FUN_00238010()" identifier (argument_list "()" ( ))) ;) (expression_statement "uStack_50 = 0x2381e0;" (assignment_expression "uStack_50 = 0x2381e0" identifier = number_literal) ;) (expression_statement "local_38 = (pthread_mutex_t *)FUN_00236fc0();" (assignment_expression "local_38 = (pthread_mutex_t *)FUN_00236fc0()" identifier = (cast_expression "(pthread_mutex_t *)FUN_00236fc0()" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00236fc0()" identifier (argument_list "()" ( ))))) ;) (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(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_lock(local_38);" (assignment_expression "iVar2 = pthread_mutex_lock(local_38)" identifier = (call_expression "pthread_mutex_lock(local_38)" identifier (argument_list "(local_38)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }" { (expression_statement "uStack_50 = 0x2382c7;" (assignment_expression "uStack_50 = 0x2382c7" identifier = number_literal) ;) (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_002382c7;" goto statement_identifier ;) })) })) (expression_statement "local_44 = DAT_00396314;" (assignment_expression "local_44 = DAT_00396314" identifier = identifier) ;) (expression_statement "DAT_00396314 = (int *)*param_2;" (assignment_expression "DAT_00396314 = (int *)*param_2" identifier = (cast_expression "(int *)*param_2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (if_statement "if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }" if (parenthesized_expression "(puVar1 == (undefined *)0x0)" ( (binary_expression "puVar1 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }" { (expression_statement "*DAT_00396314 = *DAT_00396314 + 1;" (assignment_expression "*DAT_00396314 = *DAT_00396314 + 1" (pointer_expression "*DAT_00396314" * identifier) = (binary_expression "*DAT_00396314 + 1" (pointer_expression "*DAT_00396314" * identifier) + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }" else (compound_statement "{\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*DAT_00396314 = *DAT_00396314 + 1;" (assignment_expression "*DAT_00396314 = *DAT_00396314 + 1" (pointer_expression "*DAT_00396314" * identifier) = (binary_expression "*DAT_00396314 + 1" (pointer_expression "*DAT_00396314" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "DAT_00396314 = (int *)*param_2;" (assignment_expression "DAT_00396314 = (int *)*param_2" identifier = (cast_expression "(int *)*param_2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) }))) (expression_statement "local_40 = local_34;" (assignment_expression "local_40 = local_34" identifier = identifier) ;) (expression_statement "FUN_001e8d90(local_40,param_2);" (call_expression "FUN_001e8d90(local_40,param_2)" identifier (argument_list "(local_40,param_2)" ( identifier , identifier ))) ;) (expression_statement "iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);" (assignment_expression "iVar2 = FUN_001f1370(local_40,&DAT_002a0d44)" identifier = (call_expression "FUN_001f1370(local_40,&DAT_002a0d44)" identifier (argument_list "(local_40,&DAT_002a0d44)" ( identifier , (pointer_expression "&DAT_002a0d44" & identifier) )))) ;) (if_statement "if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    setlocale(6,local_34[0]);\n  }" { (expression_statement "setlocale(6,local_34[0]);" (call_expression "setlocale(6,local_34[0])" identifier (argument_list "(6,local_34[0])" ( number_literal , (subscript_expression "local_34[0]" identifier [ number_literal ]) ))) ;) })) (expression_statement "puVar4 = &uStack_50;" (assignment_expression "puVar4 = &uStack_50" identifier = (pointer_expression "&uStack_50" & identifier)) ;) (if_statement "if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }" if (parenthesized_expression "(local_34[0] != local_2c)" ( (binary_expression "local_34[0] != local_2c" (subscript_expression "local_34[0]" identifier [ number_literal ]) != identifier) )) (compound_statement "{\n    FUN_001e6db0(local_34[0]);\n  }" { (expression_statement "FUN_001e6db0(local_34[0]);" (call_expression "FUN_001e6db0(local_34[0])" identifier (argument_list "(local_34[0])" ( (subscript_expression "local_34[0]" identifier [ number_literal ]) ))) ;) })) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_unlock(local_38);" (assignment_expression "iVar2 = pthread_mutex_unlock(local_38)" identifier = (call_expression "pthread_mutex_unlock(local_38)" identifier (argument_list "(local_38)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }" { (labeled_statement "LAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;" statement_identifier : (expression_statement "*(undefined4 *)((int)puVar4 + -0x10) = 4;" (assignment_expression "*(undefined4 *)((int)puVar4 + -0x10) = 4" (pointer_expression "*(undefined4 *)((int)puVar4 + -0x10)" * (cast_expression "(undefined4 *)((int)puVar4 + -0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + -0x10)" ( (binary_expression "(int)puVar4 + -0x10" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;)) (expression_statement "*(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;" (assignment_expression "*(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1" (pointer_expression "*(undefined4 *)((int)puVar4 + -0x14)" * (cast_expression "(undefined4 *)((int)puVar4 + -0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + -0x14)" ( (binary_expression "(int)puVar4 + -0x14" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "puVar3 = (undefined4 *)FUN_001e6be0();" (assignment_expression "puVar3 = (undefined4 *)FUN_001e6be0()" identifier = (cast_expression "(undefined4 *)FUN_001e6be0()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001e6be0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "*puVar3 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar3 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar3" * identifier) = (pointer_expression "&PTR_FUN_0038bfb0" & identifier)) ;) (expression_statement "*(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;" (assignment_expression "*(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc" (pointer_expression "*(undefined **)((int)puVar4 + -8)" * (cast_expression "(undefined **)((int)puVar4 + -8)" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)puVar4 + -8)" ( (binary_expression "(int)puVar4 + -8" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;" (assignment_expression "*(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0" (pointer_expression "*(undefined **)((int)puVar4 + -0xc)" * (cast_expression "(undefined **)((int)puVar4 + -0xc)" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)puVar4 + -0xc)" ( (binary_expression "(int)puVar4 + -0xc" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 **)((int)puVar4 + -0x10) = puVar3;" (assignment_expression "*(undefined4 **)((int)puVar4 + -0x10) = puVar3" (pointer_expression "*(undefined4 **)((int)puVar4 + -0x10)" * (cast_expression "(undefined4 **)((int)puVar4 + -0x10)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)puVar4 + -0x10)" ( (binary_expression "(int)puVar4 + -0x10" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;" (assignment_expression "*(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1" (pointer_expression "*(undefined1 **)((int)puVar4 + -0x14)" * (cast_expression "(undefined1 **)((int)puVar4 + -0x14)" ( (type_descriptor "undefined1 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)puVar4 + -0x14)" ( (binary_expression "(int)puVar4 + -0x14" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (pointer_expression "&LAB_002382f1" & identifier)) ;) (expression_statement "FUN_001e5630();" (call_expression "FUN_001e5630()" identifier (argument_list "()" ( ))) ;) })) })) (expression_statement "FUN_001e8d80(param_1,local_44);" (call_expression "FUN_001e8d80(param_1,local_44)" identifier (argument_list "(param_1,local_44)" ( identifier , identifier ))) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * (array_declarator IDENT [ LIT ])) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (subscript_expression IDENT [ LIT ]) ))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (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) )))) = IDENT) ;) (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) )))) = IDENT) ;) (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) )))) = IDENT) ;) (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) )))) = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_002381c0(undefined4 param_1,undefined4 *param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  undefined4 uStack_50;\n  undefined1 auStack_4c [8];\n  int *local_44;\n  char **local_40;\n  pthread_mutex_t *local_38;\n  char *local_34 [2];\n  char local_2c [28];\n  \n  puVar4 = (undefined4 *)auStack_4c;\n  uStack_50 = 0x2381db;\n  FUN_00238010();\n  uStack_50 = 0x2381e0;\n  local_38 = (pthread_mutex_t *)FUN_00236fc0();\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }\n  local_44 = DAT_00396314;\n  DAT_00396314 = (int *)*param_2;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }\n  local_40 = local_34;\n                    \n  FUN_001e8d90(local_40,param_2);\n  iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);\n  if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }\n  puVar4 = &uStack_50;\n  if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }\n  FUN_001e8d80(param_1,local_44);\n  return param_1;\n}" (type_identifier "undefined4") (function_declarator "FUN_002381c0(undefined4 param_1,undefined4 *param_2)" (identifier "FUN_002381c0") (parameter_list "(undefined4 param_1,undefined4 *param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  undefined4 uStack_50;\n  undefined1 auStack_4c [8];\n  int *local_44;\n  char **local_40;\n  pthread_mutex_t *local_38;\n  char *local_34 [2];\n  char local_2c [28];\n  \n  puVar4 = (undefined4 *)auStack_4c;\n  uStack_50 = 0x2381db;\n  FUN_00238010();\n  uStack_50 = 0x2381e0;\n  local_38 = (pthread_mutex_t *)FUN_00236fc0();\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }\n  local_44 = DAT_00396314;\n  DAT_00396314 = (int *)*param_2;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }\n  local_40 = local_34;\n                    \n  FUN_001e8d90(local_40,param_2);\n  iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);\n  if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }\n  puVar4 = &uStack_50;\n  if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }\n  FUN_001e8d80(param_1,local_44);\n  return param_1;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "undefined4 uStack_50;" (type_identifier "undefined4") (identifier "uStack_50") (; ";")) (declaration "undefined1 auStack_4c [8];" (type_identifier "undefined1") (array_declarator "auStack_4c [8]" (identifier "auStack_4c") ([ "[") (number_literal "8") (] "]")) (; ";")) (declaration "int *local_44;" (primitive_type "int") (pointer_declarator "*local_44" (* "*") (identifier "local_44")) (; ";")) (declaration "char **local_40;" (primitive_type "char") (pointer_declarator "**local_40" (* "*") (pointer_declarator "*local_40" (* "*") (identifier "local_40"))) (; ";")) (declaration "pthread_mutex_t *local_38;" (type_identifier "pthread_mutex_t") (pointer_declarator "*local_38" (* "*") (identifier "local_38")) (; ";")) (declaration "char *local_34 [2];" (primitive_type "char") (pointer_declarator "*local_34 [2]" (* "*") (array_declarator "local_34 [2]" (identifier "local_34") ([ "[") (number_literal "2") (] "]"))) (; ";")) (declaration "char local_2c [28];" (primitive_type "char") (array_declarator "local_2c [28]" (identifier "local_2c") ([ "[") (number_literal "28") (] "]")) (; ";")) (expression_statement "puVar4 = (undefined4 *)auStack_4c;" (assignment_expression "puVar4 = (undefined4 *)auStack_4c" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)auStack_4c" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "auStack_4c"))) (; ";")) (expression_statement "uStack_50 = 0x2381db;" (assignment_expression "uStack_50 = 0x2381db" (identifier "uStack_50") (= "=") (number_literal "0x2381db")) (; ";")) (expression_statement "FUN_00238010();" (call_expression "FUN_00238010()" (identifier "FUN_00238010") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uStack_50 = 0x2381e0;" (assignment_expression "uStack_50 = 0x2381e0" (identifier "uStack_50") (= "=") (number_literal "0x2381e0")) (; ";")) (expression_statement "local_38 = (pthread_mutex_t *)FUN_00236fc0();" (assignment_expression "local_38 = (pthread_mutex_t *)FUN_00236fc0()" (identifier "local_38") (= "=") (cast_expression "(pthread_mutex_t *)FUN_00236fc0()" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00236fc0()" (identifier "FUN_00236fc0") (argument_list "()" (( "(") () ")"))))) (; ";")) (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(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_0038ef24 != (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_0038ef24 != (undefined *)0x0" (identifier "PTR___pthread_key_create_0038ef24") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar2 = pthread_mutex_lock(local_38);\n    if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }\n  }" ({ "{") (expression_statement "iVar2 = pthread_mutex_lock(local_38);" (assignment_expression "iVar2 = pthread_mutex_lock(local_38)" (identifier "iVar2") (= "=") (call_expression "pthread_mutex_lock(local_38)" (identifier "pthread_mutex_lock") (argument_list "(local_38)" (( "(") (identifier "local_38") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uStack_50 = 0x2382c7;\n      FUN_001e68a0();\n      goto LAB_002382c7;\n    }" ({ "{") (expression_statement "uStack_50 = 0x2382c7;" (assignment_expression "uStack_50 = 0x2382c7" (identifier "uStack_50") (= "=") (number_literal "0x2382c7")) (; ";")) (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" (identifier "FUN_001e68a0") (argument_list "()" (( "(") () ")"))) (; ";")) (goto_statement "goto LAB_002382c7;" (goto "goto") (statement_identifier "LAB_002382c7") (; ";")) (} "}"))) (} "}"))) (expression_statement "local_44 = DAT_00396314;" (assignment_expression "local_44 = DAT_00396314" (identifier "local_44") (= "=") (identifier "DAT_00396314")) (; ";")) (expression_statement "DAT_00396314 = (int *)*param_2;" (assignment_expression "DAT_00396314 = (int *)*param_2" (identifier "DAT_00396314") (= "=") (cast_expression "(int *)*param_2" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (if_statement "if (puVar1 == (undefined *)0x0) {\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }" (if "if") (parenthesized_expression "(puVar1 == (undefined *)0x0)" (( "(") (binary_expression "puVar1 == (undefined *)0x0" (identifier "puVar1") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *DAT_00396314 = *DAT_00396314 + 1;\n  }" ({ "{") (expression_statement "*DAT_00396314 = *DAT_00396314 + 1;" (assignment_expression "*DAT_00396314 = *DAT_00396314 + 1" (pointer_expression "*DAT_00396314" (* "*") (identifier "DAT_00396314")) (= "=") (binary_expression "*DAT_00396314 + 1" (pointer_expression "*DAT_00396314" (* "*") (identifier "DAT_00396314")) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }" (else "else") (compound_statement "{\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    DAT_00396314 = (int *)*param_2;\n  }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*DAT_00396314 = *DAT_00396314 + 1;" (assignment_expression "*DAT_00396314 = *DAT_00396314 + 1" (pointer_expression "*DAT_00396314" (* "*") (identifier "DAT_00396314")) (= "=") (binary_expression "*DAT_00396314 + 1" (pointer_expression "*DAT_00396314" (* "*") (identifier "DAT_00396314")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "DAT_00396314 = (int *)*param_2;" (assignment_expression "DAT_00396314 = (int *)*param_2" (identifier "DAT_00396314") (= "=") (cast_expression "(int *)*param_2" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (} "}")))) (expression_statement "local_40 = local_34;" (assignment_expression "local_40 = local_34" (identifier "local_40") (= "=") (identifier "local_34")) (; ";")) (expression_statement "FUN_001e8d90(local_40,param_2);" (call_expression "FUN_001e8d90(local_40,param_2)" (identifier "FUN_001e8d90") (argument_list "(local_40,param_2)" (( "(") (identifier "local_40") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);" (assignment_expression "iVar2 = FUN_001f1370(local_40,&DAT_002a0d44)" (identifier "iVar2") (= "=") (call_expression "FUN_001f1370(local_40,&DAT_002a0d44)" (identifier "FUN_001f1370") (argument_list "(local_40,&DAT_002a0d44)" (( "(") (identifier "local_40") (, ",") (pointer_expression "&DAT_002a0d44" (& "&") (identifier "DAT_002a0d44")) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    setlocale(6,local_34[0]);\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    setlocale(6,local_34[0]);\n  }" ({ "{") (expression_statement "setlocale(6,local_34[0]);" (call_expression "setlocale(6,local_34[0])" (identifier "setlocale") (argument_list "(6,local_34[0])" (( "(") (number_literal "6") (, ",") (subscript_expression "local_34[0]" (identifier "local_34") ([ "[") (number_literal "0") (] "]")) () ")"))) (; ";")) (} "}"))) (expression_statement "puVar4 = &uStack_50;" (assignment_expression "puVar4 = &uStack_50" (identifier "puVar4") (= "=") (pointer_expression "&uStack_50" (& "&") (identifier "uStack_50"))) (; ";")) (if_statement "if (local_34[0] != local_2c) {\n    FUN_001e6db0(local_34[0]);\n  }" (if "if") (parenthesized_expression "(local_34[0] != local_2c)" (( "(") (binary_expression "local_34[0] != local_2c" (subscript_expression "local_34[0]" (identifier "local_34") ([ "[") (number_literal "0") (] "]")) (!= "!=") (identifier "local_2c")) () ")")) (compound_statement "{\n    FUN_001e6db0(local_34[0]);\n  }" ({ "{") (expression_statement "FUN_001e6db0(local_34[0]);" (call_expression "FUN_001e6db0(local_34[0])" (identifier "FUN_001e6db0") (argument_list "(local_34[0])" (( "(") (subscript_expression "local_34[0]" (identifier "local_34") ([ "[") (number_literal "0") (] "]")) () ")"))) (; ";")) (} "}"))) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }" (if "if") (parenthesized_expression "(puVar1 != (undefined *)0x0)" (( "(") (binary_expression "puVar1 != (undefined *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar2 = pthread_mutex_unlock(local_38);\n    if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }\n  }" ({ "{") (expression_statement "iVar2 = pthread_mutex_unlock(local_38);" (assignment_expression "iVar2 = pthread_mutex_unlock(local_38)" (identifier "iVar2") (= "=") (call_expression "pthread_mutex_unlock(local_38)" (identifier "pthread_mutex_unlock") (argument_list "(local_38)" (( "(") (identifier "local_38") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;\n      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;\n      puVar3 = (undefined4 *)FUN_001e6be0();\n      *puVar3 = &PTR_FUN_0038bfb0;\n      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;\n      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;\n      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;\n                    \n                    \n      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;\n      FUN_001e5630();\n    }" ({ "{") (labeled_statement "LAB_002382c7:\n      *(undefined4 *)((int)puVar4 + -0x10) = 4;" (statement_identifier "LAB_002382c7") (: ":") (expression_statement "*(undefined4 *)((int)puVar4 + -0x10) = 4;" (assignment_expression "*(undefined4 *)((int)puVar4 + -0x10) = 4" (pointer_expression "*(undefined4 *)((int)puVar4 + -0x10)" (* "*") (cast_expression "(undefined4 *)((int)puVar4 + -0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar4 + -0x10)" (( "(") (binary_expression "(int)puVar4 + -0x10" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (number_literal "-0x10")) () ")")))) (= "=") (number_literal "4")) (; ";"))) (expression_statement "*(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;" (assignment_expression "*(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1" (pointer_expression "*(undefined4 *)((int)puVar4 + -0x14)" (* "*") (cast_expression "(undefined4 *)((int)puVar4 + -0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar4 + -0x14)" (( "(") (binary_expression "(int)puVar4 + -0x14" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (number_literal "-0x14")) () ")")))) (= "=") (number_literal "0x2382d1")) (; ";")) (expression_statement "puVar3 = (undefined4 *)FUN_001e6be0();" (assignment_expression "puVar3 = (undefined4 *)FUN_001e6be0()" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)FUN_001e6be0()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_001e6be0()" (identifier "FUN_001e6be0") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "*puVar3 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar3 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "&PTR_FUN_0038bfb0" (& "&") (identifier "PTR_FUN_0038bfb0"))) (; ";")) (expression_statement "*(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;" (assignment_expression "*(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc" (pointer_expression "*(undefined **)((int)puVar4 + -8)" (* "*") (cast_expression "(undefined **)((int)puVar4 + -8)" (( "(") (type_descriptor "undefined **" (type_identifier "undefined") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)puVar4 + -8)" (( "(") (binary_expression "(int)puVar4 + -8" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (number_literal "-8")) () ")")))) (= "=") (identifier "PTR_FUN_0038efdc")) (; ";")) (expression_statement "*(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;" (assignment_expression "*(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0" (pointer_expression "*(undefined **)((int)puVar4 + -0xc)" (* "*") (cast_expression "(undefined **)((int)puVar4 + -0xc)" (( "(") (type_descriptor "undefined **" (type_identifier "undefined") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)puVar4 + -0xc)" (( "(") (binary_expression "(int)puVar4 + -0xc" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (number_literal "-0xc")) () ")")))) (= "=") (identifier "PTR_PTR_0038ebc0")) (; ";")) (expression_statement "*(undefined4 **)((int)puVar4 + -0x10) = puVar3;" (assignment_expression "*(undefined4 **)((int)puVar4 + -0x10) = puVar3" (pointer_expression "*(undefined4 **)((int)puVar4 + -0x10)" (* "*") (cast_expression "(undefined4 **)((int)puVar4 + -0x10)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)puVar4 + -0x10)" (( "(") (binary_expression "(int)puVar4 + -0x10" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (number_literal "-0x10")) () ")")))) (= "=") (identifier "puVar3")) (; ";")) (expression_statement "*(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;" (assignment_expression "*(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1" (pointer_expression "*(undefined1 **)((int)puVar4 + -0x14)" (* "*") (cast_expression "(undefined1 **)((int)puVar4 + -0x14)" (( "(") (type_descriptor "undefined1 **" (type_identifier "undefined1") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)puVar4 + -0x14)" (( "(") (binary_expression "(int)puVar4 + -0x14" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (number_literal "-0x14")) () ")")))) (= "=") (pointer_expression "&LAB_002382f1" (& "&") (identifier "LAB_002382f1"))) (; ";")) (expression_statement "FUN_001e5630();" (call_expression "FUN_001e5630()" (identifier "FUN_001e5630") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_001e8d80(param_1,local_44);" (call_expression "FUN_001e8d80(param_1,local_44)" (identifier "FUN_001e8d80") (argument_list "(param_1,local_44)" (( "(") (identifier "param_1") (, ",") (identifier "local_44") () ")"))) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* std::locale::global(std::locale const&) */

var_18 * __thiscall std::var_18::global(var_18 *this,var_18 *param_1)

{
  type_1 *var_7;
  type_2 *p_Var2;
  type_3 *__mutex;
  int var_5;
  type_4 *puVar4;
  char *local_34 [2];
  char var_13 [28];
  
  var_1();
  __mutex = (type_3 *)::(anonymous_namespace)::var_2();
  var_7 = var_3;
  if (var_3 != (type_1 *)0x0) {
    var_5 = var_4(__mutex);
    if (var_5 != 0) {
      var_6();
      goto LAB_002382c7;
    }
  }
  p_Var2 = _S_global;
  _S_global = *(type_2 **)param_1;
  if (var_7 == (type_1 *)0x0) {
    *(int *)_S_global = *(int *)_S_global + 1;
  }
  else {
    var_8();
    *(int *)_S_global = *(int *)_S_global + 1;
    var_9();
    _S_global = *(type_2 **)param_1;
  }
                    /* try { // try from 00238233 to 00238237 has its CatchHandler @ 002382f1 */
  var_10();
  var_5 = std::string::var_11((type_5 *)local_34,"*");
  if (var_5 != 0) {
    var_12(6,local_34[0]);
  }
  if (local_34[0] != var_13) {
    var_14(local_34[0]);
  }
  if (var_7 != (type_1 *)0x0) {
    var_5 = var_15(__mutex);
    if (var_5 != 0) {
LAB_002382c7:
      puVar4 = (type_4 *)var_16(4);
      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */
      var_17(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);
    }
  }
  var_18(this,p_Var2);
  return this;
}


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

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

undefined4 MASKED(undefined4 param_1,undefined4 *param_2)

{
  undefined *puVar1;
  int iVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  undefined4 uStack_50;
  undefined1 auStack_4c [8];
  int *local_44;
  char **local_40;
  pthread_mutex_t *local_38;
  char *local_34 [2];
  char local_2c [28];
  
  puVar4 = (undefined4 *)auStack_4c;
  uStack_50 = 0x2381db;
  FUN_00238010();
  uStack_50 = 0x2381e0;
  local_38 = (pthread_mutex_t *)FUN_00236fc0();
  puVar1 = PTR___pthread_key_create_0038ef24;
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    iVar2 = pthread_mutex_lock(local_38);
    if (iVar2 != 0) {
      uStack_50 = 0x2382c7;
      FUN_001e68a0();
      goto LAB_002382c7;
    }
  }
  local_44 = DAT_00396314;
  DAT_00396314 = (int *)*param_2;
  if (puVar1 == (undefined *)0x0) {
    *DAT_00396314 = *DAT_00396314 + 1;
  }
  else {
    LOCK();
    *DAT_00396314 = *DAT_00396314 + 1;
    UNLOCK();
    DAT_00396314 = (int *)*param_2;
  }
  local_40 = local_34;
                    /* try { // try from 00238233 to 00238237 has its CatchHandler @ 002382f1 */
  FUN_001e8d90(local_40,param_2);
  iVar2 = FUN_001f1370(local_40,&DAT_002a0d44);
  if (iVar2 != 0) {
    setlocale(6,local_34[0]);
  }
  puVar4 = &uStack_50;
  if (local_34[0] != local_2c) {
    FUN_001e6db0(local_34[0]);
  }
  if (puVar1 != (undefined *)0x0) {
    iVar2 = pthread_mutex_unlock(local_38);
    if (iVar2 != 0) {
LAB_002382c7:
      *(undefined4 *)((int)puVar4 + -0x10) = 4;
      *(undefined4 *)((int)puVar4 + -0x14) = 0x2382d1;
      puVar3 = (undefined4 *)FUN_001e6be0();
      *puVar3 = &PTR_FUN_0038bfb0;
      *(undefined **)((int)puVar4 + -8) = PTR_FUN_0038efdc;
      *(undefined **)((int)puVar4 + -0xc) = PTR_PTR_0038ebc0;
      *(undefined4 **)((int)puVar4 + -0x10) = puVar3;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 002382ec to 002382f0 has its CatchHandler @ 002382f8 */
      *(undefined1 **)((int)puVar4 + -0x14) = &LAB_002382f1;
      FUN_001e5630();
    }
  }
  FUN_001e8d80(param_1,local_44);
  return param_1;
}

