
char * safe_tempfile(FILE **f)

{
  undefined *puVar1;
  char *pcVar2;
  int iVar3;
  char *pcVar4;
  FILE *pFVar5;
  undefined4 uVar6;
  undefined4 uVar7;
  
  pcVar2 = (char *)(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);
  if (pcVar2 != (char *)0x0) {
    pcVar2 = check_writable_directory(pcVar2);
    if (pcVar2 != (char *)0x0) goto LAB_0002189c;
  }
  pcVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);
  if (pcVar2 == (char *)0x0) {
    pcVar2 = (char *)(*(code *)PTR_mallocstrcpy_00077568)
                               (0,PTR_s_d_of_current_line_0007755c + -0xac0);
  }
LAB_0002189c:
  iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);
  pcVar2 = (char *)(*(code *)PTR_nrealloc_00077584)(pcVar2,iVar3 + 0xc);
  iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);
  puVar1 = PTR_umask_00077ec8;
  pcVar4 = pcVar2 + iVar3;
  uVar7 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);
  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);
  *(undefined4 *)pcVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);
  *(undefined4 *)(pcVar4 + 4) = uVar7;
  *(undefined4 *)(pcVar4 + 8) = uVar6;
  uVar6 = (*(code *)puVar1)(0);
  (*(code *)PTR_umask_00077ec8)(0x3f);
  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(pcVar2);
  if (iVar3 == -1) {
    pcVar4 = (char *)0x0;
    (*(code *)PTR_free_0007810c)(pcVar2);
  }
  else {
    pFVar5 = (FILE *)(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)
    ;
    *f = pFVar5;
    pcVar4 = pcVar2;
  }
  (*(code *)PTR_umask_00077ec8)(uVar6);
  return pcVar4;
}



int safe_tempfile(undefined4 *param_1)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  undefined4 *puVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  
  iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);
  if (iVar2 != 0) {
    iVar2 = check_writable_directory(iVar2);
    if (iVar2 != 0) goto LAB_0002189c;
  }
  iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);
  if (iVar2 == 0) {
    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);
  }
LAB_0002189c:
  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);
  iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);
  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);
  puVar1 = PTR_umask_00077ec8;
  puVar4 = (undefined4 *)(iVar2 + iVar3);
  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);
  uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);
  *puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);
  puVar4[1] = uVar6;
  puVar4[2] = uVar5;
  uVar5 = (*(code *)puVar1)(0);
  (*(code *)PTR_umask_00077ec8)(0x3f);
  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);
  if (iVar3 == -1) {
    iVar3 = 0;
    (*(code *)PTR_free_0007810c)(iVar2);
  }
  else {
    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);
    *param_1 = uVar6;
    iVar3 = iVar2;
  }
  (*(code *)PTR_umask_00077ec8)(uVar5);
  return iVar3;
}


lui gp,0x6
addiu gp,gp,-0x2320
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x74e0(gp)
sw s1,0x1c(sp)
or s1,a0,zero
sw gp,0x10(sp)
sw s2,0x20(sp)
sw ra,0x24(sp)
sw s0,0x18(sp)
lw a0,-0x7fc4(gp)
jalr t9
_addiu a0,a0,-0xad0
lw gp,0x10(sp)
beq v0,zero,0x00021984
_lw s2,-0x7adc(gp)
or t9,s2,zero
bal 0x0002179c
_or a0,v0,zero
lw gp,0x10(sp)
beq v0,zero,0x00021984
_or s0,v0,zero
lw t9,-0x7528(gp)
jalr t9
_or a0,s0,zero
or a0,s0,zero
lw gp,0x10(sp)
lw t9,-0x7f9c(gp)
jalr t9
_addiu a1,v0,0xc
lw gp,0x10(sp)
or a0,v0,zero
lw t9,-0x7528(gp)
jalr t9
_or s0,v0,zero
or a0,zero,zero
lw gp,0x10(sp)
addu v0,s0,v0
lw a1,-0x7fc4(gp)
lw t9,-0x7658(gp)
addiu v1,a1,-0xab8
lw a2,-0xab8(a1)
lw a1,0x4(v1)
lw v1,0x8(v1)
swl a2,0x0(v0)
swr a2,0x3(v0)
swl a1,0x4(v0)
swr a1,0x7(v0)
swl v1,0x8(v0)
jalr t9
_swr v1,0xb(v0)
li a0,0x3f
lw gp,0x10(sp)
lw t9,-0x7658(gp)
jalr t9
_or s2,v0,zero
lw gp,0x10(sp)
lw t9,-0x74e4(gp)
jalr t9
_or a0,s0,zero
li v1,-0x1
beq v0,v1,0x000219c0
_lw gp,0x10(sp)
lw a1,-0x7fc4(gp)
or a0,v0,zero
lw t9,-0x73c0(gp)
jalr t9
_addiu a1,a1,-0xaac
lw gp,0x10(sp)
sw v0,0x0(s1)
lw t9,-0x7658(gp)
jalr t9
_or a0,s2,zero
or v0,s0,zero
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
lw a0,-0x7fc4(gp)
or t9,s2,zero
bal 0x0002179c
_addiu a0,a0,-0xac8
lw gp,0x10(sp)
bne v0,zero,0x0002189c
_or s0,v0,zero
lw a1,-0x7fc4(gp)
or a0,zero,zero
lw t9,-0x7fb8(gp)
jalr t9
_addiu a1,a1,-0xac0
lw gp,0x10(sp)
b 0x0002189c
_or s0,v0,zero
lw t9,-0x7414(gp)
or a0,s0,zero
jalr t9
_or s0,zero,zero
b 0x0002195c
_lw gp,0x10(sp)
(translation_unit "int safe_tempfile(undefined4 *param_1)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  \n  iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }\n  iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  puVar1 = PTR_umask_00077ec8;\n  puVar4 = (undefined4 *)(iVar2 + iVar3);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  puVar4[1] = uVar6;\n  puVar4[2] = uVar5;\n  uVar5 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);\n  if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar5);\n  return iVar3;\n}\n\n" (function_definition "int safe_tempfile(undefined4 *param_1)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  \n  iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }\n  iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  puVar1 = PTR_umask_00077ec8;\n  puVar4 = (undefined4 *)(iVar2 + iVar3);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  puVar4[1] = uVar6;\n  puVar4[2] = uVar5;\n  uVar5 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);\n  if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar5);\n  return iVar3;\n}" primitive_type (function_declarator "safe_tempfile(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  \n  iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }\n  iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  puVar1 = PTR_umask_00077ec8;\n  puVar4 = (undefined4 *)(iVar2 + iVar3);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  puVar4[1] = uVar6;\n  puVar4[2] = uVar5;\n  uVar5 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);\n  if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar5);\n  return iVar3;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (expression_statement "iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);" (assignment_expression "iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0)" identifier = (call_expression "(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0)" (parenthesized_expression "(*(code *)PTR_getenv_00078040)" ( (pointer_expression "*(code *)PTR_getenv_00078040" * (cast_expression "(code *)PTR_getenv_00078040" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_d_of_current_line_0007755c + -0xad0)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xad0" identifier + number_literal) )))) ;) (if_statement "if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }" { (expression_statement "iVar2 = check_writable_directory(iVar2);" (assignment_expression "iVar2 = check_writable_directory(iVar2)" identifier = (call_expression "check_writable_directory(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) goto LAB_0002189c;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0002189c;" goto statement_identifier ;)) })) (expression_statement "iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);" (assignment_expression "iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8)" identifier = (call_expression "check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8)" identifier (argument_list "(PTR_s_d_of_current_line_0007755c + -0xac8)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xac8" identifier + number_literal) )))) ;) (if_statement "if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }" { (expression_statement "iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);" (assignment_expression "iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0)" identifier = (call_expression "(*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0)" (parenthesized_expression "(*(code *)PTR_mallocstrcpy_00077568)" ( (pointer_expression "*(code *)PTR_mallocstrcpy_00077568" * (cast_expression "(code *)PTR_mallocstrcpy_00077568" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,PTR_s_d_of_current_line_0007755c + -0xac0)" ( number_literal , (binary_expression "PTR_s_d_of_current_line_0007755c + -0xac0" identifier + number_literal) )))) ;) })) (labeled_statement "LAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);" statement_identifier : (expression_statement "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2)" identifier = (call_expression "(*(code *)PTR_strlen_00077ff8)(iVar2)" (parenthesized_expression "(*(code *)PTR_strlen_00077ff8)" ( (pointer_expression "*(code *)PTR_strlen_00077ff8" * (cast_expression "(code *)PTR_strlen_00077ff8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;)) (expression_statement "iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);" (assignment_expression "iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc)" identifier = (call_expression "(*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc)" (parenthesized_expression "(*(code *)PTR_nrealloc_00077584)" ( (pointer_expression "*(code *)PTR_nrealloc_00077584" * (cast_expression "(code *)PTR_nrealloc_00077584" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,iVar3 + 0xc)" ( identifier , (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) ;) (expression_statement "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2)" identifier = (call_expression "(*(code *)PTR_strlen_00077ff8)(iVar2)" (parenthesized_expression "(*(code *)PTR_strlen_00077ff8)" ( (pointer_expression "*(code *)PTR_strlen_00077ff8" * (cast_expression "(code *)PTR_strlen_00077ff8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "puVar1 = PTR_umask_00077ec8;" (assignment_expression "puVar1 = PTR_umask_00077ec8" identifier = identifier) ;) (expression_statement "puVar4 = (undefined4 *)(iVar2 + iVar3);" (assignment_expression "puVar4 = (undefined4 *)(iVar2 + iVar3)" identifier = (cast_expression "(undefined4 *)(iVar2 + iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + iVar3)" ( (binary_expression "iVar2 + iVar3" identifier + identifier) )))) ;) (expression_statement "uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);" (assignment_expression "uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" identifier = (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" * (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab4)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab4" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);" (assignment_expression "uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" identifier = (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" * (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab0)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab0" identifier + number_literal) ))))) ;) (expression_statement "*puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);" (assignment_expression "*puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" (pointer_expression "*puVar4" * identifier) = (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" * (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab8)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab8" identifier + number_literal) ))))) ;) (expression_statement "puVar4[1] = uVar6;" (assignment_expression "puVar4[1] = uVar6" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar4[2] = uVar5;" (assignment_expression "puVar4[2] = uVar5" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = (*(code *)puVar1)(0);" (assignment_expression "uVar5 = (*(code *)puVar1)(0)" identifier = (call_expression "(*(code *)puVar1)(0)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal )))) ;) (expression_statement "(*(code *)PTR_umask_00077ec8)(0x3f);" (call_expression "(*(code *)PTR_umask_00077ec8)(0x3f)" (parenthesized_expression "(*(code *)PTR_umask_00077ec8)" ( (pointer_expression "*(code *)PTR_umask_00077ec8" * (cast_expression "(code *)PTR_umask_00077ec8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0x3f)" ( number_literal ))) ;) (expression_statement "iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2)" identifier = (call_expression "(*(code *)PTR_mkstemp64_0007803c)(iVar2)" (parenthesized_expression "(*(code *)PTR_mkstemp64_0007803c)" ( (pointer_expression "*(code *)PTR_mkstemp64_0007803c" * (cast_expression "(code *)PTR_mkstemp64_0007803c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_free_0007810c)(iVar2);" (call_expression "(*(code *)PTR_free_0007810c)(iVar2)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" ( (pointer_expression "*(code *)PTR_free_0007810c" * (cast_expression "(code *)PTR_free_0007810c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) }) (else_clause "else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }" else (compound_statement "{\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }" { (expression_statement "uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);" (assignment_expression "uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" identifier = (call_expression "(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" (parenthesized_expression "(*(code *)PTR_fdopen_00078160)" ( (pointer_expression "*(code *)PTR_fdopen_00078160" * (cast_expression "(code *)PTR_fdopen_00078160" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" ( identifier , (binary_expression "PTR_s_d_of_current_line_0007755c + -0xaac" identifier + number_literal) )))) ;) (expression_statement "*param_1 = uVar6;" (assignment_expression "*param_1 = uVar6" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) }))) (expression_statement "(*(code *)PTR_umask_00077ec8)(uVar5);" (call_expression "(*(code *)PTR_umask_00077ec8)(uVar5)" (parenthesized_expression "(*(code *)PTR_umask_00077ec8)" ( (pointer_expression "*(code *)PTR_umask_00077ec8" * (cast_expression "(code *)PTR_umask_00077ec8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar5)" ( identifier ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "char * safe_tempfile(FILE **f)\n\n{\n  undefined *puVar1;\n  char *pcVar2;\n  int iVar3;\n  char *pcVar4;\n  FILE *pFVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  pcVar2 = (char *)(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (pcVar2 != (char *)0x0) {\n    pcVar2 = check_writable_directory(pcVar2);\n    if (pcVar2 != (char *)0x0) goto LAB_0002189c;\n  }\n  pcVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (pcVar2 == (char *)0x0) {\n    pcVar2 = (char *)(*(code *)PTR_mallocstrcpy_00077568)\n                               (0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);\n  pcVar2 = (char *)(*(code *)PTR_nrealloc_00077584)(pcVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);\n  puVar1 = PTR_umask_00077ec8;\n  pcVar4 = pcVar2 + iVar3;\n  uVar7 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *(undefined4 *)pcVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  *(undefined4 *)(pcVar4 + 4) = uVar7;\n  *(undefined4 *)(pcVar4 + 8) = uVar6;\n  uVar6 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(pcVar2);\n  if (iVar3 == -1) {\n    pcVar4 = (char *)0x0;\n    (*(code *)PTR_free_0007810c)(pcVar2);\n  }\n  else {\n    pFVar5 = (FILE *)(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)\n    ;\n    *f = pFVar5;\n    pcVar4 = pcVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar6);\n  return pcVar4;\n}\n\n" (function_definition "char * safe_tempfile(FILE **f)\n\n{\n  undefined *puVar1;\n  char *pcVar2;\n  int iVar3;\n  char *pcVar4;\n  FILE *pFVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  pcVar2 = (char *)(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (pcVar2 != (char *)0x0) {\n    pcVar2 = check_writable_directory(pcVar2);\n    if (pcVar2 != (char *)0x0) goto LAB_0002189c;\n  }\n  pcVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (pcVar2 == (char *)0x0) {\n    pcVar2 = (char *)(*(code *)PTR_mallocstrcpy_00077568)\n                               (0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);\n  pcVar2 = (char *)(*(code *)PTR_nrealloc_00077584)(pcVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);\n  puVar1 = PTR_umask_00077ec8;\n  pcVar4 = pcVar2 + iVar3;\n  uVar7 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *(undefined4 *)pcVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  *(undefined4 *)(pcVar4 + 4) = uVar7;\n  *(undefined4 *)(pcVar4 + 8) = uVar6;\n  uVar6 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(pcVar2);\n  if (iVar3 == -1) {\n    pcVar4 = (char *)0x0;\n    (*(code *)PTR_free_0007810c)(pcVar2);\n  }\n  else {\n    pFVar5 = (FILE *)(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)\n    ;\n    *f = pFVar5;\n    pcVar4 = pcVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar6);\n  return pcVar4;\n}" primitive_type (pointer_declarator "* safe_tempfile(FILE **f)" * (function_declarator "safe_tempfile(FILE **f)" identifier (parameter_list "(FILE **f)" ( (parameter_declaration "FILE **f" type_identifier (pointer_declarator "**f" * (pointer_declarator "*f" * identifier))) )))) (compound_statement "{\n  undefined *puVar1;\n  char *pcVar2;\n  int iVar3;\n  char *pcVar4;\n  FILE *pFVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  pcVar2 = (char *)(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (pcVar2 != (char *)0x0) {\n    pcVar2 = check_writable_directory(pcVar2);\n    if (pcVar2 != (char *)0x0) goto LAB_0002189c;\n  }\n  pcVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (pcVar2 == (char *)0x0) {\n    pcVar2 = (char *)(*(code *)PTR_mallocstrcpy_00077568)\n                               (0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);\n  pcVar2 = (char *)(*(code *)PTR_nrealloc_00077584)(pcVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);\n  puVar1 = PTR_umask_00077ec8;\n  pcVar4 = pcVar2 + iVar3;\n  uVar7 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *(undefined4 *)pcVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  *(undefined4 *)(pcVar4 + 4) = uVar7;\n  *(undefined4 *)(pcVar4 + 8) = uVar6;\n  uVar6 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(pcVar2);\n  if (iVar3 == -1) {\n    pcVar4 = (char *)0x0;\n    (*(code *)PTR_free_0007810c)(pcVar2);\n  }\n  else {\n    pFVar5 = (FILE *)(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)\n    ;\n    *f = pFVar5;\n    pcVar4 = pcVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar6);\n  return pcVar4;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "FILE *pFVar5;" type_identifier (pointer_declarator "*pFVar5" * identifier) ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (expression_statement "pcVar2 = (char *)(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);" (assignment_expression "pcVar2 = (char *)(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0)" identifier = (cast_expression "(char *)(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0)" (parenthesized_expression "(*(code *)PTR_getenv_00078040)" ( (pointer_expression "*(code *)PTR_getenv_00078040" * (cast_expression "(code *)PTR_getenv_00078040" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_d_of_current_line_0007755c + -0xad0)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xad0" identifier + number_literal) ))))) ;) (if_statement "if (pcVar2 != (char *)0x0) {\n    pcVar2 = check_writable_directory(pcVar2);\n    if (pcVar2 != (char *)0x0) goto LAB_0002189c;\n  }" if (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar2 = check_writable_directory(pcVar2);\n    if (pcVar2 != (char *)0x0) goto LAB_0002189c;\n  }" { (expression_statement "pcVar2 = check_writable_directory(pcVar2);" (assignment_expression "pcVar2 = check_writable_directory(pcVar2)" identifier = (call_expression "check_writable_directory(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (if_statement "if (pcVar2 != (char *)0x0) goto LAB_0002189c;" if (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0002189c;" goto statement_identifier ;)) })) (expression_statement "pcVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);" (assignment_expression "pcVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8)" identifier = (call_expression "check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8)" identifier (argument_list "(PTR_s_d_of_current_line_0007755c + -0xac8)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xac8" identifier + number_literal) )))) ;) (if_statement "if (pcVar2 == (char *)0x0) {\n    pcVar2 = (char *)(*(code *)PTR_mallocstrcpy_00077568)\n                               (0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar2 = (char *)(*(code *)PTR_mallocstrcpy_00077568)\n                               (0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }" { (expression_statement "pcVar2 = (char *)(*(code *)PTR_mallocstrcpy_00077568)\n                               (0,PTR_s_d_of_current_line_0007755c + -0xac0);" (assignment_expression "pcVar2 = (char *)(*(code *)PTR_mallocstrcpy_00077568)\n                               (0,PTR_s_d_of_current_line_0007755c + -0xac0)" identifier = (cast_expression "(char *)(*(code *)PTR_mallocstrcpy_00077568)\n                               (0,PTR_s_d_of_current_line_0007755c + -0xac0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_mallocstrcpy_00077568)\n                               (0,PTR_s_d_of_current_line_0007755c + -0xac0)" (parenthesized_expression "(*(code *)PTR_mallocstrcpy_00077568)" ( (pointer_expression "*(code *)PTR_mallocstrcpy_00077568" * (cast_expression "(code *)PTR_mallocstrcpy_00077568" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,PTR_s_d_of_current_line_0007755c + -0xac0)" ( number_literal , (binary_expression "PTR_s_d_of_current_line_0007755c + -0xac0" identifier + number_literal) ))))) ;) })) (labeled_statement "LAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);" statement_identifier : (expression_statement "iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2)" identifier = (call_expression "(*(code *)PTR_strlen_00077ff8)(pcVar2)" (parenthesized_expression "(*(code *)PTR_strlen_00077ff8)" ( (pointer_expression "*(code *)PTR_strlen_00077ff8" * (cast_expression "(code *)PTR_strlen_00077ff8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar2)" ( identifier )))) ;)) (expression_statement "pcVar2 = (char *)(*(code *)PTR_nrealloc_00077584)(pcVar2,iVar3 + 0xc);" (assignment_expression "pcVar2 = (char *)(*(code *)PTR_nrealloc_00077584)(pcVar2,iVar3 + 0xc)" identifier = (cast_expression "(char *)(*(code *)PTR_nrealloc_00077584)(pcVar2,iVar3 + 0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_nrealloc_00077584)(pcVar2,iVar3 + 0xc)" (parenthesized_expression "(*(code *)PTR_nrealloc_00077584)" ( (pointer_expression "*(code *)PTR_nrealloc_00077584" * (cast_expression "(code *)PTR_nrealloc_00077584" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar2,iVar3 + 0xc)" ( identifier , (binary_expression "iVar3 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00077ff8)(pcVar2)" identifier = (call_expression "(*(code *)PTR_strlen_00077ff8)(pcVar2)" (parenthesized_expression "(*(code *)PTR_strlen_00077ff8)" ( (pointer_expression "*(code *)PTR_strlen_00077ff8" * (cast_expression "(code *)PTR_strlen_00077ff8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "puVar1 = PTR_umask_00077ec8;" (assignment_expression "puVar1 = PTR_umask_00077ec8" identifier = identifier) ;) (expression_statement "pcVar4 = pcVar2 + iVar3;" (assignment_expression "pcVar4 = pcVar2 + iVar3" identifier = (binary_expression "pcVar2 + iVar3" identifier + identifier)) ;) (expression_statement "uVar7 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);" (assignment_expression "uVar7 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" identifier = (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" * (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab4)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab4" identifier + number_literal) ))))) ;) (expression_statement "uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);" (assignment_expression "uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" identifier = (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" * (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab0)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab0" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)pcVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);" (assignment_expression "*(undefined4 *)pcVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" (pointer_expression "*(undefined4 *)pcVar4" * (cast_expression "(undefined4 *)pcVar4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" * (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab8)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab8" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(pcVar4 + 4) = uVar7;" (assignment_expression "*(undefined4 *)(pcVar4 + 4) = uVar7" (pointer_expression "*(undefined4 *)(pcVar4 + 4)" * (cast_expression "(undefined4 *)(pcVar4 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar4 + 4)" ( (binary_expression "pcVar4 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(pcVar4 + 8) = uVar6;" (assignment_expression "*(undefined4 *)(pcVar4 + 8) = uVar6" (pointer_expression "*(undefined4 *)(pcVar4 + 8)" * (cast_expression "(undefined4 *)(pcVar4 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar4 + 8)" ( (binary_expression "pcVar4 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar6 = (*(code *)puVar1)(0);" (assignment_expression "uVar6 = (*(code *)puVar1)(0)" identifier = (call_expression "(*(code *)puVar1)(0)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal )))) ;) (expression_statement "(*(code *)PTR_umask_00077ec8)(0x3f);" (call_expression "(*(code *)PTR_umask_00077ec8)(0x3f)" (parenthesized_expression "(*(code *)PTR_umask_00077ec8)" ( (pointer_expression "*(code *)PTR_umask_00077ec8" * (cast_expression "(code *)PTR_umask_00077ec8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0x3f)" ( number_literal ))) ;) (expression_statement "iVar3 = (*(code *)PTR_mkstemp64_0007803c)(pcVar2);" (assignment_expression "iVar3 = (*(code *)PTR_mkstemp64_0007803c)(pcVar2)" identifier = (call_expression "(*(code *)PTR_mkstemp64_0007803c)(pcVar2)" (parenthesized_expression "(*(code *)PTR_mkstemp64_0007803c)" ( (pointer_expression "*(code *)PTR_mkstemp64_0007803c" * (cast_expression "(code *)PTR_mkstemp64_0007803c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar2)" ( identifier )))) ;) (if_statement "if (iVar3 == -1) {\n    pcVar4 = (char *)0x0;\n    (*(code *)PTR_free_0007810c)(pcVar2);\n  }\n  else {\n    pFVar5 = (FILE *)(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)\n    ;\n    *f = pFVar5;\n    pcVar4 = pcVar2;\n  }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n    pcVar4 = (char *)0x0;\n    (*(code *)PTR_free_0007810c)(pcVar2);\n  }" { (expression_statement "pcVar4 = (char *)0x0;" (assignment_expression "pcVar4 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "(*(code *)PTR_free_0007810c)(pcVar2);" (call_expression "(*(code *)PTR_free_0007810c)(pcVar2)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" ( (pointer_expression "*(code *)PTR_free_0007810c" * (cast_expression "(code *)PTR_free_0007810c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar2)" ( identifier ))) ;) }) (else_clause "else {\n    pFVar5 = (FILE *)(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)\n    ;\n    *f = pFVar5;\n    pcVar4 = pcVar2;\n  }" else (compound_statement "{\n    pFVar5 = (FILE *)(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)\n    ;\n    *f = pFVar5;\n    pcVar4 = pcVar2;\n  }" { (expression_statement "pFVar5 = (FILE *)(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)\n    ;" (assignment_expression "pFVar5 = (FILE *)(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" identifier = (cast_expression "(FILE *)(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" (parenthesized_expression "(*(code *)PTR_fdopen_00078160)" ( (pointer_expression "*(code *)PTR_fdopen_00078160" * (cast_expression "(code *)PTR_fdopen_00078160" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" ( identifier , (binary_expression "PTR_s_d_of_current_line_0007755c + -0xaac" identifier + number_literal) ))))) ;) (expression_statement "*f = pFVar5;" (assignment_expression "*f = pFVar5" (pointer_expression "*f" * identifier) = identifier) ;) (expression_statement "pcVar4 = pcVar2;" (assignment_expression "pcVar4 = pcVar2" identifier = identifier) ;) }))) (expression_statement "(*(code *)PTR_umask_00077ec8)(uVar6);" (call_expression "(*(code *)PTR_umask_00077ec8)(uVar6)" (parenthesized_expression "(*(code *)PTR_umask_00077ec8)" ( (pointer_expression "*(code *)PTR_umask_00077ec8" * (cast_expression "(code *)PTR_umask_00077ec8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar6)" ( identifier ))) ;) (return_statement "return pcVar4;" return identifier ;) })))
(translation_unit "int safe_tempfile(undefined4 *param_1)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  \n  iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }\n  iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  puVar1 = PTR_umask_00077ec8;\n  puVar4 = (undefined4 *)(iVar2 + iVar3);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  puVar4[1] = uVar6;\n  puVar4[2] = uVar5;\n  uVar5 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);\n  if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar5);\n  return iVar3;\n}\n\n" (function_definition "int safe_tempfile(undefined4 *param_1)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  \n  iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }\n  iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  puVar1 = PTR_umask_00077ec8;\n  puVar4 = (undefined4 *)(iVar2 + iVar3);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  puVar4[1] = uVar6;\n  puVar4[2] = uVar5;\n  uVar5 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);\n  if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar5);\n  return iVar3;\n}" primitive_type (function_declarator "safe_tempfile(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  \n  iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }\n  iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  puVar1 = PTR_umask_00077ec8;\n  puVar4 = (undefined4 *)(iVar2 + iVar3);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  puVar4[1] = uVar6;\n  puVar4[2] = uVar5;\n  uVar5 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);\n  if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar5);\n  return iVar3;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (expression_statement "iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);" (assignment_expression "iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0)" identifier = (call_expression "(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0)" (parenthesized_expression "(*(code *)PTR_getenv_00078040)" ( (pointer_expression "*(code *)PTR_getenv_00078040" * (cast_expression "(code *)PTR_getenv_00078040" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_d_of_current_line_0007755c + -0xad0)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xad0" identifier + number_literal) )))) ;) (if_statement "if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }" { (expression_statement "iVar2 = check_writable_directory(iVar2);" (assignment_expression "iVar2 = check_writable_directory(iVar2)" identifier = (call_expression "check_writable_directory(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) goto LAB_0002189c;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0002189c;" goto statement_identifier ;)) })) (expression_statement "iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);" (assignment_expression "iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8)" identifier = (call_expression "check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8)" identifier (argument_list "(PTR_s_d_of_current_line_0007755c + -0xac8)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xac8" identifier + number_literal) )))) ;) (if_statement "if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }" { (expression_statement "iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);" (assignment_expression "iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0)" identifier = (call_expression "(*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0)" (parenthesized_expression "(*(code *)PTR_mallocstrcpy_00077568)" ( (pointer_expression "*(code *)PTR_mallocstrcpy_00077568" * (cast_expression "(code *)PTR_mallocstrcpy_00077568" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,PTR_s_d_of_current_line_0007755c + -0xac0)" ( number_literal , (binary_expression "PTR_s_d_of_current_line_0007755c + -0xac0" identifier + number_literal) )))) ;) })) (labeled_statement "LAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);" statement_identifier : (expression_statement "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2)" identifier = (call_expression "(*(code *)PTR_strlen_00077ff8)(iVar2)" (parenthesized_expression "(*(code *)PTR_strlen_00077ff8)" ( (pointer_expression "*(code *)PTR_strlen_00077ff8" * (cast_expression "(code *)PTR_strlen_00077ff8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;)) (expression_statement "iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);" (assignment_expression "iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc)" identifier = (call_expression "(*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc)" (parenthesized_expression "(*(code *)PTR_nrealloc_00077584)" ( (pointer_expression "*(code *)PTR_nrealloc_00077584" * (cast_expression "(code *)PTR_nrealloc_00077584" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,iVar3 + 0xc)" ( identifier , (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) ;) (expression_statement "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2)" identifier = (call_expression "(*(code *)PTR_strlen_00077ff8)(iVar2)" (parenthesized_expression "(*(code *)PTR_strlen_00077ff8)" ( (pointer_expression "*(code *)PTR_strlen_00077ff8" * (cast_expression "(code *)PTR_strlen_00077ff8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "puVar1 = PTR_umask_00077ec8;" (assignment_expression "puVar1 = PTR_umask_00077ec8" identifier = identifier) ;) (expression_statement "puVar4 = (undefined4 *)(iVar2 + iVar3);" (assignment_expression "puVar4 = (undefined4 *)(iVar2 + iVar3)" identifier = (cast_expression "(undefined4 *)(iVar2 + iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + iVar3)" ( (binary_expression "iVar2 + iVar3" identifier + identifier) )))) ;) (expression_statement "uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);" (assignment_expression "uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" identifier = (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" * (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab4)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab4" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);" (assignment_expression "uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" identifier = (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" * (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab0)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab0" identifier + number_literal) ))))) ;) (expression_statement "*puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);" (assignment_expression "*puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" (pointer_expression "*puVar4" * identifier) = (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" * (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab8)" ( (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab8" identifier + number_literal) ))))) ;) (expression_statement "puVar4[1] = uVar6;" (assignment_expression "puVar4[1] = uVar6" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar4[2] = uVar5;" (assignment_expression "puVar4[2] = uVar5" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = (*(code *)puVar1)(0);" (assignment_expression "uVar5 = (*(code *)puVar1)(0)" identifier = (call_expression "(*(code *)puVar1)(0)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal )))) ;) (expression_statement "(*(code *)PTR_umask_00077ec8)(0x3f);" (call_expression "(*(code *)PTR_umask_00077ec8)(0x3f)" (parenthesized_expression "(*(code *)PTR_umask_00077ec8)" ( (pointer_expression "*(code *)PTR_umask_00077ec8" * (cast_expression "(code *)PTR_umask_00077ec8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0x3f)" ( number_literal ))) ;) (expression_statement "iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2)" identifier = (call_expression "(*(code *)PTR_mkstemp64_0007803c)(iVar2)" (parenthesized_expression "(*(code *)PTR_mkstemp64_0007803c)" ( (pointer_expression "*(code *)PTR_mkstemp64_0007803c" * (cast_expression "(code *)PTR_mkstemp64_0007803c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_free_0007810c)(iVar2);" (call_expression "(*(code *)PTR_free_0007810c)(iVar2)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" ( (pointer_expression "*(code *)PTR_free_0007810c" * (cast_expression "(code *)PTR_free_0007810c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) }) (else_clause "else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }" else (compound_statement "{\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }" { (expression_statement "uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);" (assignment_expression "uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" identifier = (call_expression "(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" (parenthesized_expression "(*(code *)PTR_fdopen_00078160)" ( (pointer_expression "*(code *)PTR_fdopen_00078160" * (cast_expression "(code *)PTR_fdopen_00078160" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" ( identifier , (binary_expression "PTR_s_d_of_current_line_0007755c + -0xaac" identifier + number_literal) )))) ;) (expression_statement "*param_1 = uVar6;" (assignment_expression "*param_1 = uVar6" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) }))) (expression_statement "(*(code *)PTR_umask_00077ec8)(uVar5);" (call_expression "(*(code *)PTR_umask_00077ec8)(uVar5)" (parenthesized_expression "(*(code *)PTR_umask_00077ec8)" ( (pointer_expression "*(code *)PTR_umask_00077ec8" * (cast_expression "(code *)PTR_umask_00077ec8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar5)" ( identifier ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != 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 ;)) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , (binary_expression IDENT + LIT) )))) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;)) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + 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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "int safe_tempfile(undefined4 *param_1)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  \n  iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }\n  iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  puVar1 = PTR_umask_00077ec8;\n  puVar4 = (undefined4 *)(iVar2 + iVar3);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  puVar4[1] = uVar6;\n  puVar4[2] = uVar5;\n  uVar5 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);\n  if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar5);\n  return iVar3;\n}" (primitive_type "int") (function_declarator "safe_tempfile(undefined4 *param_1)" (identifier "safe_tempfile") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  \n  iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);\n  if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }\n  iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);\n  if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }\nLAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);\n  puVar1 = PTR_umask_00077ec8;\n  puVar4 = (undefined4 *)(iVar2 + iVar3);\n  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);\n  uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);\n  *puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);\n  puVar4[1] = uVar6;\n  puVar4[2] = uVar5;\n  uVar5 = (*(code *)puVar1)(0);\n  (*(code *)PTR_umask_00077ec8)(0x3f);\n  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);\n  if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }\n  (*(code *)PTR_umask_00077ec8)(uVar5);\n  return iVar3;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "undefined4 uVar6;" (type_identifier "undefined4") (identifier "uVar6") (; ";")) (expression_statement "iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);" (assignment_expression "iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0)" (parenthesized_expression "(*(code *)PTR_getenv_00078040)" (( "(") (pointer_expression "*(code *)PTR_getenv_00078040" (* "*") (cast_expression "(code *)PTR_getenv_00078040" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_getenv_00078040"))) () ")")) (argument_list "(PTR_s_d_of_current_line_0007755c + -0xad0)" (( "(") (binary_expression "PTR_s_d_of_current_line_0007755c + -0xad0" (identifier "PTR_s_d_of_current_line_0007755c") (+ "+") (number_literal "-0xad0")) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = check_writable_directory(iVar2);\n    if (iVar2 != 0) goto LAB_0002189c;\n  }" ({ "{") (expression_statement "iVar2 = check_writable_directory(iVar2);" (assignment_expression "iVar2 = check_writable_directory(iVar2)" (identifier "iVar2") (= "=") (call_expression "check_writable_directory(iVar2)" (identifier "check_writable_directory") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) goto LAB_0002189c;" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0002189c;" (goto "goto") (statement_identifier "LAB_0002189c") (; ";"))) (} "}"))) (expression_statement "iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);" (assignment_expression "iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8)" (identifier "iVar2") (= "=") (call_expression "check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8)" (identifier "check_writable_directory") (argument_list "(PTR_s_d_of_current_line_0007755c + -0xac8)" (( "(") (binary_expression "PTR_s_d_of_current_line_0007755c + -0xac8" (identifier "PTR_s_d_of_current_line_0007755c") (+ "+") (number_literal "-0xac8")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);\n  }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);" (assignment_expression "iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0)" (parenthesized_expression "(*(code *)PTR_mallocstrcpy_00077568)" (( "(") (pointer_expression "*(code *)PTR_mallocstrcpy_00077568" (* "*") (cast_expression "(code *)PTR_mallocstrcpy_00077568" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mallocstrcpy_00077568"))) () ")")) (argument_list "(0,PTR_s_d_of_current_line_0007755c + -0xac0)" (( "(") (number_literal "0") (, ",") (binary_expression "PTR_s_d_of_current_line_0007755c + -0xac0" (identifier "PTR_s_d_of_current_line_0007755c") (+ "+") (number_literal "-0xac0")) () ")")))) (; ";")) (} "}"))) (labeled_statement "LAB_0002189c:\n  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);" (statement_identifier "LAB_0002189c") (: ":") (expression_statement "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_strlen_00077ff8)(iVar2)" (parenthesized_expression "(*(code *)PTR_strlen_00077ff8)" (( "(") (pointer_expression "*(code *)PTR_strlen_00077ff8" (* "*") (cast_expression "(code *)PTR_strlen_00077ff8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_00077ff8"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";"))) (expression_statement "iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);" (assignment_expression "iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc)" (parenthesized_expression "(*(code *)PTR_nrealloc_00077584)" (( "(") (pointer_expression "*(code *)PTR_nrealloc_00077584" (* "*") (cast_expression "(code *)PTR_nrealloc_00077584" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_nrealloc_00077584"))) () ")")) (argument_list "(iVar2,iVar3 + 0xc)" (( "(") (identifier "iVar2") (, ",") (binary_expression "iVar3 + 0xc" (identifier "iVar3") (+ "+") (number_literal "0xc")) () ")")))) (; ";")) (expression_statement "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_strlen_00077ff8)(iVar2)" (parenthesized_expression "(*(code *)PTR_strlen_00077ff8)" (( "(") (pointer_expression "*(code *)PTR_strlen_00077ff8" (* "*") (cast_expression "(code *)PTR_strlen_00077ff8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_00077ff8"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "puVar1 = PTR_umask_00077ec8;" (assignment_expression "puVar1 = PTR_umask_00077ec8" (identifier "puVar1") (= "=") (identifier "PTR_umask_00077ec8")) (; ";")) (expression_statement "puVar4 = (undefined4 *)(iVar2 + iVar3);" (assignment_expression "puVar4 = (undefined4 *)(iVar2 + iVar3)" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(iVar2 + iVar3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + iVar3)" (( "(") (binary_expression "iVar2 + iVar3" (identifier "iVar2") (+ "+") (identifier "iVar3")) () ")")))) (; ";")) (expression_statement "uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);" (assignment_expression "uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" (identifier "uVar6") (= "=") (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" (* "*") (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab4)" (( "(") (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab4" (identifier "PTR_s_d_of_current_line_0007755c") (+ "+") (number_literal "-0xab4")) () ")"))))) (; ";")) (expression_statement "uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);" (assignment_expression "uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" (identifier "uVar5") (= "=") (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" (* "*") (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab0)" (( "(") (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab0" (identifier "PTR_s_d_of_current_line_0007755c") (+ "+") (number_literal "-0xab0")) () ")"))))) (; ";")) (expression_statement "*puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);" (assignment_expression "*puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (pointer_expression "*(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" (* "*") (cast_expression "(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_s_d_of_current_line_0007755c + -0xab8)" (( "(") (binary_expression "PTR_s_d_of_current_line_0007755c + -0xab8" (identifier "PTR_s_d_of_current_line_0007755c") (+ "+") (number_literal "-0xab8")) () ")"))))) (; ";")) (expression_statement "puVar4[1] = uVar6;" (assignment_expression "puVar4[1] = uVar6" (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar6")) (; ";")) (expression_statement "puVar4[2] = uVar5;" (assignment_expression "puVar4[2] = uVar5" (subscript_expression "puVar4[2]" (identifier "puVar4") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = (*(code *)puVar1)(0);" (assignment_expression "uVar5 = (*(code *)puVar1)(0)" (identifier "uVar5") (= "=") (call_expression "(*(code *)puVar1)(0)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(0)" (( "(") (number_literal "0") () ")")))) (; ";")) (expression_statement "(*(code *)PTR_umask_00077ec8)(0x3f);" (call_expression "(*(code *)PTR_umask_00077ec8)(0x3f)" (parenthesized_expression "(*(code *)PTR_umask_00077ec8)" (( "(") (pointer_expression "*(code *)PTR_umask_00077ec8" (* "*") (cast_expression "(code *)PTR_umask_00077ec8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_umask_00077ec8"))) () ")")) (argument_list "(0x3f)" (( "(") (number_literal "0x3f") () ")"))) (; ";")) (expression_statement "iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_mkstemp64_0007803c)(iVar2)" (parenthesized_expression "(*(code *)PTR_mkstemp64_0007803c)" (( "(") (pointer_expression "*(code *)PTR_mkstemp64_0007803c" (* "*") (cast_expression "(code *)PTR_mkstemp64_0007803c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mkstemp64_0007803c"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (if_statement "if (iVar3 == -1) {\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }\n  else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }" (if "if") (parenthesized_expression "(iVar3 == -1)" (( "(") (binary_expression "iVar3 == -1" (identifier "iVar3") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    iVar3 = 0;\n    (*(code *)PTR_free_0007810c)(iVar2);\n  }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "(*(code *)PTR_free_0007810c)(iVar2);" (call_expression "(*(code *)PTR_free_0007810c)(iVar2)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" (( "(") (pointer_expression "*(code *)PTR_free_0007810c" (* "*") (cast_expression "(code *)PTR_free_0007810c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_0007810c"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }" (else "else") (compound_statement "{\n    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);\n    *param_1 = uVar6;\n    iVar3 = iVar2;\n  }" ({ "{") (expression_statement "uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);" (assignment_expression "uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" (identifier "uVar6") (= "=") (call_expression "(*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" (parenthesized_expression "(*(code *)PTR_fdopen_00078160)" (( "(") (pointer_expression "*(code *)PTR_fdopen_00078160" (* "*") (cast_expression "(code *)PTR_fdopen_00078160" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fdopen_00078160"))) () ")")) (argument_list "(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac)" (( "(") (identifier "iVar3") (, ",") (binary_expression "PTR_s_d_of_current_line_0007755c + -0xaac" (identifier "PTR_s_d_of_current_line_0007755c") (+ "+") (number_literal "-0xaac")) () ")")))) (; ";")) (expression_statement "*param_1 = uVar6;" (assignment_expression "*param_1 = uVar6" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "uVar6")) (; ";")) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" (identifier "iVar3") (= "=") (identifier "iVar2")) (; ";")) (} "}")))) (expression_statement "(*(code *)PTR_umask_00077ec8)(uVar5);" (call_expression "(*(code *)PTR_umask_00077ec8)(uVar5)" (parenthesized_expression "(*(code *)PTR_umask_00077ec8)" (( "(") (pointer_expression "*(code *)PTR_umask_00077ec8" (* "*") (cast_expression "(code *)PTR_umask_00077ec8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_umask_00077ec8"))) () ")")) (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

char * function_1(type_1 **f)

{
  type_2 *puVar1;
  char *var_2;
  int var_4;
  char *var_5;
  type_1 *pFVar5;
  type_3 uVar6;
  type_3 uVar7;
  
  var_2 = (char *)(*(type_4 *)PTR_getenv_00078040)(var_1 + -0xad0);
  if (var_2 != (char *)0x0) {
    var_2 = var_3(var_2);
    if (var_2 != (char *)0x0) goto LAB_0002189c;
  }
  var_2 = var_3(var_1 + -0xac8);
  if (var_2 == (char *)0x0) {
    var_2 = (char *)(*(type_4 *)PTR_mallocstrcpy_00077568)
                               (0,var_1 + -0xac0);
  }
LAB_0002189c:
  var_4 = (*(type_4 *)PTR_strlen_00077ff8)(var_2);
  var_2 = (char *)(*(type_4 *)PTR_nrealloc_00077584)(var_2,var_4 + 0xc);
  var_4 = (*(type_4 *)PTR_strlen_00077ff8)(var_2);
  puVar1 = PTR_umask_00077ec8;
  var_5 = var_2 + var_4;
  uVar7 = *(type_3 *)(var_1 + -0xab4);
  uVar6 = *(type_3 *)(var_1 + -0xab0);
  *(type_3 *)var_5 = *(type_3 *)(var_1 + -0xab8);
  *(type_3 *)(var_5 + 4) = uVar7;
  *(type_3 *)(var_5 + 8) = uVar6;
  uVar6 = (*(type_4 *)puVar1)(0);
  (*(type_4 *)PTR_umask_00077ec8)(0x3f);
  var_4 = (*(type_4 *)PTR_mkstemp64_0007803c)(var_2);
  if (var_4 == -1) {
    var_5 = (char *)0x0;
    (*(type_4 *)PTR_free_0007810c)(var_2);
  }
  else {
    pFVar5 = (type_1 *)(*(type_4 *)PTR_fdopen_00078160)(var_4,var_1 + -0xaac)
    ;
    *f = pFVar5;
    var_5 = var_2;
  }
  (*(type_4 *)PTR_umask_00077ec8)(uVar6);
  return var_5;
}


(translation_unit (function_definition type: (primitive_type) 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: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) 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))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal) (binary_expression left: (identifier) right: (number_literal)))))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (return_statement (identifier)))))

int MASKED(undefined4 *param_1)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  undefined4 *puVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  
  iVar2 = (*(code *)PTR_getenv_00078040)(PTR_s_d_of_current_line_0007755c + -0xad0);
  if (iVar2 != 0) {
    iVar2 = check_writable_directory(iVar2);
    if (iVar2 != 0) goto LAB_0002189c;
  }
  iVar2 = check_writable_directory(PTR_s_d_of_current_line_0007755c + -0xac8);
  if (iVar2 == 0) {
    iVar2 = (*(code *)PTR_mallocstrcpy_00077568)(0,PTR_s_d_of_current_line_0007755c + -0xac0);
  }
LAB_0002189c:
  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);
  iVar2 = (*(code *)PTR_nrealloc_00077584)(iVar2,iVar3 + 0xc);
  iVar3 = (*(code *)PTR_strlen_00077ff8)(iVar2);
  puVar1 = PTR_umask_00077ec8;
  puVar4 = (undefined4 *)(iVar2 + iVar3);
  uVar6 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab4);
  uVar5 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab0);
  *puVar4 = *(undefined4 *)(PTR_s_d_of_current_line_0007755c + -0xab8);
  puVar4[1] = uVar6;
  puVar4[2] = uVar5;
  uVar5 = (*(code *)puVar1)(0);
  (*(code *)PTR_umask_00077ec8)(0x3f);
  iVar3 = (*(code *)PTR_mkstemp64_0007803c)(iVar2);
  if (iVar3 == -1) {
    iVar3 = 0;
    (*(code *)PTR_free_0007810c)(iVar2);
  }
  else {
    uVar6 = (*(code *)PTR_fdopen_00078160)(iVar3,PTR_s_d_of_current_line_0007755c + -0xaac);
    *param_1 = uVar6;
    iVar3 = iVar2;
  }
  (*(code *)PTR_umask_00077ec8)(uVar5);
  return iVar3;
}

