
/* std::locale::locale() */

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

{
  undefined *puVar1;
  int iVar2;
  pthread_mutex_t *__mutex;
  int *piVar3;
  undefined8 *puVar4;
  
  *(undefined8 *)this = 0;
                    /* try { // try from 002c04c4 to 002c0572 has its CatchHandler @ 002c05a1 */
  _S_initialize();
  piVar3 = _S_global;
  *(int **)this = _S_global;
  if (piVar3 == _S_classic) {
    if (PTR___pthread_key_create_003bdee8 != (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_003bdee8;
  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {
    iVar2 = pthread_mutex_lock(__mutex);
    if (iVar2 != 0) {
      __throw_concurrence_lock_error();
      goto LAB_002c0573;
    }
  }
  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_002c0573:
      puVar4 = (undefined8 *)__cxa_allocate_exception(8);
      *puVar4 = &PTR____concurrence_unlock_error_003b84a8;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */
      __cxa_throw(puVar4,&__concurrence_unlock_error::typeinfo,
                  __concurrence_unlock_error::~__concurrence_unlock_error);
    }
  }
  return;
}



void FUN_002c04b0(undefined8 *param_1)

{
  undefined *puVar1;
  int iVar2;
  pthread_mutex_t *__mutex;
  int *piVar3;
  undefined8 *puVar4;
  
  *param_1 = 0;
                    /* try { // try from 002c04c4 to 002c0572 has its CatchHandler @ 002c05a1 */
  FUN_002c0440();
  piVar3 = DAT_003c92d8;
  *param_1 = DAT_003c92d8;
  if (piVar3 == DAT_003c92e0) {
    if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {
      LOCK();
      *piVar3 = *piVar3 + 1;
      UNLOCK();
      return;
    }
    *piVar3 = *piVar3 + 1;
    return;
  }
  __mutex = (pthread_mutex_t *)FUN_002bf340();
  puVar1 = PTR___pthread_key_create_003bdee8;
  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {
    iVar2 = pthread_mutex_lock(__mutex);
    if (iVar2 != 0) {
      FUN_00276890();
      goto LAB_002c0573;
    }
  }
  piVar3 = DAT_003c92d8;
  if (puVar1 == (undefined *)0x0) {
    *DAT_003c92d8 = *DAT_003c92d8 + 1;
  }
  else {
    LOCK();
    *DAT_003c92d8 = *DAT_003c92d8 + 1;
    UNLOCK();
    piVar3 = DAT_003c92d8;
  }
  *param_1 = piVar3;
  if (puVar1 != (undefined *)0x0) {
    iVar2 = pthread_mutex_unlock(__mutex);
    if (iVar2 != 0) {
LAB_002c0573:
      puVar4 = (undefined8 *)FUN_00276bb0(8);
      *puVar4 = &PTR_FUN_003b84a8;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */
      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);
    }
  }
  return;
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
MOV qword ptr [RDI],0x0
CALL 0x002c0440
LEA RBP,[0x3c92d8]
LEA RDX,[0x3c92e0]
MOV RAX,qword ptr [RBP]
MOV qword ptr [RBX],RAX
CMP RAX,qword ptr [RDX]
JZ 0x002c0540
CALL 0x002bf340
MOV R12,qword ptr [0x003bdee8]
MOV R13,RAX
TEST R12,R12
JZ 0x002c0503
MOV RDI,RAX
CALL 0x0013e9b0
TEST EAX,EAX
JNZ 0x002c056e
MOV RAX,qword ptr [RBP]
TEST R12,R12
JZ 0x002c0538
ADD.LOCK dword ptr [RAX],0x1
MOV RAX,qword ptr [RBP]
MOV qword ptr [RBX],RAX
TEST R12,R12
JZ 0x002c0528
MOV RDI,R13
CALL 0x0013ea80
TEST EAX,EAX
JNZ 0x002c0573
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
ADD dword ptr [RAX],0x1
JMP 0x002c0514
CMP qword ptr [0x003bdee8],0x0
JZ 0x002c0560
ADD.LOCK dword ptr [RAX],0x1
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
ADD dword ptr [RAX],0x1
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
CALL 0x00276890
MOV EDI,0x8
CALL 0x00276bb0
LEA RDX,[0x3b8498]
LEA RSI,[0x3b8458]
MOV RDI,RAX
ADD RDX,0x10
MOV qword ptr [RAX],RDX
LEA RDX,[0x276810]
CALL 0x002758d0
(translation_unit "void FUN_002c04b0(undefined8 *param_1)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *param_1 = 0;\n                    /* try { // try from 002c04c4 to 002c0572 has its CatchHandler @ 002c05a1 */\n  FUN_002c0440();\n  piVar3 = DAT_003c92d8;\n  *param_1 = DAT_003c92d8;\n  if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_002bf340();\n  puVar1 = PTR___pthread_key_create_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }\n  piVar3 = DAT_003c92d8;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_002c04b0(undefined8 *param_1)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *param_1 = 0;\n                    /* try { // try from 002c04c4 to 002c0572 has its CatchHandler @ 002c05a1 */\n  FUN_002c0440();\n  piVar3 = DAT_003c92d8;\n  *param_1 = DAT_003c92d8;\n  if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_002bf340();\n  puVar1 = PTR___pthread_key_create_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }\n  piVar3 = DAT_003c92d8;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_002c04b0(undefined8 *param_1)" identifier (parameter_list "(undefined8 *param_1)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *param_1 = 0;\n                    /* try { // try from 002c04c4 to 002c0572 has its CatchHandler @ 002c05a1 */\n  FUN_002c0440();\n  piVar3 = DAT_003c92d8;\n  *param_1 = DAT_003c92d8;\n  if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_002bf340();\n  puVar1 = PTR___pthread_key_create_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }\n  piVar3 = DAT_003c92d8;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "pthread_mutex_t *__mutex;" type_identifier (pointer_declarator "*__mutex" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined8 *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_002c0440();" (call_expression "FUN_002c0440()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = DAT_003c92d8;" (assignment_expression "piVar3 = DAT_003c92d8" identifier = identifier) ;) (expression_statement "*param_1 = DAT_003c92d8;" (assignment_expression "*param_1 = DAT_003c92d8" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_003c92e0)" ( (binary_expression "piVar3 == DAT_003c92e0" identifier == identifier) )) (compound_statement "{\n    if (PTR___pthread_key_create_003bdee8 != (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_003bdee8 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }" if (parenthesized_expression "(PTR___pthread_key_create_003bdee8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003bdee8 != (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_002bf340();" (assignment_expression "__mutex = (pthread_mutex_t *)FUN_002bf340()" identifier = (cast_expression "(pthread_mutex_t *)FUN_002bf340()" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_002bf340()" identifier (argument_list "()" ( ))))) ;) (expression_statement "puVar1 = PTR___pthread_key_create_003bdee8;" (assignment_expression "puVar1 = PTR___pthread_key_create_003bdee8" identifier = identifier) ;) (if_statement "if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }" if (parenthesized_expression "(PTR___pthread_key_create_003bdee8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003bdee8 != (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_00276890();\n      goto LAB_002c0573;\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_00276890();\n      goto LAB_002c0573;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_00276890();\n      goto LAB_002c0573;\n    }" { (expression_statement "FUN_00276890();" (call_expression "FUN_00276890()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_002c0573;" goto statement_identifier ;) })) })) (expression_statement "piVar3 = DAT_003c92d8;" (assignment_expression "piVar3 = DAT_003c92d8" identifier = identifier) ;) (if_statement "if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\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_003c92d8 = *DAT_003c92d8 + 1;\n  }" { (expression_statement "*DAT_003c92d8 = *DAT_003c92d8 + 1;" (assignment_expression "*DAT_003c92d8 = *DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" * identifier) = (binary_expression "*DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" * identifier) + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }" else (compound_statement "{\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*DAT_003c92d8 = *DAT_003c92d8 + 1;" (assignment_expression "*DAT_003c92d8 = *DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" * identifier) = (binary_expression "*DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = DAT_003c92d8;" (assignment_expression "piVar3 = DAT_003c92d8" 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_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\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_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\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_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }" { (labeled_statement "LAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);" statement_identifier : (expression_statement "puVar4 = (undefined8 *)FUN_00276bb0(8);" (assignment_expression "puVar4 = (undefined8 *)FUN_00276bb0(8)" identifier = (cast_expression "(undefined8 *)FUN_00276bb0(8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00276bb0(8)" identifier (argument_list "(8)" ( number_literal ))))) ;)) (expression_statement "*puVar4 = &PTR_FUN_003b84a8;" (assignment_expression "*puVar4 = &PTR_FUN_003b84a8" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR_FUN_003b84a8" & identifier)) ;) comment comment (expression_statement "FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);" (call_expression "FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810)" identifier (argument_list "(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810)" ( identifier , (pointer_expression "&PTR_PTR_FUN_003b8458" & identifier) , identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* std::locale::locale() */\n\nvoid __thiscall std::locale::locale(locale *this)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *(undefined8 *)this = 0;\n                    /* try { // try from 002c04c4 to 002c0572 has its CatchHandler @ 002c05a1 */\n  _S_initialize();\n  piVar3 = _S_global;\n  *(int **)this = _S_global;\n  if (piVar3 == _S_classic) {\n    if (PTR___pthread_key_create_003bdee8 != (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_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_002c0573;\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_002c0573:\n      puVar4 = (undefined8 *)__cxa_allocate_exception(8);\n      *puVar4 = &PTR____concurrence_unlock_error_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      __cxa_throw(puVar4,&__concurrence_unlock_error::typeinfo,\n                  __concurrence_unlock_error::~__concurrence_unlock_error);\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void __thiscall std::locale::locale(locale *this)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *(undefined8 *)this = 0;\n                    /* try { // try from 002c04c4 to 002c0572 has its CatchHandler @ 002c05a1 */\n  _S_initialize();\n  piVar3 = _S_global;\n  *(int **)this = _S_global;\n  if (piVar3 == _S_classic) {\n    if (PTR___pthread_key_create_003bdee8 != (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_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_002c0573;\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_002c0573:\n      puVar4 = (undefined8 *)__cxa_allocate_exception(8);\n      *puVar4 = &PTR____concurrence_unlock_error_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      __cxa_throw(puVar4,&__concurrence_unlock_error::typeinfo,\n                  __concurrence_unlock_error::~__concurrence_unlock_error);\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  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *(undefined8 *)this = 0;\n                    /* try { // try from 002c04c4 to 002c0572 has its CatchHandler @ 002c05a1 */\n  _S_initialize();\n  piVar3 = _S_global;\n  *(int **)this = _S_global;\n  if (piVar3 == _S_classic) {\n    if (PTR___pthread_key_create_003bdee8 != (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_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_002c0573;\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_002c0573:\n      puVar4 = (undefined8 *)__cxa_allocate_exception(8);\n      *puVar4 = &PTR____concurrence_unlock_error_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      __cxa_throw(puVar4,&__concurrence_unlock_error::typeinfo,\n                  __concurrence_unlock_error::~__concurrence_unlock_error);\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "pthread_mutex_t *__mutex;" type_identifier (pointer_declarator "*__mutex" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined8 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "*(undefined8 *)this = 0;" (assignment_expression "*(undefined8 *)this = 0" (pointer_expression "*(undefined8 *)this" * (cast_expression "(undefined8 *)this" ( (type_descriptor "undefined8 *" 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_003bdee8 != (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_003bdee8 != (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_003bdee8 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }" if (parenthesized_expression "(PTR___pthread_key_create_003bdee8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003bdee8 != (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_003bdee8;" (assignment_expression "puVar1 = PTR___pthread_key_create_003bdee8" identifier = identifier) ;) (if_statement "if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      __throw_concurrence_lock_error();\n      goto LAB_002c0573;\n    }\n  }" if (parenthesized_expression "(PTR___pthread_key_create_003bdee8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003bdee8 != (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_002c0573;\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_002c0573;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      __throw_concurrence_lock_error();\n      goto LAB_002c0573;\n    }" { (expression_statement "__throw_concurrence_lock_error();" (call_expression "__throw_concurrence_lock_error()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_002c0573;" 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_002c0573:\n      puVar4 = (undefined8 *)__cxa_allocate_exception(8);\n      *puVar4 = &PTR____concurrence_unlock_error_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      __cxa_throw(puVar4,&__concurrence_unlock_error::typeinfo,\n                  __concurrence_unlock_error::~__concurrence_unlock_error);\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_002c0573:\n      puVar4 = (undefined8 *)__cxa_allocate_exception(8);\n      *puVar4 = &PTR____concurrence_unlock_error_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      __cxa_throw(puVar4,&__concurrence_unlock_error::typeinfo,\n                  __concurrence_unlock_error::~__concurrence_unlock_error);\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_002c0573:\n      puVar4 = (undefined8 *)__cxa_allocate_exception(8);\n      *puVar4 = &PTR____concurrence_unlock_error_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      __cxa_throw(puVar4,&__concurrence_unlock_error::typeinfo,\n                  __concurrence_unlock_error::~__concurrence_unlock_error);\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_002c0573:\n      puVar4 = (undefined8 *)__cxa_allocate_exception(8);\n      *puVar4 = &PTR____concurrence_unlock_error_003b84a8;\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */\n      __cxa_throw(puVar4,&__concurrence_unlock_error::typeinfo,\n                  __concurrence_unlock_error::~__concurrence_unlock_error);\n    }" { (labeled_statement "LAB_002c0573:\n      puVar4 = (undefined8 *)__cxa_allocate_exception(8);" statement_identifier : (expression_statement "puVar4 = (undefined8 *)__cxa_allocate_exception(8);" (assignment_expression "puVar4 = (undefined8 *)__cxa_allocate_exception(8)" identifier = (cast_expression "(undefined8 *)__cxa_allocate_exception(8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "__cxa_allocate_exception(8)" identifier (argument_list "(8)" ( number_literal ))))) ;)) (expression_statement "*puVar4 = &PTR____concurrence_unlock_error_003b84a8;" (assignment_expression "*puVar4 = &PTR____concurrence_unlock_error_003b84a8" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR____concurrence_unlock_error_003b84a8" & identifier)) ;) comment comment (expression_statement "__cxa_throw(puVar4,&__concurrence_unlock_error::typeinfo,\n                  __concurrence_unlock_error::~__concurrence_unlock_error);" (call_expression "__cxa_throw(puVar4,&__concurrence_unlock_error::typeinfo,\n                  __concurrence_unlock_error::~__concurrence_unlock_error)" identifier (argument_list "(puVar4,&__concurrence_unlock_error::typeinfo,\n                  __concurrence_unlock_error::~__concurrence_unlock_error)" ( identifier , (pointer_expression "&__concurrence_unlock_error" & identifier) (ERROR "::typeinfo" : : identifier) , (ERROR "__concurrence_unlock_error::" identifier : :) (unary_expression "~__concurrence_unlock_error" ~ identifier) ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_002c04b0(undefined8 *param_1)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *param_1 = 0;\n                    \n  FUN_002c0440();\n  piVar3 = DAT_003c92d8;\n  *param_1 = DAT_003c92d8;\n  if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_002bf340();\n  puVar1 = PTR___pthread_key_create_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }\n  piVar3 = DAT_003c92d8;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_002c04b0(undefined8 *param_1)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *param_1 = 0;\n                    \n  FUN_002c0440();\n  piVar3 = DAT_003c92d8;\n  *param_1 = DAT_003c92d8;\n  if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_002bf340();\n  puVar1 = PTR___pthread_key_create_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }\n  piVar3 = DAT_003c92d8;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_002c04b0(undefined8 *param_1)" identifier (parameter_list "(undefined8 *param_1)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *param_1 = 0;\n                    \n  FUN_002c0440();\n  piVar3 = DAT_003c92d8;\n  *param_1 = DAT_003c92d8;\n  if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_002bf340();\n  puVar1 = PTR___pthread_key_create_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }\n  piVar3 = DAT_003c92d8;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "pthread_mutex_t *__mutex;" type_identifier (pointer_declarator "*__mutex" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined8 *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_002c0440();" (call_expression "FUN_002c0440()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = DAT_003c92d8;" (assignment_expression "piVar3 = DAT_003c92d8" identifier = identifier) ;) (expression_statement "*param_1 = DAT_003c92d8;" (assignment_expression "*param_1 = DAT_003c92d8" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_003c92e0)" ( (binary_expression "piVar3 == DAT_003c92e0" identifier == identifier) )) (compound_statement "{\n    if (PTR___pthread_key_create_003bdee8 != (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_003bdee8 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }" if (parenthesized_expression "(PTR___pthread_key_create_003bdee8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003bdee8 != (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_002bf340();" (assignment_expression "__mutex = (pthread_mutex_t *)FUN_002bf340()" identifier = (cast_expression "(pthread_mutex_t *)FUN_002bf340()" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_002bf340()" identifier (argument_list "()" ( ))))) ;) (expression_statement "puVar1 = PTR___pthread_key_create_003bdee8;" (assignment_expression "puVar1 = PTR___pthread_key_create_003bdee8" identifier = identifier) ;) (if_statement "if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }" if (parenthesized_expression "(PTR___pthread_key_create_003bdee8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003bdee8 != (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_00276890();\n      goto LAB_002c0573;\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_00276890();\n      goto LAB_002c0573;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_00276890();\n      goto LAB_002c0573;\n    }" { (expression_statement "FUN_00276890();" (call_expression "FUN_00276890()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_002c0573;" goto statement_identifier ;) })) })) (expression_statement "piVar3 = DAT_003c92d8;" (assignment_expression "piVar3 = DAT_003c92d8" identifier = identifier) ;) (if_statement "if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\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_003c92d8 = *DAT_003c92d8 + 1;\n  }" { (expression_statement "*DAT_003c92d8 = *DAT_003c92d8 + 1;" (assignment_expression "*DAT_003c92d8 = *DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" * identifier) = (binary_expression "*DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" * identifier) + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }" else (compound_statement "{\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*DAT_003c92d8 = *DAT_003c92d8 + 1;" (assignment_expression "*DAT_003c92d8 = *DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" * identifier) = (binary_expression "*DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = DAT_003c92d8;" (assignment_expression "piVar3 = DAT_003c92d8" 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_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\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_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\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_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }" { (labeled_statement "LAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);" statement_identifier : (expression_statement "puVar4 = (undefined8 *)FUN_00276bb0(8);" (assignment_expression "puVar4 = (undefined8 *)FUN_00276bb0(8)" identifier = (cast_expression "(undefined8 *)FUN_00276bb0(8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00276bb0(8)" identifier (argument_list "(8)" ( number_literal ))))) ;)) (expression_statement "*puVar4 = &PTR_FUN_003b84a8;" (assignment_expression "*puVar4 = &PTR_FUN_003b84a8" (pointer_expression "*puVar4" * identifier) = (pointer_expression "&PTR_FUN_003b84a8" & identifier)) ;) (expression_statement "FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);" (call_expression "FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810)" identifier (argument_list "(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810)" ( identifier , (pointer_expression "&PTR_PTR_FUN_003b8458" & 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 IDENT ;) (declaration TYPE (pointer_declarator * 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 , (pointer_expression & IDENT) , IDENT ))) ;) })) })) (return_statement return ;) })))
(function_definition "void FUN_002c04b0(undefined8 *param_1)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *param_1 = 0;\n                    \n  FUN_002c0440();\n  piVar3 = DAT_003c92d8;\n  *param_1 = DAT_003c92d8;\n  if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_002bf340();\n  puVar1 = PTR___pthread_key_create_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }\n  piVar3 = DAT_003c92d8;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_002c04b0(undefined8 *param_1)" (identifier "FUN_002c04b0") (parameter_list "(undefined8 *param_1)" (( "(") (parameter_declaration "undefined8 *param_1" (type_identifier "undefined8") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  pthread_mutex_t *__mutex;\n  int *piVar3;\n  undefined8 *puVar4;\n  \n  *param_1 = 0;\n                    \n  FUN_002c0440();\n  piVar3 = DAT_003c92d8;\n  *param_1 = DAT_003c92d8;\n  if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_002bf340();\n  puVar1 = PTR___pthread_key_create_003bdee8;\n  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }\n  piVar3 = DAT_003c92d8;\n  if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }\n  *param_1 = piVar3;\n  if (puVar1 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_unlock(__mutex);\n    if (iVar2 != 0) {\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }\n  }\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "pthread_mutex_t *__mutex;" (type_identifier "pthread_mutex_t") (pointer_declarator "*__mutex" (* "*") (identifier "__mutex")) (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "undefined8 *puVar4;" (type_identifier "undefined8") (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_002c0440();" (call_expression "FUN_002c0440()" (identifier "FUN_002c0440") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar3 = DAT_003c92d8;" (assignment_expression "piVar3 = DAT_003c92d8" (identifier "piVar3") (= "=") (identifier "DAT_003c92d8")) (; ";")) (expression_statement "*param_1 = DAT_003c92d8;" (assignment_expression "*param_1 = DAT_003c92d8" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "DAT_003c92d8")) (; ";")) (if_statement "if (piVar3 == DAT_003c92e0) {\n    if (PTR___pthread_key_create_003bdee8 != (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_003c92e0)" (( "(") (binary_expression "piVar3 == DAT_003c92e0" (identifier "piVar3") (== "==") (identifier "DAT_003c92e0")) () ")")) (compound_statement "{\n    if (PTR___pthread_key_create_003bdee8 != (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_003bdee8 != (undefined *)0x0) {\n      LOCK();\n      *piVar3 = *piVar3 + 1;\n      UNLOCK();\n      return;\n    }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_003bdee8 != (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_003bdee8 != (undefined *)0x0" (identifier "PTR___pthread_key_create_003bdee8") (!= "!=") (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_002bf340();" (assignment_expression "__mutex = (pthread_mutex_t *)FUN_002bf340()" (identifier "__mutex") (= "=") (cast_expression "(pthread_mutex_t *)FUN_002bf340()" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_002bf340()" (identifier "FUN_002bf340") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "puVar1 = PTR___pthread_key_create_003bdee8;" (assignment_expression "puVar1 = PTR___pthread_key_create_003bdee8" (identifier "puVar1") (= "=") (identifier "PTR___pthread_key_create_003bdee8")) (; ";")) (if_statement "if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {\n    iVar2 = pthread_mutex_lock(__mutex);\n    if (iVar2 != 0) {\n      FUN_00276890();\n      goto LAB_002c0573;\n    }\n  }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_003bdee8 != (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_003bdee8 != (undefined *)0x0" (identifier "PTR___pthread_key_create_003bdee8") (!= "!=") (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_00276890();\n      goto LAB_002c0573;\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_00276890();\n      goto LAB_002c0573;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00276890();\n      goto LAB_002c0573;\n    }" ({ "{") (expression_statement "FUN_00276890();" (call_expression "FUN_00276890()" (identifier "FUN_00276890") (argument_list "()" (( "(") () ")"))) (; ";")) (goto_statement "goto LAB_002c0573;" (goto "goto") (statement_identifier "LAB_002c0573") (; ";")) (} "}"))) (} "}"))) (expression_statement "piVar3 = DAT_003c92d8;" (assignment_expression "piVar3 = DAT_003c92d8" (identifier "piVar3") (= "=") (identifier "DAT_003c92d8")) (; ";")) (if_statement "if (puVar1 == (undefined *)0x0) {\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n  }\n  else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\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_003c92d8 = *DAT_003c92d8 + 1;\n  }" ({ "{") (expression_statement "*DAT_003c92d8 = *DAT_003c92d8 + 1;" (assignment_expression "*DAT_003c92d8 = *DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" (* "*") (identifier "DAT_003c92d8")) (= "=") (binary_expression "*DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" (* "*") (identifier "DAT_003c92d8")) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }" (else "else") (compound_statement "{\n    LOCK();\n    *DAT_003c92d8 = *DAT_003c92d8 + 1;\n    UNLOCK();\n    piVar3 = DAT_003c92d8;\n  }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*DAT_003c92d8 = *DAT_003c92d8 + 1;" (assignment_expression "*DAT_003c92d8 = *DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" (* "*") (identifier "DAT_003c92d8")) (= "=") (binary_expression "*DAT_003c92d8 + 1" (pointer_expression "*DAT_003c92d8" (* "*") (identifier "DAT_003c92d8")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar3 = DAT_003c92d8;" (assignment_expression "piVar3 = DAT_003c92d8" (identifier "piVar3") (= "=") (identifier "DAT_003c92d8")) (; ";")) (} "}")))) (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_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\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_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\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_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);\n      *puVar4 = &PTR_FUN_003b84a8;\n                    \n                    \n      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);\n    }" ({ "{") (labeled_statement "LAB_002c0573:\n      puVar4 = (undefined8 *)FUN_00276bb0(8);" (statement_identifier "LAB_002c0573") (: ":") (expression_statement "puVar4 = (undefined8 *)FUN_00276bb0(8);" (assignment_expression "puVar4 = (undefined8 *)FUN_00276bb0(8)" (identifier "puVar4") (= "=") (cast_expression "(undefined8 *)FUN_00276bb0(8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00276bb0(8)" (identifier "FUN_00276bb0") (argument_list "(8)" (( "(") (number_literal "8") () ")"))))) (; ";"))) (expression_statement "*puVar4 = &PTR_FUN_003b84a8;" (assignment_expression "*puVar4 = &PTR_FUN_003b84a8" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (pointer_expression "&PTR_FUN_003b84a8" (& "&") (identifier "PTR_FUN_003b84a8"))) (; ";")) (expression_statement "FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);" (call_expression "FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810)" (identifier "FUN_002758d0") (argument_list "(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810)" (( "(") (identifier "puVar4") (, ",") (pointer_expression "&PTR_PTR_FUN_003b8458" (& "&") (identifier "PTR_PTR_FUN_003b8458")) (, ",") (identifier "FUN_00276810") () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* std::locale::locale() */

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

{
  type_1 *var_11;
  int var_9;
  type_2 *__mutex;
  int *var_2;
  type_3 *puVar4;
  
  *(type_3 *)this = 0;
                    /* try { // try from 002c04c4 to 002c0572 has its CatchHandler @ 002c05a1 */
  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_002c0573;
    }
  }
  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_002c0573:
      puVar4 = (type_3 *)var_13(8);
      *puVar4 = &PTR____concurrence_unlock_error_003b84a8;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */
      var_14(puVar4,&__concurrence_unlock_error::typeinfo,
                  __concurrence_unlock_error::~__concurrence_unlock_error);
    }
  }
  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: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator 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) (pointer_expression argument: (identifier)) (identifier)))))))) (return_statement))))

void MASKED(undefined8 *param_1)

{
  undefined *puVar1;
  int iVar2;
  pthread_mutex_t *__mutex;
  int *piVar3;
  undefined8 *puVar4;
  
  *param_1 = 0;
                    /* try { // try from 002c04c4 to 002c0572 has its CatchHandler @ 002c05a1 */
  FUN_002c0440();
  piVar3 = DAT_003c92d8;
  *param_1 = DAT_003c92d8;
  if (piVar3 == DAT_003c92e0) {
    if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {
      LOCK();
      *piVar3 = *piVar3 + 1;
      UNLOCK();
      return;
    }
    *piVar3 = *piVar3 + 1;
    return;
  }
  __mutex = (pthread_mutex_t *)FUN_002bf340();
  puVar1 = PTR___pthread_key_create_003bdee8;
  if (PTR___pthread_key_create_003bdee8 != (undefined *)0x0) {
    iVar2 = pthread_mutex_lock(__mutex);
    if (iVar2 != 0) {
      FUN_00276890();
      goto LAB_002c0573;
    }
  }
  piVar3 = DAT_003c92d8;
  if (puVar1 == (undefined *)0x0) {
    *DAT_003c92d8 = *DAT_003c92d8 + 1;
  }
  else {
    LOCK();
    *DAT_003c92d8 = *DAT_003c92d8 + 1;
    UNLOCK();
    piVar3 = DAT_003c92d8;
  }
  *param_1 = piVar3;
  if (puVar1 != (undefined *)0x0) {
    iVar2 = pthread_mutex_unlock(__mutex);
    if (iVar2 != 0) {
LAB_002c0573:
      puVar4 = (undefined8 *)FUN_00276bb0(8);
      *puVar4 = &PTR_FUN_003b84a8;
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 002c059c to 002c05a0 has its CatchHandler @ 002c05a9 */
      FUN_002758d0(puVar4,&PTR_PTR_FUN_003b8458,FUN_00276810);
    }
  }
  return;
}

