
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::_Rep::_M_dispose(std::allocator<char> const&) [clone .part.14] */

void __regparm3 std::string::_Rep::_M_dispose(allocator *param_1)

{
  allocator *paVar1;
  int iVar2;
  
  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {
    iVar2 = *(int *)(param_1 + 8);
    *(int *)(param_1 + 8) = iVar2 + -1;
  }
  else {
    LOCK();
    paVar1 = param_1 + 8;
    iVar2 = *(int *)paVar1;
    *(int *)paVar1 = *(int *)paVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  _M_destroy(param_1);
  return;
}



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

void __regparm3 FUN_001fec10(int param_1,undefined4 param_2)

{
  int *piVar1;
  int iVar2;
  
  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {
    iVar2 = *(int *)(param_1 + 8);
    *(int *)(param_1 + 8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(param_1 + 8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  FUN_001e4070(param_1,param_2);
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00035680
ADD EBX,0x1403e9
SUB ESP,0x4
MOV ECX,dword ptr [EBX + 0xffffff3c]
TEST ECX,ECX
JZ 0x001fec40
MOV ECX,0xffffffff
XADD.LOCK dword ptr [EAX + 0x8],ECX
TEST ECX,ECX
JLE 0x001fec4d
ADD ESP,0x4
POP EBX
POP ESI
RET
MOV ECX,dword ptr [EAX + 0x8]
LEA ESI,[ECX + -0x1]
MOV dword ptr [EAX + 0x8],ESI
TEST ECX,ECX
JG 0x001fec38
SUB ESP,0x8
PUSH EDX
PUSH EAX
CALL 0x001e4070
ADD ESP,0x10
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_001fec10(int param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  FUN_001e4070(param_1,param_2);\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_001fec10(int param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  FUN_001e4070(param_1,param_2);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_001fec10(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  FUN_001e4070(param_1,param_2);\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0033ef3c == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0033ef3c == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 8);" (assignment_expression "iVar2 = *(int *)(param_1 + 8)" identifier = (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 8) = iVar2 + -1;" (assignment_expression "*(int *)(param_1 + 8) = iVar2 + -1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" else (compound_statement "{\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(param_1 + 8);" (assignment_expression "piVar1 = (int *)(param_1 + 8)" identifier = (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) ;) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (0 < iVar2) {\n    return;\n  }" if (parenthesized_expression "(0 < iVar2)" ( (binary_expression "0 < iVar2" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_001e4070(param_1,param_2);" (call_expression "FUN_001e4070(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::string::_Rep::_M_dispose(std::allocator<char> const&) [clone .part.14] */\n\nvoid __regparm3 std::string::_Rep::_M_dispose(allocator *param_1)\n\n{\n  allocator *paVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    paVar1 = param_1 + 8;\n    iVar2 = *(int *)paVar1;\n    *(int *)paVar1 = *(int *)paVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  _M_destroy(param_1);\n  return;\n}\n\n" comment comment (declaration "void __regparm3" primitive_type identifier ;) (labeled_statement "std::string::_Rep::_M_dispose(allocator *param_1)\n\n{\n  allocator *paVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    paVar1 = param_1 + 8;\n    iVar2 = *(int *)paVar1;\n    *(int *)paVar1 = *(int *)paVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  _M_destroy(param_1);\n  return;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "string::_Rep::_M_dispose(allocator *param_1)\n\n{\n  allocator *paVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    paVar1 = param_1 + 8;\n    iVar2 = *(int *)paVar1;\n    *(int *)paVar1 = *(int *)paVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  _M_destroy(param_1);\n  return;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "_Rep::_M_dispose(allocator *param_1)\n\n{\n  allocator *paVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    paVar1 = param_1 + 8;\n    iVar2 = *(int *)paVar1;\n    *(int *)paVar1 = *(int *)paVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  _M_destroy(param_1);\n  return;\n}" statement_identifier : (ERROR ":_M_dispose(allocator *param_1)" : (call_expression "_M_dispose(allocator *param_1)" identifier (argument_list "(allocator *param_1)" ( (binary_expression "allocator *param_1" identifier * identifier) )))) (compound_statement "{\n  allocator *paVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    paVar1 = param_1 + 8;\n    iVar2 = *(int *)paVar1;\n    *(int *)paVar1 = *(int *)paVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  _M_destroy(param_1);\n  return;\n}" { (declaration "allocator *paVar1;" type_identifier (pointer_declarator "*paVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    paVar1 = param_1 + 8;\n    iVar2 = *(int *)paVar1;\n    *(int *)paVar1 = *(int *)paVar1 + -1;\n    UNLOCK();\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0033ef3c == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0033ef3c == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 8);" (assignment_expression "iVar2 = *(int *)(param_1 + 8)" identifier = (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 8) = iVar2 + -1;" (assignment_expression "*(int *)(param_1 + 8) = iVar2 + -1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    paVar1 = param_1 + 8;\n    iVar2 = *(int *)paVar1;\n    *(int *)paVar1 = *(int *)paVar1 + -1;\n    UNLOCK();\n  }" else (compound_statement "{\n    LOCK();\n    paVar1 = param_1 + 8;\n    iVar2 = *(int *)paVar1;\n    *(int *)paVar1 = *(int *)paVar1 + -1;\n    UNLOCK();\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "paVar1 = param_1 + 8;" (assignment_expression "paVar1 = param_1 + 8" identifier = (binary_expression "param_1 + 8" identifier + number_literal)) ;) (expression_statement "iVar2 = *(int *)paVar1;" (assignment_expression "iVar2 = *(int *)paVar1" identifier = (pointer_expression "*(int *)paVar1" * (cast_expression "(int *)paVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(int *)paVar1 = *(int *)paVar1 + -1;" (assignment_expression "*(int *)paVar1 = *(int *)paVar1 + -1" (pointer_expression "*(int *)paVar1" * (cast_expression "(int *)paVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "*(int *)paVar1 + -1" (pointer_expression "*(int *)paVar1" * (cast_expression "(int *)paVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (0 < iVar2) {\n    return;\n  }" if (parenthesized_expression "(0 < iVar2)" ( (binary_expression "0 < iVar2" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "_M_destroy(param_1);" (call_expression "_M_destroy(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))))
(translation_unit "void __regparm3 FUN_001fec10(int param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  FUN_001e4070(param_1,param_2);\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_001fec10(int param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  FUN_001e4070(param_1,param_2);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_001fec10(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  FUN_001e4070(param_1,param_2);\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0033ef3c == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0033ef3c == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 8);" (assignment_expression "iVar2 = *(int *)(param_1 + 8)" identifier = (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 8) = iVar2 + -1;" (assignment_expression "*(int *)(param_1 + 8) = iVar2 + -1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" else (compound_statement "{\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(param_1 + 8);" (assignment_expression "piVar1 = (int *)(param_1 + 8)" identifier = (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) ;) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (0 < iVar2) {\n    return;\n  }" if (parenthesized_expression "(0 < iVar2)" ( (binary_expression "0 < iVar2" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_001e4070(param_1,param_2);" (call_expression "FUN_001e4070(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_001fec10(int param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  FUN_001e4070(param_1,param_2);\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_001fec10(int param_1,undefined4 param_2)" (identifier "FUN_001fec10") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  FUN_001e4070(param_1,param_2);\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_0033ef3c == (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_0033ef3c == (undefined *)0x0" (identifier "PTR___pthread_key_create_0033ef3c") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 8);\n    *(int *)(param_1 + 8) = iVar2 + -1;\n  }" ({ "{") (expression_statement "iVar2 = *(int *)(param_1 + 8);" (assignment_expression "iVar2 = *(int *)(param_1 + 8)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "*(int *)(param_1 + 8) = iVar2 + -1;" (assignment_expression "*(int *)(param_1 + 8) = iVar2 + -1" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" (else "else") (compound_statement "{\n    LOCK();\n    piVar1 = (int *)(param_1 + 8);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar1 = (int *)(param_1 + 8);" (assignment_expression "piVar1 = (int *)(param_1 + 8)" (identifier "piVar1") (= "=") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (; ";")) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" (identifier "iVar2") (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (if_statement "if (0 < iVar2) {\n    return;\n  }" (if "if") (parenthesized_expression "(0 < iVar2)" (( "(") (binary_expression "0 < iVar2" (number_literal "0") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_001e4070(param_1,param_2);" (call_expression "FUN_001e4070(param_1,param_2)" (identifier "FUN_001e4070") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::_Rep::_M_dispose(std::allocator<char> const&) [clone .part.14] */

void __regparm3 std::string::_Rep::_M_dispose(type_1 *var_2)

{
  type_1 *paVar1;
  int var_3;
  
  if (var_1 == (type_2 *)0x0) {
    var_3 = *(int *)(var_2 + 8);
    *(int *)(var_2 + 8) = var_3 + -1;
  }
  else {
    var_4();
    paVar1 = var_2 + 8;
    var_3 = *(int *)paVar1;
    *(int *)paVar1 = *(int *)paVar1 + -1;
    var_5();
  }
  if (0 < var_3) {
    return;
  }
  var_6(var_2);
  return;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (return_statement))))

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

void __regparm3 MASKED(int param_1,undefined4 param_2)

{
  int *piVar1;
  int iVar2;
  
  if (PTR___pthread_key_create_0033ef3c == (undefined *)0x0) {
    iVar2 = *(int *)(param_1 + 8);
    *(int *)(param_1 + 8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(param_1 + 8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  FUN_001e4070(param_1,param_2);
  return;
}

