
/* std::string::_Rep::_M_dispose(std::allocator<char> const&) [clone .part.14] */

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

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



void FUN_0033a690(long param_1)

{
  int *piVar1;
  int iVar2;
  
  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {
    iVar2 = *(int *)(param_1 + 0x10);
    *(int *)(param_1 + 0x10) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(param_1 + 0x10);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  thunk_FUN_002eff50();
  return;
}


CMP qword ptr [0x00457ee8],0x0
JZ 0x0033a6b0
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0x10],EAX
TEST EAX,EAX
JLE 0x0033a6bd
RET
MOV EAX,dword ptr [RDI + 0x10]
LEA EDX,[RAX + -0x1]
MOV dword ptr [RDI + 0x10],EDX
TEST EAX,EAX
JG 0x0033a6a8
JMP 0x00322d20
(translation_unit "void FUN_0033a690(long param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  thunk_FUN_002eff50();\n  return;\n}\n\n" (function_definition "void FUN_0033a690(long param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  thunk_FUN_002eff50();\n  return;\n}" primitive_type (function_declarator "FUN_0033a690(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  thunk_FUN_002eff50();\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_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" if (parenthesized_expression "(PTR___pthread_key_create_00457ee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_00457ee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x10) = iVar2 + -1;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar2 + -1" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" else (compound_statement "{\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\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 + 0x10);" (assignment_expression "piVar1 = (int *)(param_1 + 0x10)" identifier = (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" 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 "thunk_FUN_002eff50();" (call_expression "thunk_FUN_002eff50()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* std::string::_Rep::_M_dispose(std::allocator<char> const&) [clone .part.14] */\n\nvoid std::string::_Rep::_M_dispose(allocator *param_1)\n\n{\n  allocator *paVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    paVar1 = param_1 + 0x10;\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 (function_definition "void std::string::_Rep::_M_dispose(allocator *param_1)\n\n{\n  allocator *paVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    paVar1 = param_1 + 0x10;\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}" primitive_type (ERROR "std::string::_Rep::" identifier : : identifier : : identifier : :) (function_declarator "_M_dispose(allocator *param_1)" identifier (parameter_list "(allocator *param_1)" ( (parameter_declaration "allocator *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  allocator *paVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    paVar1 = param_1 + 0x10;\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_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    paVar1 = param_1 + 0x10;\n    iVar2 = *(int *)paVar1;\n    *(int *)paVar1 = *(int *)paVar1 + -1;\n    UNLOCK();\n  }" if (parenthesized_expression "(PTR___pthread_key_create_00457ee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_00457ee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x10) = iVar2 + -1;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar2 + -1" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    paVar1 = param_1 + 0x10;\n    iVar2 = *(int *)paVar1;\n    *(int *)paVar1 = *(int *)paVar1 + -1;\n    UNLOCK();\n  }" else (compound_statement "{\n    LOCK();\n    paVar1 = param_1 + 0x10;\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 + 0x10;" (assignment_expression "paVar1 = param_1 + 0x10" identifier = (binary_expression "param_1 + 0x10" 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 FUN_0033a690(long param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  thunk_FUN_002eff50();\n  return;\n}\n\n" (function_definition "void FUN_0033a690(long param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  thunk_FUN_002eff50();\n  return;\n}" primitive_type (function_declarator "FUN_0033a690(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  thunk_FUN_002eff50();\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_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" if (parenthesized_expression "(PTR___pthread_key_create_00457ee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_00457ee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x10) = iVar2 + -1;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar2 + -1" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" else (compound_statement "{\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\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 + 0x10);" (assignment_expression "piVar1 = (int *)(param_1 + 0x10)" identifier = (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" 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 "thunk_FUN_002eff50();" (call_expression "thunk_FUN_002eff50()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) 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 ( ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0033a690(long param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  thunk_FUN_002eff50();\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0033a690(long param_1)" (identifier "FUN_0033a690") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }\n  if (0 < iVar2) {\n    return;\n  }\n  thunk_FUN_002eff50();\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_00457ee8 == (undefined *)0x0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }\n  else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_00457ee8 == (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_00457ee8 == (undefined *)0x0" (identifier "PTR___pthread_key_create_00457ee8") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x10) = iVar2 + -1;\n  }" ({ "{") (expression_statement "iVar2 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x10)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "*(int *)(param_1 + 0x10) = iVar2 + -1;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar2 + -1" (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\n    iVar2 = *piVar1;\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n  }" (else "else") (compound_statement "{\n    LOCK();\n    piVar1 = (int *)(param_1 + 0x10);\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 + 0x10);" (assignment_expression "piVar1 = (int *)(param_1 + 0x10)" (identifier "piVar1") (= "=") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (; ";")) (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 "thunk_FUN_002eff50();" (call_expression "thunk_FUN_002eff50()" (identifier "thunk_FUN_002eff50") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* std::string::_Rep::_M_dispose(std::allocator<char> const&) [clone .part.14] */

void std::string::_Rep::function_1(type_1 *var_2)

{
  type_1 *paVar1;
  int var_3;
  
  if (var_1 == (type_2 *)0x0) {
    var_3 = *(int *)(var_2 + 0x10);
    *(int *)(var_2 + 0x10) = var_3 + -1;
  }
  else {
    var_4();
    paVar1 = var_2 + 0x10;
    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) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) 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))) (return_statement))))

void MASKED(long param_1)

{
  int *piVar1;
  int iVar2;
  
  if (PTR___pthread_key_create_00457ee8 == (undefined *)0x0) {
    iVar2 = *(int *)(param_1 + 0x10);
    *(int *)(param_1 + 0x10) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(param_1 + 0x10);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  thunk_FUN_002eff50();
  return;
}

