
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int mktemp_main(int argc,char **argv)

{
  char *path;
  
}



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

undefined4 FUN_00087fae(undefined4 param_1,int param_2)

{
  uint uVar1;
  char *__template;
  undefined4 uVar2;
  char *pcVar3;
  int iVar4;
  int in_GS_OFFSET;
  char *local_14;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  local_14 = getenv("TMPDIR");
  if (local_14 == (char *)0x0) {
    local_14 = "/tmp";
  }
  else if (*local_14 == '\0') {
    local_14 = "/tmp";
  }
  uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);
  __template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);
  if (__template == (char *)0x0) {
    __template = (char *)FUN_00019ba3();
    uVar1 = uVar1 | 4;
  }
  if ((uVar1 & 0xc) != 0) {
    __template = (char *)FUN_00018bd3();
  }
  if ((uVar1 & 0x10) == 0) {
    if ((uVar1 & 1) == 0) {
      iVar4 = FUN_000168c0(__template);
      if (iVar4 < 0) goto joined_r0x000880cc;
    }
    else {
      pcVar3 = mkdtemp(__template);
      if (pcVar3 == (char *)0x0) {
joined_r0x000880cc:
        if ((uVar1 & 2) == 0) {
                    /* WARNING: Subroutine does not return */
          FUN_000ae0aa();
        }
        uVar2 = 1;
        goto LAB_00088069;
      }
    }
  }
  else {
    __template = mktemp(__template);
    if (*__template == '\0') goto joined_r0x000880cc;
  }
  puts(__template);
  uVar2 = 0;
LAB_00088069:
  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00017e10();
  }
  return uVar2;
}


PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x1c
CALL 0x00017640
ADD EBX,0x48a67
MOV ESI,dword ptr [ESP + 0x30]
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x18],EAX
XOR EAX,EAX
LEA EAX,[EBX + 0xffffaee0]
PUSH EAX
CALL 0x000168b0
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0008807d
LEA EAX,[EBX + 0xffffaee7]
MOV dword ptr [ESP + 0x8],EAX
PUSH EAX
LEA EAX,[ESP + 0xc]
PUSH EAX
LEA EAX,[EBX + 0xffffaef7]
PUSH EAX
PUSH ESI
CALL 0x000a8bdf
MOV EDI,EAX
MOV EAX,dword ptr [EBX + 0x574]
MOV EAX,dword ptr [EAX]
MOV ESI,dword ptr [ESI + EAX*0x4]
ADD ESP,0x10
TEST ESI,ESI
JNZ 0x0008802b
LEA EAX,[EBX + 0xffffaeec]
CALL 0x00019ba3
MOV ESI,EAX
OR EDI,0x4
TEST EDI,0xc
JZ 0x00088040
MOV EDX,ESI
MOV EAX,dword ptr [ESP + 0x8]
CALL 0x00018bd3
MOV ESI,EAX
TEST EDI,0x10
JZ 0x00088095
SUB ESP,0xc
PUSH ESI
CALL 0x00016950
MOV ESI,EAX
ADD ESP,0x10
CMP byte ptr [EAX],0x0
JZ 0x000880ad
SUB ESP,0xc
PUSH ESI
CALL 0x00016920
ADD ESP,0x10
XOR EAX,EAX
MOV ECX,dword ptr [ESP + 0xc]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x000880d0
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
CMP byte ptr [EAX],0x0
JNZ 0x00087ff4
LEA EAX,[EBX + 0xffffaee7]
MOV dword ptr [ESP + 0x8],EAX
JMP 0x00087ff4
TEST EDI,0x1
JZ 0x000880b9
SUB ESP,0xc
PUSH ESI
CALL 0x00017210
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0008805b
AND EDI,0x2
JZ 0x000880d5
MOV EAX,0x1
JMP 0x00088069
SUB ESP,0xc
PUSH ESI
CALL 0x000168c0
ADD ESP,0x10
TEST EAX,EAX
JNS 0x0008805b
AND EDI,0x2
JNZ 0x000880b2
JMP 0x000880d5
CALL 0x00017e10
CALL 0x000ae0aa
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00087fae(undefined4 param_1,int param_2)\n\n{\n  uint uVar1;\n  char *__template;\n  undefined4 uVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_14 = getenv("TMPDIR");\n  if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }\n  uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);\n  __template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);\n  if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }\n  if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }\n  if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }\n  puts(__template);\n  uVar2 = 0;\nLAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\n  }\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 FUN_00087fae(undefined4 param_1,int param_2)\n\n{\n  uint uVar1;\n  char *__template;\n  undefined4 uVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_14 = getenv("TMPDIR");\n  if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }\n  uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);\n  __template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);\n  if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }\n  if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }\n  if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }\n  puts(__template);\n  uVar2 = 0;\nLAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_00087fae(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  char *__template;\n  undefined4 uVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_14 = getenv("TMPDIR");\n  if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }\n  uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);\n  __template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);\n  if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }\n  if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }\n  if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }\n  puts(__template);\n  uVar2 = 0;\nLAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\n  }\n  return uVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "char *__template;" primitive_type (pointer_declarator "*__template" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_14;" primitive_type (pointer_declarator "*local_14" * identifier) ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_14 = getenv("TMPDIR");" (assignment_expression "local_14 = getenv("TMPDIR")" identifier = (call_expression "getenv("TMPDIR")" identifier (argument_list "("TMPDIR")" ( (string_literal ""TMPDIR"" " string_content ") )))) ;) (if_statement "if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }" if (parenthesized_expression "(local_14 == (char *)0x0)" ( (binary_expression "local_14 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_14 = "/tmp";\n  }" { (expression_statement "local_14 = "/tmp";" (assignment_expression "local_14 = "/tmp"" identifier = (string_literal ""/tmp"" " string_content ")) ;) }) (else_clause "else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }" else (if_statement "if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }" if (parenthesized_expression "(*local_14 == '\0')" ( (binary_expression "*local_14 == '\0'" (pointer_expression "*local_14" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_14 = "/tmp";\n  }" { (expression_statement "local_14 = "/tmp";" (assignment_expression "local_14 = "/tmp"" identifier = (string_literal ""/tmp"" " string_content ")) ;) })))) (expression_statement "uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);" (assignment_expression "uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14)" identifier = (call_expression "FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14)" identifier (argument_list "(param_2,"^dqtp:u",&local_14,local_14)" ( identifier , (string_literal ""^dqtp:u"" " string_content ") , (pointer_expression "&local_14" & identifier) , identifier )))) ;) (expression_statement "__template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);" (assignment_expression "__template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4)" identifier = (pointer_expression "*(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4)" * (cast_expression "(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + *(int *)PTR_optind_000d0f94 * 4)" ( (binary_expression "param_2 + *(int *)PTR_optind_000d0f94 * 4" identifier + (binary_expression "*(int *)PTR_optind_000d0f94 * 4" (pointer_expression "*(int *)PTR_optind_000d0f94" * (cast_expression "(int *)PTR_optind_000d0f94" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) * number_literal)) ))))) ;) (if_statement "if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }" if (parenthesized_expression "(__template == (char *)0x0)" ( (binary_expression "__template == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }" { (expression_statement "__template = (char *)FUN_00019ba3();" (assignment_expression "__template = (char *)FUN_00019ba3()" identifier = (cast_expression "(char *)FUN_00019ba3()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00019ba3()" identifier (argument_list "()" ( ))))) ;) (expression_statement "uVar1 = uVar1 | 4;" (assignment_expression "uVar1 = uVar1 | 4" identifier = (binary_expression "uVar1 | 4" identifier | number_literal)) ;) })) (if_statement "if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }" if (parenthesized_expression "((uVar1 & 0xc) != 0)" ( (binary_expression "(uVar1 & 0xc) != 0" (parenthesized_expression "(uVar1 & 0xc)" ( (binary_expression "uVar1 & 0xc" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    __template = (char *)FUN_00018bd3();\n  }" { (expression_statement "__template = (char *)FUN_00018bd3();" (assignment_expression "__template = (char *)FUN_00018bd3()" identifier = (cast_expression "(char *)FUN_00018bd3()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00018bd3()" identifier (argument_list "()" ( ))))) ;) })) (if_statement "if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }" if (parenthesized_expression "((uVar1 & 0x10) == 0)" ( (binary_expression "(uVar1 & 0x10) == 0" (parenthesized_expression "(uVar1 & 0x10)" ( (binary_expression "uVar1 & 0x10" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }" { (if_statement "if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }" if (parenthesized_expression "((uVar1 & 1) == 0)" ( (binary_expression "(uVar1 & 1) == 0" (parenthesized_expression "(uVar1 & 1)" ( (binary_expression "uVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }" { (expression_statement "iVar4 = FUN_000168c0(__template);" (assignment_expression "iVar4 = FUN_000168c0(__template)" identifier = (call_expression "FUN_000168c0(__template)" identifier (argument_list "(__template)" ( identifier )))) ;) (if_statement "if (iVar4 < 0) goto joined_r0x000880cc;" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (goto_statement "goto joined_r0x000880cc;" goto statement_identifier ;)) }) (else_clause "else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }" else (compound_statement "{\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }" { (expression_statement "pcVar3 = mkdtemp(__template);" (assignment_expression "pcVar3 = mkdtemp(__template)" identifier = (call_expression "mkdtemp(__template)" identifier (argument_list "(__template)" ( identifier )))) ;) (if_statement "if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }" { (labeled_statement "joined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }" statement_identifier : (if_statement "if ((uVar1 & 2) == 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }" if (parenthesized_expression "((uVar1 & 2) == 0)" ( (binary_expression "(uVar1 & 2) == 0" (parenthesized_expression "(uVar1 & 2)" ( (binary_expression "uVar1 & 2" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n          FUN_000ae0aa();\n        }" { comment (expression_statement "FUN_000ae0aa();" (call_expression "FUN_000ae0aa()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_00088069;" goto statement_identifier ;) })) }))) }) (else_clause "else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }" else (compound_statement "{\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }" { (expression_statement "__template = mktemp(__template);" (assignment_expression "__template = mktemp(__template)" identifier = (call_expression "mktemp(__template)" identifier (argument_list "(__template)" ( identifier )))) ;) (if_statement "if (*__template == '\0') goto joined_r0x000880cc;" if (parenthesized_expression "(*__template == '\0')" ( (binary_expression "*__template == '\0'" (pointer_expression "*__template" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto joined_r0x000880cc;" goto statement_identifier ;)) }))) (expression_statement "puts(__template);" (call_expression "puts(__template)" identifier (argument_list "(__template)" ( identifier ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (labeled_statement "LAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\n  }" statement_identifier : (if_statement "if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\n  }" if (parenthesized_expression "(local_10 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\n  }" { comment (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint mktemp_main(int argc,char **argv)\n\n{\n  char *path;\n  \n}\n\n" comment comment (function_definition "int mktemp_main(int argc,char **argv)\n\n{\n  char *path;\n  \n}" primitive_type (function_declarator "mktemp_main(int argc,char **argv)" identifier (parameter_list "(int argc,char **argv)" ( (parameter_declaration "int argc" primitive_type identifier) , (parameter_declaration "char **argv" primitive_type (pointer_declarator "**argv" * (pointer_declarator "*argv" * identifier))) ))) (compound_statement "{\n  char *path;\n  \n}" { (declaration "char *path;" primitive_type (pointer_declarator "*path" * identifier) ;) })))
(translation_unit "undefined4 FUN_00087fae(undefined4 param_1,int param_2)\n\n{\n  uint uVar1;\n  char *__template;\n  undefined4 uVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_14 = getenv("TMPDIR");\n  if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }\n  uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);\n  __template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);\n  if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }\n  if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }\n  if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }\n  puts(__template);\n  uVar2 = 0;\nLAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 FUN_00087fae(undefined4 param_1,int param_2)\n\n{\n  uint uVar1;\n  char *__template;\n  undefined4 uVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_14 = getenv("TMPDIR");\n  if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }\n  uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);\n  __template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);\n  if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }\n  if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }\n  if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }\n  puts(__template);\n  uVar2 = 0;\nLAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_00087fae(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  char *__template;\n  undefined4 uVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_14 = getenv("TMPDIR");\n  if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }\n  uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);\n  __template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);\n  if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }\n  if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }\n  if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }\n  puts(__template);\n  uVar2 = 0;\nLAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }\n  return uVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "char *__template;" primitive_type (pointer_declarator "*__template" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_14;" primitive_type (pointer_declarator "*local_14" * identifier) ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_14 = getenv("TMPDIR");" (assignment_expression "local_14 = getenv("TMPDIR")" identifier = (call_expression "getenv("TMPDIR")" identifier (argument_list "("TMPDIR")" ( (string_literal ""TMPDIR"" " string_content ") )))) ;) (if_statement "if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }" if (parenthesized_expression "(local_14 == (char *)0x0)" ( (binary_expression "local_14 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_14 = "/tmp";\n  }" { (expression_statement "local_14 = "/tmp";" (assignment_expression "local_14 = "/tmp"" identifier = (string_literal ""/tmp"" " string_content ")) ;) }) (else_clause "else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }" else (if_statement "if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }" if (parenthesized_expression "(*local_14 == '\0')" ( (binary_expression "*local_14 == '\0'" (pointer_expression "*local_14" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_14 = "/tmp";\n  }" { (expression_statement "local_14 = "/tmp";" (assignment_expression "local_14 = "/tmp"" identifier = (string_literal ""/tmp"" " string_content ")) ;) })))) (expression_statement "uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);" (assignment_expression "uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14)" identifier = (call_expression "FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14)" identifier (argument_list "(param_2,"^dqtp:u",&local_14,local_14)" ( identifier , (string_literal ""^dqtp:u"" " string_content ") , (pointer_expression "&local_14" & identifier) , identifier )))) ;) (expression_statement "__template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);" (assignment_expression "__template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4)" identifier = (pointer_expression "*(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4)" * (cast_expression "(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + *(int *)PTR_optind_000d0f94 * 4)" ( (binary_expression "param_2 + *(int *)PTR_optind_000d0f94 * 4" identifier + (binary_expression "*(int *)PTR_optind_000d0f94 * 4" (pointer_expression "*(int *)PTR_optind_000d0f94" * (cast_expression "(int *)PTR_optind_000d0f94" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) * number_literal)) ))))) ;) (if_statement "if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }" if (parenthesized_expression "(__template == (char *)0x0)" ( (binary_expression "__template == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }" { (expression_statement "__template = (char *)FUN_00019ba3();" (assignment_expression "__template = (char *)FUN_00019ba3()" identifier = (cast_expression "(char *)FUN_00019ba3()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00019ba3()" identifier (argument_list "()" ( ))))) ;) (expression_statement "uVar1 = uVar1 | 4;" (assignment_expression "uVar1 = uVar1 | 4" identifier = (binary_expression "uVar1 | 4" identifier | number_literal)) ;) })) (if_statement "if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }" if (parenthesized_expression "((uVar1 & 0xc) != 0)" ( (binary_expression "(uVar1 & 0xc) != 0" (parenthesized_expression "(uVar1 & 0xc)" ( (binary_expression "uVar1 & 0xc" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    __template = (char *)FUN_00018bd3();\n  }" { (expression_statement "__template = (char *)FUN_00018bd3();" (assignment_expression "__template = (char *)FUN_00018bd3()" identifier = (cast_expression "(char *)FUN_00018bd3()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00018bd3()" identifier (argument_list "()" ( ))))) ;) })) (if_statement "if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }" if (parenthesized_expression "((uVar1 & 0x10) == 0)" ( (binary_expression "(uVar1 & 0x10) == 0" (parenthesized_expression "(uVar1 & 0x10)" ( (binary_expression "uVar1 & 0x10" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }" { (if_statement "if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }" if (parenthesized_expression "((uVar1 & 1) == 0)" ( (binary_expression "(uVar1 & 1) == 0" (parenthesized_expression "(uVar1 & 1)" ( (binary_expression "uVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }" { (expression_statement "iVar4 = FUN_000168c0(__template);" (assignment_expression "iVar4 = FUN_000168c0(__template)" identifier = (call_expression "FUN_000168c0(__template)" identifier (argument_list "(__template)" ( identifier )))) ;) (if_statement "if (iVar4 < 0) goto joined_r0x000880cc;" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (goto_statement "goto joined_r0x000880cc;" goto statement_identifier ;)) }) (else_clause "else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }" else (compound_statement "{\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }" { (expression_statement "pcVar3 = mkdtemp(__template);" (assignment_expression "pcVar3 = mkdtemp(__template)" identifier = (call_expression "mkdtemp(__template)" identifier (argument_list "(__template)" ( identifier )))) ;) (if_statement "if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }" { (labeled_statement "joined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }" statement_identifier : (if_statement "if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }" if (parenthesized_expression "((uVar1 & 2) == 0)" ( (binary_expression "(uVar1 & 2) == 0" (parenthesized_expression "(uVar1 & 2)" ( (binary_expression "uVar1 & 2" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n                    \n          FUN_000ae0aa();\n        }" { (expression_statement "FUN_000ae0aa();" (call_expression "FUN_000ae0aa()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_00088069;" goto statement_identifier ;) })) }))) }) (else_clause "else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }" else (compound_statement "{\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }" { (expression_statement "__template = mktemp(__template);" (assignment_expression "__template = mktemp(__template)" identifier = (call_expression "mktemp(__template)" identifier (argument_list "(__template)" ( identifier )))) ;) (if_statement "if (*__template == '\0') goto joined_r0x000880cc;" if (parenthesized_expression "(*__template == '\0')" ( (binary_expression "*__template == '\0'" (pointer_expression "*__template" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto joined_r0x000880cc;" goto statement_identifier ;)) }))) (expression_statement "puts(__template);" (call_expression "puts(__template)" identifier (argument_list "(__template)" ( identifier ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (labeled_statement "LAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }" statement_identifier : (if_statement "if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }" if (parenthesized_expression "(local_10 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_00017e10();\n  }" { (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) })))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , (pointer_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 + (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) * LIT)) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_00087fae(undefined4 param_1,int param_2)\n\n{\n  uint uVar1;\n  char *__template;\n  undefined4 uVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_14 = getenv("TMPDIR");\n  if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }\n  uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);\n  __template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);\n  if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }\n  if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }\n  if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }\n  puts(__template);\n  uVar2 = 0;\nLAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "FUN_00087fae(undefined4 param_1,int param_2)" (identifier "FUN_00087fae") (parameter_list "(undefined4 param_1,int param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  uint uVar1;\n  char *__template;\n  undefined4 uVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_14 = getenv("TMPDIR");\n  if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }\n  uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);\n  __template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);\n  if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }\n  if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }\n  if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }\n  puts(__template);\n  uVar2 = 0;\nLAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }\n  return uVar2;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "char *__template;" (primitive_type "char") (pointer_declarator "*__template" (* "*") (identifier "__template")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char *local_14;" (primitive_type "char") (pointer_declarator "*local_14" (* "*") (identifier "local_14")) (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "local_14 = getenv("TMPDIR");" (assignment_expression "local_14 = getenv("TMPDIR")" (identifier "local_14") (= "=") (call_expression "getenv("TMPDIR")" (identifier "getenv") (argument_list "("TMPDIR")" (( "(") (string_literal ""TMPDIR"" (" """) (string_content "TMPDIR") (" """)) () ")")))) (; ";")) (if_statement "if (local_14 == (char *)0x0) {\n    local_14 = "/tmp";\n  }\n  else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }" (if "if") (parenthesized_expression "(local_14 == (char *)0x0)" (( "(") (binary_expression "local_14 == (char *)0x0" (identifier "local_14") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    local_14 = "/tmp";\n  }" ({ "{") (expression_statement "local_14 = "/tmp";" (assignment_expression "local_14 = "/tmp"" (identifier "local_14") (= "=") (string_literal ""/tmp"" (" """) (string_content "/tmp") (" """))) (; ";")) (} "}")) (else_clause "else if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }" (else "else") (if_statement "if (*local_14 == '\0') {\n    local_14 = "/tmp";\n  }" (if "if") (parenthesized_expression "(*local_14 == '\0')" (( "(") (binary_expression "*local_14 == '\0'" (pointer_expression "*local_14" (* "*") (identifier "local_14")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    local_14 = "/tmp";\n  }" ({ "{") (expression_statement "local_14 = "/tmp";" (assignment_expression "local_14 = "/tmp"" (identifier "local_14") (= "=") (string_literal ""/tmp"" (" """) (string_content "/tmp") (" """))) (; ";")) (} "}"))))) (expression_statement "uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);" (assignment_expression "uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14)" (identifier "uVar1") (= "=") (call_expression "FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14)" (identifier "FUN_000a8bdf") (argument_list "(param_2,"^dqtp:u",&local_14,local_14)" (( "(") (identifier "param_2") (, ",") (string_literal ""^dqtp:u"" (" """) (string_content "^dqtp:u") (" """)) (, ",") (pointer_expression "&local_14" (& "&") (identifier "local_14")) (, ",") (identifier "local_14") () ")")))) (; ";")) (expression_statement "__template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);" (assignment_expression "__template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4)" (identifier "__template") (= "=") (pointer_expression "*(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4)" (* "*") (cast_expression "(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + *(int *)PTR_optind_000d0f94 * 4)" (( "(") (binary_expression "param_2 + *(int *)PTR_optind_000d0f94 * 4" (identifier "param_2") (+ "+") (binary_expression "*(int *)PTR_optind_000d0f94 * 4" (pointer_expression "*(int *)PTR_optind_000d0f94" (* "*") (cast_expression "(int *)PTR_optind_000d0f94" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_optind_000d0f94"))) (* "*") (number_literal "4"))) () ")"))))) (; ";")) (if_statement "if (__template == (char *)0x0) {\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }" (if "if") (parenthesized_expression "(__template == (char *)0x0)" (( "(") (binary_expression "__template == (char *)0x0" (identifier "__template") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    __template = (char *)FUN_00019ba3();\n    uVar1 = uVar1 | 4;\n  }" ({ "{") (expression_statement "__template = (char *)FUN_00019ba3();" (assignment_expression "__template = (char *)FUN_00019ba3()" (identifier "__template") (= "=") (cast_expression "(char *)FUN_00019ba3()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00019ba3()" (identifier "FUN_00019ba3") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "uVar1 = uVar1 | 4;" (assignment_expression "uVar1 = uVar1 | 4" (identifier "uVar1") (= "=") (binary_expression "uVar1 | 4" (identifier "uVar1") (| "|") (number_literal "4"))) (; ";")) (} "}"))) (if_statement "if ((uVar1 & 0xc) != 0) {\n    __template = (char *)FUN_00018bd3();\n  }" (if "if") (parenthesized_expression "((uVar1 & 0xc) != 0)" (( "(") (binary_expression "(uVar1 & 0xc) != 0" (parenthesized_expression "(uVar1 & 0xc)" (( "(") (binary_expression "uVar1 & 0xc" (identifier "uVar1") (& "&") (number_literal "0xc")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    __template = (char *)FUN_00018bd3();\n  }" ({ "{") (expression_statement "__template = (char *)FUN_00018bd3();" (assignment_expression "__template = (char *)FUN_00018bd3()" (identifier "__template") (= "=") (cast_expression "(char *)FUN_00018bd3()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00018bd3()" (identifier "FUN_00018bd3") (argument_list "()" (( "(") () ")"))))) (; ";")) (} "}"))) (if_statement "if ((uVar1 & 0x10) == 0) {\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }\n  else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }" (if "if") (parenthesized_expression "((uVar1 & 0x10) == 0)" (( "(") (binary_expression "(uVar1 & 0x10) == 0" (parenthesized_expression "(uVar1 & 0x10)" (( "(") (binary_expression "uVar1 & 0x10" (identifier "uVar1") (& "&") (number_literal "0x10")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }\n  }" ({ "{") (if_statement "if ((uVar1 & 1) == 0) {\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }\n    else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }" (if "if") (parenthesized_expression "((uVar1 & 1) == 0)" (( "(") (binary_expression "(uVar1 & 1) == 0" (parenthesized_expression "(uVar1 & 1)" (( "(") (binary_expression "uVar1 & 1" (identifier "uVar1") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar4 = FUN_000168c0(__template);\n      if (iVar4 < 0) goto joined_r0x000880cc;\n    }" ({ "{") (expression_statement "iVar4 = FUN_000168c0(__template);" (assignment_expression "iVar4 = FUN_000168c0(__template)" (identifier "iVar4") (= "=") (call_expression "FUN_000168c0(__template)" (identifier "FUN_000168c0") (argument_list "(__template)" (( "(") (identifier "__template") () ")")))) (; ";")) (if_statement "if (iVar4 < 0) goto joined_r0x000880cc;" (if "if") (parenthesized_expression "(iVar4 < 0)" (( "(") (binary_expression "iVar4 < 0" (identifier "iVar4") (< "<") (number_literal "0")) () ")")) (goto_statement "goto joined_r0x000880cc;" (goto "goto") (statement_identifier "joined_r0x000880cc") (; ";"))) (} "}")) (else_clause "else {\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }" (else "else") (compound_statement "{\n      pcVar3 = mkdtemp(__template);\n      if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }\n    }" ({ "{") (expression_statement "pcVar3 = mkdtemp(__template);" (assignment_expression "pcVar3 = mkdtemp(__template)" (identifier "pcVar3") (= "=") (call_expression "mkdtemp(__template)" (identifier "mkdtemp") (argument_list "(__template)" (( "(") (identifier "__template") () ")")))) (; ";")) (if_statement "if (pcVar3 == (char *)0x0) {\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }" (if "if") (parenthesized_expression "(pcVar3 == (char *)0x0)" (( "(") (binary_expression "pcVar3 == (char *)0x0" (identifier "pcVar3") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\njoined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }\n        uVar2 = 1;\n        goto LAB_00088069;\n      }" ({ "{") (labeled_statement "joined_r0x000880cc:\n        if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }" (statement_identifier "joined_r0x000880cc") (: ":") (if_statement "if ((uVar1 & 2) == 0) {\n                    \n          FUN_000ae0aa();\n        }" (if "if") (parenthesized_expression "((uVar1 & 2) == 0)" (( "(") (binary_expression "(uVar1 & 2) == 0" (parenthesized_expression "(uVar1 & 2)" (( "(") (binary_expression "uVar1 & 2" (identifier "uVar1") (& "&") (number_literal "2")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n          FUN_000ae0aa();\n        }" ({ "{") (expression_statement "FUN_000ae0aa();" (call_expression "FUN_000ae0aa()" (identifier "FUN_000ae0aa") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (goto_statement "goto LAB_00088069;" (goto "goto") (statement_identifier "LAB_00088069") (; ";")) (} "}"))) (} "}")))) (} "}")) (else_clause "else {\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }" (else "else") (compound_statement "{\n    __template = mktemp(__template);\n    if (*__template == '\0') goto joined_r0x000880cc;\n  }" ({ "{") (expression_statement "__template = mktemp(__template);" (assignment_expression "__template = mktemp(__template)" (identifier "__template") (= "=") (call_expression "mktemp(__template)" (identifier "mktemp") (argument_list "(__template)" (( "(") (identifier "__template") () ")")))) (; ";")) (if_statement "if (*__template == '\0') goto joined_r0x000880cc;" (if "if") (parenthesized_expression "(*__template == '\0')" (( "(") (binary_expression "*__template == '\0'" (pointer_expression "*__template" (* "*") (identifier "__template")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto joined_r0x000880cc;" (goto "goto") (statement_identifier "joined_r0x000880cc") (; ";"))) (} "}")))) (expression_statement "puts(__template);" (call_expression "puts(__template)" (identifier "puts") (argument_list "(__template)" (( "(") (identifier "__template") () ")"))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_00088069:\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }" (statement_identifier "LAB_00088069") (: ":") (if_statement "if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }" (if "if") (parenthesized_expression "(local_10 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_00017e10();\n  }" ({ "{") (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" (identifier "FUN_00017e10") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(int argc,char **argv)

{
  char *path;
  
}


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

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

undefined4 MASKED(undefined4 param_1,int param_2)

{
  uint uVar1;
  char *__template;
  undefined4 uVar2;
  char *pcVar3;
  int iVar4;
  int in_GS_OFFSET;
  char *local_14;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  local_14 = getenv("TMPDIR");
  if (local_14 == (char *)0x0) {
    local_14 = "/tmp";
  }
  else if (*local_14 == '\0') {
    local_14 = "/tmp";
  }
  uVar1 = FUN_000a8bdf(param_2,"^dqtp:u",&local_14,local_14);
  __template = *(char **)(param_2 + *(int *)PTR_optind_000d0f94 * 4);
  if (__template == (char *)0x0) {
    __template = (char *)FUN_00019ba3();
    uVar1 = uVar1 | 4;
  }
  if ((uVar1 & 0xc) != 0) {
    __template = (char *)FUN_00018bd3();
  }
  if ((uVar1 & 0x10) == 0) {
    if ((uVar1 & 1) == 0) {
      iVar4 = FUN_000168c0(__template);
      if (iVar4 < 0) goto joined_r0x000880cc;
    }
    else {
      pcVar3 = mkdtemp(__template);
      if (pcVar3 == (char *)0x0) {
joined_r0x000880cc:
        if ((uVar1 & 2) == 0) {
                    /* WARNING: Subroutine does not return */
          FUN_000ae0aa();
        }
        uVar2 = 1;
        goto LAB_00088069;
      }
    }
  }
  else {
    __template = mktemp(__template);
    if (*__template == '\0') goto joined_r0x000880cc;
  }
  puts(__template);
  uVar2 = 0;
LAB_00088069:
  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00017e10();
  }
  return uVar2;
}

