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

undefined8 __thiscall
std::__facet_shims::__money_get<wchar_t>
          (__facet_shims *this,undefined8 param_2,undefined8 param_3,undefined8 param_4,
          undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,
          wstring *param_10)

{
  int *piVar1;
  undefined8 uVar2;
  int iVar3;
  undefined *local_40 [2];
  
  if (param_9 == 0) {
    local_40[0] = &DAT_0068b618;
                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */
    uVar2 = (**(code **)(*(long *)this + 0x18))
                      (this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,
                       (wstring *)local_40);
    if (*param_8 == 0) {
      if (*(code **)(param_10 + 0x20) != (code *)0x0) {
        (**(code **)(param_10 + 0x20))(param_10);
      }
      std::wstring::wstring(param_10,(wstring *)local_40);
      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);
      *(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t>;
    }
    if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::wstring::_Rep::_S_empty_rep_storage
       ) {
      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {
        iVar3 = *(int *)(local_40[0] + -8);
        *(int *)(local_40[0] + -8) = iVar3 + -1;
      }
      else {
        LOCK();
        piVar1 = (int *)(local_40[0] + -8);
        iVar3 = *piVar1;
        *piVar1 = *piVar1 + -1;
        UNLOCK();
      }
      if (iVar3 < 1) {
        std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));
      }
    }
  }
  else {
    uVar2 = (**(code **)(*(long *)this + 0x10))(this,param_2,param_3);
  }
  return uVar2;
}



undefined8
FUN_004daf00(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,
            long param_10)

{
  int *piVar1;
  undefined8 uVar2;
  int iVar3;
  undefined1 local_41;
  undefined *local_40 [2];
  
  if (param_9 == 0) {
    local_40[0] = &DAT_0068b618;
                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */
    uVar2 = (**(code **)(*param_1 + 0x18))
                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);
    if (*param_8 == 0) {
      if (*(code **)(param_10 + 0x20) != (code *)0x0) {
        (**(code **)(param_10 + 0x20))(param_10);
      }
      FUN_0051a710(param_10,local_40);
      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);
      *(code **)(param_10 + 0x20) = FUN_004d9000;
    }
    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {
      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {
        iVar3 = *(int *)(local_40[0] + -8);
        *(int *)(local_40[0] + -8) = iVar3 + -1;
      }
      else {
        LOCK();
        piVar1 = (int *)(local_40[0] + -8);
        iVar3 = *piVar1;
        *piVar1 = *piVar1 + -1;
        UNLOCK();
      }
      if (iVar3 < 1) {
        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);
      }
    }
  }
  else {
    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);
  }
  return uVar2;
}


PUSH RBP
MOVZX R9D,R9B
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDX
SUB RSP,0x38
MOV RAX,qword ptr [RBP + 0x20]
MOV RDX,qword ptr [RBP + 0x10]
MOV R13,qword ptr [RBP + 0x18]
MOV R10,qword ptr [RDI]
TEST RAX,RAX
JZ 0x004daf50
SUB RSP,0x8
PUSH RAX
PUSH R13
PUSH RDX
MOV RDX,RBX
CALL qword ptr [R10 + 0x10]
ADD RSP,0x20
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LEA R12,[0x68b600]
SUB RSP,0x8
LEA R14,[RBP + -0x38]
PUSH R14
LEA RAX,[R12 + 0x18]
PUSH R13
MOV qword ptr [RBP + -0x38],RAX
PUSH RDX
MOV RDX,RBX
CALL qword ptr [R10 + 0x18]
MOV EDX,EDX
MOV qword ptr [RBP + -0x50],RAX
MOV R15,RAX
ADD RSP,0x20
MOV RAX,-0x100000000
MOV qword ptr [RBP + -0x48],RDX
AND RBX,RAX
MOV EAX,dword ptr [R13]
OR RBX,RDX
TEST EAX,EAX
JZ 0x004daff0
MOV RCX,qword ptr [RBP + -0x38]
LEA RDI,[RCX + -0x18]
MOV RAX,R15
MOV RDX,RBX
CMP RDI,R12
JZ 0x004daf3f
CMP qword ptr [0x0067bee8],0x0
JZ 0x004db038
MOV ESI,0xffffffff
XADD.LOCK dword ptr [RCX + -0x8],ESI
TEST ESI,ESI
JG 0x004daf3f
LEA RSI,[RBP + -0x39]
MOV qword ptr [RBP + -0x60],RDX
MOV qword ptr [RBP + -0x58],RAX
CALL 0x005192f0
MOV RAX,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x60]
JMP 0x004daf3f
MOV RAX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RAX + 0x20]
TEST RAX,RAX
JZ 0x004db003
MOV RDI,qword ptr [RBP + 0x28]
CALL RAX
MOV RDI,qword ptr [RBP + 0x28]
MOV RSI,R14
CALL 0x0051a710
MOV RCX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RCX + -0x18]
MOV qword ptr [RSI + 0x8],RAX
MOV RAX,RSI
LEA RSI,[0x4d9000]
MOV qword ptr [RAX + 0x20],RSI
JMP 0x004dafa1
MOV ESI,dword ptr [RCX + -0x8]
LEA R8D,[RSI + -0x1]
MOV dword ptr [RCX + -0x8],R8D
JMP 0x004dafc4
(translation_unit "undefined8\nFUN_004daf00(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)\n\n{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined1 local_41;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */\n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined8\nFUN_004daf00(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)\n\n{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined1 local_41;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */\n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_004daf00(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)" identifier (parameter_list "(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) , (parameter_declaration "undefined1 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) , (parameter_declaration "int *param_8" primitive_type (pointer_declarator "*param_8" * identifier)) , (parameter_declaration "long param_9" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_10" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined1 local_41;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */\n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }\n  return uVar2;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined1 local_41;" type_identifier identifier ;) (declaration "undefined *local_40 [2];" type_identifier (pointer_declarator "*local_40 [2]" * (array_declarator "local_40 [2]" identifier [ number_literal ])) ;) (if_statement "if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */\n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }" if (parenthesized_expression "(param_9 == 0)" ( (binary_expression "param_9 == 0" identifier == number_literal) )) (compound_statement "{\n    local_40[0] = &DAT_0068b618;\n                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */\n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }" { (expression_statement "local_40[0] = &DAT_0068b618;" (assignment_expression "local_40[0] = &DAT_0068b618" (subscript_expression "local_40[0]" identifier [ number_literal ]) = (pointer_expression "&DAT_0068b618" & identifier)) ;) comment (expression_statement "uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40)" identifier = (call_expression "(**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40)" (parenthesized_expression "(**(code **)(*param_1 + 0x18))" ( (pointer_expression "**(code **)(*param_1 + 0x18)" * (pointer_expression "*(code **)(*param_1 + 0x18)" * (cast_expression "(code **)(*param_1 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }" if (parenthesized_expression "(*param_8 == 0)" ( (binary_expression "*param_8 == 0" (pointer_expression "*param_8" * identifier) == number_literal) )) (compound_statement "{\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }" { (if_statement "if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }" if (parenthesized_expression "(*(code **)(param_10 + 0x20) != (code *)0x0)" ( (binary_expression "*(code **)(param_10 + 0x20) != (code *)0x0" (pointer_expression "*(code **)(param_10 + 0x20)" * (cast_expression "(code **)(param_10 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_10 + 0x20)" ( (binary_expression "param_10 + 0x20" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (**(code **)(param_10 + 0x20))(param_10);\n      }" { (expression_statement "(**(code **)(param_10 + 0x20))(param_10);" (call_expression "(**(code **)(param_10 + 0x20))(param_10)" (parenthesized_expression "(**(code **)(param_10 + 0x20))" ( (pointer_expression "**(code **)(param_10 + 0x20)" * (pointer_expression "*(code **)(param_10 + 0x20)" * (cast_expression "(code **)(param_10 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_10 + 0x20)" ( (binary_expression "param_10 + 0x20" identifier + number_literal) ))))) )) (argument_list "(param_10)" ( identifier ))) ;) })) (expression_statement "FUN_0051a710(param_10,local_40);" (call_expression "FUN_0051a710(param_10,local_40)" identifier (argument_list "(param_10,local_40)" ( identifier , identifier ))) ;) (expression_statement "*(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);" (assignment_expression "*(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18)" (pointer_expression "*(undefined8 *)(param_10 + 8)" * (cast_expression "(undefined8 *)(param_10 + 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_10 + 8)" ( (binary_expression "param_10 + 8" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(local_40[0] + -0x18)" * (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(code **)(param_10 + 0x20) = FUN_004d9000;" (assignment_expression "*(code **)(param_10 + 0x20) = FUN_004d9000" (pointer_expression "*(code **)(param_10 + 0x20)" * (cast_expression "(code **)(param_10 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_10 + 0x20)" ( (binary_expression "param_10 + 0x20" identifier + number_literal) )))) = identifier) ;) })) (if_statement "if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }" if (parenthesized_expression "((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600)" ( (binary_expression "(undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600" (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))) != (pointer_expression "&DAT_0068b600" & identifier)) )) (compound_statement "{\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_0067bee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0067bee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }" { (expression_statement "iVar3 = *(int *)(local_40[0] + -8);" (assignment_expression "iVar3 = *(int *)(local_40[0] + -8)" identifier = (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(int *)(local_40[0] + -8) = iVar3 + -1;" (assignment_expression "*(int *)(local_40[0] + -8) = iVar3 + -1" (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_40[0] + -8);" (assignment_expression "piVar1 = (int *)(local_40[0] + -8)" identifier = (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) ;) (expression_statement "iVar3 = *piVar1;" (assignment_expression "iVar3 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }" { (expression_statement "thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);" (call_expression "thunk_FUN_0049e340(local_40[0] + -0x18,&local_41)" identifier (argument_list "(local_40[0] + -0x18,&local_41)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) , (pointer_expression "&local_41" & identifier) ))) ;) })) })) }) (else_clause "else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }" else (compound_statement "{\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }" { (expression_statement "uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3)" identifier = (call_expression "(**(code **)(*param_1 + 0x10))(param_1,param_2,param_3)" (parenthesized_expression "(**(code **)(*param_1 + 0x10))" ( (pointer_expression "**(code **)(*param_1 + 0x10)" * (pointer_expression "*(code **)(*param_1 + 0x10)" * (cast_expression "(code **)(*param_1 + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x10)" ( (binary_expression "*param_1 + 0x10" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >\n   std::__facet_shims::__money_get<wchar_t>(std::integral_constant<bool, false>, std::locale::facet\n   const*, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,\n   std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,\n   std::_Ios_Iostate&, long double*, std::__facet_shims::__any_string*) */\n\nundefined8 __thiscall\nstd::__facet_shims::__money_get<wchar_t>\n          (__facet_shims *this,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n          undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n          wstring *param_10)\n\n{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */\n    uVar2 = (**(code **)(*(long *)this + 0x18))\n                      (this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,\n                       (wstring *)local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      std::wstring::wstring(param_10,(wstring *)local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t>;\n    }\n    if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::wstring::_Rep::_S_empty_rep_storage\n       ) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*(long *)this + 0x10))(this,param_2,param_3);\n  }\n  return uVar2;\n}\n\n" comment (function_definition "undefined8 __thiscall\nstd::__facet_shims::__money_get<wchar_t>\n          (__facet_shims *this,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n          undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n          wstring *param_10)\n\n{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */\n    uVar2 = (**(code **)(*(long *)this + 0x18))\n                      (this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,\n                       (wstring *)local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      std::wstring::wstring(param_10,(wstring *)local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t>;\n    }\n    if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::wstring::_Rep::_S_empty_rep_storage\n       ) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*(long *)this + 0x10))(this,param_2,param_3);\n  }\n  return uVar2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::__facet_shims::__money_get<" identifier : : identifier : : identifier <) (function_declarator "wchar_t>\n          (__facet_shims *this,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n          undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n          wstring *param_10)" identifier (ERROR ">" >) (parameter_list "(__facet_shims *this,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n          undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n          wstring *param_10)" ( (parameter_declaration "__facet_shims *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) , (parameter_declaration "undefined1 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) , (parameter_declaration "int *param_8" primitive_type (pointer_declarator "*param_8" * identifier)) , (parameter_declaration "long param_9" (sized_type_specifier "long" long) identifier) , (parameter_declaration "wstring *param_10" type_identifier (pointer_declarator "*param_10" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */\n    uVar2 = (**(code **)(*(long *)this + 0x18))\n                      (this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,\n                       (wstring *)local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      std::wstring::wstring(param_10,(wstring *)local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t>;\n    }\n    if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::wstring::_Rep::_S_empty_rep_storage\n       ) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*(long *)this + 0x10))(this,param_2,param_3);\n  }\n  return uVar2;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined *local_40 [2];" type_identifier (pointer_declarator "*local_40 [2]" * (array_declarator "local_40 [2]" identifier [ number_literal ])) ;) (if_statement "if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */\n    uVar2 = (**(code **)(*(long *)this + 0x18))\n                      (this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,\n                       (wstring *)local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      std::wstring::wstring(param_10,(wstring *)local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t>;\n    }\n    if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::wstring::_Rep::_S_empty_rep_storage\n       ) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*(long *)this + 0x10))(this,param_2,param_3);\n  }" if (parenthesized_expression "(param_9 == 0)" ( (binary_expression "param_9 == 0" identifier == number_literal) )) (compound_statement "{\n    local_40[0] = &DAT_0068b618;\n                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */\n    uVar2 = (**(code **)(*(long *)this + 0x18))\n                      (this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,\n                       (wstring *)local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      std::wstring::wstring(param_10,(wstring *)local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t>;\n    }\n    if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::wstring::_Rep::_S_empty_rep_storage\n       ) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n      }\n    }\n  }" { (expression_statement "local_40[0] = &DAT_0068b618;" (assignment_expression "local_40[0] = &DAT_0068b618" (subscript_expression "local_40[0]" identifier [ number_literal ]) = (pointer_expression "&DAT_0068b618" & identifier)) ;) comment (expression_statement "uVar2 = (**(code **)(*(long *)this + 0x18))\n                      (this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,\n                       (wstring *)local_40);" (assignment_expression "uVar2 = (**(code **)(*(long *)this + 0x18))\n                      (this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,\n                       (wstring *)local_40)" identifier = (call_expression "(**(code **)(*(long *)this + 0x18))\n                      (this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,\n                       (wstring *)local_40)" (parenthesized_expression "(**(code **)(*(long *)this + 0x18))" ( (pointer_expression "**(code **)(*(long *)this + 0x18)" * (pointer_expression "*(code **)(*(long *)this + 0x18)" * (cast_expression "(code **)(*(long *)this + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)this + 0x18)" ( (binary_expression "*(long *)this + 0x18" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (argument_list "(this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,\n                       (wstring *)local_40)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , (cast_expression "(wstring *)local_40" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      std::wstring::wstring(param_10,(wstring *)local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t>;\n    }" if (parenthesized_expression "(*param_8 == 0)" ( (binary_expression "*param_8 == 0" (pointer_expression "*param_8" * identifier) == number_literal) )) (compound_statement "{\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      std::wstring::wstring(param_10,(wstring *)local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t>;\n    }" { (if_statement "if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }" if (parenthesized_expression "(*(code **)(param_10 + 0x20) != (code *)0x0)" ( (binary_expression "*(code **)(param_10 + 0x20) != (code *)0x0" (pointer_expression "*(code **)(param_10 + 0x20)" * (cast_expression "(code **)(param_10 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_10 + 0x20)" ( (binary_expression "param_10 + 0x20" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (**(code **)(param_10 + 0x20))(param_10);\n      }" { (expression_statement "(**(code **)(param_10 + 0x20))(param_10);" (call_expression "(**(code **)(param_10 + 0x20))(param_10)" (parenthesized_expression "(**(code **)(param_10 + 0x20))" ( (pointer_expression "**(code **)(param_10 + 0x20)" * (pointer_expression "*(code **)(param_10 + 0x20)" * (cast_expression "(code **)(param_10 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_10 + 0x20)" ( (binary_expression "param_10 + 0x20" identifier + number_literal) ))))) )) (argument_list "(param_10)" ( identifier ))) ;) })) (labeled_statement "std::wstring::wstring(param_10,(wstring *)local_40);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::wstring(param_10,(wstring *)local_40);" statement_identifier : (ERROR ":" :) (expression_statement "wstring(param_10,(wstring *)local_40);" (call_expression "wstring(param_10,(wstring *)local_40)" identifier (argument_list "(param_10,(wstring *)local_40)" ( identifier , (cast_expression "(wstring *)local_40" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;))) (expression_statement "*(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);" (assignment_expression "*(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18)" (pointer_expression "*(undefined8 *)(param_10 + 8)" * (cast_expression "(undefined8 *)(param_10 + 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_10 + 8)" ( (binary_expression "param_10 + 8" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(local_40[0] + -0x18)" * (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t>;" (binary_expression "*(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t>" (binary_expression "*(code **)(param_10 + 0x20) = (anonymous_namespace)::__destroy_string<wchar_t" (assignment_expression "*(code **)(param_10 + 0x20) = (anonymous_namespace)" (pointer_expression "*(code **)(param_10 + 0x20)" * (cast_expression "(code **)(param_10 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_10 + 0x20)" ( (binary_expression "param_10 + 0x20" identifier + number_literal) )))) = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) (ERROR "::__destroy_string" : : identifier) < identifier) > identifier) ;) })) (if_statement "if ((allocator *)(local_40[0] + -0x18) != (allocator *)&std::wstring::_Rep::_S_empty_rep_storage\n       ) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n      }\n    }" if (parenthesized_expression "((allocator *)(local_40[0] + -0x18) != (allocator *)&std::wstring::_Rep::_S_empty_rep_storage\n       )" ( (binary_expression "(allocator *)(local_40[0] + -0x18) != (allocator *)&std" (cast_expression "(allocator *)(local_40[0] + -0x18)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))) != (cast_expression "(allocator *)&std" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&std" & identifier))) (ERROR "::wstring::_Rep::_S_empty_rep_storage" : : identifier : : identifier : : identifier) )) (compound_statement "{\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_0067bee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0067bee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }" { (expression_statement "iVar3 = *(int *)(local_40[0] + -8);" (assignment_expression "iVar3 = *(int *)(local_40[0] + -8)" identifier = (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(int *)(local_40[0] + -8) = iVar3 + -1;" (assignment_expression "*(int *)(local_40[0] + -8) = iVar3 + -1" (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_40[0] + -8);" (assignment_expression "piVar1 = (int *)(local_40[0] + -8)" identifier = (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) ;) (expression_statement "iVar3 = *piVar1;" (assignment_expression "iVar3 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar3 < 1) {\n        std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n      }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n        std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));\n      }" { (labeled_statement "std::wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));" statement_identifier : (ERROR ":" :) (labeled_statement "_Rep::_M_destroy((allocator *)(local_40[0] + -0x18));" statement_identifier : (ERROR ":" :) (expression_statement "_M_destroy((allocator *)(local_40[0] + -0x18));" (call_expression "_M_destroy((allocator *)(local_40[0] + -0x18))" identifier (argument_list "((allocator *)(local_40[0] + -0x18))" ( (cast_expression "(allocator *)(local_40[0] + -0x18)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))) ))) ;)))) })) })) }) (else_clause "else {\n    uVar2 = (**(code **)(*(long *)this + 0x10))(this,param_2,param_3);\n  }" else (compound_statement "{\n    uVar2 = (**(code **)(*(long *)this + 0x10))(this,param_2,param_3);\n  }" { (expression_statement "uVar2 = (**(code **)(*(long *)this + 0x10))(this,param_2,param_3);" (assignment_expression "uVar2 = (**(code **)(*(long *)this + 0x10))(this,param_2,param_3)" identifier = (call_expression "(**(code **)(*(long *)this + 0x10))(this,param_2,param_3)" (parenthesized_expression "(**(code **)(*(long *)this + 0x10))" ( (pointer_expression "**(code **)(*(long *)this + 0x10)" * (pointer_expression "*(code **)(*(long *)this + 0x10)" * (cast_expression "(code **)(*(long *)this + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)this + 0x10)" ( (binary_expression "*(long *)this + 0x10" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (argument_list "(this,param_2,param_3)" ( identifier , identifier , identifier )))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "undefined8\nFUN_004daf00(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)\n\n{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined1 local_41;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    \n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined8\nFUN_004daf00(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)\n\n{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined1 local_41;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    \n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_004daf00(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)" identifier (parameter_list "(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) , (parameter_declaration "undefined1 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) , (parameter_declaration "int *param_8" primitive_type (pointer_declarator "*param_8" * identifier)) , (parameter_declaration "long param_9" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_10" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined1 local_41;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    \n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }\n  return uVar2;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined1 local_41;" type_identifier identifier ;) (declaration "undefined *local_40 [2];" type_identifier (pointer_declarator "*local_40 [2]" * (array_declarator "local_40 [2]" identifier [ number_literal ])) ;) (if_statement "if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    \n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }" if (parenthesized_expression "(param_9 == 0)" ( (binary_expression "param_9 == 0" identifier == number_literal) )) (compound_statement "{\n    local_40[0] = &DAT_0068b618;\n                    \n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }" { (expression_statement "local_40[0] = &DAT_0068b618;" (assignment_expression "local_40[0] = &DAT_0068b618" (subscript_expression "local_40[0]" identifier [ number_literal ]) = (pointer_expression "&DAT_0068b618" & identifier)) ;) (expression_statement "uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40)" identifier = (call_expression "(**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40)" (parenthesized_expression "(**(code **)(*param_1 + 0x18))" ( (pointer_expression "**(code **)(*param_1 + 0x18)" * (pointer_expression "*(code **)(*param_1 + 0x18)" * (cast_expression "(code **)(*param_1 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }" if (parenthesized_expression "(*param_8 == 0)" ( (binary_expression "*param_8 == 0" (pointer_expression "*param_8" * identifier) == number_literal) )) (compound_statement "{\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }" { (if_statement "if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }" if (parenthesized_expression "(*(code **)(param_10 + 0x20) != (code *)0x0)" ( (binary_expression "*(code **)(param_10 + 0x20) != (code *)0x0" (pointer_expression "*(code **)(param_10 + 0x20)" * (cast_expression "(code **)(param_10 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_10 + 0x20)" ( (binary_expression "param_10 + 0x20" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (**(code **)(param_10 + 0x20))(param_10);\n      }" { (expression_statement "(**(code **)(param_10 + 0x20))(param_10);" (call_expression "(**(code **)(param_10 + 0x20))(param_10)" (parenthesized_expression "(**(code **)(param_10 + 0x20))" ( (pointer_expression "**(code **)(param_10 + 0x20)" * (pointer_expression "*(code **)(param_10 + 0x20)" * (cast_expression "(code **)(param_10 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_10 + 0x20)" ( (binary_expression "param_10 + 0x20" identifier + number_literal) ))))) )) (argument_list "(param_10)" ( identifier ))) ;) })) (expression_statement "FUN_0051a710(param_10,local_40);" (call_expression "FUN_0051a710(param_10,local_40)" identifier (argument_list "(param_10,local_40)" ( identifier , identifier ))) ;) (expression_statement "*(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);" (assignment_expression "*(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18)" (pointer_expression "*(undefined8 *)(param_10 + 8)" * (cast_expression "(undefined8 *)(param_10 + 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_10 + 8)" ( (binary_expression "param_10 + 8" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(local_40[0] + -0x18)" * (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(code **)(param_10 + 0x20) = FUN_004d9000;" (assignment_expression "*(code **)(param_10 + 0x20) = FUN_004d9000" (pointer_expression "*(code **)(param_10 + 0x20)" * (cast_expression "(code **)(param_10 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_10 + 0x20)" ( (binary_expression "param_10 + 0x20" identifier + number_literal) )))) = identifier) ;) })) (if_statement "if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }" if (parenthesized_expression "((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600)" ( (binary_expression "(undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600" (cast_expression "(undefined8 *)(local_40[0] + -0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -0x18)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))) != (pointer_expression "&DAT_0068b600" & identifier)) )) (compound_statement "{\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_0067bee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0067bee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }" { (expression_statement "iVar3 = *(int *)(local_40[0] + -8);" (assignment_expression "iVar3 = *(int *)(local_40[0] + -8)" identifier = (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*(int *)(local_40[0] + -8) = iVar3 + -1;" (assignment_expression "*(int *)(local_40[0] + -8) = iVar3 + -1" (pointer_expression "*(int *)(local_40[0] + -8)" * (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(local_40[0] + -8);" (assignment_expression "piVar1 = (int *)(local_40[0] + -8)" identifier = (cast_expression "(int *)(local_40[0] + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_40[0] + -8)" ( (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) )))) ;) (expression_statement "iVar3 = *piVar1;" (assignment_expression "iVar3 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }" { (expression_statement "thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);" (call_expression "thunk_FUN_0049e340(local_40[0] + -0x18,&local_41)" identifier (argument_list "(local_40[0] + -0x18,&local_41)" ( (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" identifier [ number_literal ]) + number_literal) , (pointer_expression "&local_41" & identifier) ))) ;) })) })) }) (else_clause "else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }" else (compound_statement "{\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }" { (expression_statement "uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3)" identifier = (call_expression "(**(code **)(*param_1 + 0x10))(param_1,param_2,param_3)" (parenthesized_expression "(**(code **)(*param_1 + 0x10))" ( (pointer_expression "**(code **)(*param_1 + 0x10)" * (pointer_expression "*(code **)(*param_1 + 0x10)" * (cast_expression "(code **)(*param_1 + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x10)" ( (binary_expression "*param_1 + 0x10" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (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 (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * 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 (assignment_expression IDENT = (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 )))) ;) (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) ;) })) (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 (assignment_expression IDENT = (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 )))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined8\nFUN_004daf00(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)\n\n{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined1 local_41;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    \n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }\n  return uVar2;\n}" (type_identifier "undefined8") (function_declarator "FUN_004daf00(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)" (identifier "FUN_004daf00") (parameter_list "(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,\n            long param_10)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "undefined8 param_3" (type_identifier "undefined8") (identifier "param_3")) (, ",") (parameter_declaration "undefined8 param_4" (type_identifier "undefined8") (identifier "param_4")) (, ",") (parameter_declaration "undefined8 param_5" (type_identifier "undefined8") (identifier "param_5")) (, ",") (parameter_declaration "undefined1 param_6" (type_identifier "undefined1") (identifier "param_6")) (, ",") (parameter_declaration "undefined8 param_7" (type_identifier "undefined8") (identifier "param_7")) (, ",") (parameter_declaration "int *param_8" (primitive_type "int") (pointer_declarator "*param_8" (* "*") (identifier "param_8"))) (, ",") (parameter_declaration "long param_9" (sized_type_specifier "long" (long "long")) (identifier "param_9")) (, ",") (parameter_declaration "long param_10" (sized_type_specifier "long" (long "long")) (identifier "param_10")) () ")"))) (compound_statement "{\n  int *piVar1;\n  undefined8 uVar2;\n  int iVar3;\n  undefined1 local_41;\n  undefined *local_40 [2];\n  \n  if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    \n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }\n  return uVar2;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined1 local_41;" (type_identifier "undefined1") (identifier "local_41") (; ";")) (declaration "undefined *local_40 [2];" (type_identifier "undefined") (pointer_declarator "*local_40 [2]" (* "*") (array_declarator "local_40 [2]" (identifier "local_40") ([ "[") (number_literal "2") (] "]"))) (; ";")) (if_statement "if (param_9 == 0) {\n    local_40[0] = &DAT_0068b618;\n                    \n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }\n  else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }" (if "if") (parenthesized_expression "(param_9 == 0)" (( "(") (binary_expression "param_9 == 0" (identifier "param_9") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    local_40[0] = &DAT_0068b618;\n                    \n    uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);\n    if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }\n    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }\n  }" ({ "{") (expression_statement "local_40[0] = &DAT_0068b618;" (assignment_expression "local_40[0] = &DAT_0068b618" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (= "=") (pointer_expression "&DAT_0068b618" (& "&") (identifier "DAT_0068b618"))) (; ";")) (expression_statement "uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40)" (identifier "uVar2") (= "=") (call_expression "(**(code **)(*param_1 + 0x18))\n                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40)" (parenthesized_expression "(**(code **)(*param_1 + 0x18))" (( "(") (pointer_expression "**(code **)(*param_1 + 0x18)" (* "*") (pointer_expression "*(code **)(*param_1 + 0x18)" (* "*") (cast_expression "(code **)(*param_1 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x18)" (( "(") (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (argument_list "(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (identifier "param_6") (, ",") (identifier "param_7") (, ",") (identifier "param_8") (, ",") (identifier "local_40") () ")")))) (; ";")) (if_statement "if (*param_8 == 0) {\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }" (if "if") (parenthesized_expression "(*param_8 == 0)" (( "(") (binary_expression "*param_8 == 0" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }\n      FUN_0051a710(param_10,local_40);\n      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);\n      *(code **)(param_10 + 0x20) = FUN_004d9000;\n    }" ({ "{") (if_statement "if (*(code **)(param_10 + 0x20) != (code *)0x0) {\n        (**(code **)(param_10 + 0x20))(param_10);\n      }" (if "if") (parenthesized_expression "(*(code **)(param_10 + 0x20) != (code *)0x0)" (( "(") (binary_expression "*(code **)(param_10 + 0x20) != (code *)0x0" (pointer_expression "*(code **)(param_10 + 0x20)" (* "*") (cast_expression "(code **)(param_10 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_10 + 0x20)" (( "(") (binary_expression "param_10 + 0x20" (identifier "param_10") (+ "+") (number_literal "0x20")) () ")")))) (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        (**(code **)(param_10 + 0x20))(param_10);\n      }" ({ "{") (expression_statement "(**(code **)(param_10 + 0x20))(param_10);" (call_expression "(**(code **)(param_10 + 0x20))(param_10)" (parenthesized_expression "(**(code **)(param_10 + 0x20))" (( "(") (pointer_expression "**(code **)(param_10 + 0x20)" (* "*") (pointer_expression "*(code **)(param_10 + 0x20)" (* "*") (cast_expression "(code **)(param_10 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_10 + 0x20)" (( "(") (binary_expression "param_10 + 0x20" (identifier "param_10") (+ "+") (number_literal "0x20")) () ")"))))) () ")")) (argument_list "(param_10)" (( "(") (identifier "param_10") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0051a710(param_10,local_40);" (call_expression "FUN_0051a710(param_10,local_40)" (identifier "FUN_0051a710") (argument_list "(param_10,local_40)" (( "(") (identifier "param_10") (, ",") (identifier "local_40") () ")"))) (; ";")) (expression_statement "*(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);" (assignment_expression "*(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18)" (pointer_expression "*(undefined8 *)(param_10 + 8)" (* "*") (cast_expression "(undefined8 *)(param_10 + 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_10 + 8)" (( "(") (binary_expression "param_10 + 8" (identifier "param_10") (+ "+") (number_literal "8")) () ")")))) (= "=") (pointer_expression "*(undefined8 *)(local_40[0] + -0x18)" (* "*") (cast_expression "(undefined8 *)(local_40[0] + -0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -0x18)" (( "(") (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-0x18")) () ")"))))) (; ";")) (expression_statement "*(code **)(param_10 + 0x20) = FUN_004d9000;" (assignment_expression "*(code **)(param_10 + 0x20) = FUN_004d9000" (pointer_expression "*(code **)(param_10 + 0x20)" (* "*") (cast_expression "(code **)(param_10 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_10 + 0x20)" (( "(") (binary_expression "param_10 + 0x20" (identifier "param_10") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "FUN_004d9000")) (; ";")) (} "}"))) (if_statement "if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }" (if "if") (parenthesized_expression "((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600)" (( "(") (binary_expression "(undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600" (cast_expression "(undefined8 *)(local_40[0] + -0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -0x18)" (( "(") (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-0x18")) () ")"))) (!= "!=") (pointer_expression "&DAT_0068b600" (& "&") (identifier "DAT_0068b600"))) () ")")) (compound_statement "{\n      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }\n    }" ({ "{") (if_statement "if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_0067bee8 == (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_0067bee8 == (undefined *)0x0" (identifier "PTR___pthread_key_create_0067bee8") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        iVar3 = *(int *)(local_40[0] + -8);\n        *(int *)(local_40[0] + -8) = iVar3 + -1;\n      }" ({ "{") (expression_statement "iVar3 = *(int *)(local_40[0] + -8);" (assignment_expression "iVar3 = *(int *)(local_40[0] + -8)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(local_40[0] + -8)" (* "*") (cast_expression "(int *)(local_40[0] + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -8)" (( "(") (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-8")) () ")"))))) (; ";")) (expression_statement "*(int *)(local_40[0] + -8) = iVar3 + -1;" (assignment_expression "*(int *)(local_40[0] + -8) = iVar3 + -1" (pointer_expression "*(int *)(local_40[0] + -8)" (* "*") (cast_expression "(int *)(local_40[0] + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -8)" (( "(") (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-8")) () ")")))) (= "=") (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" (else "else") (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(local_40[0] + -8);\n        iVar3 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar1 = (int *)(local_40[0] + -8);" (assignment_expression "piVar1 = (int *)(local_40[0] + -8)" (identifier "piVar1") (= "=") (cast_expression "(int *)(local_40[0] + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_40[0] + -8)" (( "(") (binary_expression "local_40[0] + -8" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-8")) () ")")))) (; ";")) (expression_statement "iVar3 = *piVar1;" (assignment_expression "iVar3 = *piVar1" (identifier "iVar3") (= "=") (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 (iVar3 < 1) {\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }" (if "if") (parenthesized_expression "(iVar3 < 1)" (( "(") (binary_expression "iVar3 < 1" (identifier "iVar3") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);\n      }" ({ "{") (expression_statement "thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);" (call_expression "thunk_FUN_0049e340(local_40[0] + -0x18,&local_41)" (identifier "thunk_FUN_0049e340") (argument_list "(local_40[0] + -0x18,&local_41)" (( "(") (binary_expression "local_40[0] + -0x18" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "-0x18")) (, ",") (pointer_expression "&local_41" (& "&") (identifier "local_41")) () ")"))) (; ";")) (} "}"))) (} "}"))) (} "}")) (else_clause "else {\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }" (else "else") (compound_statement "{\n    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);\n  }" ({ "{") (expression_statement "uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3)" (identifier "uVar2") (= "=") (call_expression "(**(code **)(*param_1 + 0x10))(param_1,param_2,param_3)" (parenthesized_expression "(**(code **)(*param_1 + 0x10))" (( "(") (pointer_expression "**(code **)(*param_1 + 0x10)" (* "*") (pointer_expression "*(code **)(*param_1 + 0x10)" (* "*") (cast_expression "(code **)(*param_1 + 0x10)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x10)" (( "(") (binary_expression "*param_1 + 0x10" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x10")) () ")"))))) () ")")) (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

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

type_1 __thiscall
std::type_2::__money_get<function_1>
          (type_2 *this,type_1 param_2,type_1 param_3,type_1 param_4,
          type_1 param_5,type_3 param_6,type_1 param_7,int *param_8,long var_1,
          type_4 *var_2)

{
  int *piVar1;
  type_1 uVar2;
  int var_5;
  type_5 *local_40 [2];
  
  if (var_1 == 0) {
    local_40[0] = &DAT_0068b618;
                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */
    uVar2 = (**(type_6 **)(*(long *)this + 0x18))
                      (this,param_2,param_3,param_4,param_5,param_6,param_7,param_8,
                       (type_4 *)local_40);
    if (*param_8 == 0) {
      if (*(type_6 **)(var_2 + 0x20) != (type_6 *)0x0) {
        (**(type_6 **)(var_2 + 0x20))(var_2);
      }
      std::wstring::type_4(var_2,(type_4 *)local_40);
      *(type_1 *)(var_2 + 8) = *(type_1 *)(local_40[0] + -0x18);
      *(type_6 **)(var_2 + 0x20) = (anonymous_namespace)::__destroy_string<function_1>var_3;
    }
    if ((type_7 *)(local_40[0] + -0x18) != (type_7 *)&std::type_4::_Rep::_S_empty_rep_storage
       ) {
      if (var_4 == (type_5 *)0x0) {
        var_5 = *(int *)(local_40[0] + -8);
        *(int *)(local_40[0] + -8) = var_5 + -1;
      }
      else {
        var_6();
        piVar1 = (int *)(local_40[0] + -8);
        var_5 = *piVar1;
        *piVar1 = *piVar1 + -1;
        var_7();
      }
      if (var_5 < 1) {
        std::wstring::_Rep::var_8((type_7 *)(local_40[0] + -0x18));
      }
    }
  }
  else {
    uVar2 = (**(type_6 **)(*(long *)this + 0x10))(this,param_2,param_3);
  }
  return uVar2;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) 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: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) 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 (assignment_expression left: (identifier) right: (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))))) (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))))) (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 (assignment_expression left: (identifier) right: (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)))))))) (return_statement (identifier)))))

undefined8
MASKED(long *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
            undefined8 param_5,undefined1 param_6,undefined8 param_7,int *param_8,long param_9,
            long param_10)

{
  int *piVar1;
  undefined8 uVar2;
  int iVar3;
  undefined1 local_41;
  undefined *local_40 [2];
  
  if (param_9 == 0) {
    local_40[0] = &DAT_0068b618;
                    /* try { // try from 004daf70 to 004db00e has its CatchHandler @ 004db048 */
    uVar2 = (**(code **)(*param_1 + 0x18))
                      (param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,local_40);
    if (*param_8 == 0) {
      if (*(code **)(param_10 + 0x20) != (code *)0x0) {
        (**(code **)(param_10 + 0x20))(param_10);
      }
      FUN_0051a710(param_10,local_40);
      *(undefined8 *)(param_10 + 8) = *(undefined8 *)(local_40[0] + -0x18);
      *(code **)(param_10 + 0x20) = FUN_004d9000;
    }
    if ((undefined8 *)(local_40[0] + -0x18) != &DAT_0068b600) {
      if (PTR___pthread_key_create_0067bee8 == (undefined *)0x0) {
        iVar3 = *(int *)(local_40[0] + -8);
        *(int *)(local_40[0] + -8) = iVar3 + -1;
      }
      else {
        LOCK();
        piVar1 = (int *)(local_40[0] + -8);
        iVar3 = *piVar1;
        *piVar1 = *piVar1 + -1;
        UNLOCK();
      }
      if (iVar3 < 1) {
        thunk_FUN_0049e340(local_40[0] + -0x18,&local_41);
      }
    }
  }
  else {
    uVar2 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3);
  }
  return uVar2;
}

