
/* std::ios_base::_M_dispose_callbacks() */

void __thiscall std::ios_base::_M_dispose_callbacks(ios_base *this)

{
  int *piVar1;
  int iVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  undefined *puVar5;
  
  puVar5 = PTR___pthread_key_create_0043dee8;
  puVar4 = *(undefined8 **)(this + 0x28);
  while (puVar4 != (undefined8 *)0x0) {
    if (puVar5 == (undefined *)0x0) {
      iVar2 = *(int *)((long)puVar4 + 0x14);
      *(int *)((long)puVar4 + 0x14) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)((long)puVar4 + 0x14);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 != 0) break;
    puVar3 = (undefined8 *)*puVar4;
    operator_delete(puVar4);
    puVar4 = puVar3;
  }
  *(undefined8 *)(this + 0x28) = 0;
  return;
}



void FUN_00318cc0(long param_1)

{
  int *piVar1;
  int iVar2;
  undefined8 *puVar3;
  undefined *puVar4;
  
  puVar4 = PTR___pthread_key_create_0043dee8;
  puVar3 = *(undefined8 **)(param_1 + 0x28);
  while (puVar3 != (undefined8 *)0x0) {
    if (puVar4 == (undefined *)0x0) {
      iVar2 = *(int *)((long)puVar3 + 0x14);
      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)((long)puVar3 + 0x14);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 != 0) break;
    puVar3 = (undefined8 *)*puVar3;
    FUN_002dac70();
  }
  *(undefined8 *)(param_1 + 0x28) = 0;
  return;
}


PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
MOV RDI,qword ptr [RDI + 0x28]
TEST RDI,RDI
JZ 0x00318d10
MOV RBP,qword ptr [0x0043dee8]
JMP 0x00318cfe
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0x14],EAX
TEST EAX,EAX
JNZ 0x00318d10
MOV RBX,qword ptr [RDI]
CALL 0x002dac70
MOV RDI,RBX
TEST RBX,RBX
JZ 0x00318d10
TEST RBP,RBP
JNZ 0x00318ce0
MOV EAX,dword ptr [RDI + 0x14]
LEA EDX,[RAX + -0x1]
MOV dword ptr [RDI + 0x14],EDX
TEST EAX,EAX
JZ 0x00318cee
MOV qword ptr [R12 + 0x28],0x0
POP RBX
POP RBP
POP R12
RET
(translation_unit "void FUN_00318cc0(long param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  undefined *puVar4;\n  \n  puVar4 = PTR___pthread_key_create_0043dee8;\n  puVar3 = *(undefined8 **)(param_1 + 0x28);\n  while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }\n  *(undefined8 *)(param_1 + 0x28) = 0;\n  return;\n}\n\n" (function_definition "void FUN_00318cc0(long param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  undefined *puVar4;\n  \n  puVar4 = PTR___pthread_key_create_0043dee8;\n  puVar3 = *(undefined8 **)(param_1 + 0x28);\n  while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }\n  *(undefined8 *)(param_1 + 0x28) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_00318cc0(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  undefined8 *puVar3;\n  undefined *puVar4;\n  \n  puVar4 = PTR___pthread_key_create_0043dee8;\n  puVar3 = *(undefined8 **)(param_1 + 0x28);\n  while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }\n  *(undefined8 *)(param_1 + 0x28) = 0;\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "puVar4 = PTR___pthread_key_create_0043dee8;" (assignment_expression "puVar4 = PTR___pthread_key_create_0043dee8" identifier = identifier) ;) (expression_statement "puVar3 = *(undefined8 **)(param_1 + 0x28);" (assignment_expression "puVar3 = *(undefined8 **)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined8 **)(param_1 + 0x28)" * (cast_expression "(undefined8 **)(param_1 + 0x28)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (while_statement "while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }" while (parenthesized_expression "(puVar3 != (undefined8 *)0x0)" ( (binary_expression "puVar3 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }" { (if_statement "if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" if (parenthesized_expression "(puVar4 == (undefined *)0x0)" ( (binary_expression "puVar4 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }" { (expression_statement "iVar2 = *(int *)((long)puVar3 + 0x14);" (assignment_expression "iVar2 = *(int *)((long)puVar3 + 0x14)" identifier = (pointer_expression "*(int *)((long)puVar3 + 0x14)" * (cast_expression "(int *)((long)puVar3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar3 + 0x14)" ( (binary_expression "(long)puVar3 + 0x14" (cast_expression "(long)puVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) ;) (expression_statement "*(int *)((long)puVar3 + 0x14) = iVar2 + -1;" (assignment_expression "*(int *)((long)puVar3 + 0x14) = iVar2 + -1" (pointer_expression "*(int *)((long)puVar3 + 0x14)" * (cast_expression "(int *)((long)puVar3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar3 + 0x14)" ( (binary_expression "(long)puVar3 + 0x14" (cast_expression "(long)puVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)((long)puVar3 + 0x14);" (assignment_expression "piVar1 = (int *)((long)puVar3 + 0x14)" identifier = (cast_expression "(int *)((long)puVar3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar3 + 0x14)" ( (binary_expression "(long)puVar3 + 0x14" (cast_expression "(long)puVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) 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 (iVar2 != 0) break;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "puVar3 = (undefined8 *)*puVar3;" (assignment_expression "puVar3 = (undefined8 *)*puVar3" identifier = (cast_expression "(undefined8 *)*puVar3" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar3" * identifier))) ;) (expression_statement "FUN_002dac70();" (call_expression "FUN_002dac70()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined8 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x28)" * (cast_expression "(undefined8 *)(param_1 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* std::ios_base::_M_dispose_callbacks() */\n\nvoid __thiscall std::ios_base::_M_dispose_callbacks(ios_base *this)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  undefined8 *puVar4;\n  undefined *puVar5;\n  \n  puVar5 = PTR___pthread_key_create_0043dee8;\n  puVar4 = *(undefined8 **)(this + 0x28);\n  while (puVar4 != (undefined8 *)0x0) {\n    if (puVar5 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar4 + 0x14);\n      *(int *)((long)puVar4 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar4 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar4;\n    operator_delete(puVar4);\n    puVar4 = puVar3;\n  }\n  *(undefined8 *)(this + 0x28) = 0;\n  return;\n}\n\n" comment (function_definition "void __thiscall std::ios_base::_M_dispose_callbacks(ios_base *this)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  undefined8 *puVar4;\n  undefined *puVar5;\n  \n  puVar5 = PTR___pthread_key_create_0043dee8;\n  puVar4 = *(undefined8 **)(this + 0x28);\n  while (puVar4 != (undefined8 *)0x0) {\n    if (puVar5 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar4 + 0x14);\n      *(int *)((long)puVar4 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar4 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar4;\n    operator_delete(puVar4);\n    puVar4 = puVar3;\n  }\n  *(undefined8 *)(this + 0x28) = 0;\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::ios_base::" identifier : : identifier : :) (function_declarator "_M_dispose_callbacks(ios_base *this)" identifier (parameter_list "(ios_base *this)" ( (parameter_declaration "ios_base *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  undefined8 *puVar4;\n  undefined *puVar5;\n  \n  puVar5 = PTR___pthread_key_create_0043dee8;\n  puVar4 = *(undefined8 **)(this + 0x28);\n  while (puVar4 != (undefined8 *)0x0) {\n    if (puVar5 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar4 + 0x14);\n      *(int *)((long)puVar4 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar4 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar4;\n    operator_delete(puVar4);\n    puVar4 = puVar3;\n  }\n  *(undefined8 *)(this + 0x28) = 0;\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined8 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (expression_statement "puVar5 = PTR___pthread_key_create_0043dee8;" (assignment_expression "puVar5 = PTR___pthread_key_create_0043dee8" identifier = identifier) ;) (expression_statement "puVar4 = *(undefined8 **)(this + 0x28);" (assignment_expression "puVar4 = *(undefined8 **)(this + 0x28)" identifier = (pointer_expression "*(undefined8 **)(this + 0x28)" * (cast_expression "(undefined8 **)(this + 0x28)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x28)" ( (binary_expression "this + 0x28" identifier + number_literal) ))))) ;) (while_statement "while (puVar4 != (undefined8 *)0x0) {\n    if (puVar5 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar4 + 0x14);\n      *(int *)((long)puVar4 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar4 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar4;\n    operator_delete(puVar4);\n    puVar4 = puVar3;\n  }" while (parenthesized_expression "(puVar4 != (undefined8 *)0x0)" ( (binary_expression "puVar4 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (puVar5 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar4 + 0x14);\n      *(int *)((long)puVar4 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar4 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar4;\n    operator_delete(puVar4);\n    puVar4 = puVar3;\n  }" { (if_statement "if (puVar5 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar4 + 0x14);\n      *(int *)((long)puVar4 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar4 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" if (parenthesized_expression "(puVar5 == (undefined *)0x0)" ( (binary_expression "puVar5 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar2 = *(int *)((long)puVar4 + 0x14);\n      *(int *)((long)puVar4 + 0x14) = iVar2 + -1;\n    }" { (expression_statement "iVar2 = *(int *)((long)puVar4 + 0x14);" (assignment_expression "iVar2 = *(int *)((long)puVar4 + 0x14)" identifier = (pointer_expression "*(int *)((long)puVar4 + 0x14)" * (cast_expression "(int *)((long)puVar4 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar4 + 0x14)" ( (binary_expression "(long)puVar4 + 0x14" (cast_expression "(long)puVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) ;) (expression_statement "*(int *)((long)puVar4 + 0x14) = iVar2 + -1;" (assignment_expression "*(int *)((long)puVar4 + 0x14) = iVar2 + -1" (pointer_expression "*(int *)((long)puVar4 + 0x14)" * (cast_expression "(int *)((long)puVar4 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar4 + 0x14)" ( (binary_expression "(long)puVar4 + 0x14" (cast_expression "(long)puVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)((long)puVar4 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      piVar1 = (int *)((long)puVar4 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)((long)puVar4 + 0x14);" (assignment_expression "piVar1 = (int *)((long)puVar4 + 0x14)" identifier = (cast_expression "(int *)((long)puVar4 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar4 + 0x14)" ( (binary_expression "(long)puVar4 + 0x14" (cast_expression "(long)puVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) 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 (iVar2 != 0) break;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "puVar3 = (undefined8 *)*puVar4;" (assignment_expression "puVar3 = (undefined8 *)*puVar4" identifier = (cast_expression "(undefined8 *)*puVar4" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar4" * identifier))) ;) (expression_statement "operator_delete(puVar4);" (call_expression "operator_delete(puVar4)" identifier (argument_list "(puVar4)" ( identifier ))) ;) (expression_statement "puVar4 = puVar3;" (assignment_expression "puVar4 = puVar3" identifier = identifier) ;) })) (expression_statement "*(undefined8 *)(this + 0x28) = 0;" (assignment_expression "*(undefined8 *)(this + 0x28) = 0" (pointer_expression "*(undefined8 *)(this + 0x28)" * (cast_expression "(undefined8 *)(this + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x28)" ( (binary_expression "this + 0x28" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00318cc0(long param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  undefined *puVar4;\n  \n  puVar4 = PTR___pthread_key_create_0043dee8;\n  puVar3 = *(undefined8 **)(param_1 + 0x28);\n  while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }\n  *(undefined8 *)(param_1 + 0x28) = 0;\n  return;\n}\n\n" (function_definition "void FUN_00318cc0(long param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  undefined *puVar4;\n  \n  puVar4 = PTR___pthread_key_create_0043dee8;\n  puVar3 = *(undefined8 **)(param_1 + 0x28);\n  while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }\n  *(undefined8 *)(param_1 + 0x28) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_00318cc0(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  undefined8 *puVar3;\n  undefined *puVar4;\n  \n  puVar4 = PTR___pthread_key_create_0043dee8;\n  puVar3 = *(undefined8 **)(param_1 + 0x28);\n  while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }\n  *(undefined8 *)(param_1 + 0x28) = 0;\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "puVar4 = PTR___pthread_key_create_0043dee8;" (assignment_expression "puVar4 = PTR___pthread_key_create_0043dee8" identifier = identifier) ;) (expression_statement "puVar3 = *(undefined8 **)(param_1 + 0x28);" (assignment_expression "puVar3 = *(undefined8 **)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined8 **)(param_1 + 0x28)" * (cast_expression "(undefined8 **)(param_1 + 0x28)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (while_statement "while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }" while (parenthesized_expression "(puVar3 != (undefined8 *)0x0)" ( (binary_expression "puVar3 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }" { (if_statement "if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" if (parenthesized_expression "(puVar4 == (undefined *)0x0)" ( (binary_expression "puVar4 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }" { (expression_statement "iVar2 = *(int *)((long)puVar3 + 0x14);" (assignment_expression "iVar2 = *(int *)((long)puVar3 + 0x14)" identifier = (pointer_expression "*(int *)((long)puVar3 + 0x14)" * (cast_expression "(int *)((long)puVar3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar3 + 0x14)" ( (binary_expression "(long)puVar3 + 0x14" (cast_expression "(long)puVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) ;) (expression_statement "*(int *)((long)puVar3 + 0x14) = iVar2 + -1;" (assignment_expression "*(int *)((long)puVar3 + 0x14) = iVar2 + -1" (pointer_expression "*(int *)((long)puVar3 + 0x14)" * (cast_expression "(int *)((long)puVar3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar3 + 0x14)" ( (binary_expression "(long)puVar3 + 0x14" (cast_expression "(long)puVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)((long)puVar3 + 0x14);" (assignment_expression "piVar1 = (int *)((long)puVar3 + 0x14)" identifier = (cast_expression "(int *)((long)puVar3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar3 + 0x14)" ( (binary_expression "(long)puVar3 + 0x14" (cast_expression "(long)puVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) 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 (iVar2 != 0) break;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "puVar3 = (undefined8 *)*puVar3;" (assignment_expression "puVar3 = (undefined8 *)*puVar3" identifier = (cast_expression "(undefined8 *)*puVar3" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar3" * identifier))) ;) (expression_statement "FUN_002dac70();" (call_expression "FUN_002dac70()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined8 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x28)" * (cast_expression "(undefined8 *)(param_1 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = number_literal) ;) (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 ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) 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 (cast_expression ( (type_descriptor (sized_type_specifier long)) ) 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) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_00318cc0(long param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  undefined *puVar4;\n  \n  puVar4 = PTR___pthread_key_create_0043dee8;\n  puVar3 = *(undefined8 **)(param_1 + 0x28);\n  while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }\n  *(undefined8 *)(param_1 + 0x28) = 0;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00318cc0(long param_1)" (identifier "FUN_00318cc0") (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  undefined8 *puVar3;\n  undefined *puVar4;\n  \n  puVar4 = PTR___pthread_key_create_0043dee8;\n  puVar3 = *(undefined8 **)(param_1 + 0x28);\n  while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }\n  *(undefined8 *)(param_1 + 0x28) = 0;\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined8 *puVar3;" (type_identifier "undefined8") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined *puVar4;" (type_identifier "undefined") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (expression_statement "puVar4 = PTR___pthread_key_create_0043dee8;" (assignment_expression "puVar4 = PTR___pthread_key_create_0043dee8" (identifier "puVar4") (= "=") (identifier "PTR___pthread_key_create_0043dee8")) (; ";")) (expression_statement "puVar3 = *(undefined8 **)(param_1 + 0x28);" (assignment_expression "puVar3 = *(undefined8 **)(param_1 + 0x28)" (identifier "puVar3") (= "=") (pointer_expression "*(undefined8 **)(param_1 + 0x28)" (* "*") (cast_expression "(undefined8 **)(param_1 + 0x28)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (while_statement "while (puVar3 != (undefined8 *)0x0) {\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }" (while "while") (parenthesized_expression "(puVar3 != (undefined8 *)0x0)" (( "(") (binary_expression "puVar3 != (undefined8 *)0x0" (identifier "puVar3") (!= "!=") (cast_expression "(undefined8 *)0x0" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }\n    if (iVar2 != 0) break;\n    puVar3 = (undefined8 *)*puVar3;\n    FUN_002dac70();\n  }" ({ "{") (if_statement "if (puVar4 == (undefined *)0x0) {\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }\n    else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" (if "if") (parenthesized_expression "(puVar4 == (undefined *)0x0)" (( "(") (binary_expression "puVar4 == (undefined *)0x0" (identifier "puVar4") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      iVar2 = *(int *)((long)puVar3 + 0x14);\n      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;\n    }" ({ "{") (expression_statement "iVar2 = *(int *)((long)puVar3 + 0x14);" (assignment_expression "iVar2 = *(int *)((long)puVar3 + 0x14)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)((long)puVar3 + 0x14)" (* "*") (cast_expression "(int *)((long)puVar3 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar3 + 0x14)" (( "(") (binary_expression "(long)puVar3 + 0x14" (cast_expression "(long)puVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar3")) (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "*(int *)((long)puVar3 + 0x14) = iVar2 + -1;" (assignment_expression "*(int *)((long)puVar3 + 0x14) = iVar2 + -1" (pointer_expression "*(int *)((long)puVar3 + 0x14)" (* "*") (cast_expression "(int *)((long)puVar3 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar3 + 0x14)" (( "(") (binary_expression "(long)puVar3 + 0x14" (cast_expression "(long)puVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar3")) (+ "+") (number_literal "0x14")) () ")")))) (= "=") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" (else "else") (compound_statement "{\n      LOCK();\n      piVar1 = (int *)((long)puVar3 + 0x14);\n      iVar2 = *piVar1;\n      *piVar1 = *piVar1 + -1;\n      UNLOCK();\n    }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar1 = (int *)((long)puVar3 + 0x14);" (assignment_expression "piVar1 = (int *)((long)puVar3 + 0x14)" (identifier "piVar1") (= "=") (cast_expression "(int *)((long)puVar3 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar3 + 0x14)" (( "(") (binary_expression "(long)puVar3 + 0x14" (cast_expression "(long)puVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar3")) (+ "+") (number_literal "0x14")) () ")")))) (; ";")) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" (identifier "iVar2") (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (if_statement "if (iVar2 != 0) break;" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "puVar3 = (undefined8 *)*puVar3;" (assignment_expression "puVar3 = (undefined8 *)*puVar3" (identifier "puVar3") (= "=") (cast_expression "(undefined8 *)*puVar3" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar3" (* "*") (identifier "puVar3")))) (; ";")) (expression_statement "FUN_002dac70();" (call_expression "FUN_002dac70()" (identifier "FUN_002dac70") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined8 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x28)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x28)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* std::ios_base::_M_dispose_callbacks() */

void __thiscall std::type_1::function_1(type_1 *var_1)

{
  int *piVar1;
  int var_4;
  type_2 *puVar3;
  type_2 *var_2;
  type_3 *var_3;
  
  var_3 = PTR___pthread_key_create_0043dee8;
  var_2 = *(type_2 **)(var_1 + 0x28);
  while (var_2 != (type_2 *)0x0) {
    if (var_3 == (type_3 *)0x0) {
      var_4 = *(int *)((long)var_2 + 0x14);
      *(int *)((long)var_2 + 0x14) = var_4 + -1;
    }
    else {
      var_5();
      piVar1 = (int *)((long)var_2 + 0x14);
      var_4 = *piVar1;
      *piVar1 = *piVar1 + -1;
      var_6();
    }
    if (var_4 != 0) break;
    puVar3 = (type_2 *)*var_2;
    var_7(var_2);
    var_2 = puVar3;
  }
  *(type_2 *)(var_1 + 0x28) = 0;
  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)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (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: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (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: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (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: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))))

void MASKED(long param_1)

{
  int *piVar1;
  int iVar2;
  undefined8 *puVar3;
  undefined *puVar4;
  
  puVar4 = PTR___pthread_key_create_0043dee8;
  puVar3 = *(undefined8 **)(param_1 + 0x28);
  while (puVar3 != (undefined8 *)0x0) {
    if (puVar4 == (undefined *)0x0) {
      iVar2 = *(int *)((long)puVar3 + 0x14);
      *(int *)((long)puVar3 + 0x14) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)((long)puVar3 + 0x14);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 != 0) break;
    puVar3 = (undefined8 *)*puVar3;
    FUN_002dac70();
  }
  *(undefined8 *)(param_1 + 0x28) = 0;
  return;
}

