
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::__facet_shims::(anonymous namespace)::moneypunct_shim<char, false>::~moneypunct_shim() */

void __thiscall
std::__facet_shims::(anonymous_namespace)::moneypunct_shim<char,false>::~moneypunct_shim
          (moneypunct_shim<char,false> *this)

{
  int *piVar1;
  int *piVar2;
  undefined *puVar3;
  int iVar4;
  
  puVar3 = PTR___pthread_key_create_00301f24;
  *(undefined ***)this = &PTR__moneypunct_shim_002ffff8;
  *(undefined4 *)(*(int *)(this + 0x10) + 0xc) = 0;
  *(undefined4 *)(*(int *)(this + 0x10) + 0x18) = 0;
  *(undefined4 *)(*(int *)(this + 0x10) + 0x20) = 0;
  *(undefined4 *)(*(int *)(this + 0x10) + 0x28) = 0;
  piVar2 = *(int **)(this + 0xc);
  if (puVar3 == (undefined *)0x0) {
    iVar4 = piVar2[1];
    piVar2[1] = iVar4 + -1;
  }
  else {
    LOCK();
    piVar1 = piVar2 + 1;
    iVar4 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*piVar2 + 4))(piVar2);
  }
  moneypunct<char,false>::~moneypunct((moneypunct<char,false> *)this);
  operator_delete(this);
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_001bc480(undefined4 *param_1)

{
  int *piVar1;
  int *piVar2;
  undefined *puVar3;
  int iVar4;
  
  puVar3 = PTR___pthread_key_create_00301f24;
  *param_1 = &PTR_FUN_002ffff8;
  *(undefined4 *)(param_1[4] + 0xc) = 0;
  *(undefined4 *)(param_1[4] + 0x18) = 0;
  *(undefined4 *)(param_1[4] + 0x20) = 0;
  *(undefined4 *)(param_1[4] + 0x28) = 0;
  piVar2 = (int *)param_1[3];
  if (puVar3 == (undefined *)0x0) {
    iVar4 = piVar2[1];
    piVar2[1] = iVar4 + -1;
  }
  else {
    LOCK();
    piVar1 = piVar2 + 1;
    iVar4 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*piVar2 + 4))(piVar2);
  }
  FUN_001cb5d0(param_1);
  FUN_001807a0(param_1);
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00032730
ADD EBX,0x145b79
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
LEA EAX,[EBX + 0xffffdff8]
MOV EDX,dword ptr [EBX + 0xffffff24]
MOV dword ptr [ESI],EAX
MOV EAX,dword ptr [ESI + 0x10]
MOV dword ptr [EAX + 0xc],0x0
MOV EAX,dword ptr [ESI + 0x10]
MOV dword ptr [EAX + 0x18],0x0
MOV EAX,dword ptr [ESI + 0x10]
MOV dword ptr [EAX + 0x20],0x0
MOV EAX,dword ptr [ESI + 0x10]
MOV dword ptr [EAX + 0x28],0x0
MOV EAX,dword ptr [ESI + 0xc]
TEST EDX,EDX
JZ 0x001bc508
MOV EDX,0xffffffff
XADD.LOCK dword ptr [EAX + 0x4],EDX
CMP EDX,0x1
JNZ 0x001bc4ec
SUB ESP,0xc
MOV EDX,dword ptr [EAX]
PUSH EAX
CALL dword ptr [EDX + 0x4]
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x001cb5d0
MOV dword ptr [ESP],ESI
CALL 0x001807a0
ADD ESP,0x14
POP EBX
POP ESI
RET
MOV EDX,dword ptr [EAX + 0x4]
LEA ECX,[EDX + -0x1]
MOV dword ptr [EAX + 0x4],ECX
JMP 0x001bc4db
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_001bc480(undefined4 *param_1)\n\n{\n  int *piVar1;\n  int *piVar2;\n  undefined *puVar3;\n  int iVar4;\n  \n  puVar3 = PTR___pthread_key_create_00301f24;\n  *param_1 = &PTR_FUN_002ffff8;\n  *(undefined4 *)(param_1[4] + 0xc) = 0;\n  *(undefined4 *)(param_1[4] + 0x18) = 0;\n  *(undefined4 *)(param_1[4] + 0x20) = 0;\n  *(undefined4 *)(param_1[4] + 0x28) = 0;\n  piVar2 = (int *)param_1[3];\n  if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }\n  FUN_001cb5d0(param_1);\n  FUN_001807a0(param_1);\n  return;\n}\n\n" comment (function_definition "void FUN_001bc480(undefined4 *param_1)\n\n{\n  int *piVar1;\n  int *piVar2;\n  undefined *puVar3;\n  int iVar4;\n  \n  puVar3 = PTR___pthread_key_create_00301f24;\n  *param_1 = &PTR_FUN_002ffff8;\n  *(undefined4 *)(param_1[4] + 0xc) = 0;\n  *(undefined4 *)(param_1[4] + 0x18) = 0;\n  *(undefined4 *)(param_1[4] + 0x20) = 0;\n  *(undefined4 *)(param_1[4] + 0x28) = 0;\n  piVar2 = (int *)param_1[3];\n  if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }\n  FUN_001cb5d0(param_1);\n  FUN_001807a0(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_001bc480(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int *piVar2;\n  undefined *puVar3;\n  int iVar4;\n  \n  puVar3 = PTR___pthread_key_create_00301f24;\n  *param_1 = &PTR_FUN_002ffff8;\n  *(undefined4 *)(param_1[4] + 0xc) = 0;\n  *(undefined4 *)(param_1[4] + 0x18) = 0;\n  *(undefined4 *)(param_1[4] + 0x20) = 0;\n  *(undefined4 *)(param_1[4] + 0x28) = 0;\n  piVar2 = (int *)param_1[3];\n  if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }\n  FUN_001cb5d0(param_1);\n  FUN_001807a0(param_1);\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar3 = PTR___pthread_key_create_00301f24;" (assignment_expression "puVar3 = PTR___pthread_key_create_00301f24" identifier = identifier) ;) (expression_statement "*param_1 = &PTR_FUN_002ffff8;" (assignment_expression "*param_1 = &PTR_FUN_002ffff8" (pointer_expression "*param_1" * identifier) = (pointer_expression "&PTR_FUN_002ffff8" & identifier)) ;) (expression_statement "*(undefined4 *)(param_1[4] + 0xc) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0xc) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0xc)" * (cast_expression "(undefined4 *)(param_1[4] + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[4] + 0xc)" ( (binary_expression "param_1[4] + 0xc" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1[4] + 0x18) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0x18) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0x18)" * (cast_expression "(undefined4 *)(param_1[4] + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[4] + 0x18)" ( (binary_expression "param_1[4] + 0x18" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1[4] + 0x20) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0x20) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0x20)" * (cast_expression "(undefined4 *)(param_1[4] + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[4] + 0x20)" ( (binary_expression "param_1[4] + 0x20" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1[4] + 0x28) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0x28) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0x28)" * (cast_expression "(undefined4 *)(param_1[4] + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[4] + 0x28)" ( (binary_expression "param_1[4] + 0x28" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) )))) = number_literal) ;) (expression_statement "piVar2 = (int *)param_1[3];" (assignment_expression "piVar2 = (int *)param_1[3]" identifier = (cast_expression "(int *)param_1[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) ;) (if_statement "if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" if (parenthesized_expression "(puVar3 == (undefined *)0x0)" ( (binary_expression "puVar3 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }" { (expression_statement "iVar4 = piVar2[1];" (assignment_expression "iVar4 = piVar2[1]" identifier = (subscript_expression "piVar2[1]" identifier [ number_literal ])) ;) (expression_statement "piVar2[1] = iVar4 + -1;" (assignment_expression "piVar2[1] = iVar4 + -1" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" else (compound_statement "{\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = piVar2 + 1;" (assignment_expression "piVar1 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (expression_statement "iVar4 = *piVar1;" (assignment_expression "iVar4 = *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 (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }" { (expression_statement "(**(code **)(*piVar2 + 4))(piVar2);" (call_expression "(**(code **)(*piVar2 + 4))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 4))" ( (pointer_expression "**(code **)(*piVar2 + 4)" * (pointer_expression "*(code **)(*piVar2 + 4)" * (cast_expression "(code **)(*piVar2 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 4)" ( (binary_expression "*piVar2 + 4" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2)" ( identifier ))) ;) })) (expression_statement "FUN_001cb5d0(param_1);" (call_expression "FUN_001cb5d0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "FUN_001807a0(param_1);" (call_expression "FUN_001807a0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::__facet_shims::(anonymous namespace)::moneypunct_shim<char, false>::~moneypunct_shim() */\n\nvoid __thiscall\nstd::__facet_shims::(anonymous_namespace)::moneypunct_shim<char,false>::~moneypunct_shim\n          (moneypunct_shim<char,false> *this)\n\n{\n  int *piVar1;\n  int *piVar2;\n  undefined *puVar3;\n  int iVar4;\n  \n  puVar3 = PTR___pthread_key_create_00301f24;\n  *(undefined ***)this = &PTR__moneypunct_shim_002ffff8;\n  *(undefined4 *)(*(int *)(this + 0x10) + 0xc) = 0;\n  *(undefined4 *)(*(int *)(this + 0x10) + 0x18) = 0;\n  *(undefined4 *)(*(int *)(this + 0x10) + 0x20) = 0;\n  *(undefined4 *)(*(int *)(this + 0x10) + 0x28) = 0;\n  piVar2 = *(int **)(this + 0xc);\n  if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }\n  moneypunct<char,false>::~moneypunct((moneypunct<char,false> *)this);\n  operator_delete(this);\n  return;\n}\n\n" comment comment (declaration "void __thiscall\nstd::__facet_shims::(anonymous_namespace)::moneypunct_shim<char,false>::~moneypunct_shim\n          (moneypunct_shim<char,false> *this)\n\n{\n  int *piVar1;" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::__facet_shims::(anonymous_namespace)::" identifier : : identifier : : ( identifier ) : :) identifier (ERROR "<char" < primitive_type) , (ERROR "false>::~moneypunct_shim\n          (moneypunct_shim<char,false> *this)\n\n{\n  int" identifier > : : ~ (function_declarator "moneypunct_shim\n          (moneypunct_shim<char,false> *this)" identifier (parameter_list "(moneypunct_shim<char,false> *this)" ( (parameter_declaration "moneypunct_shim" type_identifier) (ERROR "<char" < primitive_type) , (parameter_declaration "false> *this" type_identifier (ERROR ">" >) (pointer_declarator "*this" * identifier)) ))) { primitive_type) (pointer_declarator "*piVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar3 = PTR___pthread_key_create_00301f24;" (assignment_expression "puVar3 = PTR___pthread_key_create_00301f24" identifier = identifier) ;) (expression_statement "*(undefined ***)this = &PTR__moneypunct_shim_002ffff8;" (assignment_expression "*(undefined ***)this = &PTR__moneypunct_shim_002ffff8" (pointer_expression "*(undefined ***)this" * (cast_expression "(undefined ***)this" ( (type_descriptor "undefined ***" type_identifier (abstract_pointer_declarator "***" * (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *)))) ) identifier)) = (pointer_expression "&PTR__moneypunct_shim_002ffff8" & identifier)) ;) (expression_statement "*(undefined4 *)(*(int *)(this + 0x10) + 0xc) = 0;" (assignment_expression "*(undefined4 *)(*(int *)(this + 0x10) + 0xc) = 0" (pointer_expression "*(undefined4 *)(*(int *)(this + 0x10) + 0xc)" * (cast_expression "(undefined4 *)(*(int *)(this + 0x10) + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(this + 0x10) + 0xc)" ( (binary_expression "*(int *)(this + 0x10) + 0xc" (pointer_expression "*(int *)(this + 0x10)" * (cast_expression "(int *)(this + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(*(int *)(this + 0x10) + 0x18) = 0;" (assignment_expression "*(undefined4 *)(*(int *)(this + 0x10) + 0x18) = 0" (pointer_expression "*(undefined4 *)(*(int *)(this + 0x10) + 0x18)" * (cast_expression "(undefined4 *)(*(int *)(this + 0x10) + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(this + 0x10) + 0x18)" ( (binary_expression "*(int *)(this + 0x10) + 0x18" (pointer_expression "*(int *)(this + 0x10)" * (cast_expression "(int *)(this + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(*(int *)(this + 0x10) + 0x20) = 0;" (assignment_expression "*(undefined4 *)(*(int *)(this + 0x10) + 0x20) = 0" (pointer_expression "*(undefined4 *)(*(int *)(this + 0x10) + 0x20)" * (cast_expression "(undefined4 *)(*(int *)(this + 0x10) + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(this + 0x10) + 0x20)" ( (binary_expression "*(int *)(this + 0x10) + 0x20" (pointer_expression "*(int *)(this + 0x10)" * (cast_expression "(int *)(this + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(*(int *)(this + 0x10) + 0x28) = 0;" (assignment_expression "*(undefined4 *)(*(int *)(this + 0x10) + 0x28) = 0" (pointer_expression "*(undefined4 *)(*(int *)(this + 0x10) + 0x28)" * (cast_expression "(undefined4 *)(*(int *)(this + 0x10) + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(this + 0x10) + 0x28)" ( (binary_expression "*(int *)(this + 0x10) + 0x28" (pointer_expression "*(int *)(this + 0x10)" * (cast_expression "(int *)(this + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) + number_literal) )))) = number_literal) ;) (expression_statement "piVar2 = *(int **)(this + 0xc);" (assignment_expression "piVar2 = *(int **)(this + 0xc)" identifier = (pointer_expression "*(int **)(this + 0xc)" * (cast_expression "(int **)(this + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" if (parenthesized_expression "(puVar3 == (undefined *)0x0)" ( (binary_expression "puVar3 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }" { (expression_statement "iVar4 = piVar2[1];" (assignment_expression "iVar4 = piVar2[1]" identifier = (subscript_expression "piVar2[1]" identifier [ number_literal ])) ;) (expression_statement "piVar2[1] = iVar4 + -1;" (assignment_expression "piVar2[1] = iVar4 + -1" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" else (compound_statement "{\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = piVar2 + 1;" (assignment_expression "piVar1 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (expression_statement "iVar4 = *piVar1;" (assignment_expression "iVar4 = *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 (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }" { (expression_statement "(**(code **)(*piVar2 + 4))(piVar2);" (call_expression "(**(code **)(*piVar2 + 4))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 4))" ( (pointer_expression "**(code **)(*piVar2 + 4)" * (pointer_expression "*(code **)(*piVar2 + 4)" * (cast_expression "(code **)(*piVar2 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 4)" ( (binary_expression "*piVar2 + 4" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2)" ( identifier ))) ;) })) (ERROR "moneypunct<char,false>::~moneypunct((moneypunct<char,false> *)this);\n  operator_delete(this);\n  return;\n}" (binary_expression "moneypunct<char" identifier < identifier) (ERROR ",false" , false) > (ERROR "::" : :) ~ identifier ( (ERROR "(moneypunct<char,false> *)this);" (parenthesized_expression "(moneypunct<char,false> *)this)" ( (comma_expression "moneypunct<char,false> *)this" (binary_expression "moneypunct<char" identifier < identifier) , (binary_expression "false> *)this" false > (pointer_expression "*)this" * (ERROR ")" )) identifier))) )) ;) (call_expression "operator_delete(this)" identifier (argument_list "(this)" ( identifier ))) ; return ; }))
(translation_unit "void FUN_001bc480(undefined4 *param_1)\n\n{\n  int *piVar1;\n  int *piVar2;\n  undefined *puVar3;\n  int iVar4;\n  \n  puVar3 = PTR___pthread_key_create_00301f24;\n  *param_1 = &PTR_FUN_002ffff8;\n  *(undefined4 *)(param_1[4] + 0xc) = 0;\n  *(undefined4 *)(param_1[4] + 0x18) = 0;\n  *(undefined4 *)(param_1[4] + 0x20) = 0;\n  *(undefined4 *)(param_1[4] + 0x28) = 0;\n  piVar2 = (int *)param_1[3];\n  if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }\n  FUN_001cb5d0(param_1);\n  FUN_001807a0(param_1);\n  return;\n}\n\n" (function_definition "void FUN_001bc480(undefined4 *param_1)\n\n{\n  int *piVar1;\n  int *piVar2;\n  undefined *puVar3;\n  int iVar4;\n  \n  puVar3 = PTR___pthread_key_create_00301f24;\n  *param_1 = &PTR_FUN_002ffff8;\n  *(undefined4 *)(param_1[4] + 0xc) = 0;\n  *(undefined4 *)(param_1[4] + 0x18) = 0;\n  *(undefined4 *)(param_1[4] + 0x20) = 0;\n  *(undefined4 *)(param_1[4] + 0x28) = 0;\n  piVar2 = (int *)param_1[3];\n  if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }\n  FUN_001cb5d0(param_1);\n  FUN_001807a0(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_001bc480(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int *piVar2;\n  undefined *puVar3;\n  int iVar4;\n  \n  puVar3 = PTR___pthread_key_create_00301f24;\n  *param_1 = &PTR_FUN_002ffff8;\n  *(undefined4 *)(param_1[4] + 0xc) = 0;\n  *(undefined4 *)(param_1[4] + 0x18) = 0;\n  *(undefined4 *)(param_1[4] + 0x20) = 0;\n  *(undefined4 *)(param_1[4] + 0x28) = 0;\n  piVar2 = (int *)param_1[3];\n  if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }\n  FUN_001cb5d0(param_1);\n  FUN_001807a0(param_1);\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar3 = PTR___pthread_key_create_00301f24;" (assignment_expression "puVar3 = PTR___pthread_key_create_00301f24" identifier = identifier) ;) (expression_statement "*param_1 = &PTR_FUN_002ffff8;" (assignment_expression "*param_1 = &PTR_FUN_002ffff8" (pointer_expression "*param_1" * identifier) = (pointer_expression "&PTR_FUN_002ffff8" & identifier)) ;) (expression_statement "*(undefined4 *)(param_1[4] + 0xc) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0xc) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0xc)" * (cast_expression "(undefined4 *)(param_1[4] + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[4] + 0xc)" ( (binary_expression "param_1[4] + 0xc" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1[4] + 0x18) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0x18) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0x18)" * (cast_expression "(undefined4 *)(param_1[4] + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[4] + 0x18)" ( (binary_expression "param_1[4] + 0x18" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1[4] + 0x20) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0x20) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0x20)" * (cast_expression "(undefined4 *)(param_1[4] + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[4] + 0x20)" ( (binary_expression "param_1[4] + 0x20" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1[4] + 0x28) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0x28) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0x28)" * (cast_expression "(undefined4 *)(param_1[4] + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[4] + 0x28)" ( (binary_expression "param_1[4] + 0x28" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) )))) = number_literal) ;) (expression_statement "piVar2 = (int *)param_1[3];" (assignment_expression "piVar2 = (int *)param_1[3]" identifier = (cast_expression "(int *)param_1[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) ;) (if_statement "if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" if (parenthesized_expression "(puVar3 == (undefined *)0x0)" ( (binary_expression "puVar3 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }" { (expression_statement "iVar4 = piVar2[1];" (assignment_expression "iVar4 = piVar2[1]" identifier = (subscript_expression "piVar2[1]" identifier [ number_literal ])) ;) (expression_statement "piVar2[1] = iVar4 + -1;" (assignment_expression "piVar2[1] = iVar4 + -1" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" else (compound_statement "{\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = piVar2 + 1;" (assignment_expression "piVar1 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (expression_statement "iVar4 = *piVar1;" (assignment_expression "iVar4 = *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 (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }" { (expression_statement "(**(code **)(*piVar2 + 4))(piVar2);" (call_expression "(**(code **)(*piVar2 + 4))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 4))" ( (pointer_expression "**(code **)(*piVar2 + 4)" * (pointer_expression "*(code **)(*piVar2 + 4)" * (cast_expression "(code **)(*piVar2 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 4)" ( (binary_expression "*piVar2 + 4" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2)" ( identifier ))) ;) })) (expression_statement "FUN_001cb5d0(param_1);" (call_expression "FUN_001cb5d0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "FUN_001807a0(param_1);" (call_expression "FUN_001807a0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + 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) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + 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) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression (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 ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_001bc480(undefined4 *param_1)\n\n{\n  int *piVar1;\n  int *piVar2;\n  undefined *puVar3;\n  int iVar4;\n  \n  puVar3 = PTR___pthread_key_create_00301f24;\n  *param_1 = &PTR_FUN_002ffff8;\n  *(undefined4 *)(param_1[4] + 0xc) = 0;\n  *(undefined4 *)(param_1[4] + 0x18) = 0;\n  *(undefined4 *)(param_1[4] + 0x20) = 0;\n  *(undefined4 *)(param_1[4] + 0x28) = 0;\n  piVar2 = (int *)param_1[3];\n  if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }\n  FUN_001cb5d0(param_1);\n  FUN_001807a0(param_1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_001bc480(undefined4 *param_1)" (identifier "FUN_001bc480") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int *piVar1;\n  int *piVar2;\n  undefined *puVar3;\n  int iVar4;\n  \n  puVar3 = PTR___pthread_key_create_00301f24;\n  *param_1 = &PTR_FUN_002ffff8;\n  *(undefined4 *)(param_1[4] + 0xc) = 0;\n  *(undefined4 *)(param_1[4] + 0x18) = 0;\n  *(undefined4 *)(param_1[4] + 0x20) = 0;\n  *(undefined4 *)(param_1[4] + 0x28) = 0;\n  piVar2 = (int *)param_1[3];\n  if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }\n  FUN_001cb5d0(param_1);\n  FUN_001807a0(param_1);\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "puVar3 = PTR___pthread_key_create_00301f24;" (assignment_expression "puVar3 = PTR___pthread_key_create_00301f24" (identifier "puVar3") (= "=") (identifier "PTR___pthread_key_create_00301f24")) (; ";")) (expression_statement "*param_1 = &PTR_FUN_002ffff8;" (assignment_expression "*param_1 = &PTR_FUN_002ffff8" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (pointer_expression "&PTR_FUN_002ffff8" (& "&") (identifier "PTR_FUN_002ffff8"))) (; ";")) (expression_statement "*(undefined4 *)(param_1[4] + 0xc) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0xc) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1[4] + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[4] + 0xc)" (( "(") (binary_expression "param_1[4] + 0xc" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (+ "+") (number_literal "0xc")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1[4] + 0x18) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0x18) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0x18)" (* "*") (cast_expression "(undefined4 *)(param_1[4] + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[4] + 0x18)" (( "(") (binary_expression "param_1[4] + 0x18" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (+ "+") (number_literal "0x18")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1[4] + 0x20) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0x20) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1[4] + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[4] + 0x20)" (( "(") (binary_expression "param_1[4] + 0x20" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (+ "+") (number_literal "0x20")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1[4] + 0x28) = 0;" (assignment_expression "*(undefined4 *)(param_1[4] + 0x28) = 0" (pointer_expression "*(undefined4 *)(param_1[4] + 0x28)" (* "*") (cast_expression "(undefined4 *)(param_1[4] + 0x28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[4] + 0x28)" (( "(") (binary_expression "param_1[4] + 0x28" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (+ "+") (number_literal "0x28")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2 = (int *)param_1[3];" (assignment_expression "piVar2 = (int *)param_1[3]" (identifier "piVar2") (= "=") (cast_expression "(int *)param_1[3]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")))) (; ";")) (if_statement "if (puVar3 == (undefined *)0x0) {\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" (if "if") (parenthesized_expression "(puVar3 == (undefined *)0x0)" (( "(") (binary_expression "puVar3 == (undefined *)0x0" (identifier "puVar3") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar4 = piVar2[1];\n    piVar2[1] = iVar4 + -1;\n  }" ({ "{") (expression_statement "iVar4 = piVar2[1];" (assignment_expression "iVar4 = piVar2[1]" (identifier "iVar4") (= "=") (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar2[1] = iVar4 + -1;" (assignment_expression "piVar2[1] = iVar4 + -1" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" (else "else") (compound_statement "{\n    LOCK();\n    piVar1 = piVar2 + 1;\n    iVar4 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar1 = piVar2 + 1;" (assignment_expression "piVar1 = piVar2 + 1" (identifier "piVar1") (= "=") (binary_expression "piVar2 + 1" (identifier "piVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar4 = *piVar1;" (assignment_expression "iVar4 = *piVar1" (identifier "iVar4") (= "=") (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 (iVar4 == 1) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }" (if "if") (parenthesized_expression "(iVar4 == 1)" (( "(") (binary_expression "iVar4 == 1" (identifier "iVar4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    (**(code **)(*piVar2 + 4))(piVar2);\n  }" ({ "{") (expression_statement "(**(code **)(*piVar2 + 4))(piVar2);" (call_expression "(**(code **)(*piVar2 + 4))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 4))" (( "(") (pointer_expression "**(code **)(*piVar2 + 4)" (* "*") (pointer_expression "*(code **)(*piVar2 + 4)" (* "*") (cast_expression "(code **)(*piVar2 + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar2 + 4)" (( "(") (binary_expression "*piVar2 + 4" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(piVar2)" (( "(") (identifier "piVar2") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_001cb5d0(param_1);" (call_expression "FUN_001cb5d0(param_1)" (identifier "FUN_001cb5d0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "FUN_001807a0(param_1);" (call_expression "FUN_001807a0(param_1)" (identifier "FUN_001807a0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::__facet_shims::(anonymous namespace)::moneypunct_shim<char, false>::~moneypunct_shim() */

void __thiscall
std::__facet_shims::(anonymous_namespace)::moneypunct_shim<char,false>::~moneypunct_shim
          (moneypunct_shim<char,false> *var_1)

{
  int *piVar1;
  int *var_5;
  type_1 *var_2;
  int var_3;
  
  var_2 = PTR___pthread_key_create_00301f24;
  *(type_1 ***)var_1 = &PTR__moneypunct_shim_002ffff8;
  *(type_2 *)(*(int *)(var_1 + 0x10) + 0xc) = 0;
  *(type_2 *)(*(int *)(var_1 + 0x10) + 0x18) = 0;
  *(type_2 *)(*(int *)(var_1 + 0x10) + 0x20) = 0;
  *(type_2 *)(*(int *)(var_1 + 0x10) + 0x28) = 0;
  var_5 = *(int **)(var_1 + 0xc);
  if (var_2 == (type_1 *)0x0) {
    var_3 = var_5[1];
    var_5[1] = var_3 + -1;
  }
  else {
    var_4();
    piVar1 = var_5 + 1;
    var_3 = *piVar1;
    *piVar1 = *piVar1 + -1;
    var_6();
  }
  if (var_3 == 1) {
    (**(type_3 **)(*var_5 + 4))(var_5);
  }
  moneypunct<char,false>::~moneypunct((moneypunct<char,false> *)var_1);
  operator_delete(var_1);
  return;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(undefined4 *param_1)

{
  int *piVar1;
  int *piVar2;
  undefined *puVar3;
  int iVar4;
  
  puVar3 = PTR___pthread_key_create_00301f24;
  *param_1 = &PTR_FUN_002ffff8;
  *(undefined4 *)(param_1[4] + 0xc) = 0;
  *(undefined4 *)(param_1[4] + 0x18) = 0;
  *(undefined4 *)(param_1[4] + 0x20) = 0;
  *(undefined4 *)(param_1[4] + 0x28) = 0;
  piVar2 = (int *)param_1[3];
  if (puVar3 == (undefined *)0x0) {
    iVar4 = piVar2[1];
    piVar2[1] = iVar4 + -1;
  }
  else {
    LOCK();
    piVar1 = piVar2 + 1;
    iVar4 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*piVar2 + 4))(piVar2);
  }
  FUN_001cb5d0(param_1);
  FUN_001807a0(param_1);
  return;
}

