
undefined8 __cxa_guard_acquire(uint *param_1)

{
  uint uVar1;
  undefined8 *puVar2;
  ulong uVar3;
  bool bVar4;
  
  if ((char)*param_1 != '\0') {
    return 0;
  }
  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {
    if ((char)*param_1 != '\0') {
      return 0;
    }
    if (*(char *)((long)param_1 + 1) == '\0') {
      *(undefined1 *)((long)param_1 + 1) = 1;
      return 1;
    }
    puVar2 = (undefined8 *)__cxa_allocate_exception(8);
    *puVar2 = &PTR__recursive_init_error_0043b2b8;
                    /* WARNING: Subroutine does not return */
    __cxa_throw(puVar2,&recursive_init_error::typeinfo,recursive_init_error::~recursive_init_error);
  }
  do {
    LOCK();
    uVar1 = *param_1;
    bVar4 = uVar1 == 0;
    if (bVar4) {
      *param_1 = 0x100;
      uVar1 = 0;
    }
    UNLOCK();
    if (bVar4) {
      return 1;
    }
    uVar3 = (ulong)uVar1;
    if (uVar1 == 1) {
      return 0;
    }
    if (uVar1 != 0x100) goto LAB_002d969b;
    uVar3 = 0x10100;
    LOCK();
    uVar1 = *param_1;
    bVar4 = uVar1 == 0x100;
    if (bVar4) {
      *param_1 = 0x10100;
      uVar1 = 0x100;
    }
    UNLOCK();
    if (bVar4) goto LAB_002d969b;
    if (uVar1 == 1) {
      return 0;
    }
    if (uVar1 != 0) {
LAB_002d969b:
      syscall(0xca,param_1,0,uVar3,0);
    }
  } while( true );
}



undefined8 FUN_002d9600(uint *param_1)

{
  uint uVar1;
  undefined8 *puVar2;
  ulong uVar3;
  bool bVar4;
  
  if ((char)*param_1 != '\0') {
    return 0;
  }
  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {
    if ((char)*param_1 != '\0') {
      return 0;
    }
    if (*(char *)((long)param_1 + 1) == '\0') {
      *(undefined1 *)((long)param_1 + 1) = 1;
      return 1;
    }
    puVar2 = (undefined8 *)FUN_002daaf0(8);
    *puVar2 = &PTR_FUN_0043b2b8;
                    /* WARNING: Subroutine does not return */
    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);
  }
  do {
    LOCK();
    uVar1 = *param_1;
    bVar4 = uVar1 == 0;
    if (bVar4) {
      *param_1 = 0x100;
      uVar1 = 0;
    }
    UNLOCK();
    if (bVar4) {
      return 1;
    }
    uVar3 = (ulong)uVar1;
    if (uVar1 == 1) {
      return 0;
    }
    if (uVar1 != 0x100) goto LAB_002d969b;
    uVar3 = 0x10100;
    LOCK();
    uVar1 = *param_1;
    bVar4 = uVar1 == 0x100;
    if (bVar4) {
      *param_1 = 0x10100;
      uVar1 = 0x100;
    }
    UNLOCK();
    if (bVar4) goto LAB_002d969b;
    if (uVar1 == 1) {
      return 0;
    }
    if (uVar1 != 0) {
LAB_002d969b:
      syscall(0xca,param_1,0,uVar3,0);
    }
  } while( true );
}


MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JNZ 0x002d9680
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
CMP qword ptr [0x0043dee8],0x0
JZ 0x002d9648
MOV R13D,0x1
MOV EBP,0x100
XOR R12D,R12D
MOV EAX,R12D
CMPXCHG.LOCK dword ptr [RBX],EBP
JNZ 0x002d9683
ADD RSP,0x8
MOV EAX,0x1
POP RBX
POP RBP
POP R12
POP R13
RET
CMP byte ptr [RDI],0x0
JNZ 0x002d9670
CMP byte ptr [RDI + 0x1],0x0
JNZ 0x002d96b4
MOV byte ptr [RDI + 0x1],0x1
ADD RSP,0x8
MOV EAX,0x1
POP RBX
POP RBP
POP R12
POP R13
RET
ADD RSP,0x8
XOR EAX,EAX
POP RBX
POP RBP
POP R12
POP R13
RET
XOR EAX,EAX
RET
MOV ECX,EAX
CMP R13D,EAX
JZ 0x002d9670
CMP EBP,EAX
JNZ 0x002d969b
MOV ECX,0x10100
MOV EAX,EBP
CMPXCHG.LOCK dword ptr [RBX],ECX
JNZ 0x002d96e2
XOR R8D,R8D
XOR EDX,EDX
MOV RSI,RBX
MOV EDI,0xca
XOR EAX,EAX
CALL 0x001475c0
JMP 0x002d962c
MOV EDI,0x8
CALL 0x002daaf0
LEA RDX,[0x43b2a8]
LEA RSI,[0x43b290]
MOV RDI,RAX
ADD RDX,0x10
MOV qword ptr [RAX],RDX
LEA RDX,[0x31b740]
CALL 0x002d9810
CMP R13D,EAX
JZ 0x002d9670
TEST EAX,EAX
JNZ 0x002d969b
JMP 0x002d962c
(translation_unit "undefined8 FUN_002d9600(uint *param_1)\n\n{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    /* WARNING: Subroutine does not return */\n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}\n\n" (function_definition "undefined8 FUN_002d9600(uint *param_1)\n\n{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    /* WARNING: Subroutine does not return */\n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}" type_identifier (function_declarator "FUN_002d9600(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    /* WARNING: Subroutine does not return */\n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (if_statement "if ((char)*param_1 != '\0') {\n    return 0;\n  }" if (parenthesized_expression "((char)*param_1 != '\0')" ( (binary_expression "(char)*param_1 != '\0'" (cast_expression "(char)*param_1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_1" * identifier)) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    /* WARNING: Subroutine does not return */\n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0043dee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0043dee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    /* WARNING: Subroutine does not return */\n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }" { (if_statement "if ((char)*param_1 != '\0') {\n      return 0;\n    }" if (parenthesized_expression "((char)*param_1 != '\0')" ( (binary_expression "(char)*param_1 != '\0'" (cast_expression "(char)*param_1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_1" * identifier)) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }" if (parenthesized_expression "(*(char *)((long)param_1 + 1) == '\0')" ( (binary_expression "*(char *)((long)param_1 + 1) == '\0'" (pointer_expression "*(char *)((long)param_1 + 1)" * (cast_expression "(char *)((long)param_1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 1)" ( (binary_expression "(long)param_1 + 1" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }" { (expression_statement "*(undefined1 *)((long)param_1 + 1) = 1;" (assignment_expression "*(undefined1 *)((long)param_1 + 1) = 1" (pointer_expression "*(undefined1 *)((long)param_1 + 1)" * (cast_expression "(undefined1 *)((long)param_1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 1)" ( (binary_expression "(long)param_1 + 1" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "puVar2 = (undefined8 *)FUN_002daaf0(8);" (assignment_expression "puVar2 = (undefined8 *)FUN_002daaf0(8)" identifier = (cast_expression "(undefined8 *)FUN_002daaf0(8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_002daaf0(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "*puVar2 = &PTR_FUN_0043b2b8;" (assignment_expression "*puVar2 = &PTR_FUN_0043b2b8" (pointer_expression "*puVar2" * identifier) = (pointer_expression "&PTR_FUN_0043b2b8" & identifier)) ;) comment (expression_statement "FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);" (call_expression "FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740)" identifier (argument_list "(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740)" ( identifier , (pointer_expression "&PTR_PTR_FUN_0043b290" & identifier) , identifier ))) ;) })) (do_statement "do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );" do (compound_statement "{\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "bVar4 = uVar1 == 0;" (assignment_expression "bVar4 = uVar1 == 0" identifier = (binary_expression "uVar1 == 0" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }" { (expression_statement "*param_1 = 0x100;" (assignment_expression "*param_1 = 0x100" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) })) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (if_statement "if (bVar4) {\n      return 1;\n    }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "uVar3 = (ulong)uVar1;" (assignment_expression "uVar3 = (ulong)uVar1" identifier = (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (if_statement "if (uVar1 == 1) {\n      return 0;\n    }" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (uVar1 != 0x100) goto LAB_002d969b;" if (parenthesized_expression "(uVar1 != 0x100)" ( (binary_expression "uVar1 != 0x100" identifier != number_literal) )) (goto_statement "goto LAB_002d969b;" goto statement_identifier ;)) (expression_statement "uVar3 = 0x10100;" (assignment_expression "uVar3 = 0x10100" identifier = number_literal) ;) (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "bVar4 = uVar1 == 0x100;" (assignment_expression "bVar4 = uVar1 == 0x100" identifier = (binary_expression "uVar1 == 0x100" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }" { (expression_statement "*param_1 = 0x10100;" (assignment_expression "*param_1 = 0x10100" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0x100;" (assignment_expression "uVar1 = 0x100" identifier = number_literal) ;) })) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (if_statement "if (bVar4) goto LAB_002d969b;" if (parenthesized_expression "(bVar4)" ( identifier )) (goto_statement "goto LAB_002d969b;" goto statement_identifier ;)) (if_statement "if (uVar1 == 1) {\n      return 0;\n    }" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }" { (labeled_statement "LAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);" statement_identifier : (expression_statement "syscall(0xca,param_1,0,uVar3,0);" (call_expression "syscall(0xca,param_1,0,uVar3,0)" identifier (argument_list "(0xca,param_1,0,uVar3,0)" ( number_literal , identifier , number_literal , identifier , number_literal ))) ;)) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "undefined8 __cxa_guard_acquire(uint *param_1)\n\n{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)__cxa_allocate_exception(8);\n    *puVar2 = &PTR__recursive_init_error_0043b2b8;\n                    /* WARNING: Subroutine does not return */\n    __cxa_throw(puVar2,&recursive_init_error::typeinfo,recursive_init_error::~recursive_init_error);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}\n\n" (function_definition "undefined8 __cxa_guard_acquire(uint *param_1)\n\n{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)__cxa_allocate_exception(8);\n    *puVar2 = &PTR__recursive_init_error_0043b2b8;\n                    /* WARNING: Subroutine does not return */\n    __cxa_throw(puVar2,&recursive_init_error::typeinfo,recursive_init_error::~recursive_init_error);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}" type_identifier (function_declarator "__cxa_guard_acquire(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)__cxa_allocate_exception(8);\n    *puVar2 = &PTR__recursive_init_error_0043b2b8;\n                    /* WARNING: Subroutine does not return */\n    __cxa_throw(puVar2,&recursive_init_error::typeinfo,recursive_init_error::~recursive_init_error);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (if_statement "if ((char)*param_1 != '\0') {\n    return 0;\n  }" if (parenthesized_expression "((char)*param_1 != '\0')" ( (binary_expression "(char)*param_1 != '\0'" (cast_expression "(char)*param_1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_1" * identifier)) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)__cxa_allocate_exception(8);\n    *puVar2 = &PTR__recursive_init_error_0043b2b8;\n                    /* WARNING: Subroutine does not return */\n    __cxa_throw(puVar2,&recursive_init_error::typeinfo,recursive_init_error::~recursive_init_error);\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0043dee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0043dee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)__cxa_allocate_exception(8);\n    *puVar2 = &PTR__recursive_init_error_0043b2b8;\n                    /* WARNING: Subroutine does not return */\n    __cxa_throw(puVar2,&recursive_init_error::typeinfo,recursive_init_error::~recursive_init_error);\n  }" { (if_statement "if ((char)*param_1 != '\0') {\n      return 0;\n    }" if (parenthesized_expression "((char)*param_1 != '\0')" ( (binary_expression "(char)*param_1 != '\0'" (cast_expression "(char)*param_1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_1" * identifier)) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }" if (parenthesized_expression "(*(char *)((long)param_1 + 1) == '\0')" ( (binary_expression "*(char *)((long)param_1 + 1) == '\0'" (pointer_expression "*(char *)((long)param_1 + 1)" * (cast_expression "(char *)((long)param_1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 1)" ( (binary_expression "(long)param_1 + 1" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }" { (expression_statement "*(undefined1 *)((long)param_1 + 1) = 1;" (assignment_expression "*(undefined1 *)((long)param_1 + 1) = 1" (pointer_expression "*(undefined1 *)((long)param_1 + 1)" * (cast_expression "(undefined1 *)((long)param_1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 1)" ( (binary_expression "(long)param_1 + 1" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "puVar2 = (undefined8 *)__cxa_allocate_exception(8);" (assignment_expression "puVar2 = (undefined8 *)__cxa_allocate_exception(8)" identifier = (cast_expression "(undefined8 *)__cxa_allocate_exception(8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "__cxa_allocate_exception(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "*puVar2 = &PTR__recursive_init_error_0043b2b8;" (assignment_expression "*puVar2 = &PTR__recursive_init_error_0043b2b8" (pointer_expression "*puVar2" * identifier) = (pointer_expression "&PTR__recursive_init_error_0043b2b8" & identifier)) ;) comment (expression_statement "__cxa_throw(puVar2,&recursive_init_error::typeinfo,recursive_init_error::~recursive_init_error);" (call_expression "__cxa_throw(puVar2,&recursive_init_error::typeinfo,recursive_init_error::~recursive_init_error)" identifier (argument_list "(puVar2,&recursive_init_error::typeinfo,recursive_init_error::~recursive_init_error)" ( identifier , (pointer_expression "&recursive_init_error" & identifier) (ERROR "::typeinfo" : : identifier) , (ERROR "recursive_init_error::" identifier : :) (unary_expression "~recursive_init_error" ~ identifier) ))) ;) })) (do_statement "do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );" do (compound_statement "{\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "bVar4 = uVar1 == 0;" (assignment_expression "bVar4 = uVar1 == 0" identifier = (binary_expression "uVar1 == 0" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }" { (expression_statement "*param_1 = 0x100;" (assignment_expression "*param_1 = 0x100" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) })) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (if_statement "if (bVar4) {\n      return 1;\n    }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "uVar3 = (ulong)uVar1;" (assignment_expression "uVar3 = (ulong)uVar1" identifier = (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (if_statement "if (uVar1 == 1) {\n      return 0;\n    }" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (uVar1 != 0x100) goto LAB_002d969b;" if (parenthesized_expression "(uVar1 != 0x100)" ( (binary_expression "uVar1 != 0x100" identifier != number_literal) )) (goto_statement "goto LAB_002d969b;" goto statement_identifier ;)) (expression_statement "uVar3 = 0x10100;" (assignment_expression "uVar3 = 0x10100" identifier = number_literal) ;) (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "bVar4 = uVar1 == 0x100;" (assignment_expression "bVar4 = uVar1 == 0x100" identifier = (binary_expression "uVar1 == 0x100" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }" { (expression_statement "*param_1 = 0x10100;" (assignment_expression "*param_1 = 0x10100" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0x100;" (assignment_expression "uVar1 = 0x100" identifier = number_literal) ;) })) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (if_statement "if (bVar4) goto LAB_002d969b;" if (parenthesized_expression "(bVar4)" ( identifier )) (goto_statement "goto LAB_002d969b;" goto statement_identifier ;)) (if_statement "if (uVar1 == 1) {\n      return 0;\n    }" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }" { (labeled_statement "LAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);" statement_identifier : (expression_statement "syscall(0xca,param_1,0,uVar3,0);" (call_expression "syscall(0xca,param_1,0,uVar3,0)" identifier (argument_list "(0xca,param_1,0,uVar3,0)" ( number_literal , identifier , number_literal , identifier , number_literal ))) ;)) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "undefined8 FUN_002d9600(uint *param_1)\n\n{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    \n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}\n\n" (function_definition "undefined8 FUN_002d9600(uint *param_1)\n\n{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    \n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}" type_identifier (function_declarator "FUN_002d9600(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    \n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (if_statement "if ((char)*param_1 != '\0') {\n    return 0;\n  }" if (parenthesized_expression "((char)*param_1 != '\0')" ( (binary_expression "(char)*param_1 != '\0'" (cast_expression "(char)*param_1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_1" * identifier)) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    \n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }" if (parenthesized_expression "(PTR___pthread_key_create_0043dee8 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0043dee8 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    \n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }" { (if_statement "if ((char)*param_1 != '\0') {\n      return 0;\n    }" if (parenthesized_expression "((char)*param_1 != '\0')" ( (binary_expression "(char)*param_1 != '\0'" (cast_expression "(char)*param_1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_1" * identifier)) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }" if (parenthesized_expression "(*(char *)((long)param_1 + 1) == '\0')" ( (binary_expression "*(char *)((long)param_1 + 1) == '\0'" (pointer_expression "*(char *)((long)param_1 + 1)" * (cast_expression "(char *)((long)param_1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 1)" ( (binary_expression "(long)param_1 + 1" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }" { (expression_statement "*(undefined1 *)((long)param_1 + 1) = 1;" (assignment_expression "*(undefined1 *)((long)param_1 + 1) = 1" (pointer_expression "*(undefined1 *)((long)param_1 + 1)" * (cast_expression "(undefined1 *)((long)param_1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 1)" ( (binary_expression "(long)param_1 + 1" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "puVar2 = (undefined8 *)FUN_002daaf0(8);" (assignment_expression "puVar2 = (undefined8 *)FUN_002daaf0(8)" identifier = (cast_expression "(undefined8 *)FUN_002daaf0(8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_002daaf0(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "*puVar2 = &PTR_FUN_0043b2b8;" (assignment_expression "*puVar2 = &PTR_FUN_0043b2b8" (pointer_expression "*puVar2" * identifier) = (pointer_expression "&PTR_FUN_0043b2b8" & identifier)) ;) (expression_statement "FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);" (call_expression "FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740)" identifier (argument_list "(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740)" ( identifier , (pointer_expression "&PTR_PTR_FUN_0043b290" & identifier) , identifier ))) ;) })) (do_statement "do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );" do (compound_statement "{\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "bVar4 = uVar1 == 0;" (assignment_expression "bVar4 = uVar1 == 0" identifier = (binary_expression "uVar1 == 0" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }" { (expression_statement "*param_1 = 0x100;" (assignment_expression "*param_1 = 0x100" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) })) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (if_statement "if (bVar4) {\n      return 1;\n    }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "uVar3 = (ulong)uVar1;" (assignment_expression "uVar3 = (ulong)uVar1" identifier = (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (if_statement "if (uVar1 == 1) {\n      return 0;\n    }" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (uVar1 != 0x100) goto LAB_002d969b;" if (parenthesized_expression "(uVar1 != 0x100)" ( (binary_expression "uVar1 != 0x100" identifier != number_literal) )) (goto_statement "goto LAB_002d969b;" goto statement_identifier ;)) (expression_statement "uVar3 = 0x10100;" (assignment_expression "uVar3 = 0x10100" identifier = number_literal) ;) (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "bVar4 = uVar1 == 0x100;" (assignment_expression "bVar4 = uVar1 == 0x100" identifier = (binary_expression "uVar1 == 0x100" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }" { (expression_statement "*param_1 = 0x10100;" (assignment_expression "*param_1 = 0x10100" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0x100;" (assignment_expression "uVar1 = 0x100" identifier = number_literal) ;) })) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (if_statement "if (bVar4) goto LAB_002d969b;" if (parenthesized_expression "(bVar4)" ( identifier )) (goto_statement "goto LAB_002d969b;" goto statement_identifier ;)) (if_statement "if (uVar1 == 1) {\n      return 0;\n    }" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }" { (labeled_statement "LAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);" statement_identifier : (expression_statement "syscall(0xca,param_1,0,uVar3,0);" (call_expression "syscall(0xca,param_1,0,uVar3,0)" identifier (argument_list "(0xca,param_1,0,uVar3,0)" ( number_literal , identifier , number_literal , identifier , number_literal ))) ;)) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT)) != (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT)) != (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_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) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (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) )))) = LIT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , IDENT ))) ;) })) (do_statement do (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( IDENT )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( LIT , IDENT , LIT , IDENT , LIT ))) ;)) })) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "undefined8 FUN_002d9600(uint *param_1)\n\n{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    \n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}" (type_identifier "undefined8") (function_declarator "FUN_002d9600(uint *param_1)" (identifier "FUN_002d9600") (parameter_list "(uint *param_1)" (( "(") (parameter_declaration "uint *param_1" (type_identifier "uint") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  undefined8 *puVar2;\n  ulong uVar3;\n  bool bVar4;\n  \n  if ((char)*param_1 != '\0') {\n    return 0;\n  }\n  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    \n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }\n  do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "undefined8 *puVar2;" (type_identifier "undefined8") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (declaration "bool bVar4;" (primitive_type "bool") (identifier "bVar4") (; ";")) (if_statement "if ((char)*param_1 != '\0') {\n    return 0;\n  }" (if "if") (parenthesized_expression "((char)*param_1 != '\0')" (( "(") (binary_expression "(char)*param_1 != '\0'" (cast_expression "(char)*param_1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    \n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_0043dee8 == (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_0043dee8 == (undefined *)0x0" (identifier "PTR___pthread_key_create_0043dee8") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if ((char)*param_1 != '\0') {\n      return 0;\n    }\n    if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }\n    puVar2 = (undefined8 *)FUN_002daaf0(8);\n    *puVar2 = &PTR_FUN_0043b2b8;\n                    \n    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);\n  }" ({ "{") (if_statement "if ((char)*param_1 != '\0') {\n      return 0;\n    }" (if "if") (parenthesized_expression "((char)*param_1 != '\0')" (( "(") (binary_expression "(char)*param_1 != '\0'" (cast_expression "(char)*param_1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (*(char *)((long)param_1 + 1) == '\0') {\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }" (if "if") (parenthesized_expression "(*(char *)((long)param_1 + 1) == '\0')" (( "(") (binary_expression "*(char *)((long)param_1 + 1) == '\0'" (pointer_expression "*(char *)((long)param_1 + 1)" (* "*") (cast_expression "(char *)((long)param_1 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 1)" (( "(") (binary_expression "(long)param_1 + 1" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "1")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      *(undefined1 *)((long)param_1 + 1) = 1;\n      return 1;\n    }" ({ "{") (expression_statement "*(undefined1 *)((long)param_1 + 1) = 1;" (assignment_expression "*(undefined1 *)((long)param_1 + 1) = 1" (pointer_expression "*(undefined1 *)((long)param_1 + 1)" (* "*") (cast_expression "(undefined1 *)((long)param_1 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 1)" (( "(") (binary_expression "(long)param_1 + 1" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "1")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "puVar2 = (undefined8 *)FUN_002daaf0(8);" (assignment_expression "puVar2 = (undefined8 *)FUN_002daaf0(8)" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)FUN_002daaf0(8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_002daaf0(8)" (identifier "FUN_002daaf0") (argument_list "(8)" (( "(") (number_literal "8") () ")"))))) (; ";")) (expression_statement "*puVar2 = &PTR_FUN_0043b2b8;" (assignment_expression "*puVar2 = &PTR_FUN_0043b2b8" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (pointer_expression "&PTR_FUN_0043b2b8" (& "&") (identifier "PTR_FUN_0043b2b8"))) (; ";")) (expression_statement "FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);" (call_expression "FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740)" (identifier "FUN_002d9810") (argument_list "(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740)" (( "(") (identifier "puVar2") (, ",") (pointer_expression "&PTR_PTR_FUN_0043b290" (& "&") (identifier "PTR_PTR_FUN_0043b290")) (, ",") (identifier "FUN_0031b740") () ")"))) (; ";")) (} "}"))) (do_statement "do {\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  } while( true );" (do "do") (compound_statement "{\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0;\n    if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }\n    UNLOCK();\n    if (bVar4) {\n      return 1;\n    }\n    uVar3 = (ulong)uVar1;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0x100) goto LAB_002d969b;\n    uVar3 = 0x10100;\n    LOCK();\n    uVar1 = *param_1;\n    bVar4 = uVar1 == 0x100;\n    if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }\n    UNLOCK();\n    if (bVar4) goto LAB_002d969b;\n    if (uVar1 == 1) {\n      return 0;\n    }\n    if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }\n  }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" (identifier "uVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "bVar4 = uVar1 == 0;" (assignment_expression "bVar4 = uVar1 == 0" (identifier "bVar4") (= "=") (binary_expression "uVar1 == 0" (identifier "uVar1") (== "==") (number_literal "0"))) (; ";")) (if_statement "if (bVar4) {\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }" (if "if") (parenthesized_expression "(bVar4)" (( "(") (identifier "bVar4") () ")")) (compound_statement "{\n      *param_1 = 0x100;\n      uVar1 = 0;\n    }" ({ "{") (expression_statement "*param_1 = 0x100;" (assignment_expression "*param_1 = 0x100" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0x100")) (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (bVar4) {\n      return 1;\n    }" (if "if") (parenthesized_expression "(bVar4)" (( "(") (identifier "bVar4") () ")")) (compound_statement "{\n      return 1;\n    }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "uVar3 = (ulong)uVar1;" (assignment_expression "uVar3 = (ulong)uVar1" (identifier "uVar3") (= "=") (cast_expression "(ulong)uVar1" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar1"))) (; ";")) (if_statement "if (uVar1 == 1) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(uVar1 == 1)" (( "(") (binary_expression "uVar1 == 1" (identifier "uVar1") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (uVar1 != 0x100) goto LAB_002d969b;" (if "if") (parenthesized_expression "(uVar1 != 0x100)" (( "(") (binary_expression "uVar1 != 0x100" (identifier "uVar1") (!= "!=") (number_literal "0x100")) () ")")) (goto_statement "goto LAB_002d969b;" (goto "goto") (statement_identifier "LAB_002d969b") (; ";"))) (expression_statement "uVar3 = 0x10100;" (assignment_expression "uVar3 = 0x10100" (identifier "uVar3") (= "=") (number_literal "0x10100")) (; ";")) (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" (identifier "uVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "bVar4 = uVar1 == 0x100;" (assignment_expression "bVar4 = uVar1 == 0x100" (identifier "bVar4") (= "=") (binary_expression "uVar1 == 0x100" (identifier "uVar1") (== "==") (number_literal "0x100"))) (; ";")) (if_statement "if (bVar4) {\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }" (if "if") (parenthesized_expression "(bVar4)" (( "(") (identifier "bVar4") () ")")) (compound_statement "{\n      *param_1 = 0x10100;\n      uVar1 = 0x100;\n    }" ({ "{") (expression_statement "*param_1 = 0x10100;" (assignment_expression "*param_1 = 0x10100" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0x10100")) (; ";")) (expression_statement "uVar1 = 0x100;" (assignment_expression "uVar1 = 0x100" (identifier "uVar1") (= "=") (number_literal "0x100")) (; ";")) (} "}"))) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (bVar4) goto LAB_002d969b;" (if "if") (parenthesized_expression "(bVar4)" (( "(") (identifier "bVar4") () ")")) (goto_statement "goto LAB_002d969b;" (goto "goto") (statement_identifier "LAB_002d969b") (; ";"))) (if_statement "if (uVar1 == 1) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(uVar1 == 1)" (( "(") (binary_expression "uVar1 == 1" (identifier "uVar1") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (uVar1 != 0) {\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }" (if "if") (parenthesized_expression "(uVar1 != 0)" (( "(") (binary_expression "uVar1 != 0" (identifier "uVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);\n    }" ({ "{") (labeled_statement "LAB_002d969b:\n      syscall(0xca,param_1,0,uVar3,0);" (statement_identifier "LAB_002d969b") (: ":") (expression_statement "syscall(0xca,param_1,0,uVar3,0);" (call_expression "syscall(0xca,param_1,0,uVar3,0)" (identifier "syscall") (argument_list "(0xca,param_1,0,uVar3,0)" (( "(") (number_literal "0xca") (, ",") (identifier "param_1") (, ",") (number_literal "0") (, ",") (identifier "uVar3") (, ",") (number_literal "0") () ")"))) (; ";"))) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

type_1 function_1(type_2 *param_1)

{
  type_2 var_5;
  type_1 *puVar2;
  type_3 uVar3;
  bool bVar4;
  
  if ((char)*param_1 != '\0') {
    return 0;
  }
  if (var_1 == (type_4 *)0x0) {
    if ((char)*param_1 != '\0') {
      return 0;
    }
    if (*(char *)((long)param_1 + 1) == '\0') {
      *(type_5 *)((long)param_1 + 1) = 1;
      return 1;
    }
    puVar2 = (type_1 *)var_2(8);
    *puVar2 = &PTR__recursive_init_error_0043b2b8;
                    /* WARNING: Subroutine does not return */
    var_3(puVar2,&recursive_init_error::typeinfo,recursive_init_error::~recursive_init_error);
  }
  do {
    var_4();
    var_5 = *param_1;
    bVar4 = var_5 == 0;
    if (bVar4) {
      *param_1 = 0x100;
      var_5 = 0;
    }
    var_6();
    if (bVar4) {
      return 1;
    }
    uVar3 = (type_3)var_5;
    if (var_5 == 1) {
      return 0;
    }
    if (var_5 != 0x100) goto LAB_002d969b;
    uVar3 = 0x10100;
    var_4();
    var_5 = *param_1;
    bVar4 = var_5 == 0x100;
    if (bVar4) {
      *param_1 = 0x10100;
      var_5 = 0x100;
    }
    var_6();
    if (bVar4) goto LAB_002d969b;
    if (var_5 == 1) {
      return 0;
    }
    if (var_5 != 0) {
LAB_002d969b:
      var_7(0xca,param_1,0,uVar3,0);
    }
  } while( true );
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_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: (char_literal (escape_sequence)))) consequence: (compound_statement (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: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal))))) right: (number_literal))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (identifier)))))) (do_statement body: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier) (number_literal) (identifier) (number_literal)))))))) condition: (parenthesized_expression (true))))))

undefined8 MASKED(uint *param_1)

{
  uint uVar1;
  undefined8 *puVar2;
  ulong uVar3;
  bool bVar4;
  
  if ((char)*param_1 != '\0') {
    return 0;
  }
  if (PTR___pthread_key_create_0043dee8 == (undefined *)0x0) {
    if ((char)*param_1 != '\0') {
      return 0;
    }
    if (*(char *)((long)param_1 + 1) == '\0') {
      *(undefined1 *)((long)param_1 + 1) = 1;
      return 1;
    }
    puVar2 = (undefined8 *)FUN_002daaf0(8);
    *puVar2 = &PTR_FUN_0043b2b8;
                    /* WARNING: Subroutine does not return */
    FUN_002d9810(puVar2,&PTR_PTR_FUN_0043b290,FUN_0031b740);
  }
  do {
    LOCK();
    uVar1 = *param_1;
    bVar4 = uVar1 == 0;
    if (bVar4) {
      *param_1 = 0x100;
      uVar1 = 0;
    }
    UNLOCK();
    if (bVar4) {
      return 1;
    }
    uVar3 = (ulong)uVar1;
    if (uVar1 == 1) {
      return 0;
    }
    if (uVar1 != 0x100) goto LAB_002d969b;
    uVar3 = 0x10100;
    LOCK();
    uVar1 = *param_1;
    bVar4 = uVar1 == 0x100;
    if (bVar4) {
      *param_1 = 0x10100;
      uVar1 = 0x100;
    }
    UNLOCK();
    if (bVar4) goto LAB_002d969b;
    if (uVar1 == 1) {
      return 0;
    }
    if (uVar1 != 0) {
LAB_002d969b:
      syscall(0xca,param_1,0,uVar3,0);
    }
  } while( true );
}

