
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* std::istreambuf_iterator<char, std::char_traits<char> >
   std::__facet_shims::__money_get<char>(std::integral_constant<bool, false>, std::locale::facet
   const*, std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
   std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, long double*,
   std::__facet_shims::__any_string*) */

undefined4 *
std::__facet_shims::__money_get<char>
          (undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5
          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10
          ,int param_11,string *param_12)

{
  int *piVar1;
  int iVar2;
  undefined4 local_34;
  undefined4 local_30;
  undefined *local_20 [4];
  
  if (param_11 == 0) {
    local_20[0] = &DAT_00396e0c;
                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */
    (**(code **)(*param_3 + 0xc))
              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,
               (string *)local_20);
    if (*param_10 == 0) {
      if (*(code **)(param_12 + 0x18) != (code *)0x0) {
        (**(code **)(param_12 + 0x18))(param_12);
      }
      std::string::string(param_12,(string *)local_20);
      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);
      *(code **)(param_12 + 0x18) = (anonymous_namespace)::__destroy_string<char>;
    }
    *param_1 = local_34;
    param_1[1] = local_30;
    if ((allocator *)(local_20[0] + -0xc) != (allocator *)&std::string::_Rep::_S_empty_rep_storage)
    {
      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {
        iVar2 = *(int *)(local_20[0] + -4);
        *(int *)(local_20[0] + -4) = iVar2 + -1;
      }
      else {
        LOCK();
        piVar1 = (int *)(local_20[0] + -4);
        iVar2 = *piVar1;
        *piVar1 = *piVar1 + -1;
        UNLOCK();
      }
      if (iVar2 < 1) {
        std::string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));
      }
    }
  }
  else {
    (**(code **)(*param_3 + 8))
              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);
  }
  return param_1;
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

undefined4 *
FUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,
            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,
            undefined4 param_9,int *param_10,int param_11,int param_12)

{
  int *piVar1;
  int iVar2;
  undefined4 local_34;
  undefined4 local_30;
  undefined1 local_21;
  undefined *local_20 [4];
  
  if (param_11 == 0) {
    local_20[0] = &DAT_00396e0c;
                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */
    (**(code **)(*param_3 + 0xc))
              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);
    if (*param_10 == 0) {
      if (*(code **)(param_12 + 0x18) != (code *)0x0) {
        (**(code **)(param_12 + 0x18))(param_12);
      }
      FUN_002201f0(param_12,local_20);
      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);
      *(code **)(param_12 + 0x18) = FUN_00228670;
    }
    *param_1 = local_34;
    param_1[1] = local_30;
    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {
      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {
        iVar2 = *(int *)(local_20[0] + -4);
        *(int *)(local_20[0] + -4) = iVar2 + -1;
      }
      else {
        LOCK();
        piVar1 = (int *)(local_20[0] + -4);
        iVar2 = *piVar1;
        *piVar1 = *piVar1 + -1;
        UNLOCK();
      }
      if (iVar2 < 1) {
        FUN_0021e9b0(local_20[0] + -0xc,&local_21);
      }
    }
  }
  else {
    (**(code **)(*param_3 + 8))
              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);
  }
  return param_1;
}


CALL 0x000559e6
ADD EAX,0x1647fb
PUSH EBP
MOV EBP,ESP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x2c
MOV EBX,dword ptr [EBP + 0x30]
MOV EDI,dword ptr [EBP + 0x28]
MOV dword ptr [EBP + -0x34],EAX
MOV EAX,dword ptr [EBP + 0x10]
MOVZX ECX,byte ptr [EBP + 0x24]
MOV EDX,dword ptr [EAX]
TEST EBX,EBX
JZ 0x0022a858
SUB ESP,0x8
PUSH EBX
PUSH dword ptr [EBP + 0x2c]
PUSH EDI
PUSH ECX
PUSH dword ptr [EBP + 0x20]
PUSH dword ptr [EBP + 0x1c]
PUSH dword ptr [EBP + 0x18]
PUSH dword ptr [EBP + 0x14]
PUSH EAX
PUSH dword ptr [EBP + 0x8]
CALL dword ptr [EDX + 0x8]
ADD ESP,0x2c
MOV EAX,dword ptr [EBP + 0x8]
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET 0x4
MOV ESI,dword ptr [EBP + -0x34]
SUB ESP,0x8
LEA ESI,[ESI + 0x7e00]
LEA EBX,[ESI + 0xc]
MOV dword ptr [EBP + -0x38],ESI
LEA ESI,[EBP + -0x30]
MOV dword ptr [EBP + -0x1c],EBX
LEA EBX,[EBP + -0x1c]
PUSH EBX
PUSH dword ptr [EBP + 0x2c]
PUSH EDI
PUSH ECX
PUSH dword ptr [EBP + 0x20]
PUSH dword ptr [EBP + 0x1c]
PUSH dword ptr [EBP + 0x18]
PUSH dword ptr [EBP + 0x14]
PUSH EAX
PUSH ESI
CALL dword ptr [EDX + 0xc]
MOV EAX,dword ptr [EBP + 0x2c]
MOV ESI,dword ptr [EBP + -0x30]
ADD ESP,0x2c
MOV EDI,dword ptr [EBP + -0x2c]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x0022a8f0
MOV EAX,dword ptr [EBP + -0x1c]
MOV ECX,dword ptr [EBP + 0x8]
LEA EDX,[EAX + -0xc]
MOV dword ptr [ECX],ESI
MOV dword ptr [ECX + 0x4],EDI
CMP EDX,dword ptr [EBP + -0x38]
JZ 0x0022a848
MOV EDI,dword ptr [EBP + -0x34]
MOV ECX,dword ptr [EDI + 0xffffff24]
TEST ECX,ECX
JZ 0x0022a938
MOV ECX,0xffffffff
XADD.LOCK dword ptr [EAX + -0x4],ECX
TEST ECX,ECX
JG 0x0022a848
SUB ESP,0x8
LEA EAX,[EBP + -0x1d]
MOV EBX,dword ptr [EBP + -0x34]
PUSH EAX
PUSH EDX
CALL 0x0021e9b0
ADD ESP,0x10
JMP 0x0022a848
MOV EAX,dword ptr [EBP + 0x34]
MOV EAX,dword ptr [EAX + 0x18]
TEST EAX,EAX
JZ 0x0022a905
SUB ESP,0xc
PUSH dword ptr [EBP + 0x34]
CALL EAX
ADD ESP,0x10
SUB ESP,0x8
PUSH EBX
MOV EBX,dword ptr [EBP + -0x34]
PUSH dword ptr [EBP + 0x34]
CALL 0x002201f0
MOV EAX,dword ptr [EBP + -0x1c]
MOV EBX,dword ptr [EBP + 0x34]
ADD ESP,0x10
MOV ECX,dword ptr [EBP + -0x34]
MOV EDX,dword ptr [EAX + -0xc]
MOV dword ptr [EBX + 0x4],EDX
LEA EDX,[ECX + 0xffe99670]
MOV dword ptr [EBX + 0x18],EDX
JMP 0x0022a89f
MOV ECX,dword ptr [EAX + -0x4]
LEA EBX,[ECX + -0x1]
MOV dword ptr [EAX + -0x4],EBX
JMP 0x0022a8c6
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nundefined4 *\nFUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  undefined1 local_21;\n  undefined *local_20 [4];\n  \n  if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */\n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }\n  return param_1;\n}\n\n" comment (function_definition "undefined4 *\nFUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  undefined1 local_21;\n  undefined *local_20 [4];\n  \n  if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */\n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }\n  return param_1;\n}" type_identifier (pointer_declarator "*\nFUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)" * (function_declarator "FUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)" identifier (parameter_list "(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined1 param_8" type_identifier identifier) , (parameter_declaration "undefined4 param_9" type_identifier identifier) , (parameter_declaration "int *param_10" primitive_type (pointer_declarator "*param_10" * identifier)) , (parameter_declaration "int param_11" primitive_type identifier) , (parameter_declaration "int param_12" primitive_type identifier) )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  undefined1 local_21;\n  undefined *local_20 [4];\n  \n  if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */\n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }\n  return param_1;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "undefined *local_20 [4];" type_identifier (pointer_declarator "*local_20 [4]" * (array_declarator "local_20 [4]" identifier [ number_literal ])) ;) (if_statement "if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */\n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" if (parenthesized_expression "(param_11 == 0)" ( (binary_expression "param_11 == 0" identifier == number_literal) )) (compound_statement "{\n    local_20[0] = &DAT_00396e0c;\n                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */\n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }" { (expression_statement "local_20[0] = &DAT_00396e0c;" (assignment_expression "local_20[0] = &DAT_00396e0c" (subscript_expression "local_20[0]" identifier [ number_literal ]) = (pointer_expression "&DAT_00396e0c" & identifier)) ;) comment (expression_statement "(**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);" (call_expression "(**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20)" (parenthesized_expression "(**(code **)(*param_3 + 0xc))" ( (pointer_expression "**(code **)(*param_3 + 0xc)" * (pointer_expression "*(code **)(*param_3 + 0xc)" * (cast_expression "(code **)(*param_3 + 0xc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_3 + 0xc)" ( (binary_expression "*param_3 + 0xc" (pointer_expression "*param_3" * identifier) + number_literal) ))))) )) (argument_list "(&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20)" ( (pointer_expression "&local_34" & identifier) , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier ))) ;) (if_statement "if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }" if (parenthesized_expression "(*param_10 == 0)" ( (binary_expression "*param_10 == 0" (pointer_expression "*param_10" * identifier) == number_literal) )) (compound_statement "{\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }" { (if_statement "if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }" if (parenthesized_expression "(*(code **)(param_12 + 0x18) != (code *)0x0)" ( (binary_expression "*(code **)(param_12 + 0x18) != (code *)0x0" (pointer_expression "*(code **)(param_12 + 0x18)" * (cast_expression "(code **)(param_12 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_12 + 0x18)" ( (binary_expression "param_12 + 0x18" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (**(code **)(param_12 + 0x18))(param_12);\n      }" { (expression_statement "(**(code **)(param_12 + 0x18))(param_12);" (call_expression "(**(code **)(param_12 + 0x18))(param_12)" (parenthesized_expression "(**(code **)(param_12 + 0x18))" ( (pointer_expression "**(code **)(param_12 + 0x18)" * (pointer_expression "*(code **)(param_12 + 0x18)" * (cast_expression "(code **)(param_12 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_12 + 0x18)" ( (binary_expression "param_12 + 0x18" identifier + number_literal) ))))) )) (argument_list "(param_12)" ( identifier ))) ;) })) (expression_statement "FUN_002201f0(param_12,local_20);" (call_expression "FUN_002201f0(param_12,local_20)" identifier (argument_list "(param_12,local_20)" ( identifier , identifier ))) ;) (expression_statement "*(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);" (assignment_expression "*(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc)" (pointer_expression "*(undefined4 *)(param_12 + 4)" * (cast_expression "(undefined4 *)(param_12 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_12 + 4)" ( (binary_expression "param_12 + 4" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(local_20[0] + -0xc)" * (cast_expression "(undefined4 *)(local_20[0] + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -0xc)" ( (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(code **)(param_12 + 0x18) = FUN_00228670;" (assignment_expression "*(code **)(param_12 + 0x18) = FUN_00228670" (pointer_expression "*(code **)(param_12 + 0x18)" * (cast_expression "(code **)(param_12 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_12 + 0x18)" ( (binary_expression "param_12 + 0x18" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "*param_1 = local_34;" (assignment_expression "*param_1 = local_34" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[1] = local_30;" (assignment_expression "param_1[1] = local_30" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }" if (parenthesized_expression "((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00)" ( (binary_expression "(undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00" (cast_expression "(undefined4 *)(local_20[0] + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -0xc)" ( (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) ))) != (pointer_expression "&DAT_00396e00" & identifier)) )) (compound_statement "{\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }" { (expression_statement "iVar2 = *(int *)(local_20[0] + -4);" (assignment_expression "iVar2 = *(int *)(local_20[0] + -4)" identifier = (pointer_expression "*(int *)(local_20[0] + -4)" * (cast_expression "(int *)(local_20[0] + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -4)" ( (binary_expression "local_20[0] + -4" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(int *)(local_20[0] + -4) = iVar2 + -1;" (assignment_expression "*(int *)(local_20[0] + -4) = iVar2 + -1" (pointer_expression "*(int *)(local_20[0] + -4)" * (cast_expression "(int *)(local_20[0] + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -4)" ( (binary_expression "local_20[0] + -4" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_20[0] + -4);" (assignment_expression "piVar1 = (int *)(local_20[0] + -4)" identifier = (cast_expression "(int *)(local_20[0] + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -4)" ( (binary_expression "local_20[0] + -4" (subscript_expression "local_20[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        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }" { (expression_statement "FUN_0021e9b0(local_20[0] + -0xc,&local_21);" (call_expression "FUN_0021e9b0(local_20[0] + -0xc,&local_21)" identifier (argument_list "(local_20[0] + -0xc,&local_21)" ( (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) , (pointer_expression "&local_21" & identifier) ))) ;) })) })) }) (else_clause "else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" else (compound_statement "{\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" { (expression_statement "(**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);" (call_expression "(**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11)" (parenthesized_expression "(**(code **)(*param_3 + 8))" ( (pointer_expression "**(code **)(*param_3 + 8)" * (pointer_expression "*(code **)(*param_3 + 8)" * (cast_expression "(code **)(*param_3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_3 + 8)" ( (binary_expression "*param_3 + 8" (pointer_expression "*param_3" * identifier) + number_literal) ))))) )) (argument_list "(param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier ))) ;) }))) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n/* std::istreambuf_iterator<char, std::char_traits<char> >\n   std::__facet_shims::__money_get<char>(std::integral_constant<bool, false>, std::locale::facet\n   const*, std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,\n   std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, long double*,\n   std::__facet_shims::__any_string*) */\n\nundefined4 *\nstd::__facet_shims::__money_get<char>\n          (undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5\n          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  undefined *local_20 [4];\n  \n  if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */\n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,\n               (string *)local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      std::string::string(param_12,(string *)local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = (anonymous_namespace)::__destroy_string<char>;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((allocator *)(local_20[0] + -0xc) != (allocator *)&std::string::_Rep::_S_empty_rep_storage)\n    {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        std::string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }\n  return param_1;\n}\n\n" comment comment (ERROR "undefined4 *\nstd::" (binary_expression "undefined4 *\nstd" identifier * identifier) : :) (labeled_statement "__facet_shims::__money_get<char>\n          (undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5\n          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12)" statement_identifier : (ERROR ":" :) (expression_statement "__money_get<char>\n          (undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5\n          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12)" (binary_expression "__money_get<char>\n          (undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5\n          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12)" (binary_expression "__money_get<char" identifier < identifier) > (parenthesized_expression "(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5\n          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12)" ( (comma_expression "undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5\n          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12" (binary_expression "undefined4 *param_1" identifier * identifier) , (comma_expression "undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5\n          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12" identifier (ERROR "param_2" identifier) , (comma_expression "int *param_3,undefined4 param_4,undefined4 param_5\n          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12" (binary_expression "int *param_3" identifier * identifier) , (comma_expression "undefined4 param_4,undefined4 param_5\n          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12" identifier (ERROR "param_4" identifier) , (comma_expression "undefined4 param_5\n          ,undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12" identifier (ERROR "param_5" identifier) , (comma_expression "undefined4 param_6,undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12" identifier (ERROR "param_6" identifier) , (comma_expression "undefined4 param_7,undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12" identifier (ERROR "param_7" identifier) , (comma_expression "undefined1 param_8,undefined4 param_9,int *param_10\n          ,int param_11,string *param_12" identifier (ERROR "param_8" identifier) , (ERROR "undefined4" identifier) (comma_expression "param_9,int *param_10\n          ,int param_11,string *param_12" identifier , (comma_expression "int *param_10\n          ,int param_11,string *param_12" (binary_expression "int *param_10" identifier * identifier) , (ERROR "int" identifier) (comma_expression "param_11,string *param_12" identifier , (binary_expression "string *param_12" identifier * identifier)))))))))))) ))) ;)) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  undefined *local_20 [4];\n  \n  if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */\n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,\n               (string *)local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      std::string::string(param_12,(string *)local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = (anonymous_namespace)::__destroy_string<char>;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((allocator *)(local_20[0] + -0xc) != (allocator *)&std::string::_Rep::_S_empty_rep_storage)\n    {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        std::string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }\n  return param_1;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "undefined *local_20 [4];" type_identifier (pointer_declarator "*local_20 [4]" * (array_declarator "local_20 [4]" identifier [ number_literal ])) ;) (if_statement "if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */\n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,\n               (string *)local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      std::string::string(param_12,(string *)local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = (anonymous_namespace)::__destroy_string<char>;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((allocator *)(local_20[0] + -0xc) != (allocator *)&std::string::_Rep::_S_empty_rep_storage)\n    {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        std::string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" if (parenthesized_expression "(param_11 == 0)" ( (binary_expression "param_11 == 0" identifier == number_literal) )) (compound_statement "{\n    local_20[0] = &DAT_00396e0c;\n                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */\n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,\n               (string *)local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      std::string::string(param_12,(string *)local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = (anonymous_namespace)::__destroy_string<char>;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((allocator *)(local_20[0] + -0xc) != (allocator *)&std::string::_Rep::_S_empty_rep_storage)\n    {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        std::string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }\n  }" { (expression_statement "local_20[0] = &DAT_00396e0c;" (assignment_expression "local_20[0] = &DAT_00396e0c" (subscript_expression "local_20[0]" identifier [ number_literal ]) = (pointer_expression "&DAT_00396e0c" & identifier)) ;) comment (expression_statement "(**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,\n               (string *)local_20);" (call_expression "(**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,\n               (string *)local_20)" (parenthesized_expression "(**(code **)(*param_3 + 0xc))" ( (pointer_expression "**(code **)(*param_3 + 0xc)" * (pointer_expression "*(code **)(*param_3 + 0xc)" * (cast_expression "(code **)(*param_3 + 0xc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_3 + 0xc)" ( (binary_expression "*param_3 + 0xc" (pointer_expression "*param_3" * identifier) + number_literal) ))))) )) (argument_list "(&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,\n               (string *)local_20)" ( (pointer_expression "&local_34" & identifier) , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , (cast_expression "(string *)local_20" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (if_statement "if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      std::string::string(param_12,(string *)local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = (anonymous_namespace)::__destroy_string<char>;\n    }" if (parenthesized_expression "(*param_10 == 0)" ( (binary_expression "*param_10 == 0" (pointer_expression "*param_10" * identifier) == number_literal) )) (compound_statement "{\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      std::string::string(param_12,(string *)local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = (anonymous_namespace)::__destroy_string<char>;\n    }" { (if_statement "if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }" if (parenthesized_expression "(*(code **)(param_12 + 0x18) != (code *)0x0)" ( (binary_expression "*(code **)(param_12 + 0x18) != (code *)0x0" (pointer_expression "*(code **)(param_12 + 0x18)" * (cast_expression "(code **)(param_12 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_12 + 0x18)" ( (binary_expression "param_12 + 0x18" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (**(code **)(param_12 + 0x18))(param_12);\n      }" { (expression_statement "(**(code **)(param_12 + 0x18))(param_12);" (call_expression "(**(code **)(param_12 + 0x18))(param_12)" (parenthesized_expression "(**(code **)(param_12 + 0x18))" ( (pointer_expression "**(code **)(param_12 + 0x18)" * (pointer_expression "*(code **)(param_12 + 0x18)" * (cast_expression "(code **)(param_12 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_12 + 0x18)" ( (binary_expression "param_12 + 0x18" identifier + number_literal) ))))) )) (argument_list "(param_12)" ( identifier ))) ;) })) (labeled_statement "std::string::string(param_12,(string *)local_20);" statement_identifier : (ERROR ":" :) (labeled_statement "string::string(param_12,(string *)local_20);" statement_identifier : (ERROR ":" :) (expression_statement "string(param_12,(string *)local_20);" (call_expression "string(param_12,(string *)local_20)" identifier (argument_list "(param_12,(string *)local_20)" ( identifier , (cast_expression "(string *)local_20" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;))) (expression_statement "*(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);" (assignment_expression "*(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc)" (pointer_expression "*(undefined4 *)(param_12 + 4)" * (cast_expression "(undefined4 *)(param_12 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_12 + 4)" ( (binary_expression "param_12 + 4" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(local_20[0] + -0xc)" * (cast_expression "(undefined4 *)(local_20[0] + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -0xc)" ( (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(code **)(param_12 + 0x18) = (anonymous_namespace)::__destroy_string<char>;" (binary_expression "*(code **)(param_12 + 0x18) = (anonymous_namespace)::__destroy_string<char>" (binary_expression "*(code **)(param_12 + 0x18) = (anonymous_namespace)::__destroy_string<char" (assignment_expression "*(code **)(param_12 + 0x18) = (anonymous_namespace)" (pointer_expression "*(code **)(param_12 + 0x18)" * (cast_expression "(code **)(param_12 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_12 + 0x18)" ( (binary_expression "param_12 + 0x18" identifier + number_literal) )))) = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) (ERROR "::__destroy_string" : : identifier) < identifier) > identifier) ;) })) (expression_statement "*param_1 = local_34;" (assignment_expression "*param_1 = local_34" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[1] = local_30;" (assignment_expression "param_1[1] = local_30" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((allocator *)(local_20[0] + -0xc) != (allocator *)&std::string::_Rep::_S_empty_rep_storage)\n    {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        std::string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }" if (parenthesized_expression "((allocator *)(local_20[0] + -0xc) != (allocator *)&std::string::_Rep::_S_empty_rep_storage)" ( (binary_expression "(allocator *)(local_20[0] + -0xc) != (allocator *)&std" (cast_expression "(allocator *)(local_20[0] + -0xc)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -0xc)" ( (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[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_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        std::string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }" { (expression_statement "iVar2 = *(int *)(local_20[0] + -4);" (assignment_expression "iVar2 = *(int *)(local_20[0] + -4)" identifier = (pointer_expression "*(int *)(local_20[0] + -4)" * (cast_expression "(int *)(local_20[0] + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -4)" ( (binary_expression "local_20[0] + -4" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(int *)(local_20[0] + -4) = iVar2 + -1;" (assignment_expression "*(int *)(local_20[0] + -4) = iVar2 + -1" (pointer_expression "*(int *)(local_20[0] + -4)" * (cast_expression "(int *)(local_20[0] + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -4)" ( (binary_expression "local_20[0] + -4" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_20[0] + -4);" (assignment_expression "piVar1 = (int *)(local_20[0] + -4)" identifier = (cast_expression "(int *)(local_20[0] + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -4)" ( (binary_expression "local_20[0] + -4" (subscript_expression "local_20[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        std::string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        std::string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }" { (labeled_statement "std::string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));" statement_identifier : (ERROR ":" :) (labeled_statement "string::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));" statement_identifier : (ERROR ":" :) (labeled_statement "_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));" statement_identifier : (ERROR ":" :) (expression_statement "_M_destroy((allocator *)(local_20[0] + -0xc));" (call_expression "_M_destroy((allocator *)(local_20[0] + -0xc))" identifier (argument_list "((allocator *)(local_20[0] + -0xc))" ( (cast_expression "(allocator *)(local_20[0] + -0xc)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -0xc)" ( (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) ))) ))) ;)))) })) })) }) (else_clause "else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" else (compound_statement "{\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" { (expression_statement "(**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);" (call_expression "(**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11)" (parenthesized_expression "(**(code **)(*param_3 + 8))" ( (pointer_expression "**(code **)(*param_3 + 8)" * (pointer_expression "*(code **)(*param_3 + 8)" * (cast_expression "(code **)(*param_3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_3 + 8)" ( (binary_expression "*param_3 + 8" (pointer_expression "*param_3" * identifier) + number_literal) ))))) )) (argument_list "(param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier ))) ;) }))) (return_statement "return param_1;" return identifier ;) }))
(translation_unit "undefined4 *\nFUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  undefined1 local_21;\n  undefined *local_20 [4];\n  \n  if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    \n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }\n  return param_1;\n}\n\n" (function_definition "undefined4 *\nFUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  undefined1 local_21;\n  undefined *local_20 [4];\n  \n  if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    \n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }\n  return param_1;\n}" type_identifier (pointer_declarator "*\nFUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)" * (function_declarator "FUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)" identifier (parameter_list "(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined1 param_8" type_identifier identifier) , (parameter_declaration "undefined4 param_9" type_identifier identifier) , (parameter_declaration "int *param_10" primitive_type (pointer_declarator "*param_10" * identifier)) , (parameter_declaration "int param_11" primitive_type identifier) , (parameter_declaration "int param_12" primitive_type identifier) )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  undefined1 local_21;\n  undefined *local_20 [4];\n  \n  if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    \n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }\n  return param_1;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "undefined *local_20 [4];" type_identifier (pointer_declarator "*local_20 [4]" * (array_declarator "local_20 [4]" identifier [ number_literal ])) ;) (if_statement "if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    \n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" if (parenthesized_expression "(param_11 == 0)" ( (binary_expression "param_11 == 0" identifier == number_literal) )) (compound_statement "{\n    local_20[0] = &DAT_00396e0c;\n                    \n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }" { (expression_statement "local_20[0] = &DAT_00396e0c;" (assignment_expression "local_20[0] = &DAT_00396e0c" (subscript_expression "local_20[0]" identifier [ number_literal ]) = (pointer_expression "&DAT_00396e0c" & identifier)) ;) (expression_statement "(**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);" (call_expression "(**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20)" (parenthesized_expression "(**(code **)(*param_3 + 0xc))" ( (pointer_expression "**(code **)(*param_3 + 0xc)" * (pointer_expression "*(code **)(*param_3 + 0xc)" * (cast_expression "(code **)(*param_3 + 0xc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_3 + 0xc)" ( (binary_expression "*param_3 + 0xc" (pointer_expression "*param_3" * identifier) + number_literal) ))))) )) (argument_list "(&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20)" ( (pointer_expression "&local_34" & identifier) , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier ))) ;) (if_statement "if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }" if (parenthesized_expression "(*param_10 == 0)" ( (binary_expression "*param_10 == 0" (pointer_expression "*param_10" * identifier) == number_literal) )) (compound_statement "{\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }" { (if_statement "if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }" if (parenthesized_expression "(*(code **)(param_12 + 0x18) != (code *)0x0)" ( (binary_expression "*(code **)(param_12 + 0x18) != (code *)0x0" (pointer_expression "*(code **)(param_12 + 0x18)" * (cast_expression "(code **)(param_12 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_12 + 0x18)" ( (binary_expression "param_12 + 0x18" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (**(code **)(param_12 + 0x18))(param_12);\n      }" { (expression_statement "(**(code **)(param_12 + 0x18))(param_12);" (call_expression "(**(code **)(param_12 + 0x18))(param_12)" (parenthesized_expression "(**(code **)(param_12 + 0x18))" ( (pointer_expression "**(code **)(param_12 + 0x18)" * (pointer_expression "*(code **)(param_12 + 0x18)" * (cast_expression "(code **)(param_12 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_12 + 0x18)" ( (binary_expression "param_12 + 0x18" identifier + number_literal) ))))) )) (argument_list "(param_12)" ( identifier ))) ;) })) (expression_statement "FUN_002201f0(param_12,local_20);" (call_expression "FUN_002201f0(param_12,local_20)" identifier (argument_list "(param_12,local_20)" ( identifier , identifier ))) ;) (expression_statement "*(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);" (assignment_expression "*(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc)" (pointer_expression "*(undefined4 *)(param_12 + 4)" * (cast_expression "(undefined4 *)(param_12 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_12 + 4)" ( (binary_expression "param_12 + 4" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(local_20[0] + -0xc)" * (cast_expression "(undefined4 *)(local_20[0] + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -0xc)" ( (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(code **)(param_12 + 0x18) = FUN_00228670;" (assignment_expression "*(code **)(param_12 + 0x18) = FUN_00228670" (pointer_expression "*(code **)(param_12 + 0x18)" * (cast_expression "(code **)(param_12 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_12 + 0x18)" ( (binary_expression "param_12 + 0x18" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "*param_1 = local_34;" (assignment_expression "*param_1 = local_34" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[1] = local_30;" (assignment_expression "param_1[1] = local_30" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }" if (parenthesized_expression "((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00)" ( (binary_expression "(undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00" (cast_expression "(undefined4 *)(local_20[0] + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -0xc)" ( (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) ))) != (pointer_expression "&DAT_00396e00" & identifier)) )) (compound_statement "{\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }" { (expression_statement "iVar2 = *(int *)(local_20[0] + -4);" (assignment_expression "iVar2 = *(int *)(local_20[0] + -4)" identifier = (pointer_expression "*(int *)(local_20[0] + -4)" * (cast_expression "(int *)(local_20[0] + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -4)" ( (binary_expression "local_20[0] + -4" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(int *)(local_20[0] + -4) = iVar2 + -1;" (assignment_expression "*(int *)(local_20[0] + -4) = iVar2 + -1" (pointer_expression "*(int *)(local_20[0] + -4)" * (cast_expression "(int *)(local_20[0] + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -4)" ( (binary_expression "local_20[0] + -4" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_20[0] + -4);" (assignment_expression "piVar1 = (int *)(local_20[0] + -4)" identifier = (cast_expression "(int *)(local_20[0] + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_20[0] + -4)" ( (binary_expression "local_20[0] + -4" (subscript_expression "local_20[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        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }" { (expression_statement "FUN_0021e9b0(local_20[0] + -0xc,&local_21);" (call_expression "FUN_0021e9b0(local_20[0] + -0xc,&local_21)" identifier (argument_list "(local_20[0] + -0xc,&local_21)" ( (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) , (pointer_expression "&local_21" & identifier) ))) ;) })) })) }) (else_clause "else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" else (compound_statement "{\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" { (expression_statement "(**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);" (call_expression "(**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11)" (parenthesized_expression "(**(code **)(*param_3 + 8))" ( (pointer_expression "**(code **)(*param_3 + 8)" * (pointer_expression "*(code **)(*param_3 + 8)" * (cast_expression "(code **)(*param_3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_3 + 8)" ( (binary_expression "*param_3 + 8" (pointer_expression "*param_3" * identifier) + number_literal) ))))) )) (argument_list "(param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier ))) ;) }))) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * 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 TYPE (pointer_declarator * (array_declarator IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (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 ( (pointer_expression & IDENT) , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (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 * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_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 ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) , (pointer_expression & IDENT) ))) ;) })) })) }) (else_clause else (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 (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 *\nFUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  undefined1 local_21;\n  undefined *local_20 [4];\n  \n  if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    \n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }\n  return param_1;\n}" (type_identifier "undefined4") (pointer_declarator "*\nFUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)" (* "*") (function_declarator "FUN_0022a800(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)" (identifier "FUN_0022a800") (parameter_list "(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,\n            undefined4 param_9,int *param_10,int param_11,int param_12)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (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 "undefined4 param_6" (type_identifier "undefined4") (identifier "param_6")) (, ",") (parameter_declaration "undefined4 param_7" (type_identifier "undefined4") (identifier "param_7")) (, ",") (parameter_declaration "undefined1 param_8" (type_identifier "undefined1") (identifier "param_8")) (, ",") (parameter_declaration "undefined4 param_9" (type_identifier "undefined4") (identifier "param_9")) (, ",") (parameter_declaration "int *param_10" (primitive_type "int") (pointer_declarator "*param_10" (* "*") (identifier "param_10"))) (, ",") (parameter_declaration "int param_11" (primitive_type "int") (identifier "param_11")) (, ",") (parameter_declaration "int param_12" (primitive_type "int") (identifier "param_12")) () ")")))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  undefined1 local_21;\n  undefined *local_20 [4];\n  \n  if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    \n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }\n  return param_1;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 local_34;" (type_identifier "undefined4") (identifier "local_34") (; ";")) (declaration "undefined4 local_30;" (type_identifier "undefined4") (identifier "local_30") (; ";")) (declaration "undefined1 local_21;" (type_identifier "undefined1") (identifier "local_21") (; ";")) (declaration "undefined *local_20 [4];" (type_identifier "undefined") (pointer_declarator "*local_20 [4]" (* "*") (array_declarator "local_20 [4]" (identifier "local_20") ([ "[") (number_literal "4") (] "]"))) (; ";")) (if_statement "if (param_11 == 0) {\n    local_20[0] = &DAT_00396e0c;\n                    \n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }\n  else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" (if "if") (parenthesized_expression "(param_11 == 0)" (( "(") (binary_expression "param_11 == 0" (identifier "param_11") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    local_20[0] = &DAT_00396e0c;\n                    \n    (**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);\n    if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }\n    *param_1 = local_34;\n    param_1[1] = local_30;\n    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }\n  }" ({ "{") (expression_statement "local_20[0] = &DAT_00396e0c;" (assignment_expression "local_20[0] = &DAT_00396e0c" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (= "=") (pointer_expression "&DAT_00396e0c" (& "&") (identifier "DAT_00396e0c"))) (; ";")) (expression_statement "(**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);" (call_expression "(**(code **)(*param_3 + 0xc))\n              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20)" (parenthesized_expression "(**(code **)(*param_3 + 0xc))" (( "(") (pointer_expression "**(code **)(*param_3 + 0xc)" (* "*") (pointer_expression "*(code **)(*param_3 + 0xc)" (* "*") (cast_expression "(code **)(*param_3 + 0xc)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_3 + 0xc)" (( "(") (binary_expression "*param_3 + 0xc" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (+ "+") (number_literal "0xc")) () ")"))))) () ")")) (argument_list "(&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20)" (( "(") (pointer_expression "&local_34" (& "&") (identifier "local_34")) (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (identifier "param_6") (, ",") (identifier "param_7") (, ",") (identifier "param_8") (, ",") (identifier "param_9") (, ",") (identifier "param_10") (, ",") (identifier "local_20") () ")"))) (; ";")) (if_statement "if (*param_10 == 0) {\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }" (if "if") (parenthesized_expression "(*param_10 == 0)" (( "(") (binary_expression "*param_10 == 0" (pointer_expression "*param_10" (* "*") (identifier "param_10")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }\n      FUN_002201f0(param_12,local_20);\n      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);\n      *(code **)(param_12 + 0x18) = FUN_00228670;\n    }" ({ "{") (if_statement "if (*(code **)(param_12 + 0x18) != (code *)0x0) {\n        (**(code **)(param_12 + 0x18))(param_12);\n      }" (if "if") (parenthesized_expression "(*(code **)(param_12 + 0x18) != (code *)0x0)" (( "(") (binary_expression "*(code **)(param_12 + 0x18) != (code *)0x0" (pointer_expression "*(code **)(param_12 + 0x18)" (* "*") (cast_expression "(code **)(param_12 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_12 + 0x18)" (( "(") (binary_expression "param_12 + 0x18" (identifier "param_12") (+ "+") (number_literal "0x18")) () ")")))) (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        (**(code **)(param_12 + 0x18))(param_12);\n      }" ({ "{") (expression_statement "(**(code **)(param_12 + 0x18))(param_12);" (call_expression "(**(code **)(param_12 + 0x18))(param_12)" (parenthesized_expression "(**(code **)(param_12 + 0x18))" (( "(") (pointer_expression "**(code **)(param_12 + 0x18)" (* "*") (pointer_expression "*(code **)(param_12 + 0x18)" (* "*") (cast_expression "(code **)(param_12 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_12 + 0x18)" (( "(") (binary_expression "param_12 + 0x18" (identifier "param_12") (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (argument_list "(param_12)" (( "(") (identifier "param_12") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_002201f0(param_12,local_20);" (call_expression "FUN_002201f0(param_12,local_20)" (identifier "FUN_002201f0") (argument_list "(param_12,local_20)" (( "(") (identifier "param_12") (, ",") (identifier "local_20") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);" (assignment_expression "*(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc)" (pointer_expression "*(undefined4 *)(param_12 + 4)" (* "*") (cast_expression "(undefined4 *)(param_12 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_12 + 4)" (( "(") (binary_expression "param_12 + 4" (identifier "param_12") (+ "+") (number_literal "4")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(local_20[0] + -0xc)" (* "*") (cast_expression "(undefined4 *)(local_20[0] + -0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_20[0] + -0xc)" (( "(") (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-0xc")) () ")"))))) (; ";")) (expression_statement "*(code **)(param_12 + 0x18) = FUN_00228670;" (assignment_expression "*(code **)(param_12 + 0x18) = FUN_00228670" (pointer_expression "*(code **)(param_12 + 0x18)" (* "*") (cast_expression "(code **)(param_12 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_12 + 0x18)" (( "(") (binary_expression "param_12 + 0x18" (identifier "param_12") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "FUN_00228670")) (; ";")) (} "}"))) (expression_statement "*param_1 = local_34;" (assignment_expression "*param_1 = local_34" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "local_34")) (; ";")) (expression_statement "param_1[1] = local_30;" (assignment_expression "param_1[1] = local_30" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "local_30")) (; ";")) (if_statement "if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }" (if "if") (parenthesized_expression "((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00)" (( "(") (binary_expression "(undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00" (cast_expression "(undefined4 *)(local_20[0] + -0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_20[0] + -0xc)" (( "(") (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-0xc")) () ")"))) (!= "!=") (pointer_expression "&DAT_00396e00" (& "&") (identifier "DAT_00396e00"))) () ")")) (compound_statement "{\n      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar2 < 1) {\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }\n    }" ({ "{") (if_statement "if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_0038ef24 == (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_0038ef24 == (undefined *)0x0" (identifier "PTR___pthread_key_create_0038ef24") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        iVar2 = *(int *)(local_20[0] + -4);\n        *(int *)(local_20[0] + -4) = iVar2 + -1;\n      }" ({ "{") (expression_statement "iVar2 = *(int *)(local_20[0] + -4);" (assignment_expression "iVar2 = *(int *)(local_20[0] + -4)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(local_20[0] + -4)" (* "*") (cast_expression "(int *)(local_20[0] + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_20[0] + -4)" (( "(") (binary_expression "local_20[0] + -4" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-4")) () ")"))))) (; ";")) (expression_statement "*(int *)(local_20[0] + -4) = iVar2 + -1;" (assignment_expression "*(int *)(local_20[0] + -4) = iVar2 + -1" (pointer_expression "*(int *)(local_20[0] + -4)" (* "*") (cast_expression "(int *)(local_20[0] + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_20[0] + -4)" (( "(") (binary_expression "local_20[0] + -4" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-4")) () ")")))) (= "=") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\n        iVar2 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" (else "else") (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(local_20[0] + -4);\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_20[0] + -4);" (assignment_expression "piVar1 = (int *)(local_20[0] + -4)" (identifier "piVar1") (= "=") (cast_expression "(int *)(local_20[0] + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_20[0] + -4)" (( "(") (binary_expression "local_20[0] + -4" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-4")) () ")")))) (; ";")) (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        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }" (if "if") (parenthesized_expression "(iVar2 < 1)" (( "(") (binary_expression "iVar2 < 1" (identifier "iVar2") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        FUN_0021e9b0(local_20[0] + -0xc,&local_21);\n      }" ({ "{") (expression_statement "FUN_0021e9b0(local_20[0] + -0xc,&local_21);" (call_expression "FUN_0021e9b0(local_20[0] + -0xc,&local_21)" (identifier "FUN_0021e9b0") (argument_list "(local_20[0] + -0xc,&local_21)" (( "(") (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-0xc")) (, ",") (pointer_expression "&local_21" (& "&") (identifier "local_21")) () ")"))) (; ";")) (} "}"))) (} "}"))) (} "}")) (else_clause "else {\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" (else "else") (compound_statement "{\n    (**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);\n  }" ({ "{") (expression_statement "(**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);" (call_expression "(**(code **)(*param_3 + 8))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11)" (parenthesized_expression "(**(code **)(*param_3 + 8))" (( "(") (pointer_expression "**(code **)(*param_3 + 8)" (* "*") (pointer_expression "*(code **)(*param_3 + 8)" (* "*") (cast_expression "(code **)(*param_3 + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_3 + 8)" (( "(") (binary_expression "*param_3 + 8" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (+ "+") (number_literal "8")) () ")"))))) () ")")) (argument_list "(param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (identifier "param_6") (, ",") (identifier "param_7") (, ",") (identifier "param_8") (, ",") (identifier "param_9") (, ",") (identifier "param_10") (, ",") (identifier "param_11") () ")"))) (; ";")) (} "}")))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* std::istreambuf_iterator<char, std::char_traits<char> >
   std::__facet_shims::__money_get<char>(std::integral_constant<bool, false>, std::locale::facet
   const*, std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
   std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, long double*,
   std::__facet_shims::__any_string*) */

var_3 *
std::__facet_shims::var_1<var_2>
          (var_3 *var_4,var_3 param_2,var_5 *var_6,var_3 param_4,var_3 param_5
          ,var_3 param_6,var_3 param_7,undefined1 param_8,var_3 param_9,var_5 *var_7
          ,var_5 var_10,var_8 *var_9)

{
  int *piVar1;
  int var_13;
  var_3 local_34;
  var_3 local_30;
  type_1 *local_20 [4];
  
  if (var_10 == 0) {
    local_20[0] = &DAT_00396e0c;
                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */
    (**(type_2 **)(*var_6 + 0xc))
              (&local_34,var_6,param_4,param_5,param_6,param_7,param_8,param_9,var_7,
               (var_8 *)local_20);
    if (*var_7 == 0) {
      if (*(type_2 **)(var_9 + 0x18) != (type_2 *)0x0) {
        (**(type_2 **)(var_9 + 0x18))(var_9);
      }
      std::string::var_8(var_9,(var_8 *)local_20);
      *(var_3 *)(var_9 + 4) = *(var_3 *)(local_20[0] + -0xc);
      *(type_2 **)(var_9 + 0x18) = (anonymous_namespace)::__destroy_string<var_2>var_11;
    }
    *var_4 = local_34;
    var_4[1] = local_30;
    if ((type_3 *)(local_20[0] + -0xc) != (type_3 *)&std::var_8::_Rep::_S_empty_rep_storage)
    {
      if (var_12 == (type_1 *)0x0) {
        var_13 = *(int *)(local_20[0] + -4);
        *(int *)(local_20[0] + -4) = var_13 + -1;
      }
      else {
        var_14();
        piVar1 = (int *)(local_20[0] + -4);
        var_13 = *piVar1;
        *piVar1 = *piVar1 + -1;
        var_15();
      }
      if (var_13 < 1) {
        std::string::_Rep::var_16((type_3 *)(local_20[0] + -0xc));
      }
    }
  }
  else {
    (**(type_2 **)(*var_6 + 8))
              (var_4,var_6,param_4,param_5,param_6,param_7,param_8,param_9,var_7,var_10);
  }
  return var_4;
}


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

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

undefined4 *
MASKED(undefined4 *param_1,undefined4 param_2,int *param_3,undefined4 param_4,
            undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined1 param_8,
            undefined4 param_9,int *param_10,int param_11,int param_12)

{
  int *piVar1;
  int iVar2;
  undefined4 local_34;
  undefined4 local_30;
  undefined1 local_21;
  undefined *local_20 [4];
  
  if (param_11 == 0) {
    local_20[0] = &DAT_00396e0c;
                    /* try { // try from 0022a887 to 0022a913 has its CatchHandler @ 0022a943 */
    (**(code **)(*param_3 + 0xc))
              (&local_34,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,local_20);
    if (*param_10 == 0) {
      if (*(code **)(param_12 + 0x18) != (code *)0x0) {
        (**(code **)(param_12 + 0x18))(param_12);
      }
      FUN_002201f0(param_12,local_20);
      *(undefined4 *)(param_12 + 4) = *(undefined4 *)(local_20[0] + -0xc);
      *(code **)(param_12 + 0x18) = FUN_00228670;
    }
    *param_1 = local_34;
    param_1[1] = local_30;
    if ((undefined4 *)(local_20[0] + -0xc) != &DAT_00396e00) {
      if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {
        iVar2 = *(int *)(local_20[0] + -4);
        *(int *)(local_20[0] + -4) = iVar2 + -1;
      }
      else {
        LOCK();
        piVar1 = (int *)(local_20[0] + -4);
        iVar2 = *piVar1;
        *piVar1 = *piVar1 + -1;
        UNLOCK();
      }
      if (iVar2 < 1) {
        FUN_0021e9b0(local_20[0] + -0xc,&local_21);
      }
    }
  }
  else {
    (**(code **)(*param_3 + 8))
              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11);
  }
  return param_1;
}

