
/* std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
   std::__facet_shims::__money_put<wchar_t>(std::integral_constant<bool, false>, std::locale::facet
   const*, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
   wchar_t, long double, std::__facet_shims::__any_string const*) */

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

{
  int *piVar1;
  int iVar2;
  int unaff_EDI;
  allocator local_21;
  int local_20 [4];
  
  __x86_get_pc_thunk_di();
  if (param_12 == (undefined4 *)0x0) {
    (**(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;
  }
  if (param_12[6] != 0) {
    std::wstring::wstring((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21);
                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */
    (**(code **)(*param_3 + 0xc))
              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,(wstring *)local_20);
    if ((allocator *)(local_20[0] + -0xc) != *(allocator **)(unaff_EDI + 0x16412f)) {
      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {
        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::wstring::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));
      }
    }
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  __throw_logic_error((char *)(unaff_EDI + 0x79e8b));
}



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

{
  int *piVar1;
  int iVar2;
  int unaff_EDI;
  undefined1 local_21;
  int local_20 [4];
  
  FUN_000559ee();
  if (param_12 == (undefined4 *)0x0) {
    (**(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;
  }
  if (param_12[6] != 0) {
    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);
                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */
    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);
    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {
      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {
        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_00269d00(local_20[0] + -0xc,&local_21);
      }
    }
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0022c6b0(unaff_EDI + 0x79e8b);
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
CALL 0x000559ee
ADD EDI,0x1643d7
PUSH ESI
PUSH EBX
SUB ESP,0x2c
MOV EDX,dword ptr [EBP + 0x34]
MOV EAX,dword ptr [EBP + 0x1c]
TEST EDX,EDX
JZ 0x0022acb0
MOV EBX,dword ptr [EDX + 0x18]
TEST EBX,EBX
JZ 0x0022ad2b
MOV dword ptr [EBP + -0x2c],EAX
LEA ESI,[EBP + -0x1c]
LEA EAX,[EBP + -0x1d]
MOV EBX,EDI
PUSH EAX
PUSH dword ptr [EDX + 0x4]
PUSH dword ptr [EDX]
PUSH ESI
MOV dword ptr [EBP + -0x30],EAX
CALL 0x0026bb80
MOV EAX,dword ptr [EBP + 0x10]
ADD ESP,0x10
MOV ECX,dword ptr [EAX]
MOV EAX,dword ptr [EBP + -0x2c]
PUSH ESI
PUSH dword ptr [EBP + 0x24]
MOVZX EAX,AL
PUSH dword ptr [EBP + 0x20]
PUSH EAX
PUSH dword ptr [EBP + 0x18]
PUSH dword ptr [EBP + 0x14]
PUSH dword ptr [EBP + 0x10]
PUSH dword ptr [EBP + 0x8]
CALL dword ptr [ECX + 0xc]
MOV EAX,dword ptr [EBP + -0x1c]
ADD ESP,0x1c
LEA EDX,[EAX + -0xc]
CMP EDX,dword ptr [EDI + 0xfffffd58]
JNZ 0x0022acf0
MOV EAX,dword ptr [EBP + 0x8]
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET 0x4
MOV EBX,dword ptr [EBP + 0x10]
SUB ESP,0x8
MOVZX EAX,AL
MOV EDX,dword ptr [EBX]
PUSH dword ptr [EBP + 0x30]
PUSH dword ptr [EBP + 0x2c]
PUSH dword ptr [EBP + 0x28]
PUSH dword ptr [EBP + 0x24]
PUSH dword ptr [EBP + 0x20]
PUSH EAX
PUSH dword ptr [EBP + 0x18]
PUSH dword ptr [EBP + 0x14]
PUSH EBX
PUSH dword ptr [EBP + 0x8]
CALL dword ptr [EDX + 0x8]
MOV EAX,dword ptr [EBP + 0x8]
ADD ESP,0x2c
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET 0x4
MOV ECX,dword ptr [EDI + 0xffffff24]
TEST ECX,ECX
JZ 0x0022ad20
MOV ECX,0xffffffff
XADD.LOCK dword ptr [EAX + -0x4],ECX
TEST ECX,ECX
JG 0x0022ac99
SUB ESP,0x8
PUSH dword ptr [EBP + -0x30]
MOV EBX,EDI
PUSH EDX
CALL 0x00269d00
ADD ESP,0x10
JMP 0x0022ac99
MOV ECX,dword ptr [EAX + -0x4]
LEA ESI,[ECX + -0x1]
MOV dword ptr [EAX + -0x4],ESI
JMP 0x0022ad04
SUB ESP,0xc
LEA EAX,[EDI + 0xfff15ab4]
MOV EBX,EDI
PUSH EAX
CALL 0x0022c6b0
(translation_unit "undefined4\nFUN_0022ac20(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  undefined1 local_21;\n  int local_20 [4];\n  \n  FUN_000559ee();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */\n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c6b0(unaff_EDI + 0x79e8b);\n}\n\n" (function_definition "undefined4\nFUN_0022ac20(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  undefined1 local_21;\n  int local_20 [4];\n  \n  FUN_000559ee();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */\n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c6b0(unaff_EDI + 0x79e8b);\n}" type_identifier (function_declarator "FUN_0022ac20(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)" ( (parameter_declaration "undefined4 param_1" type_identifier 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 "undefined1 param_6" type_identifier identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined4 param_8" type_identifier identifier) , (parameter_declaration "undefined4 param_9" type_identifier identifier) , (parameter_declaration "undefined4 param_10" type_identifier identifier) , (parameter_declaration "undefined4 param_11" type_identifier identifier) , (parameter_declaration "undefined4 *param_12" type_identifier (pointer_declarator "*param_12" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  undefined1 local_21;\n  int local_20 [4];\n  \n  FUN_000559ee();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */\n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c6b0(unaff_EDI + 0x79e8b);\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "int local_20 [4];" primitive_type (array_declarator "local_20 [4]" identifier [ number_literal ]) ;) (expression_statement "FUN_000559ee();" (call_expression "FUN_000559ee()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }" if (parenthesized_expression "(param_12 == (undefined4 *)0x0)" ( (binary_expression "param_12 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (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    return param_1;\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 ;) })) (if_statement "if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */\n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }" if (parenthesized_expression "(param_12[6] != 0)" ( (binary_expression "param_12[6] != 0" (subscript_expression "param_12[6]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */\n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }" { (expression_statement "FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);" (call_expression "FUN_0026bb80(local_20,*param_12,param_12[1],&local_21)" identifier (argument_list "(local_20,*param_12,param_12[1],&local_21)" ( identifier , (pointer_expression "*param_12" * identifier) , (subscript_expression "param_12[1]" identifier [ number_literal ]) , (pointer_expression "&local_21" & identifier) ))) ;) comment (expression_statement "(**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);" (call_expression "(**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,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 "(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier ))) ;) (if_statement "if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }" if (parenthesized_expression "(local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f))" ( (binary_expression "local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)" (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) != (pointer_expression "*(int *)(unaff_EDI + 0x16412f)" * (cast_expression "(int *)(unaff_EDI + 0x16412f)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x16412f)" ( (binary_expression "unaff_EDI + 0x16412f" identifier + number_literal) ))))) )) (compound_statement "{\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }" { (if_statement "if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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 "(*(int *)(unaff_EDI + 0x1642fb) == 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x1642fb) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x1642fb)" * (cast_expression "(int *)(unaff_EDI + 0x1642fb)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x1642fb)" ( (binary_expression "unaff_EDI + 0x1642fb" identifier + number_literal) )))) == 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_00269d00(local_20[0] + -0xc,&local_21);\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        FUN_00269d00(local_20[0] + -0xc,&local_21);\n      }" { (expression_statement "FUN_00269d00(local_20[0] + -0xc,&local_21);" (call_expression "FUN_00269d00(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) ))) ;) })) })) (return_statement "return param_1;" return identifier ;) })) comment (expression_statement "FUN_0022c6b0(unaff_EDI + 0x79e8b);" (call_expression "FUN_0022c6b0(unaff_EDI + 0x79e8b)" identifier (argument_list "(unaff_EDI + 0x79e8b)" ( (binary_expression "unaff_EDI + 0x79e8b" identifier + number_literal) ))) ;) })))
(translation_unit "/* std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >\n   std::__facet_shims::__money_put<wchar_t>(std::integral_constant<bool, false>, std::locale::facet\n   const*, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,\n   wchar_t, long double, std::__facet_shims::__any_string const*) */\n\nundefined4\nstd::__facet_shims::__money_put<wchar_t>\n          (undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5,\n          undefined1 param_6,undefined4 param_7,undefined4 param_8,undefined4 param_9,\n          undefined4 param_10,undefined4 param_11,undefined4 *param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  allocator local_21;\n  int local_20 [4];\n  \n  __x86_get_pc_thunk_di();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    std::wstring::wstring((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21);\n                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */\n    (**(code **)(*param_3 + 0xc))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,(wstring *)local_20);\n    if ((allocator *)(local_20[0] + -0xc) != *(allocator **)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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::wstring::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_logic_error((char *)(unaff_EDI + 0x79e8b));\n}\n\n" comment (function_definition "undefined4\nstd::__facet_shims::__money_put<wchar_t>\n          (undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5,\n          undefined1 param_6,undefined4 param_7,undefined4 param_8,undefined4 param_9,\n          undefined4 param_10,undefined4 param_11,undefined4 *param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  allocator local_21;\n  int local_20 [4];\n  \n  __x86_get_pc_thunk_di();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    std::wstring::wstring((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21);\n                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */\n    (**(code **)(*param_3 + 0xc))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,(wstring *)local_20);\n    if ((allocator *)(local_20[0] + -0xc) != *(allocator **)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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::wstring::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_logic_error((char *)(unaff_EDI + 0x79e8b));\n}" type_identifier (ERROR "std::__facet_shims::__money_put<" identifier : : identifier : : identifier <) (function_declarator "wchar_t>\n          (undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5,\n          undefined1 param_6,undefined4 param_7,undefined4 param_8,undefined4 param_9,\n          undefined4 param_10,undefined4 param_11,undefined4 *param_12)" identifier (ERROR ">" >) (parameter_list "(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,undefined4 param_5,\n          undefined1 param_6,undefined4 param_7,undefined4 param_8,undefined4 param_9,\n          undefined4 param_10,undefined4 param_11,undefined4 *param_12)" ( (parameter_declaration "undefined4 param_1" type_identifier 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 "undefined1 param_6" type_identifier identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined4 param_8" type_identifier identifier) , (parameter_declaration "undefined4 param_9" type_identifier identifier) , (parameter_declaration "undefined4 param_10" type_identifier identifier) , (parameter_declaration "undefined4 param_11" type_identifier identifier) , (parameter_declaration "undefined4 *param_12" type_identifier (pointer_declarator "*param_12" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  allocator local_21;\n  int local_20 [4];\n  \n  __x86_get_pc_thunk_di();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    std::wstring::wstring((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21);\n                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */\n    (**(code **)(*param_3 + 0xc))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,(wstring *)local_20);\n    if ((allocator *)(local_20[0] + -0xc) != *(allocator **)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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::wstring::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_logic_error((char *)(unaff_EDI + 0x79e8b));\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "allocator local_21;" type_identifier identifier ;) (declaration "int local_20 [4];" primitive_type (array_declarator "local_20 [4]" identifier [ number_literal ]) ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }" if (parenthesized_expression "(param_12 == (undefined4 *)0x0)" ( (binary_expression "param_12 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (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    return param_1;\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 ;) })) (if_statement "if (param_12[6] != 0) {\n    std::wstring::wstring((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21);\n                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */\n    (**(code **)(*param_3 + 0xc))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,(wstring *)local_20);\n    if ((allocator *)(local_20[0] + -0xc) != *(allocator **)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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::wstring::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }\n    return param_1;\n  }" if (parenthesized_expression "(param_12[6] != 0)" ( (binary_expression "param_12[6] != 0" (subscript_expression "param_12[6]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    std::wstring::wstring((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21);\n                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */\n    (**(code **)(*param_3 + 0xc))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,(wstring *)local_20);\n    if ((allocator *)(local_20[0] + -0xc) != *(allocator **)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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::wstring::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }\n    return param_1;\n  }" { (labeled_statement "std::wstring::wstring((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::wstring((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21);" statement_identifier : (ERROR ":" :) (expression_statement "wstring((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21);" (call_expression "wstring((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21)" identifier (argument_list "((wstring *)local_20,(wchar_t *)*param_12,param_12[1],&local_21)" ( (cast_expression "(wstring *)local_20" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(wchar_t *)*param_12" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_12" * identifier)) , (subscript_expression "param_12[1]" identifier [ number_literal ]) , (pointer_expression "&local_21" & identifier) ))) ;))) comment (expression_statement "(**(code **)(*param_3 + 0xc))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,(wstring *)local_20);" (call_expression "(**(code **)(*param_3 + 0xc))\n              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,(wstring *)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 "(param_1,param_3,param_4,param_5,param_6,param_7,param_8,(wstring *)local_20)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , (cast_expression "(wstring *)local_20" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (if_statement "if ((allocator *)(local_20[0] + -0xc) != *(allocator **)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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::wstring::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }" if (parenthesized_expression "((allocator *)(local_20[0] + -0xc) != *(allocator **)(unaff_EDI + 0x16412f))" ( (binary_expression "(allocator *)(local_20[0] + -0xc) != *(allocator **)(unaff_EDI + 0x16412f)" (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) ))) != (pointer_expression "*(allocator **)(unaff_EDI + 0x16412f)" * (cast_expression "(allocator **)(unaff_EDI + 0x16412f)" ( (type_descriptor "allocator **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EDI + 0x16412f)" ( (binary_expression "unaff_EDI + 0x16412f" identifier + number_literal) ))))) )) (compound_statement "{\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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::wstring::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }\n    }" { (if_statement "if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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 "(*(int *)(unaff_EDI + 0x1642fb) == 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x1642fb) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x1642fb)" * (cast_expression "(int *)(unaff_EDI + 0x1642fb)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x1642fb)" ( (binary_expression "unaff_EDI + 0x1642fb" identifier + number_literal) )))) == 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::wstring::_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::wstring::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));\n      }" { (labeled_statement "std::wstring::_Rep::_M_destroy((allocator *)(local_20[0] + -0xc));" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_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) ))) ))) ;)))) })) })) (return_statement "return param_1;" return identifier ;) })) comment (expression_statement "__throw_logic_error((char *)(unaff_EDI + 0x79e8b));" (call_expression "__throw_logic_error((char *)(unaff_EDI + 0x79e8b))" identifier (argument_list "((char *)(unaff_EDI + 0x79e8b))" ( (cast_expression "(char *)(unaff_EDI + 0x79e8b)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x79e8b)" ( (binary_expression "unaff_EDI + 0x79e8b" identifier + number_literal) ))) ))) ;) })))
(translation_unit "undefined4\nFUN_0022ac20(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  undefined1 local_21;\n  int local_20 [4];\n  \n  FUN_000559ee();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    \n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }\n                    \n  FUN_0022c6b0(unaff_EDI + 0x79e8b);\n}\n\n" (function_definition "undefined4\nFUN_0022ac20(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  undefined1 local_21;\n  int local_20 [4];\n  \n  FUN_000559ee();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    \n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }\n                    \n  FUN_0022c6b0(unaff_EDI + 0x79e8b);\n}" type_identifier (function_declarator "FUN_0022ac20(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)" ( (parameter_declaration "undefined4 param_1" type_identifier 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 "undefined1 param_6" type_identifier identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined4 param_8" type_identifier identifier) , (parameter_declaration "undefined4 param_9" type_identifier identifier) , (parameter_declaration "undefined4 param_10" type_identifier identifier) , (parameter_declaration "undefined4 param_11" type_identifier identifier) , (parameter_declaration "undefined4 *param_12" type_identifier (pointer_declarator "*param_12" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  undefined1 local_21;\n  int local_20 [4];\n  \n  FUN_000559ee();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    \n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }\n                    \n  FUN_0022c6b0(unaff_EDI + 0x79e8b);\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "int local_20 [4];" primitive_type (array_declarator "local_20 [4]" identifier [ number_literal ]) ;) (expression_statement "FUN_000559ee();" (call_expression "FUN_000559ee()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }" if (parenthesized_expression "(param_12 == (undefined4 *)0x0)" ( (binary_expression "param_12 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (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    return param_1;\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 ;) })) (if_statement "if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    \n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }" if (parenthesized_expression "(param_12[6] != 0)" ( (binary_expression "param_12[6] != 0" (subscript_expression "param_12[6]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    \n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }" { (expression_statement "FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);" (call_expression "FUN_0026bb80(local_20,*param_12,param_12[1],&local_21)" identifier (argument_list "(local_20,*param_12,param_12[1],&local_21)" ( identifier , (pointer_expression "*param_12" * identifier) , (subscript_expression "param_12[1]" identifier [ number_literal ]) , (pointer_expression "&local_21" & identifier) ))) ;) (expression_statement "(**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);" (call_expression "(**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,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 "(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier ))) ;) (if_statement "if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }" if (parenthesized_expression "(local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f))" ( (binary_expression "local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)" (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" identifier [ number_literal ]) + number_literal) != (pointer_expression "*(int *)(unaff_EDI + 0x16412f)" * (cast_expression "(int *)(unaff_EDI + 0x16412f)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x16412f)" ( (binary_expression "unaff_EDI + 0x16412f" identifier + number_literal) ))))) )) (compound_statement "{\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }" { (if_statement "if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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 "(*(int *)(unaff_EDI + 0x1642fb) == 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x1642fb) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x1642fb)" * (cast_expression "(int *)(unaff_EDI + 0x1642fb)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x1642fb)" ( (binary_expression "unaff_EDI + 0x1642fb" identifier + number_literal) )))) == 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_00269d00(local_20[0] + -0xc,&local_21);\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        FUN_00269d00(local_20[0] + -0xc,&local_21);\n      }" { (expression_statement "FUN_00269d00(local_20[0] + -0xc,&local_21);" (call_expression "FUN_00269d00(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) ))) ;) })) })) (return_statement "return param_1;" return identifier ;) })) (expression_statement "FUN_0022c6b0(unaff_EDI + 0x79e8b);" (call_expression "FUN_0022c6b0(unaff_EDI + 0x79e8b)" identifier (argument_list "(unaff_EDI + 0x79e8b)" ( (binary_expression "unaff_EDI + 0x79e8b" identifier + number_literal) ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE 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 IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (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 (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT ))) ;) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression * IDENT) , (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 ( IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == 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) ))) ;) })) })) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) })))
(function_definition "undefined4\nFUN_0022ac20(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  undefined1 local_21;\n  int local_20 [4];\n  \n  FUN_000559ee();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    \n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }\n                    \n  FUN_0022c6b0(unaff_EDI + 0x79e8b);\n}" (type_identifier "undefined4") (function_declarator "FUN_0022ac20(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)" (identifier "FUN_0022ac20") (parameter_list "(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 param_4,\n            undefined4 param_5,undefined1 param_6,undefined4 param_7,undefined4 param_8,\n            undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 *param_12)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (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 "undefined1 param_6" (type_identifier "undefined1") (identifier "param_6")) (, ",") (parameter_declaration "undefined4 param_7" (type_identifier "undefined4") (identifier "param_7")) (, ",") (parameter_declaration "undefined4 param_8" (type_identifier "undefined4") (identifier "param_8")) (, ",") (parameter_declaration "undefined4 param_9" (type_identifier "undefined4") (identifier "param_9")) (, ",") (parameter_declaration "undefined4 param_10" (type_identifier "undefined4") (identifier "param_10")) (, ",") (parameter_declaration "undefined4 param_11" (type_identifier "undefined4") (identifier "param_11")) (, ",") (parameter_declaration "undefined4 *param_12" (type_identifier "undefined4") (pointer_declarator "*param_12" (* "*") (identifier "param_12"))) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int unaff_EDI;\n  undefined1 local_21;\n  int local_20 [4];\n  \n  FUN_000559ee();\n  if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }\n  if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    \n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }\n                    \n  FUN_0022c6b0(unaff_EDI + 0x79e8b);\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (declaration "undefined1 local_21;" (type_identifier "undefined1") (identifier "local_21") (; ";")) (declaration "int local_20 [4];" (primitive_type "int") (array_declarator "local_20 [4]" (identifier "local_20") ([ "[") (number_literal "4") (] "]")) (; ";")) (expression_statement "FUN_000559ee();" (call_expression "FUN_000559ee()" (identifier "FUN_000559ee") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (param_12 == (undefined4 *)0x0) {\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    return param_1;\n  }" (if "if") (parenthesized_expression "(param_12 == (undefined4 *)0x0)" (( "(") (binary_expression "param_12 == (undefined4 *)0x0" (identifier "param_12") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (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    return param_1;\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") (; ";")) (} "}"))) (if_statement "if (param_12[6] != 0) {\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    \n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }" (if "if") (parenthesized_expression "(param_12[6] != 0)" (( "(") (binary_expression "param_12[6] != 0" (subscript_expression "param_12[6]" (identifier "param_12") ([ "[") (number_literal "6") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);\n                    \n    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);\n    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }\n    return param_1;\n  }" ({ "{") (expression_statement "FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);" (call_expression "FUN_0026bb80(local_20,*param_12,param_12[1],&local_21)" (identifier "FUN_0026bb80") (argument_list "(local_20,*param_12,param_12[1],&local_21)" (( "(") (identifier "local_20") (, ",") (pointer_expression "*param_12" (* "*") (identifier "param_12")) (, ",") (subscript_expression "param_12[1]" (identifier "param_12") ([ "[") (number_literal "1") (] "]")) (, ",") (pointer_expression "&local_21" (& "&") (identifier "local_21")) () ")"))) (; ";")) (expression_statement "(**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);" (call_expression "(**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,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 "(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (identifier "param_6") (, ",") (identifier "param_7") (, ",") (identifier "param_8") (, ",") (identifier "local_20") () ")"))) (; ";")) (if_statement "if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }" (if "if") (parenthesized_expression "(local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f))" (( "(") (binary_expression "local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)" (binary_expression "local_20[0] + -0xc" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-0xc")) (!= "!=") (pointer_expression "*(int *)(unaff_EDI + 0x16412f)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x16412f)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x16412f)" (( "(") (binary_expression "unaff_EDI + 0x16412f" (identifier "unaff_EDI") (+ "+") (number_literal "0x16412f")) () ")"))))) () ")")) (compound_statement "{\n      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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_00269d00(local_20[0] + -0xc,&local_21);\n      }\n    }" ({ "{") (if_statement "if (*(int *)(unaff_EDI + 0x1642fb) == 0) {\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 "(*(int *)(unaff_EDI + 0x1642fb) == 0)" (( "(") (binary_expression "*(int *)(unaff_EDI + 0x1642fb) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x1642fb)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x1642fb)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x1642fb)" (( "(") (binary_expression "unaff_EDI + 0x1642fb" (identifier "unaff_EDI") (+ "+") (number_literal "0x1642fb")) () ")")))) (== "==") (number_literal "0")) () ")")) (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_00269d00(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_00269d00(local_20[0] + -0xc,&local_21);\n      }" ({ "{") (expression_statement "FUN_00269d00(local_20[0] + -0xc,&local_21);" (call_expression "FUN_00269d00(local_20[0] + -0xc,&local_21)" (identifier "FUN_00269d00") (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")) () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "FUN_0022c6b0(unaff_EDI + 0x79e8b);" (call_expression "FUN_0022c6b0(unaff_EDI + 0x79e8b)" (identifier "FUN_0022c6b0") (argument_list "(unaff_EDI + 0x79e8b)" (( "(") (binary_expression "unaff_EDI + 0x79e8b" (identifier "unaff_EDI") (+ "+") (number_literal "0x79e8b")) () ")"))) (; ";")) (} "}")))

/* std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
   std::__facet_shims::__money_put<wchar_t>(std::integral_constant<bool, false>, std::locale::facet
   const*, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
   wchar_t, long double, std::__facet_shims::__any_string const*) */

type_1
std::__facet_shims::__money_put<function_1>
          (type_1 param_1,type_1 param_2,int *param_3,type_1 param_4,type_1 param_5,
          type_2 param_6,type_1 param_7,type_1 param_8,type_1 param_9,
          type_1 param_10,type_1 param_11,type_1 *var_2)

{
  int *piVar1;
  int var_5;
  int var_4;
  type_3 local_21;
  int local_20 [4];
  
  var_1();
  if (var_2 == (type_1 *)0x0) {
    (**(type_4 **)(*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;
  }
  if (var_2[6] != 0) {
    std::wstring::var_3((var_3 *)local_20,(function_1 *)*var_2,var_2[1],&local_21);
                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */
    (**(type_4 **)(*param_3 + 0xc))
              (param_1,param_3,param_4,param_5,param_6,param_7,param_8,(var_3 *)local_20);
    if ((type_3 *)(local_20[0] + -0xc) != *(type_3 **)(var_4 + 0x16412f)) {
      if (*(int *)(var_4 + 0x1642fb) == 0) {
        var_5 = *(int *)(local_20[0] + -4);
        *(int *)(local_20[0] + -4) = var_5 + -1;
      }
      else {
        var_6();
        piVar1 = (int *)(local_20[0] + -4);
        var_5 = *piVar1;
        *piVar1 = *piVar1 + -1;
        var_7();
      }
      if (var_5 < 1) {
        std::wstring::_Rep::var_8((type_3 *)(local_20[0] + -0xc));
      }
    }
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  var_9((char *)(var_4 + 0x79e8b));
}


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

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

{
  int *piVar1;
  int iVar2;
  int unaff_EDI;
  undefined1 local_21;
  int local_20 [4];
  
  FUN_000559ee();
  if (param_12 == (undefined4 *)0x0) {
    (**(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;
  }
  if (param_12[6] != 0) {
    FUN_0026bb80(local_20,*param_12,param_12[1],&local_21);
                    /* try { // try from 0022ac85 to 0022ac87 has its CatchHandler @ 0022ad3c */
    (**(code **)(*param_3 + 0xc))(param_1,param_3,param_4,param_5,param_6,param_7,param_8,local_20);
    if (local_20[0] + -0xc != *(int *)(unaff_EDI + 0x16412f)) {
      if (*(int *)(unaff_EDI + 0x1642fb) == 0) {
        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_00269d00(local_20[0] + -0xc,&local_21);
      }
    }
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0022c6b0(unaff_EDI + 0x79e8b);
}

