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

void __thiscall std::locale::locale(locale *this)

{
  undefined *puVar1;
  pthread_mutex_t *__mutex;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  
  *(undefined4 *)this = 0;
                    /* try { // try from 0023808f to 0023813f has its CatchHandler @ 0023816a */
  _S_initialize();
  piVar3 = _S_global;
  *(int **)this = _S_global;
  if (piVar3 == _S_classic) {
    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
      LOCK();
      *piVar3 = *piVar3 + 1;
      UNLOCK();
      return;
    }
    *piVar3 = *piVar3 + 1;
    return;
  }
  __mutex = (pthread_mutex_t *)::(anonymous_namespace)::get_locale_mutex();
  puVar1 = PTR___pthread_key_create_0038ef24;
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    iVar2 = pthread_mutex_lock(__mutex);
    if (iVar2 != 0) {
      __throw_concurrence_lock_error();
      goto LAB_00238140;
    }
  }
  piVar3 = _S_global;
  if (puVar1 == (undefined *)0x0) {
    *_S_global = *_S_global + 1;
  }
  else {
    LOCK();
    *_S_global = *_S_global + 1;
    UNLOCK();
    piVar3 = _S_global;
  }
  *(int **)this = piVar3;
  if (puVar1 != (undefined *)0x0) {
    iVar2 = pthread_mutex_unlock(__mutex);
    if (iVar2 != 0) {
LAB_00238140:
      puVar4 = (undefined4 *)__cxa_allocate_exception(4);
      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */
      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);
    }
  }
  return;
}



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

void FUN_00238070(undefined4 *param_1)

{
  undefined *puVar1;
  pthread_mutex_t *__mutex;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  
  *param_1 = 0;
                    /* try { // try from 0023808f to 0023813f has its CatchHandler @ 0023816a */
  FUN_00238010();
  piVar3 = DAT_00396314;
  *param_1 = DAT_00396314;
  if (piVar3 == DAT_00396318) {
    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
      LOCK();
      *piVar3 = *piVar3 + 1;
      UNLOCK();
      return;
    }
    *piVar3 = *piVar3 + 1;
    return;
  }
  __mutex = (pthread_mutex_t *)FUN_00236fc0();
  puVar1 = PTR___pthread_key_create_0038ef24;
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    iVar2 = pthread_mutex_lock(__mutex);
    if (iVar2 != 0) {
      FUN_001e68a0();
      goto LAB_00238140;
    }
  }
  piVar3 = DAT_00396314;
  if (puVar1 == (undefined *)0x0) {
    *DAT_00396314 = *DAT_00396314 + 1;
  }
  else {
    LOCK();
    *DAT_00396314 = *DAT_00396314 + 1;
    UNLOCK();
    piVar3 = DAT_00396314;
  }
  *param_1 = piVar3;
  if (puVar1 != (undefined *)0x0) {
    iVar2 = pthread_mutex_unlock(__mutex);
    if (iVar2 != 0) {
LAB_00238140:
      puVar4 = (undefined4 *)FUN_001e6be0(4);
      *puVar4 = &PTR_FUN_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */
      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);
    }
  }
  return;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
PUSH ESI
CALL 0x000559ea
ADD ESI,0x156f86
PUSH EBX
SUB ESP,0x1c
MOV EDI,dword ptr [EBP + 0x8]
MOV dword ptr [EDI],0x0
MOV EBX,ESI
CALL 0x00238010
LEA EAX,[ESI + 0x7314]
LEA EDX,[ESI + 0x7318]
MOV dword ptr [EBP + -0x1c],EAX
MOV EAX,dword ptr [EAX]
MOV dword ptr [EDI],EAX
CMP EAX,dword ptr [EDX]
JZ 0x00238118
CALL 0x00236fc0
MOV EDX,dword ptr [ESI + 0xffffff24]
MOV ECX,EAX
TEST EDX,EDX
JZ 0x002380d8
SUB ESP,0xc
MOV dword ptr [EBP + -0x24],EDX
PUSH EAX
MOV dword ptr [EBP + -0x20],EAX
CALL 0x000297c0
ADD ESP,0x10
MOV ECX,dword ptr [EBP + -0x20]
MOV EDX,dword ptr [EBP + -0x24]
TEST EAX,EAX
JNZ 0x0023813b
MOV EBX,dword ptr [EBP + -0x1c]
MOV EAX,dword ptr [EBX]
TEST EDX,EDX
JZ 0x00238110
ADD.LOCK dword ptr [EAX],0x1
MOV EAX,dword ptr [EBX]
MOV dword ptr [EDI],EAX
TEST EDX,EDX
JZ 0x002380ff
SUB ESP,0xc
MOV EBX,ESI
PUSH ECX
CALL 0x00029500
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00238140
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD dword ptr [EAX],0x1
JMP 0x002380e7
MOV EDX,dword ptr [ESI + 0xffffff24]
TEST EDX,EDX
JZ 0x00238130
ADD.LOCK dword ptr [EAX],0x1
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD dword ptr [EAX],0x1
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x001e68a0
SUB ESP,0xc
PUSH 0x4
CALL 0x001e6be0
LEA EDX,[ESI + 0xffffcfa8]
ADD ESP,0xc
ADD EDX,0x8
MOV dword ptr [EAX],EDX
PUSH dword ptr [ESI + 0xffffffdc]
PUSH dword ptr [ESI + 0xfffffbc0]
PUSH EAX
CALL 0x001e5630
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nvoid FUN_00238070(undefined4 *param_1)\n\n{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *param_1 = 0;\n                    /* try { // try from 0023808f to 0023813f has its CatchHandler @ 0023816a */\n  FUN_00238010();\n  piVar3 = DAT_00396314;\n  *param_1 = DAT_00396314;\n  if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\n  __mutex = (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_00238070(undefined4 *param_1)\n\n{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *param_1 = 0;\n                    /* try { // try from 0023808f to 0023813f has its CatchHandler @ 0023816a */\n  FUN_00238010();\n  piVar3 = DAT_00396314;\n  *param_1 = DAT_00396314;\n  if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\n  __mutex = (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00238070(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *param_1 = 0;\n                    /* try { // try from 0023808f to 0023813f has its CatchHandler @ 0023816a */\n  FUN_00238010();\n  piVar3 = DAT_00396314;\n  *param_1 = DAT_00396314;\n  if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\n  __mutex = (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "pthread_mutex_t *__mutex;" type_identifier (pointer_declarator "*__mutex" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) comment (expression_statement "FUN_00238010();" (call_expression "FUN_00238010()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = DAT_00396314;" (assignment_expression "piVar3 = DAT_00396314" identifier = identifier) ;) (expression_statement "*param_1 = DAT_00396314;" (assignment_expression "*param_1 = DAT_00396314" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }" if (parenthesized_expression "(piVar3 == DAT_00396318)" ( (binary_expression "piVar3 == DAT_00396318" identifier == identifier) )) (compound_statement "{\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }" { (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\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      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*piVar3 = *piVar3 + 1;" (assignment_expression "*piVar3 = *piVar3 + 1" (pointer_expression "*piVar3" * identifier) = (binary_expression "*piVar3 + 1" (pointer_expression "*piVar3" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "*piVar3 = *piVar3 + 1;" (assignment_expression "*piVar3 = *piVar3 + 1" (pointer_expression "*piVar3" * identifier) = (binary_expression "*piVar3 + 1" (pointer_expression "*piVar3" * identifier) + number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "__mutex = (pthread_mutex_t *)FUN_00236fc0();" (assignment_expression "__mutex = (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_lock(__mutex);" (assignment_expression "iVar2 = pthread_mutex_lock(__mutex)" identifier = (call_expression "pthread_mutex_lock(__mutex)" identifier (argument_list "(__mutex)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }" { (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00238140;" goto statement_identifier ;) })) })) (expression_statement "piVar3 = DAT_00396314;" (assignment_expression "piVar3 = DAT_00396314" identifier = 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    piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }" else (compound_statement "{\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    piVar3 = DAT_00396314;\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 "piVar3 = DAT_00396314;" (assignment_expression "piVar3 = DAT_00396314" identifier = identifier) ;) }))) (expression_statement "*param_1 = piVar3;" (assignment_expression "*param_1 = piVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_unlock(__mutex);" (assignment_expression "iVar2 = pthread_mutex_unlock(__mutex)" identifier = (call_expression "pthread_mutex_unlock(__mutex)" identifier (argument_list "(__mutex)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" { (labeled_statement "LAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);" statement_identifier : (expression_statement "puVar4 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar4 = (undefined4 *)FUN_001e6be0(4)" identifier = (cast_expression "(undefined4 *)FUN_001e6be0(4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001e6be0(4)" identifier (argument_list "(4)" ( number_literal ))))) ;)) (expression_statement "*puVar4 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar4 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR_FUN_0038bfb0" & identifier)) ;) comment comment (expression_statement "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" identifier (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" ( identifier , identifier , identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* std::locale::locale() */\n\nvoid __thiscall std::locale::locale(locale *this)\n\n{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *(undefined4 *)this = 0;\n                    /* try { // try from 0023808f to 0023813f has its CatchHandler @ 0023816a */\n  _S_initialize();\n  piVar3 = _S_global;\n  *(int **)this = _S_global;\n  if (piVar3 == _S_classic) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\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    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = _S_global;\n  if (puVar1 == (undefined *)0x0) {\n    *_S_global = *_S_global + 1;\n  }\n  else {\n    LOCK();\n    *_S_global = *_S_global + 1;\n    UNLOCK();\n    piVar3 = _S_global;\n  }\n  *(int **)this = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }\n  return;\n}\n\n" comment comment (function_definition "void __thiscall std::locale::locale(locale *this)\n\n{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *(undefined4 *)this = 0;\n                    /* try { // try from 0023808f to 0023813f has its CatchHandler @ 0023816a */\n  _S_initialize();\n  piVar3 = _S_global;\n  *(int **)this = _S_global;\n  if (piVar3 == _S_classic) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\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    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = _S_global;\n  if (puVar1 == (undefined *)0x0) {\n    *_S_global = *_S_global + 1;\n  }\n  else {\n    LOCK();\n    *_S_global = *_S_global + 1;\n    UNLOCK();\n    piVar3 = _S_global;\n  }\n  *(int **)this = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::locale::" identifier : : identifier : :) (function_declarator "locale(locale *this)" identifier (parameter_list "(locale *this)" ( (parameter_declaration "locale *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *(undefined4 *)this = 0;\n                    /* try { // try from 0023808f to 0023813f has its CatchHandler @ 0023816a */\n  _S_initialize();\n  piVar3 = _S_global;\n  *(int **)this = _S_global;\n  if (piVar3 == _S_classic) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\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    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = _S_global;\n  if (puVar1 == (undefined *)0x0) {\n    *_S_global = *_S_global + 1;\n  }\n  else {\n    LOCK();\n    *_S_global = *_S_global + 1;\n    UNLOCK();\n    piVar3 = _S_global;\n  }\n  *(int **)this = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "pthread_mutex_t *__mutex;" type_identifier (pointer_declarator "*__mutex" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "*(undefined4 *)this = 0;" (assignment_expression "*(undefined4 *)this = 0" (pointer_expression "*(undefined4 *)this" * (cast_expression "(undefined4 *)this" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) comment (expression_statement "_S_initialize();" (call_expression "_S_initialize()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = _S_global;" (assignment_expression "piVar3 = _S_global" identifier = identifier) ;) (expression_statement "*(int **)this = _S_global;" (assignment_expression "*(int **)this = _S_global" (pointer_expression "*(int **)this" * (cast_expression "(int **)this" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (if_statement "if (piVar3 == _S_classic) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }" if (parenthesized_expression "(piVar3 == _S_classic)" ( (binary_expression "piVar3 == _S_classic" identifier == identifier) )) (compound_statement "{\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }" { (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\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      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*piVar3 = *piVar3 + 1;" (assignment_expression "*piVar3 = *piVar3 + 1" (pointer_expression "*piVar3" * identifier) = (binary_expression "*piVar3 + 1" (pointer_expression "*piVar3" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "*piVar3 = *piVar3 + 1;" (assignment_expression "*piVar3 = *piVar3 + 1" (pointer_expression "*piVar3" * identifier) = (binary_expression "*piVar3 + 1" (pointer_expression "*piVar3" * identifier) + number_literal)) ;) (return_statement "return;" return ;) })) (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    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_00238140;\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(__mutex);\n    if (iVar2 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_00238140;\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_lock(__mutex);" (assignment_expression "iVar2 = pthread_mutex_lock(__mutex)" identifier = (call_expression "pthread_mutex_lock(__mutex)" identifier (argument_list "(__mutex)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_00238140;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      __throw_concurrence_lock_error();\n      goto LAB_00238140;\n    }" { (expression_statement "__throw_concurrence_lock_error();" (call_expression "__throw_concurrence_lock_error()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00238140;" goto statement_identifier ;) })) })) (expression_statement "piVar3 = _S_global;" (assignment_expression "piVar3 = _S_global" identifier = identifier) ;) (if_statement "if (puVar1 == (undefined *)0x0) {\n    *_S_global = *_S_global + 1;\n  }\n  else {\n    LOCK();\n    *_S_global = *_S_global + 1;\n    UNLOCK();\n    piVar3 = _S_global;\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    *_S_global = *_S_global + 1;\n  }" { (expression_statement "*_S_global = *_S_global + 1;" (assignment_expression "*_S_global = *_S_global + 1" (pointer_expression "*_S_global" * identifier) = (binary_expression "*_S_global + 1" (pointer_expression "*_S_global" * identifier) + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    *_S_global = *_S_global + 1;\n    UNLOCK();\n    piVar3 = _S_global;\n  }" else (compound_statement "{\n    LOCK();\n    *_S_global = *_S_global + 1;\n    UNLOCK();\n    piVar3 = _S_global;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*_S_global = *_S_global + 1;" (assignment_expression "*_S_global = *_S_global + 1" (pointer_expression "*_S_global" * identifier) = (binary_expression "*_S_global + 1" (pointer_expression "*_S_global" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = _S_global;" (assignment_expression "piVar3 = _S_global" identifier = identifier) ;) }))) (expression_statement "*(int **)this = piVar3;" (assignment_expression "*(int **)this = piVar3" (pointer_expression "*(int **)this" * (cast_expression "(int **)this" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\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    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_unlock(__mutex);" (assignment_expression "iVar2 = pthread_mutex_unlock(__mutex)" identifier = (call_expression "pthread_mutex_unlock(__mutex)" identifier (argument_list "(__mutex)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00238140:\n      puVar4 = (undefined4 *)__cxa_allocate_exception(4);\n      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */\n      __cxa_throw(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);\n    }" { (labeled_statement "LAB_00238140:\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 ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00238070(undefined4 *param_1)\n\n{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *param_1 = 0;\n                    \n  FUN_00238010();\n  piVar3 = DAT_00396314;\n  *param_1 = DAT_00396314;\n  if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\n  __mutex = (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_00238070(undefined4 *param_1)\n\n{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *param_1 = 0;\n                    \n  FUN_00238010();\n  piVar3 = DAT_00396314;\n  *param_1 = DAT_00396314;\n  if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\n  __mutex = (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00238070(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *param_1 = 0;\n                    \n  FUN_00238010();\n  piVar3 = DAT_00396314;\n  *param_1 = DAT_00396314;\n  if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\n  __mutex = (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "pthread_mutex_t *__mutex;" type_identifier (pointer_declarator "*__mutex" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "FUN_00238010();" (call_expression "FUN_00238010()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = DAT_00396314;" (assignment_expression "piVar3 = DAT_00396314" identifier = identifier) ;) (expression_statement "*param_1 = DAT_00396314;" (assignment_expression "*param_1 = DAT_00396314" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }" if (parenthesized_expression "(piVar3 == DAT_00396318)" ( (binary_expression "piVar3 == DAT_00396318" identifier == identifier) )) (compound_statement "{\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }" { (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\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      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*piVar3 = *piVar3 + 1;" (assignment_expression "*piVar3 = *piVar3 + 1" (pointer_expression "*piVar3" * identifier) = (binary_expression "*piVar3 + 1" (pointer_expression "*piVar3" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "*piVar3 = *piVar3 + 1;" (assignment_expression "*piVar3 = *piVar3 + 1" (pointer_expression "*piVar3" * identifier) = (binary_expression "*piVar3 + 1" (pointer_expression "*piVar3" * identifier) + number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "__mutex = (pthread_mutex_t *)FUN_00236fc0();" (assignment_expression "__mutex = (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_lock(__mutex);" (assignment_expression "iVar2 = pthread_mutex_lock(__mutex)" identifier = (call_expression "pthread_mutex_lock(__mutex)" identifier (argument_list "(__mutex)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }" { (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00238140;" goto statement_identifier ;) })) })) (expression_statement "piVar3 = DAT_00396314;" (assignment_expression "piVar3 = DAT_00396314" identifier = 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    piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }" else (compound_statement "{\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    piVar3 = DAT_00396314;\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 "piVar3 = DAT_00396314;" (assignment_expression "piVar3 = DAT_00396314" identifier = identifier) ;) }))) (expression_statement "*param_1 = piVar3;" (assignment_expression "*param_1 = piVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" if (parenthesized_expression "(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(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" { (expression_statement "iVar2 = pthread_mutex_unlock(__mutex);" (assignment_expression "iVar2 = pthread_mutex_unlock(__mutex)" identifier = (call_expression "pthread_mutex_unlock(__mutex)" identifier (argument_list "(__mutex)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" { (labeled_statement "LAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);" statement_identifier : (expression_statement "puVar4 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar4 = (undefined4 *)FUN_001e6be0(4)" identifier = (cast_expression "(undefined4 *)FUN_001e6be0(4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001e6be0(4)" identifier (argument_list "(4)" ( number_literal ))))) ;)) (expression_statement "*puVar4 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar4 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR_FUN_0038bfb0" & identifier)) ;) (expression_statement "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" identifier (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" ( identifier , identifier , identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (return_statement return ;) })) (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 (call_expression IDENT (argument_list ( ))) ;) (goto_statement goto statement_identifier ;) })) })) (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 (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 = IDENT) ;) }))) (expression_statement (assignment_expression (pointer_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 { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) })) (return_statement return ;) })))
(function_definition "void FUN_00238070(undefined4 *param_1)\n\n{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *param_1 = 0;\n                    \n  FUN_00238010();\n  piVar3 = DAT_00396314;\n  *param_1 = DAT_00396314;\n  if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\n  __mutex = (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00238070(undefined4 *param_1)" (identifier "FUN_00238070") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  pthread_mutex_t *__mutex;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  \n  *param_1 = 0;\n                    \n  FUN_00238010();\n  piVar3 = DAT_00396314;\n  *param_1 = DAT_00396314;\n  if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }\n  __mutex = (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }\n  piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "pthread_mutex_t *__mutex;" (type_identifier "pthread_mutex_t") (pointer_declarator "*__mutex" (* "*") (identifier "__mutex")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_00238010();" (call_expression "FUN_00238010()" (identifier "FUN_00238010") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar3 = DAT_00396314;" (assignment_expression "piVar3 = DAT_00396314" (identifier "piVar3") (= "=") (identifier "DAT_00396314")) (; ";")) (expression_statement "*param_1 = DAT_00396314;" (assignment_expression "*param_1 = DAT_00396314" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "DAT_00396314")) (; ";")) (if_statement "if (piVar3 == DAT_00396318) {\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }" (if "if") (parenthesized_expression "(piVar3 == DAT_00396318)" (( "(") (binary_expression "piVar3 == DAT_00396318" (identifier "piVar3") (== "==") (identifier "DAT_00396318")) () ")")) (compound_statement "{\n    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }\n    *piVar3 = *piVar3 + 1;\n    return;\n  }" ({ "{") (if_statement "if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\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      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*piVar3 = *piVar3 + 1;" (assignment_expression "*piVar3 = *piVar3 + 1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (binary_expression "*piVar3 + 1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "*piVar3 = *piVar3 + 1;" (assignment_expression "*piVar3 = *piVar3 + 1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (binary_expression "*piVar3 + 1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "1"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "__mutex = (pthread_mutex_t *)FUN_00236fc0();" (assignment_expression "__mutex = (pthread_mutex_t *)FUN_00236fc0()" (identifier "__mutex") (= "=") (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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\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(__mutex);\n    if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }\n  }" ({ "{") (expression_statement "iVar2 = pthread_mutex_lock(__mutex);" (assignment_expression "iVar2 = pthread_mutex_lock(__mutex)" (identifier "iVar2") (= "=") (call_expression "pthread_mutex_lock(__mutex)" (identifier "pthread_mutex_lock") (argument_list "(__mutex)" (( "(") (identifier "__mutex") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_001e68a0();\n      goto LAB_00238140;\n    }" ({ "{") (expression_statement "FUN_001e68a0();" (call_expression "FUN_001e68a0()" (identifier "FUN_001e68a0") (argument_list "()" (( "(") () ")"))) (; ";")) (goto_statement "goto LAB_00238140;" (goto "goto") (statement_identifier "LAB_00238140") (; ";")) (} "}"))) (} "}"))) (expression_statement "piVar3 = DAT_00396314;" (assignment_expression "piVar3 = DAT_00396314" (identifier "piVar3") (= "=") (identifier "DAT_00396314")) (; ";")) (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    piVar3 = DAT_00396314;\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    piVar3 = DAT_00396314;\n  }" (else "else") (compound_statement "{\n    LOCK();\n    *DAT_00396314 = *DAT_00396314 + 1;\n    UNLOCK();\n    piVar3 = DAT_00396314;\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 "piVar3 = DAT_00396314;" (assignment_expression "piVar3 = DAT_00396314" (identifier "piVar3") (= "=") (identifier "DAT_00396314")) (; ";")) (} "}")))) (expression_statement "*param_1 = piVar3;" (assignment_expression "*param_1 = piVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "piVar3")) (; ";")) (if_statement "if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" (if "if") (parenthesized_expression "(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(__mutex);\n    if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }\n  }" ({ "{") (expression_statement "iVar2 = pthread_mutex_unlock(__mutex);" (assignment_expression "iVar2 = pthread_mutex_unlock(__mutex)" (identifier "iVar2") (= "=") (call_expression "pthread_mutex_unlock(__mutex)" (identifier "pthread_mutex_unlock") (argument_list "(__mutex)" (( "(") (identifier "__mutex") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);\n      *puVar4 = &PTR_FUN_0038bfb0;\n                    \n                    \n      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);\n    }" ({ "{") (labeled_statement "LAB_00238140:\n      puVar4 = (undefined4 *)FUN_001e6be0(4);" (statement_identifier "LAB_00238140") (: ":") (expression_statement "puVar4 = (undefined4 *)FUN_001e6be0(4);" (assignment_expression "puVar4 = (undefined4 *)FUN_001e6be0(4)" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)FUN_001e6be0(4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_001e6be0(4)" (identifier "FUN_001e6be0") (argument_list "(4)" (( "(") (number_literal "4") () ")"))))) (; ";"))) (expression_statement "*puVar4 = &PTR_FUN_0038bfb0;" (assignment_expression "*puVar4 = &PTR_FUN_0038bfb0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (pointer_expression "&PTR_FUN_0038bfb0" (& "&") (identifier "PTR_FUN_0038bfb0"))) (; ";")) (expression_statement "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);" (call_expression "FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" (identifier "FUN_001e5630") (argument_list "(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc)" (( "(") (identifier "puVar4") (, ",") (identifier "PTR_PTR_0038ebc0") (, ",") (identifier "PTR_FUN_0038efdc") () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __thiscall std::function_1::function_1(function_1 *this)

{
  type_1 *var_11;
  type_2 *__mutex;
  int var_9;
  int *var_2;
  type_3 *puVar4;
  
  *(type_3 *)this = 0;
                    /* try { // try from 0023808f to 0023813f has its CatchHandler @ 0023816a */
  var_1();
  var_2 = _S_global;
  *(int **)this = _S_global;
  if (var_2 == var_3) {
    if (var_4 != (type_1 *)0x0) {
      var_5();
      *var_2 = *var_2 + 1;
      var_6();
      return;
    }
    *var_2 = *var_2 + 1;
    return;
  }
  __mutex = (type_2 *)::(anonymous_namespace)::var_7();
  var_11 = var_4;
  if (var_4 != (type_1 *)0x0) {
    var_9 = var_8(__mutex);
    if (var_9 != 0) {
      var_10();
      goto LAB_00238140;
    }
  }
  var_2 = _S_global;
  if (var_11 == (type_1 *)0x0) {
    *_S_global = *_S_global + 1;
  }
  else {
    var_5();
    *_S_global = *_S_global + 1;
    var_6();
    var_2 = _S_global;
  }
  *(int **)this = var_2;
  if (var_11 != (type_1 *)0x0) {
    var_9 = var_12(__mutex);
    if (var_9 != 0) {
LAB_00238140:
      puVar4 = (type_3 *)var_13(4);
      *puVar4 = &PTR____concurrence_unlock_error_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */
      var_14(puVar4,PTR_PTR_0038ebc0,PTR____concurrence_unlock_error_0038efdc);
    }
  }
  return;
}


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

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

void MASKED(undefined4 *param_1)

{
  undefined *puVar1;
  pthread_mutex_t *__mutex;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  
  *param_1 = 0;
                    /* try { // try from 0023808f to 0023813f has its CatchHandler @ 0023816a */
  FUN_00238010();
  piVar3 = DAT_00396314;
  *param_1 = DAT_00396314;
  if (piVar3 == DAT_00396318) {
    if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
      LOCK();
      *piVar3 = *piVar3 + 1;
      UNLOCK();
      return;
    }
    *piVar3 = *piVar3 + 1;
    return;
  }
  __mutex = (pthread_mutex_t *)FUN_00236fc0();
  puVar1 = PTR___pthread_key_create_0038ef24;
  if (PTR___pthread_key_create_0038ef24 != (undefined *)0x0) {
    iVar2 = pthread_mutex_lock(__mutex);
    if (iVar2 != 0) {
      FUN_001e68a0();
      goto LAB_00238140;
    }
  }
  piVar3 = DAT_00396314;
  if (puVar1 == (undefined *)0x0) {
    *DAT_00396314 = *DAT_00396314 + 1;
  }
  else {
    LOCK();
    *DAT_00396314 = *DAT_00396314 + 1;
    UNLOCK();
    piVar3 = DAT_00396314;
  }
  *param_1 = piVar3;
  if (puVar1 != (undefined *)0x0) {
    iVar2 = pthread_mutex_unlock(__mutex);
    if (iVar2 != 0) {
LAB_00238140:
      puVar4 = (undefined4 *)FUN_001e6be0(4);
      *puVar4 = &PTR_FUN_0038bfb0;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 00238165 to 00238169 has its CatchHandler @ 0023816f */
      FUN_001e5630(puVar4,PTR_PTR_0038ebc0,PTR_FUN_0038efdc);
    }
  }
  return;
}

