
int openat_safer(int fd,char *file,int flags,...)

{
  undefined *puVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  
  puVar1 = PTR___stack_chk_guard_000466a0;
  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;
  iVar2 = (*(code *)PTR_openat64_000465b4)();
  iVar2 = fd_safer(iVar2);
  if (iVar4 == *(int *)puVar1) {
    return iVar2;
  }
  (*(code *)PTR___stack_chk_fail_00046664)();
  piVar3 = (int *)xmalloc(0x18);
  *piVar3 = iVar4;
  piVar3[5] = 0;
  piVar3[4] = 0;
  piVar3[3] = 0;
  piVar3[2] = 0;
  return (int)piVar3;
}



void openat_safer(void)

{
  undefined *puVar1;
  undefined4 uVar2;
  int *piVar3;
  int iVar4;
  
  puVar1 = PTR___stack_chk_guard_000466a0;
  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;
  uVar2 = (*(code *)PTR_openat64_000465b4)();
  fd_safer(uVar2);
  if (iVar4 == *(int *)puVar1) {
    return;
  }
  (*(code *)PTR___stack_chk_fail_00046664)();
  piVar3 = (int *)xmalloc(0x18);
  *piVar3 = iVar4;
  piVar3[5] = 0;
  piVar3[4] = 0;
  piVar3[3] = 0;
  piVar3[2] = 0;
  return;
}


lui gp,0x2
addiu gp,gp,-0x1620
addu gp,gp,t9
addiu sp,sp,-0x28
andi v0,a2,0x100
sw s0,0x20(sp)
sw a3,0x34(sp)
lw s0,-0x7a70(gp)
sw gp,0x10(sp)
sw ra,0x24(sp)
lw v1,0x0(s0)
sw v1,0x1c(sp)
bne v0,zero,0x0002f7a8
_addiu v0,sp,0x34
or a3,zero,zero
lw t9,-0x7b5c(gp)
jalr t9
_nop
lw gp,0x10(sp)
lw t9,-0x7e00(gp)
bal 0x00026a40
_or a0,v0,zero
lw a0,0x1c(sp)
lw v1,0x0(s0)
bne a0,v1,0x0002f7b0
_lw gp,0x10(sp)
lw ra,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x28
b 0x0002f76c
_sw v0,0x18(sp)
lw t9,-0x7aac(gp)
jalr t9
_nop
nop
(translation_unit "void openat_safer(void)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  uVar2 = (*(code *)PTR_openat64_000465b4)();\n  fd_safer(uVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return;\n}\n\n" (function_definition "void openat_safer(void)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  uVar2 = (*(code *)PTR_openat64_000465b4)();\n  fd_safer(uVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return;\n}" primitive_type (function_declarator "openat_safer(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  uVar2 = (*(code *)PTR_openat64_000465b4)();\n  fd_safer(uVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000466a0;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000466a0" identifier = identifier) ;) (expression_statement "iVar4 = *(int *)PTR___stack_chk_guard_000466a0;" (assignment_expression "iVar4 = *(int *)PTR___stack_chk_guard_000466a0" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000466a0" * (cast_expression "(int *)PTR___stack_chk_guard_000466a0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar2 = (*(code *)PTR_openat64_000465b4)();" (assignment_expression "uVar2 = (*(code *)PTR_openat64_000465b4)()" identifier = (call_expression "(*(code *)PTR_openat64_000465b4)()" (parenthesized_expression "(*(code *)PTR_openat64_000465b4)" ( (pointer_expression "*(code *)PTR_openat64_000465b4" * (cast_expression "(code *)PTR_openat64_000465b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "fd_safer(uVar2);" (call_expression "fd_safer(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if (iVar4 == *(int *)puVar1) {\n    return;\n  }" if (parenthesized_expression "(iVar4 == *(int *)puVar1)" ( (binary_expression "iVar4 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR___stack_chk_fail_00046664)();" (call_expression "(*(code *)PTR___stack_chk_fail_00046664)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00046664)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00046664" * (cast_expression "(code *)PTR___stack_chk_fail_00046664" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "piVar3 = (int *)xmalloc(0x18);" (assignment_expression "piVar3 = (int *)xmalloc(0x18)" identifier = (cast_expression "(int *)xmalloc(0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x18)" identifier (argument_list "(0x18)" ( number_literal ))))) ;) (expression_statement "*piVar3 = iVar4;" (assignment_expression "*piVar3 = iVar4" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "piVar3[5] = 0;" (assignment_expression "piVar3[5] = 0" (subscript_expression "piVar3[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[4] = 0;" (assignment_expression "piVar3[4] = 0" (subscript_expression "piVar3[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[3] = 0;" (assignment_expression "piVar3[3] = 0" (subscript_expression "piVar3[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[2] = 0;" (assignment_expression "piVar3[2] = 0" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "int openat_safer(int fd,char *file,int flags,...)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  iVar2 = (*(code *)PTR_openat64_000465b4)();\n  iVar2 = fd_safer(iVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return iVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return (int)piVar3;\n}\n\n" (function_definition "int openat_safer(int fd,char *file,int flags,...)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  iVar2 = (*(code *)PTR_openat64_000465b4)();\n  iVar2 = fd_safer(iVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return iVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return (int)piVar3;\n}" primitive_type (function_declarator "openat_safer(int fd,char *file,int flags,...)" identifier (parameter_list "(int fd,char *file,int flags,...)" ( (parameter_declaration "int fd" primitive_type identifier) , (parameter_declaration "char *file" primitive_type (pointer_declarator "*file" * identifier)) , (parameter_declaration "int flags" primitive_type identifier) , (variadic_parameter "..." ...) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  iVar2 = (*(code *)PTR_openat64_000465b4)();\n  iVar2 = fd_safer(iVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return iVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return (int)piVar3;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000466a0;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000466a0" identifier = identifier) ;) (expression_statement "iVar4 = *(int *)PTR___stack_chk_guard_000466a0;" (assignment_expression "iVar4 = *(int *)PTR___stack_chk_guard_000466a0" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000466a0" * (cast_expression "(int *)PTR___stack_chk_guard_000466a0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar2 = (*(code *)PTR_openat64_000465b4)();" (assignment_expression "iVar2 = (*(code *)PTR_openat64_000465b4)()" identifier = (call_expression "(*(code *)PTR_openat64_000465b4)()" (parenthesized_expression "(*(code *)PTR_openat64_000465b4)" ( (pointer_expression "*(code *)PTR_openat64_000465b4" * (cast_expression "(code *)PTR_openat64_000465b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "iVar2 = fd_safer(iVar2);" (assignment_expression "iVar2 = fd_safer(iVar2)" identifier = (call_expression "fd_safer(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (iVar4 == *(int *)puVar1) {\n    return iVar2;\n  }" if (parenthesized_expression "(iVar4 == *(int *)puVar1)" ( (binary_expression "iVar4 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "(*(code *)PTR___stack_chk_fail_00046664)();" (call_expression "(*(code *)PTR___stack_chk_fail_00046664)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00046664)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00046664" * (cast_expression "(code *)PTR___stack_chk_fail_00046664" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "piVar3 = (int *)xmalloc(0x18);" (assignment_expression "piVar3 = (int *)xmalloc(0x18)" identifier = (cast_expression "(int *)xmalloc(0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x18)" identifier (argument_list "(0x18)" ( number_literal ))))) ;) (expression_statement "*piVar3 = iVar4;" (assignment_expression "*piVar3 = iVar4" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "piVar3[5] = 0;" (assignment_expression "piVar3[5] = 0" (subscript_expression "piVar3[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[4] = 0;" (assignment_expression "piVar3[4] = 0" (subscript_expression "piVar3[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[3] = 0;" (assignment_expression "piVar3[3] = 0" (subscript_expression "piVar3[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[2] = 0;" (assignment_expression "piVar3[2] = 0" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return (int)piVar3;" return (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier) ;) })))
(translation_unit "void openat_safer(void)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  uVar2 = (*(code *)PTR_openat64_000465b4)();\n  fd_safer(uVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return;\n}\n\n" (function_definition "void openat_safer(void)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  uVar2 = (*(code *)PTR_openat64_000465b4)();\n  fd_safer(uVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return;\n}" primitive_type (function_declarator "openat_safer(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  uVar2 = (*(code *)PTR_openat64_000465b4)();\n  fd_safer(uVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000466a0;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000466a0" identifier = identifier) ;) (expression_statement "iVar4 = *(int *)PTR___stack_chk_guard_000466a0;" (assignment_expression "iVar4 = *(int *)PTR___stack_chk_guard_000466a0" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000466a0" * (cast_expression "(int *)PTR___stack_chk_guard_000466a0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar2 = (*(code *)PTR_openat64_000465b4)();" (assignment_expression "uVar2 = (*(code *)PTR_openat64_000465b4)()" identifier = (call_expression "(*(code *)PTR_openat64_000465b4)()" (parenthesized_expression "(*(code *)PTR_openat64_000465b4)" ( (pointer_expression "*(code *)PTR_openat64_000465b4" * (cast_expression "(code *)PTR_openat64_000465b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "fd_safer(uVar2);" (call_expression "fd_safer(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if (iVar4 == *(int *)puVar1) {\n    return;\n  }" if (parenthesized_expression "(iVar4 == *(int *)puVar1)" ( (binary_expression "iVar4 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR___stack_chk_fail_00046664)();" (call_expression "(*(code *)PTR___stack_chk_fail_00046664)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00046664)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00046664" * (cast_expression "(code *)PTR___stack_chk_fail_00046664" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "piVar3 = (int *)xmalloc(0x18);" (assignment_expression "piVar3 = (int *)xmalloc(0x18)" identifier = (cast_expression "(int *)xmalloc(0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x18)" identifier (argument_list "(0x18)" ( number_literal ))))) ;) (expression_statement "*piVar3 = iVar4;" (assignment_expression "*piVar3 = iVar4" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "piVar3[5] = 0;" (assignment_expression "piVar3[5] = 0" (subscript_expression "piVar3[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[4] = 0;" (assignment_expression "piVar3[4] = 0" (subscript_expression "piVar3[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[3] = 0;" (assignment_expression "piVar3[3] = 0" (subscript_expression "piVar3[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[2] = 0;" (assignment_expression "piVar3[2] = 0" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return ;) })))
(function_definition "void openat_safer(void)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  uVar2 = (*(code *)PTR_openat64_000465b4)();\n  fd_safer(uVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return;\n}" (primitive_type "void") (function_declarator "openat_safer(void)" (identifier "openat_safer") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  \n  puVar1 = PTR___stack_chk_guard_000466a0;\n  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;\n  uVar2 = (*(code *)PTR_openat64_000465b4)();\n  fd_safer(uVar2);\n  if (iVar4 == *(int *)puVar1) {\n    return;\n  }\n  (*(code *)PTR___stack_chk_fail_00046664)();\n  piVar3 = (int *)xmalloc(0x18);\n  *piVar3 = iVar4;\n  piVar3[5] = 0;\n  piVar3[4] = 0;\n  piVar3[3] = 0;\n  piVar3[2] = 0;\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "puVar1 = PTR___stack_chk_guard_000466a0;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000466a0" (identifier "puVar1") (= "=") (identifier "PTR___stack_chk_guard_000466a0")) (; ";")) (expression_statement "iVar4 = *(int *)PTR___stack_chk_guard_000466a0;" (assignment_expression "iVar4 = *(int *)PTR___stack_chk_guard_000466a0" (identifier "iVar4") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_000466a0" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_000466a0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_000466a0")))) (; ";")) (expression_statement "uVar2 = (*(code *)PTR_openat64_000465b4)();" (assignment_expression "uVar2 = (*(code *)PTR_openat64_000465b4)()" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_openat64_000465b4)()" (parenthesized_expression "(*(code *)PTR_openat64_000465b4)" (( "(") (pointer_expression "*(code *)PTR_openat64_000465b4" (* "*") (cast_expression "(code *)PTR_openat64_000465b4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_openat64_000465b4"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "fd_safer(uVar2);" (call_expression "fd_safer(uVar2)" (identifier "fd_safer") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (if_statement "if (iVar4 == *(int *)puVar1) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar4 == *(int *)puVar1)" (( "(") (binary_expression "iVar4 == *(int *)puVar1" (identifier "iVar4") (== "==") (pointer_expression "*(int *)puVar1" (* "*") (cast_expression "(int *)puVar1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1")))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR___stack_chk_fail_00046664)();" (call_expression "(*(code *)PTR___stack_chk_fail_00046664)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00046664)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_00046664" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_00046664" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_00046664"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar3 = (int *)xmalloc(0x18);" (assignment_expression "piVar3 = (int *)xmalloc(0x18)" (identifier "piVar3") (= "=") (cast_expression "(int *)xmalloc(0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(0x18)" (identifier "xmalloc") (argument_list "(0x18)" (( "(") (number_literal "0x18") () ")"))))) (; ";")) (expression_statement "*piVar3 = iVar4;" (assignment_expression "*piVar3 = iVar4" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "piVar3[5] = 0;" (assignment_expression "piVar3[5] = 0" (subscript_expression "piVar3[5]" (identifier "piVar3") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar3[4] = 0;" (assignment_expression "piVar3[4] = 0" (subscript_expression "piVar3[4]" (identifier "piVar3") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar3[3] = 0;" (assignment_expression "piVar3[3] = 0" (subscript_expression "piVar3[3]" (identifier "piVar3") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar3[2] = 0;" (assignment_expression "piVar3[2] = 0" (subscript_expression "piVar3[2]" (identifier "piVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

int function_1(int fd,char *file,int flags,...)

{
  type_1 *puVar1;
  int iVar2;
  int *piVar3;
  int var_2;
  
  puVar1 = PTR___stack_chk_guard_000466a0;
  var_2 = *(int *)PTR___stack_chk_guard_000466a0;
  iVar2 = (*(type_2 *)PTR_openat64_000465b4)();
  iVar2 = var_1(iVar2);
  if (var_2 == *(int *)puVar1) {
    return iVar2;
  }
  (*(type_2 *)PTR___stack_chk_fail_00046664)();
  piVar3 = (int *)var_3(0x18);
  *piVar3 = var_2;
  piVar3[5] = 0;
  piVar3[4] = 0;
  piVar3[3] = 0;
  piVar3[2] = 0;
  return (int)piVar3;
}


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

void MASKED(void)

{
  undefined *puVar1;
  undefined4 uVar2;
  int *piVar3;
  int iVar4;
  
  puVar1 = PTR___stack_chk_guard_000466a0;
  iVar4 = *(int *)PTR___stack_chk_guard_000466a0;
  uVar2 = (*(code *)PTR_openat64_000465b4)();
  fd_safer(uVar2);
  if (iVar4 == *(int *)puVar1) {
    return;
  }
  (*(code *)PTR___stack_chk_fail_00046664)();
  piVar3 = (int *)xmalloc(0x18);
  *piVar3 = iVar4;
  piVar3[5] = 0;
  piVar3[4] = 0;
  piVar3[3] = 0;
  piVar3[2] = 0;
  return;
}

