
/* void std::__facet_shims::__messages_get<char>(std::integral_constant<bool, false>,
   std::locale::facet const*, std::__facet_shims::__any_string&, int, int, int, char const*,
   unsigned long) */

void std::__facet_shims::__messages_get<char>
               (long *param_1,string *param_2,undefined4 param_3,undefined4 param_4,
               undefined4 param_5,char *param_6,ulong param_7)

{
  int *piVar1;
  undefined8 uVar2;
  int iVar3;
  allocator local_4a [2];
  long local_48;
  long local_40 [2];
  
  std::string::string((string *)&local_48,param_6,param_7,local_4a);
                    /* try { // try from 00375056 to 00375058 has its CatchHandler @ 00375130 */
  (**(code **)(*param_1 + 0x18))
            ((string *)local_40,param_1,param_3,param_4,param_5,(string *)&local_48);
  if (*(code **)(param_2 + 0x20) != (code *)0x0) {
                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */
    (**(code **)(param_2 + 0x20))(param_2);
  }
  std::string::string(param_2,(string *)local_40);
  uVar2 = *(undefined8 *)(local_40[0] + -0x18);
  *(code **)(param_2 + 0x20) = (anonymous_namespace)::__destroy_string<char>;
  *(undefined8 *)(param_2 + 8) = uVar2;
  if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage) {
    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {
      iVar3 = *(int *)(local_40[0] + -8);
      *(int *)(local_40[0] + -8) = iVar3 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(local_40[0] + -8);
      iVar3 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar3 < 1) {
      std::string::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));
    }
  }
  if ((allocator *)(local_48 + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage) {
    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {
      iVar3 = *(int *)(local_48 + -8);
      *(int *)(local_48 + -8) = iVar3 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(local_48 + -8);
      iVar3 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar3 < 1) {
      std::string::_Rep::_M_destroy((allocator *)(local_48 + -0x18));
    }
  }
  return;
}



void FUN_00375000(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,
                 undefined4 param_5,undefined8 param_6,undefined8 param_7)

{
  int *piVar1;
  int iVar2;
  undefined8 uVar3;
  undefined1 local_4a;
  undefined1 local_49;
  long local_48;
  long local_40 [2];
  
  FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);
                    /* try { // try from 00375056 to 00375058 has its CatchHandler @ 00375130 */
  (**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);
  if (*(code **)(param_2 + 0x20) != (code *)0x0) {
                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */
    (**(code **)(param_2 + 0x20))(param_2);
  }
  FUN_0036cbb0(param_2,local_40);
  uVar3 = *(undefined8 *)(local_40[0] + -0x18);
  *(code **)(param_2 + 0x20) = FUN_00373770;
  *(undefined8 *)(param_2 + 8) = uVar3;
  if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {
    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {
      iVar2 = *(int *)(local_40[0] + -8);
      *(int *)(local_40[0] + -8) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(local_40[0] + -8);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);
    }
  }
  if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {
    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {
      iVar2 = *(int *)(local_48 + -8);
      *(int *)(local_48 + -8) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(local_48 + -8);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);
    }
  }
  return;
}


PUSH R15
MOV R15D,ECX
PUSH R14
MOV R14D,EDX
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
MOV RBX,RSI
MOV RSI,R9
SUB RSP,0x38
LEA R13,[RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x70]
LEA RCX,[RSP + 0x1e]
MOV dword ptr [RSP + 0xc],R8D
MOV RDI,R13
LEA RBP,[RSP + 0x28]
CALL 0x0036d0c0
MOV RAX,qword ptr [R12]
MOV R9,R13
MOV ECX,R15D
MOV R8D,dword ptr [RSP + 0xc]
MOV EDX,R14D
MOV RSI,R12
MOV RDI,RBP
CALL qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x00375067
MOV RDI,RBX
CALL RAX
MOV RSI,RBP
MOV RDI,RBX
CALL 0x0036cbb0
MOV RAX,qword ptr [RSP + 0x28]
LEA RSI,[0x373770]
MOV RDX,qword ptr [RAX + -0x18]
MOV qword ptr [RBX + 0x20],RSI
LEA RDI,[RAX + -0x18]
MOV qword ptr [RBX + 0x8],RDX
LEA RBX,[0x4c67c0]
CMP RDI,RBX
JNZ 0x003750c0
MOV RAX,qword ptr [RSP + 0x20]
LEA RDI,[RAX + -0x18]
CMP RDI,RBX
JNZ 0x003750e8
ADD RSP,0x38
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
CMP qword ptr [0x004b9ee8],0x0
JZ 0x00375120
MOV EDX,0xffffffff
XADD.LOCK dword ptr [RAX + -0x8],EDX
TEST EDX,EDX
JG 0x0037509a
LEA RSI,[RSP + 0x1f]
CALL 0x0036b820
JMP 0x0037509a
CMP qword ptr [0x004b9ee8],0x0
JZ 0x00375110
MOV EDX,0xffffffff
XADD.LOCK dword ptr [RAX + -0x8],EDX
TEST EDX,EDX
JG 0x003750a8
MOV RSI,RBP
CALL 0x0036b820
JMP 0x003750a8
MOV EDX,dword ptr [RAX + -0x8]
LEA ECX,[RDX + -0x1]
MOV dword ptr [RAX + -0x8],ECX
JMP 0x003750fc
MOV EDX,dword ptr [RAX + -0x8]
LEA ECX,[RDX + -0x1]
MOV dword ptr [RAX + -0x8],ECX
JMP 0x003750d4
(translation_unit "void FUN_00375000(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 uVar3;\n  undefined1 local_4a;\n  undefined1 local_49;\n  long local_48;\n  long local_40 [2];\n  \n  FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);\n                    /* try { // try from 00375056 to 00375058 has its CatchHandler @ 00375130 */\n  (**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */\n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  FUN_0036cbb0(param_2,local_40);\n  uVar3 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = FUN_00373770;\n  *(undefined8 *)(param_2 + 8) = uVar3;\n  if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }\n  if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_00375000(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 uVar3;\n  undefined1 local_4a;\n  undefined1 local_49;\n  long local_48;\n  long local_40 [2];\n  \n  FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);\n                    /* try { // try from 00375056 to 00375058 has its CatchHandler @ 00375130 */\n  (**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */\n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  FUN_0036cbb0(param_2,local_40);\n  uVar3 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = FUN_00373770;\n  *(undefined8 *)(param_2 + 8) = uVar3;\n  if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }\n  if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00375000(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)" identifier (parameter_list "(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined8 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined8 uVar3;\n  undefined1 local_4a;\n  undefined1 local_49;\n  long local_48;\n  long local_40 [2];\n  \n  FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);\n                    /* try { // try from 00375056 to 00375058 has its CatchHandler @ 00375130 */\n  (**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */\n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  FUN_0036cbb0(param_2,local_40);\n  uVar3 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = FUN_00373770;\n  *(undefined8 *)(param_2 + 8) = uVar3;\n  if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }\n  if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "undefined1 local_4a;" type_identifier identifier ;) (declaration "undefined1 local_49;" type_identifier identifier ;) (declaration "long local_48;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_40 [2];" (sized_type_specifier "long" long) (array_declarator "local_40 [2]" identifier [ number_literal ]) ;) (expression_statement "FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);" (call_expression "FUN_0036d0c0(&local_48,param_6,param_7,&local_4a)" identifier (argument_list "(&local_48,param_6,param_7,&local_4a)" ( (pointer_expression "&local_48" & identifier) , identifier , identifier , (pointer_expression "&local_4a" & identifier) ))) ;) comment (expression_statement "(**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);" (call_expression "(**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48)" (parenthesized_expression "(**(code **)(*param_1 + 0x18))" ( (pointer_expression "**(code **)(*param_1 + 0x18)" * (pointer_expression "*(code **)(*param_1 + 0x18)" * (cast_expression "(code **)(*param_1 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(local_40,param_1,param_3,param_4,param_5,&local_48)" ( identifier , identifier , identifier , identifier , identifier , (pointer_expression "&local_48" & identifier) ))) ;) (if_statement "if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */\n    (**(code **)(param_2 + 0x20))(param_2);\n  }" if (parenthesized_expression "(*(code **)(param_2 + 0x20) != (code *)0x0)" ( (binary_expression "*(code **)(param_2 + 0x20) != (code *)0x0" (pointer_expression "*(code **)(param_2 + 0x20)" * (cast_expression "(code **)(param_2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */\n    (**(code **)(param_2 + 0x20))(param_2);\n  }" { comment (expression_statement "(**(code **)(param_2 + 0x20))(param_2);" (call_expression "(**(code **)(param_2 + 0x20))(param_2)" (parenthesized_expression "(**(code **)(param_2 + 0x20))" ( (pointer_expression "**(code **)(param_2 + 0x20)" * (pointer_expression "*(code **)(param_2 + 0x20)" * (cast_expression "(code **)(param_2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) ))))) )) (argument_list "(param_2)" ( identifier ))) ;) })) (expression_statement "FUN_0036cbb0(param_2,local_40);" (call_expression "FUN_0036cbb0(param_2,local_40)" identifier (argument_list "(param_2,local_40)" ( identifier , identifier ))) ;) (expression_statement "uVar3 = *(undefined8 *)(local_40[0] + -0x18);" (assignment_expression "uVar3 = *(undefined8 *)(local_40[0] + -0x18)" identifier = (pointer_expression "*(undefined8 *)(local_40[0] + -0x18)" * (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(code **)(param_2 + 0x20) = FUN_00373770;" (assignment_expression "*(code **)(param_2 + 0x20) = FUN_00373770" (pointer_expression "*(code **)(param_2 + 0x20)" * (cast_expression "(code **)(param_2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(param_2 + 8) = uVar3;" (assignment_expression "*(undefined8 *)(param_2 + 8) = uVar3" (pointer_expression "*(undefined8 *)(param_2 + 8)" * (cast_expression "(undefined8 *)(param_2 + 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }" if (parenthesized_expression "((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0)" ( (binary_expression "(undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0" (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))) != (pointer_expression "&DAT_004c67c0" & identifier)) )) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }" { (if_statement "if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_004b9ee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }" { (expression_statement "iVar2 = *(int *)(local_40[0] + -8);" (assignment_expression "iVar2 = *(int *)(local_40[0] + -8)" identifier = (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(int *)(local_40[0] + -8) = iVar2 + -1;" (assignment_expression "*(int *)(local_40[0] + -8) = iVar2 + -1" (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_40[0] + -8);" (assignment_expression "piVar1 = (int *)(local_40[0] + -8)" identifier = (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) ;) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }" { (expression_statement "thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);" (call_expression "thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49)" identifier (argument_list "((undefined8 *)(local_40[0] + -0x18),&local_49)" ( (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))) , (pointer_expression "&local_49" & identifier) ))) ;) })) })) (if_statement "if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }" if (parenthesized_expression "((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0)" ( (binary_expression "(undefined8 *)(local_48 + -0x18) != &DAT_004c67c0" (cast_expression "(undefined8 *)(local_48 + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -0x18)" ( (binary_expression "local_48 + -0x18" identifier + number_literal) ))) != (pointer_expression "&DAT_004c67c0" & identifier)) )) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }" { (if_statement "if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_004b9ee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }" { (expression_statement "iVar2 = *(int *)(local_48 + -8);" (assignment_expression "iVar2 = *(int *)(local_48 + -8)" identifier = (pointer_expression "*(int *)(local_48 + -8)" * (cast_expression "(int *)(local_48 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -8)" ( (binary_expression "local_48 + -8" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(local_48 + -8) = iVar2 + -1;" (assignment_expression "*(int *)(local_48 + -8) = iVar2 + -1" (pointer_expression "*(int *)(local_48 + -8)" * (cast_expression "(int *)(local_48 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -8)" ( (binary_expression "local_48 + -8" identifier + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_48 + -8);" (assignment_expression "piVar1 = (int *)(local_48 + -8)" identifier = (cast_expression "(int *)(local_48 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -8)" ( (binary_expression "local_48 + -8" identifier + number_literal) )))) ;) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }" { (expression_statement "thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);" (call_expression "thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40)" identifier (argument_list "((undefined8 *)(local_48 + -0x18),local_40)" ( (cast_expression "(undefined8 *)(local_48 + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -0x18)" ( (binary_expression "local_48 + -0x18" identifier + number_literal) ))) , identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* void std::__facet_shims::__messages_get<char>(std::integral_constant<bool, false>,\n   std::locale::facet const*, std::__facet_shims::__any_string&, int, int, int, char const*,\n   unsigned long) */\n\nvoid std::__facet_shims::__messages_get<char>\n               (long *param_1,string *param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,char *param_6,ulong param_7)\n\n{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  allocator local_4a [2];\n  long local_48;\n  long local_40 [2];\n  \n  std::string::string((string *)&local_48,param_6,param_7,local_4a);\n                    /* try { // try from 00375056 to 00375058 has its CatchHandler @ 00375130 */\n  (**(code **)(*param_1 + 0x18))\n            ((string *)local_40,param_1,param_3,param_4,param_5,(string *)&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */\n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  std::string::string(param_2,(string *)local_40);\n  uVar2 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = (anonymous_namespace)::__destroy_string<char>;\n  *(undefined8 *)(param_2 + 8) = uVar2;\n  if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n    }\n  }\n  if ((allocator *)(local_48 + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_48 + -0x18));\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void std::__facet_shims::__messages_get<char>\n               (long *param_1,string *param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,char *param_6,ulong param_7)\n\n{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  allocator local_4a [2];\n  long local_48;\n  long local_40 [2];\n  \n  std::string::string((string *)&local_48,param_6,param_7,local_4a);\n                    /* try { // try from 00375056 to 00375058 has its CatchHandler @ 00375130 */\n  (**(code **)(*param_1 + 0x18))\n            ((string *)local_40,param_1,param_3,param_4,param_5,(string *)&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */\n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  std::string::string(param_2,(string *)local_40);\n  uVar2 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = (anonymous_namespace)::__destroy_string<char>;\n  *(undefined8 *)(param_2 + 8) = uVar2;\n  if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n    }\n  }\n  if ((allocator *)(local_48 + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_48 + -0x18));\n    }\n  }\n  return;\n}" primitive_type (ERROR "std::__facet_shims::" identifier : : identifier : :) (function_declarator "__messages_get<char>\n               (long *param_1,string *param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,char *param_6,ulong param_7)" identifier (ERROR "<char>" < primitive_type >) (parameter_list "(long *param_1,string *param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,char *param_6,ulong param_7)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "string *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "char *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "ulong param_7" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  allocator local_4a [2];\n  long local_48;\n  long local_40 [2];\n  \n  std::string::string((string *)&local_48,param_6,param_7,local_4a);\n                    /* try { // try from 00375056 to 00375058 has its CatchHandler @ 00375130 */\n  (**(code **)(*param_1 + 0x18))\n            ((string *)local_40,param_1,param_3,param_4,param_5,(string *)&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */\n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  std::string::string(param_2,(string *)local_40);\n  uVar2 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = (anonymous_namespace)::__destroy_string<char>;\n  *(undefined8 *)(param_2 + 8) = uVar2;\n  if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n    }\n  }\n  if ((allocator *)(local_48 + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_48 + -0x18));\n    }\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "allocator local_4a [2];" type_identifier (array_declarator "local_4a [2]" identifier [ number_literal ]) ;) (declaration "long local_48;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_40 [2];" (sized_type_specifier "long" long) (array_declarator "local_40 [2]" identifier [ number_literal ]) ;) (labeled_statement "std::string::string((string *)&local_48,param_6,param_7,local_4a);" statement_identifier : (ERROR ":" :) (labeled_statement "string::string((string *)&local_48,param_6,param_7,local_4a);" statement_identifier : (ERROR ":" :) (expression_statement "string((string *)&local_48,param_6,param_7,local_4a);" (call_expression "string((string *)&local_48,param_6,param_7,local_4a)" identifier (argument_list "((string *)&local_48,param_6,param_7,local_4a)" ( (cast_expression "(string *)&local_48" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&local_48" & identifier)) , identifier , identifier , identifier ))) ;))) comment (expression_statement "(**(code **)(*param_1 + 0x18))\n            ((string *)local_40,param_1,param_3,param_4,param_5,(string *)&local_48);" (call_expression "(**(code **)(*param_1 + 0x18))\n            ((string *)local_40,param_1,param_3,param_4,param_5,(string *)&local_48)" (parenthesized_expression "(**(code **)(*param_1 + 0x18))" ( (pointer_expression "**(code **)(*param_1 + 0x18)" * (pointer_expression "*(code **)(*param_1 + 0x18)" * (cast_expression "(code **)(*param_1 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "((string *)local_40,param_1,param_3,param_4,param_5,(string *)&local_48)" ( (cast_expression "(string *)local_40" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier , identifier , identifier , (cast_expression "(string *)&local_48" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&local_48" & identifier)) ))) ;) (if_statement "if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */\n    (**(code **)(param_2 + 0x20))(param_2);\n  }" if (parenthesized_expression "(*(code **)(param_2 + 0x20) != (code *)0x0)" ( (binary_expression "*(code **)(param_2 + 0x20) != (code *)0x0" (pointer_expression "*(code **)(param_2 + 0x20)" * (cast_expression "(code **)(param_2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */\n    (**(code **)(param_2 + 0x20))(param_2);\n  }" { comment (expression_statement "(**(code **)(param_2 + 0x20))(param_2);" (call_expression "(**(code **)(param_2 + 0x20))(param_2)" (parenthesized_expression "(**(code **)(param_2 + 0x20))" ( (pointer_expression "**(code **)(param_2 + 0x20)" * (pointer_expression "*(code **)(param_2 + 0x20)" * (cast_expression "(code **)(param_2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) ))))) )) (argument_list "(param_2)" ( identifier ))) ;) })) (labeled_statement "std::string::string(param_2,(string *)local_40);" statement_identifier : (ERROR ":" :) (labeled_statement "string::string(param_2,(string *)local_40);" statement_identifier : (ERROR ":" :) (expression_statement "string(param_2,(string *)local_40);" (call_expression "string(param_2,(string *)local_40)" identifier (argument_list "(param_2,(string *)local_40)" ( identifier , (cast_expression "(string *)local_40" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;))) (expression_statement "uVar2 = *(undefined8 *)(local_40[0] + -0x18);" (assignment_expression "uVar2 = *(undefined8 *)(local_40[0] + -0x18)" identifier = (pointer_expression "*(undefined8 *)(local_40[0] + -0x18)" * (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(code **)(param_2 + 0x20) = (anonymous_namespace)::__destroy_string<char>;\n  *(undefined8 *)(param_2 + 8) = uVar2;" (binary_expression "*(code **)(param_2 + 0x20) = (anonymous_namespace)::__destroy_string<char>;\n  *(undefined8 *)(param_2 + 8) = uVar2" (binary_expression "*(code **)(param_2 + 0x20) = (anonymous_namespace)::__destroy_string<char" (assignment_expression "*(code **)(param_2 + 0x20) = (anonymous_namespace)" (pointer_expression "*(code **)(param_2 + 0x20)" * (cast_expression "(code **)(param_2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) )))) = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) (ERROR "::__destroy_string" : : identifier) < identifier) > (ERROR ";" ;) (assignment_expression "*(undefined8 *)(param_2 + 8) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 8)" * (cast_expression "(undefined8 *)(param_2 + 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier)) ;) (if_statement "if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n    }\n  }" if (parenthesized_expression "((allocator *)(local_40[0] + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage)" ( (binary_expression "(allocator *)(local_40[0] + -0x18) != (allocator *)&std" (cast_expression "(allocator *)(local_40[0] + -0x18)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))) != (cast_expression "(allocator *)&std" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&std" & identifier))) (ERROR "::string::_Rep::_S_empty_rep_storage" : : identifier : : identifier : : identifier) )) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n    }\n  }" { (if_statement "if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_004b9ee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar3 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar3 + -1;\n    }" { (expression_statement "iVar3 = *(int *)(local_40[0] + -8);" (assignment_expression "iVar3 = *(int *)(local_40[0] + -8)" identifier = (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(int *)(local_40[0] + -8) = iVar3 + -1;" (assignment_expression "*(int *)(local_40[0] + -8) = iVar3 + -1" (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_40[0] + -8);" (assignment_expression "piVar1 = (int *)(local_40[0] + -8)" identifier = (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) ;) (expression_statement "iVar3 = *piVar1;" (assignment_expression "iVar3 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n    }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n      std::string::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n    }" { (labeled_statement "std::string::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));" statement_identifier : (ERROR ":" :) (labeled_statement "string::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));" statement_identifier : (ERROR ":" :) (labeled_statement "_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));" statement_identifier : (ERROR ":" :) (expression_statement "_M_destroy((allocator *)(local_40[0] + -0x18));" (call_expression "_M_destroy((allocator *)(local_40[0] + -0x18))" identifier (argument_list "((allocator *)(local_40[0] + -0x18))" ( (cast_expression "(allocator *)(local_40[0] + -0x18)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))) ))) ;)))) })) })) (if_statement "if ((allocator *)(local_48 + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_48 + -0x18));\n    }\n  }" if (parenthesized_expression "((allocator *)(local_48 + -0x18) != (allocator *)&std::string::_Rep::_S_empty_rep_storage)" ( (binary_expression "(allocator *)(local_48 + -0x18) != (allocator *)&std" (cast_expression "(allocator *)(local_48 + -0x18)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -0x18)" ( (binary_expression "local_48 + -0x18" identifier + number_literal) ))) != (cast_expression "(allocator *)&std" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&std" & identifier))) (ERROR "::string::_Rep::_S_empty_rep_storage" : : identifier : : identifier : : identifier) )) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_48 + -0x18));\n    }\n  }" { (if_statement "if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar3 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar3 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_004b9ee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar3 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar3 + -1;\n    }" { (expression_statement "iVar3 = *(int *)(local_48 + -8);" (assignment_expression "iVar3 = *(int *)(local_48 + -8)" identifier = (pointer_expression "*(int *)(local_48 + -8)" * (cast_expression "(int *)(local_48 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -8)" ( (binary_expression "local_48 + -8" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(local_48 + -8) = iVar3 + -1;" (assignment_expression "*(int *)(local_48 + -8) = iVar3 + -1" (pointer_expression "*(int *)(local_48 + -8)" * (cast_expression "(int *)(local_48 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -8)" ( (binary_expression "local_48 + -8" identifier + number_literal) )))) = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar3 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_48 + -8);" (assignment_expression "piVar1 = (int *)(local_48 + -8)" identifier = (cast_expression "(int *)(local_48 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -8)" ( (binary_expression "local_48 + -8" identifier + number_literal) )))) ;) (expression_statement "iVar3 = *piVar1;" (assignment_expression "iVar3 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar3 < 1) {\n      std::string::_Rep::_M_destroy((allocator *)(local_48 + -0x18));\n    }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n      std::string::_Rep::_M_destroy((allocator *)(local_48 + -0x18));\n    }" { (labeled_statement "std::string::_Rep::_M_destroy((allocator *)(local_48 + -0x18));" statement_identifier : (ERROR ":" :) (labeled_statement "string::_Rep::_M_destroy((allocator *)(local_48 + -0x18));" statement_identifier : (ERROR ":" :) (labeled_statement "_Rep::_M_destroy((allocator *)(local_48 + -0x18));" statement_identifier : (ERROR ":" :) (expression_statement "_M_destroy((allocator *)(local_48 + -0x18));" (call_expression "_M_destroy((allocator *)(local_48 + -0x18))" identifier (argument_list "((allocator *)(local_48 + -0x18))" ( (cast_expression "(allocator *)(local_48 + -0x18)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -0x18)" ( (binary_expression "local_48 + -0x18" identifier + number_literal) ))) ))) ;)))) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00375000(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 uVar3;\n  undefined1 local_4a;\n  undefined1 local_49;\n  long local_48;\n  long local_40 [2];\n  \n  FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);\n                    \n  (**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    \n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  FUN_0036cbb0(param_2,local_40);\n  uVar3 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = FUN_00373770;\n  *(undefined8 *)(param_2 + 8) = uVar3;\n  if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }\n  if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_00375000(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 uVar3;\n  undefined1 local_4a;\n  undefined1 local_49;\n  long local_48;\n  long local_40 [2];\n  \n  FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);\n                    \n  (**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    \n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  FUN_0036cbb0(param_2,local_40);\n  uVar3 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = FUN_00373770;\n  *(undefined8 *)(param_2 + 8) = uVar3;\n  if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }\n  if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00375000(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)" identifier (parameter_list "(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined8 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined8 uVar3;\n  undefined1 local_4a;\n  undefined1 local_49;\n  long local_48;\n  long local_40 [2];\n  \n  FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);\n                    \n  (**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    \n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  FUN_0036cbb0(param_2,local_40);\n  uVar3 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = FUN_00373770;\n  *(undefined8 *)(param_2 + 8) = uVar3;\n  if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }\n  if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "undefined1 local_4a;" type_identifier identifier ;) (declaration "undefined1 local_49;" type_identifier identifier ;) (declaration "long local_48;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_40 [2];" (sized_type_specifier "long" long) (array_declarator "local_40 [2]" identifier [ number_literal ]) ;) (expression_statement "FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);" (call_expression "FUN_0036d0c0(&local_48,param_6,param_7,&local_4a)" identifier (argument_list "(&local_48,param_6,param_7,&local_4a)" ( (pointer_expression "&local_48" & identifier) , identifier , identifier , (pointer_expression "&local_4a" & identifier) ))) ;) (expression_statement "(**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);" (call_expression "(**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48)" (parenthesized_expression "(**(code **)(*param_1 + 0x18))" ( (pointer_expression "**(code **)(*param_1 + 0x18)" * (pointer_expression "*(code **)(*param_1 + 0x18)" * (cast_expression "(code **)(*param_1 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(local_40,param_1,param_3,param_4,param_5,&local_48)" ( identifier , identifier , identifier , identifier , identifier , (pointer_expression "&local_48" & identifier) ))) ;) (if_statement "if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    \n    (**(code **)(param_2 + 0x20))(param_2);\n  }" if (parenthesized_expression "(*(code **)(param_2 + 0x20) != (code *)0x0)" ( (binary_expression "*(code **)(param_2 + 0x20) != (code *)0x0" (pointer_expression "*(code **)(param_2 + 0x20)" * (cast_expression "(code **)(param_2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    (**(code **)(param_2 + 0x20))(param_2);\n  }" { (expression_statement "(**(code **)(param_2 + 0x20))(param_2);" (call_expression "(**(code **)(param_2 + 0x20))(param_2)" (parenthesized_expression "(**(code **)(param_2 + 0x20))" ( (pointer_expression "**(code **)(param_2 + 0x20)" * (pointer_expression "*(code **)(param_2 + 0x20)" * (cast_expression "(code **)(param_2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) ))))) )) (argument_list "(param_2)" ( identifier ))) ;) })) (expression_statement "FUN_0036cbb0(param_2,local_40);" (call_expression "FUN_0036cbb0(param_2,local_40)" identifier (argument_list "(param_2,local_40)" ( identifier , identifier ))) ;) (expression_statement "uVar3 = *(undefined8 *)(local_40[0] + -0x18);" (assignment_expression "uVar3 = *(undefined8 *)(local_40[0] + -0x18)" identifier = (pointer_expression "*(undefined8 *)(local_40[0] + -0x18)" * (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(code **)(param_2 + 0x20) = FUN_00373770;" (assignment_expression "*(code **)(param_2 + 0x20) = FUN_00373770" (pointer_expression "*(code **)(param_2 + 0x20)" * (cast_expression "(code **)(param_2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(param_2 + 8) = uVar3;" (assignment_expression "*(undefined8 *)(param_2 + 8) = uVar3" (pointer_expression "*(undefined8 *)(param_2 + 8)" * (cast_expression "(undefined8 *)(param_2 + 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }" if (parenthesized_expression "((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0)" ( (binary_expression "(undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0" (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))) != (pointer_expression "&DAT_004c67c0" & identifier)) )) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }" { (if_statement "if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_004b9ee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }" { (expression_statement "iVar2 = *(int *)(local_40[0] + -8);" (assignment_expression "iVar2 = *(int *)(local_40[0] + -8)" identifier = (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(int *)(local_40[0] + -8) = iVar2 + -1;" (assignment_expression "*(int *)(local_40[0] + -8) = iVar2 + -1" (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_40[0] + -8);" (assignment_expression "piVar1 = (int *)(local_40[0] + -8)" identifier = (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) ;) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }" { (expression_statement "thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);" (call_expression "thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49)" identifier (argument_list "((undefined8 *)(local_40[0] + -0x18),&local_49)" ( (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))) , (pointer_expression "&local_49" & identifier) ))) ;) })) })) (if_statement "if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }" if (parenthesized_expression "((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0)" ( (binary_expression "(undefined8 *)(local_48 + -0x18) != &DAT_004c67c0" (cast_expression "(undefined8 *)(local_48 + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -0x18)" ( (binary_expression "local_48 + -0x18" identifier + number_literal) ))) != (pointer_expression "&DAT_004c67c0" & identifier)) )) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }" { (if_statement "if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_004b9ee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }" { (expression_statement "iVar2 = *(int *)(local_48 + -8);" (assignment_expression "iVar2 = *(int *)(local_48 + -8)" identifier = (pointer_expression "*(int *)(local_48 + -8)" * (cast_expression "(int *)(local_48 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -8)" ( (binary_expression "local_48 + -8" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(local_48 + -8) = iVar2 + -1;" (assignment_expression "*(int *)(local_48 + -8) = iVar2 + -1" (pointer_expression "*(int *)(local_48 + -8)" * (cast_expression "(int *)(local_48 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -8)" ( (binary_expression "local_48 + -8" identifier + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_48 + -8);" (assignment_expression "piVar1 = (int *)(local_48 + -8)" identifier = (cast_expression "(int *)(local_48 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -8)" ( (binary_expression "local_48 + -8" identifier + number_literal) )))) ;) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }" { (expression_statement "thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);" (call_expression "thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40)" identifier (argument_list "((undefined8 *)(local_48 + -0x18),local_40)" ( (cast_expression "(undefined8 *)(local_48 + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_48 + -0x18)" ( (binary_expression "local_48 + -0x18" identifier + number_literal) ))) , identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) (array_declarator IDENT [ LIT ]) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT , IDENT , (pointer_expression & IDENT) ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , (pointer_expression & IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) != (pointer_expression & IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) , (pointer_expression & IDENT) ))) ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) != (pointer_expression & IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) , IDENT ))) ;) })) })) (return_statement return ;) })))
(function_definition "void FUN_00375000(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 uVar3;\n  undefined1 local_4a;\n  undefined1 local_49;\n  long local_48;\n  long local_40 [2];\n  \n  FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);\n                    \n  (**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    \n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  FUN_0036cbb0(param_2,local_40);\n  uVar3 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = FUN_00373770;\n  *(undefined8 *)(param_2 + 8) = uVar3;\n  if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }\n  if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00375000(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)" (identifier "FUN_00375000") (parameter_list "(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,\n                 undefined4 param_5,undefined8 param_6,undefined8 param_7)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "undefined8 param_6" (type_identifier "undefined8") (identifier "param_6")) (, ",") (parameter_declaration "undefined8 param_7" (type_identifier "undefined8") (identifier "param_7")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined8 uVar3;\n  undefined1 local_4a;\n  undefined1 local_49;\n  long local_48;\n  long local_40 [2];\n  \n  FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);\n                    \n  (**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);\n  if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    \n    (**(code **)(param_2 + 0x20))(param_2);\n  }\n  FUN_0036cbb0(param_2,local_40);\n  uVar3 = *(undefined8 *)(local_40[0] + -0x18);\n  *(code **)(param_2 + 0x20) = FUN_00373770;\n  *(undefined8 *)(param_2 + 8) = uVar3;\n  if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }\n  if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (declaration "undefined1 local_4a;" (type_identifier "undefined1") (identifier "local_4a") (; ";")) (declaration "undefined1 local_49;" (type_identifier "undefined1") (identifier "local_49") (; ";")) (declaration "long local_48;" (sized_type_specifier "long" (long "long")) (identifier "local_48") (; ";")) (declaration "long local_40 [2];" (sized_type_specifier "long" (long "long")) (array_declarator "local_40 [2]" (identifier "local_40") ([ "[") (number_literal "2") (] "]")) (; ";")) (expression_statement "FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);" (call_expression "FUN_0036d0c0(&local_48,param_6,param_7,&local_4a)" (identifier "FUN_0036d0c0") (argument_list "(&local_48,param_6,param_7,&local_4a)" (( "(") (pointer_expression "&local_48" (& "&") (identifier "local_48")) (, ",") (identifier "param_6") (, ",") (identifier "param_7") (, ",") (pointer_expression "&local_4a" (& "&") (identifier "local_4a")) () ")"))) (; ";")) (expression_statement "(**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);" (call_expression "(**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48)" (parenthesized_expression "(**(code **)(*param_1 + 0x18))" (( "(") (pointer_expression "**(code **)(*param_1 + 0x18)" (* "*") (pointer_expression "*(code **)(*param_1 + 0x18)" (* "*") (cast_expression "(code **)(*param_1 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x18)" (( "(") (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (argument_list "(local_40,param_1,param_3,param_4,param_5,&local_48)" (( "(") (identifier "local_40") (, ",") (identifier "param_1") (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (pointer_expression "&local_48" (& "&") (identifier "local_48")) () ")"))) (; ";")) (if_statement "if (*(code **)(param_2 + 0x20) != (code *)0x0) {\n                    \n    (**(code **)(param_2 + 0x20))(param_2);\n  }" (if "if") (parenthesized_expression "(*(code **)(param_2 + 0x20) != (code *)0x0)" (( "(") (binary_expression "*(code **)(param_2 + 0x20) != (code *)0x0" (pointer_expression "*(code **)(param_2 + 0x20)" (* "*") (cast_expression "(code **)(param_2 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0x20)" (( "(") (binary_expression "param_2 + 0x20" (identifier "param_2") (+ "+") (number_literal "0x20")) () ")")))) (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    (**(code **)(param_2 + 0x20))(param_2);\n  }" ({ "{") (expression_statement "(**(code **)(param_2 + 0x20))(param_2);" (call_expression "(**(code **)(param_2 + 0x20))(param_2)" (parenthesized_expression "(**(code **)(param_2 + 0x20))" (( "(") (pointer_expression "**(code **)(param_2 + 0x20)" (* "*") (pointer_expression "*(code **)(param_2 + 0x20)" (* "*") (cast_expression "(code **)(param_2 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0x20)" (( "(") (binary_expression "param_2 + 0x20" (identifier "param_2") (+ "+") (number_literal "0x20")) () ")"))))) () ")")) (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0036cbb0(param_2,local_40);" (call_expression "FUN_0036cbb0(param_2,local_40)" (identifier "FUN_0036cbb0") (argument_list "(param_2,local_40)" (( "(") (identifier "param_2") (, ",") (identifier "local_40") () ")"))) (; ";")) (expression_statement "uVar3 = *(undefined8 *)(local_40[0] + -0x18);" (assignment_expression "uVar3 = *(undefined8 *)(local_40[0] + -0x18)" (identifier "uVar3") (= "=") (pointer_expression "*(undefined8 *)(local_40[0] + -0x18)" (* "*") (cast_expression "(undefined8 *)(local_40[0] + -0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -0x18)" (( "(") (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-0x18")) () ")"))))) (; ";")) (expression_statement "*(code **)(param_2 + 0x20) = FUN_00373770;" (assignment_expression "*(code **)(param_2 + 0x20) = FUN_00373770" (pointer_expression "*(code **)(param_2 + 0x20)" (* "*") (cast_expression "(code **)(param_2 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0x20)" (( "(") (binary_expression "param_2 + 0x20" (identifier "param_2") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "FUN_00373770")) (; ";")) (expression_statement "*(undefined8 *)(param_2 + 8) = uVar3;" (assignment_expression "*(undefined8 *)(param_2 + 8) = uVar3" (pointer_expression "*(undefined8 *)(param_2 + 8)" (* "*") (cast_expression "(undefined8 *)(param_2 + 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (if_statement "if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }" (if "if") (parenthesized_expression "((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0)" (( "(") (binary_expression "(undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0" (cast_expression "(undefined8 *)(local_40[0] + -0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -0x18)" (( "(") (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-0x18")) () ")"))) (!= "!=") (pointer_expression "&DAT_004c67c0" (& "&") (identifier "DAT_004c67c0"))) () ")")) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }\n  }" ({ "{") (if_statement "if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 == (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_004b9ee8 == (undefined *)0x0" (identifier "PTR___pthread_key_create_004b9ee8") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      iVar2 = *(int *)(local_40[0] + -8);\n      *(int *)(local_40[0] + -8) = iVar2 + -1;\n    }" ({ "{") (expression_statement "iVar2 = *(int *)(local_40[0] + -8);" (assignment_expression "iVar2 = *(int *)(local_40[0] + -8)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(local_40[0] + -8)" (* "*") (cast_expression "(int *)(local_40[0] + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -8)" (( "(") (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-8")) () ")"))))) (; ";")) (expression_statement "*(int *)(local_40[0] + -8) = iVar2 + -1;" (assignment_expression "*(int *)(local_40[0] + -8) = iVar2 + -1" (pointer_expression "*(int *)(local_40[0] + -8)" (* "*") (cast_expression "(int *)(local_40[0] + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -8)" (( "(") (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-8")) () ")")))) (= "=") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" (else "else") (compound_statement "{\n      LOCK();\n      piVar1 = (int *)(local_40[0] + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar1 = (int *)(local_40[0] + -8);" (assignment_expression "piVar1 = (int *)(local_40[0] + -8)" (identifier "piVar1") (= "=") (cast_expression "(int *)(local_40[0] + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -8)" (( "(") (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-8")) () ")")))) (; ";")) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" (identifier "iVar2") (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (if_statement "if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }" (if "if") (parenthesized_expression "(iVar2 < 1)" (( "(") (binary_expression "iVar2 < 1" (identifier "iVar2") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);\n    }" ({ "{") (expression_statement "thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);" (call_expression "thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49)" (identifier "thunk_FUN_00338a50") (argument_list "((undefined8 *)(local_40[0] + -0x18),&local_49)" (( "(") (cast_expression "(undefined8 *)(local_40[0] + -0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -0x18)" (( "(") (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-0x18")) () ")"))) (, ",") (pointer_expression "&local_49" (& "&") (identifier "local_49")) () ")"))) (; ";")) (} "}"))) (} "}"))) (if_statement "if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }" (if "if") (parenthesized_expression "((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0)" (( "(") (binary_expression "(undefined8 *)(local_48 + -0x18) != &DAT_004c67c0" (cast_expression "(undefined8 *)(local_48 + -0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_48 + -0x18)" (( "(") (binary_expression "local_48 + -0x18" (identifier "local_48") (+ "+") (number_literal "-0x18")) () ")"))) (!= "!=") (pointer_expression "&DAT_004c67c0" (& "&") (identifier "DAT_004c67c0"))) () ")")) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }\n  }" ({ "{") (if_statement "if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 == (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_004b9ee8 == (undefined *)0x0" (identifier "PTR___pthread_key_create_004b9ee8") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      iVar2 = *(int *)(local_48 + -8);\n      *(int *)(local_48 + -8) = iVar2 + -1;\n    }" ({ "{") (expression_statement "iVar2 = *(int *)(local_48 + -8);" (assignment_expression "iVar2 = *(int *)(local_48 + -8)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(local_48 + -8)" (* "*") (cast_expression "(int *)(local_48 + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_48 + -8)" (( "(") (binary_expression "local_48 + -8" (identifier "local_48") (+ "+") (number_literal "-8")) () ")"))))) (; ";")) (expression_statement "*(int *)(local_48 + -8) = iVar2 + -1;" (assignment_expression "*(int *)(local_48 + -8) = iVar2 + -1" (pointer_expression "*(int *)(local_48 + -8)" (* "*") (cast_expression "(int *)(local_48 + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_48 + -8)" (( "(") (binary_expression "local_48 + -8" (identifier "local_48") (+ "+") (number_literal "-8")) () ")")))) (= "=") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" (else "else") (compound_statement "{\n      LOCK();\n      piVar1 = (int *)(local_48 + -8);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar1 = (int *)(local_48 + -8);" (assignment_expression "piVar1 = (int *)(local_48 + -8)" (identifier "piVar1") (= "=") (cast_expression "(int *)(local_48 + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_48 + -8)" (( "(") (binary_expression "local_48 + -8" (identifier "local_48") (+ "+") (number_literal "-8")) () ")")))) (; ";")) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" (identifier "iVar2") (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (if_statement "if (iVar2 < 1) {\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }" (if "if") (parenthesized_expression "(iVar2 < 1)" (( "(") (binary_expression "iVar2 < 1" (identifier "iVar2") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);\n    }" ({ "{") (expression_statement "thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);" (call_expression "thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40)" (identifier "thunk_FUN_00338a50") (argument_list "((undefined8 *)(local_48 + -0x18),local_40)" (( "(") (cast_expression "(undefined8 *)(local_48 + -0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_48 + -0x18)" (( "(") (binary_expression "local_48 + -0x18" (identifier "local_48") (+ "+") (number_literal "-0x18")) () ")"))) (, ",") (identifier "local_40") () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* void std::__facet_shims::__messages_get<char>(std::integral_constant<bool, false>,
   std::locale::facet const*, std::__facet_shims::__any_string&, int, int, int, char const*,
   unsigned long) */

void std::__facet_shims::function_1<char>
               (long *param_1,type_1 *var_1,type_2 param_3,type_2 param_4,
               type_2 param_5,char *param_6,type_3 param_7)

{
  int *piVar1;
  type_4 uVar2;
  int var_4;
  type_5 local_4a [2];
  long var_8;
  long local_40 [2];
  
  std::string::type_1((type_1 *)&var_8,param_6,param_7,local_4a);
                    /* try { // try from 00375056 to 00375058 has its CatchHandler @ 00375130 */
  (**(type_6 **)(*param_1 + 0x18))
            ((type_1 *)local_40,param_1,param_3,param_4,param_5,(type_1 *)&var_8);
  if (*(type_6 **)(var_1 + 0x20) != (type_6 *)0x0) {
                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */
    (**(type_6 **)(var_1 + 0x20))(var_1);
  }
  std::string::type_1(var_1,(type_1 *)local_40);
  uVar2 = *(type_4 *)(local_40[0] + -0x18);
  *(type_6 **)(var_1 + 0x20) = (anonymous_namespace)::__destroy_string<var_2>;
  *(type_4 *)(var_1 + 8) = uVar2;
  if ((type_5 *)(local_40[0] + -0x18) != (type_5 *)&std::type_1::_Rep::_S_empty_rep_storage) {
    if (var_3 == (type_7 *)0x0) {
      var_4 = *(int *)(local_40[0] + -8);
      *(int *)(local_40[0] + -8) = var_4 + -1;
    }
    else {
      var_5();
      piVar1 = (int *)(local_40[0] + -8);
      var_4 = *piVar1;
      *piVar1 = *piVar1 + -1;
      var_6();
    }
    if (var_4 < 1) {
      std::string::_Rep::var_7((type_5 *)(local_40[0] + -0x18));
    }
  }
  if ((type_5 *)(var_8 + -0x18) != (type_5 *)&std::type_1::_Rep::_S_empty_rep_storage) {
    if (var_3 == (type_7 *)0x0) {
      var_4 = *(int *)(var_8 + -8);
      *(int *)(var_8 + -8) = var_4 + -1;
    }
    else {
      var_5();
      piVar1 = (int *)(var_8 + -8);
      var_4 = *piVar1;
      *piVar1 = *piVar1 + -1;
      var_6();
    }
    if (var_4 < 1) {
      std::string::_Rep::var_7((type_5 *)(var_8 + -0x18));
    }
  }
  return;
}


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

void MASKED(long *param_1,long param_2,undefined4 param_3,undefined4 param_4,
                 undefined4 param_5,undefined8 param_6,undefined8 param_7)

{
  int *piVar1;
  int iVar2;
  undefined8 uVar3;
  undefined1 local_4a;
  undefined1 local_49;
  long local_48;
  long local_40 [2];
  
  FUN_0036d0c0(&local_48,param_6,param_7,&local_4a);
                    /* try { // try from 00375056 to 00375058 has its CatchHandler @ 00375130 */
  (**(code **)(*param_1 + 0x18))(local_40,param_1,param_3,param_4,param_5,&local_48);
  if (*(code **)(param_2 + 0x20) != (code *)0x0) {
                    /* try { // try from 00375065 to 00375071 has its CatchHandler @ 0037512b */
    (**(code **)(param_2 + 0x20))(param_2);
  }
  FUN_0036cbb0(param_2,local_40);
  uVar3 = *(undefined8 *)(local_40[0] + -0x18);
  *(code **)(param_2 + 0x20) = FUN_00373770;
  *(undefined8 *)(param_2 + 8) = uVar3;
  if ((undefined8 *)(local_40[0] + -0x18) != &DAT_004c67c0) {
    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {
      iVar2 = *(int *)(local_40[0] + -8);
      *(int *)(local_40[0] + -8) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(local_40[0] + -8);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      thunk_FUN_00338a50((undefined8 *)(local_40[0] + -0x18),&local_49);
    }
  }
  if ((undefined8 *)(local_48 + -0x18) != &DAT_004c67c0) {
    if (PTR___pthread_key_create_004b9ee8 == (undefined *)0x0) {
      iVar2 = *(int *)(local_48 + -8);
      *(int *)(local_48 + -8) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(local_48 + -8);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      thunk_FUN_00338a50((undefined8 *)(local_48 + -0x18),local_40);
    }
  }
  return;
}

