
int close_stream(FILE *stream)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  undefined4 *puVar5;
  
  iVar1 = (*(code *)PTR___fpending_000322e8)();
  iVar2 = (*(code *)PTR_ferror_00032324)(stream);
  iVar3 = (*(code *)PTR_fclose_00032248)(stream);
  if (iVar2 == 0) {
    if (iVar3 == 0) {
      return 0;
    }
    if (iVar1 == 0) {
      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();
      return -(uint)(*piVar4 != 9);
    }
  }
  else if (iVar3 == 0) {
    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();
    *puVar5 = 0;
    return -1;
  }
  return -1;
}



int close_stream(undefined4 param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  undefined4 *puVar5;
  
  iVar1 = (*(code *)PTR___fpending_000322e8)();
  iVar2 = (*(code *)PTR_ferror_00032324)(param_1);
  iVar3 = (*(code *)PTR_fclose_00032248)(param_1);
  if (iVar2 == 0) {
    if (iVar3 == 0) {
      return 0;
    }
    if (iVar1 == 0) {
      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();
      return -(uint)(*piVar4 != 9);
    }
  }
  else if (iVar3 == 0) {
    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();
    *puVar5 = 0;
    return -1;
  }
  return -1;
}


lui gp,0x2
addiu gp,gp,-0x4010
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x7db8(gp)
sw ra,0x24(sp)
sw gp,0x10(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
jalr t9
_or s0,a0,zero
or a0,s0,zero
lw gp,0x10(sp)
lw t9,-0x7d7c(gp)
jalr t9
_or s1,v0,zero
or a0,s0,zero
lw gp,0x10(sp)
lw t9,-0x7e58(gp)
jalr t9
_or s0,v0,zero
lw gp,0x10(sp)
bne s0,zero,0x0001e150
_or v1,v0,zero
beq v0,zero,0x0001e13c
_lw ra,0x24(sp)
bne s1,zero,0x0001e16c
_lw t9,-0x7e10(gp)
jalr t9
_nop
lw v1,0x0(v0)
xori v1,v1,0x9
sltu v1,zero,v1
subu v1,zero,v1
lw ra,0x24(sp)
or v0,v1,zero
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
bne v0,zero,0x0001e16c
_lw t9,-0x7e10(gp)
jalr t9
_nop
li v1,-0x1
b 0x0001e138
_sw zero,0x0(v0)
b 0x0001e138
_li v1,-0x1
(translation_unit "int close_stream(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(param_1);\n  iVar3 = (*(code *)PTR_fclose_00032248)(param_1);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}\n\n" (function_definition "int close_stream(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(param_1);\n  iVar3 = (*(code *)PTR_fclose_00032248)(param_1);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}" primitive_type (function_declarator "close_stream(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(param_1);\n  iVar3 = (*(code *)PTR_fclose_00032248)(param_1);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (expression_statement "iVar1 = (*(code *)PTR___fpending_000322e8)();" (assignment_expression "iVar1 = (*(code *)PTR___fpending_000322e8)()" identifier = (call_expression "(*(code *)PTR___fpending_000322e8)()" (parenthesized_expression "(*(code *)PTR___fpending_000322e8)" ( (pointer_expression "*(code *)PTR___fpending_000322e8" * (cast_expression "(code *)PTR___fpending_000322e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "iVar2 = (*(code *)PTR_ferror_00032324)(param_1);" (assignment_expression "iVar2 = (*(code *)PTR_ferror_00032324)(param_1)" identifier = (call_expression "(*(code *)PTR_ferror_00032324)(param_1)" (parenthesized_expression "(*(code *)PTR_ferror_00032324)" ( (pointer_expression "*(code *)PTR_ferror_00032324" * (cast_expression "(code *)PTR_ferror_00032324" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar3 = (*(code *)PTR_fclose_00032248)(param_1);" (assignment_expression "iVar3 = (*(code *)PTR_fclose_00032248)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_00032248)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_00032248)" ( (pointer_expression "*(code *)PTR_fclose_00032248" * (cast_expression "(code *)PTR_fclose_00032248" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }" { (if_statement "if (iVar3 == 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }" { (expression_statement "piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();" (assignment_expression "piVar4 = (int *)(*(code *)PTR___errno_location_00032290)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_00032290)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00032290)()" (parenthesized_expression "(*(code *)PTR___errno_location_00032290)" ( (pointer_expression "*(code *)PTR___errno_location_00032290" * (cast_expression "(code *)PTR___errno_location_00032290" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (return_statement "return -(uint)(*piVar4 != 9);" return (unary_expression "-(uint)(*piVar4 != 9)" - (call_expression "(uint)(*piVar4 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar4 != 9)" ( (binary_expression "*piVar4 != 9" (pointer_expression "*piVar4" * identifier) != number_literal) )))) ;) })) }) (else_clause "else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" else (if_statement "if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" { (expression_statement "puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();" (assignment_expression "puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00032290)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00032290)()" (parenthesized_expression "(*(code *)PTR___errno_location_00032290)" ( (pointer_expression "*(code *)PTR___errno_location_00032290" * (cast_expression "(code *)PTR___errno_location_00032290" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (return_statement "return -1;" return number_literal ;) })))) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "int close_stream(FILE *stream)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(stream);\n  iVar3 = (*(code *)PTR_fclose_00032248)(stream);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}\n\n" (function_definition "int close_stream(FILE *stream)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(stream);\n  iVar3 = (*(code *)PTR_fclose_00032248)(stream);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}" primitive_type (function_declarator "close_stream(FILE *stream)" identifier (parameter_list "(FILE *stream)" ( (parameter_declaration "FILE *stream" type_identifier (pointer_declarator "*stream" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(stream);\n  iVar3 = (*(code *)PTR_fclose_00032248)(stream);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (expression_statement "iVar1 = (*(code *)PTR___fpending_000322e8)();" (assignment_expression "iVar1 = (*(code *)PTR___fpending_000322e8)()" identifier = (call_expression "(*(code *)PTR___fpending_000322e8)()" (parenthesized_expression "(*(code *)PTR___fpending_000322e8)" ( (pointer_expression "*(code *)PTR___fpending_000322e8" * (cast_expression "(code *)PTR___fpending_000322e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "iVar2 = (*(code *)PTR_ferror_00032324)(stream);" (assignment_expression "iVar2 = (*(code *)PTR_ferror_00032324)(stream)" identifier = (call_expression "(*(code *)PTR_ferror_00032324)(stream)" (parenthesized_expression "(*(code *)PTR_ferror_00032324)" ( (pointer_expression "*(code *)PTR_ferror_00032324" * (cast_expression "(code *)PTR_ferror_00032324" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(stream)" ( identifier )))) ;) (expression_statement "iVar3 = (*(code *)PTR_fclose_00032248)(stream);" (assignment_expression "iVar3 = (*(code *)PTR_fclose_00032248)(stream)" identifier = (call_expression "(*(code *)PTR_fclose_00032248)(stream)" (parenthesized_expression "(*(code *)PTR_fclose_00032248)" ( (pointer_expression "*(code *)PTR_fclose_00032248" * (cast_expression "(code *)PTR_fclose_00032248" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(stream)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }" { (if_statement "if (iVar3 == 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }" { (expression_statement "piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();" (assignment_expression "piVar4 = (int *)(*(code *)PTR___errno_location_00032290)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_00032290)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00032290)()" (parenthesized_expression "(*(code *)PTR___errno_location_00032290)" ( (pointer_expression "*(code *)PTR___errno_location_00032290" * (cast_expression "(code *)PTR___errno_location_00032290" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (return_statement "return -(uint)(*piVar4 != 9);" return (unary_expression "-(uint)(*piVar4 != 9)" - (call_expression "(uint)(*piVar4 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar4 != 9)" ( (binary_expression "*piVar4 != 9" (pointer_expression "*piVar4" * identifier) != number_literal) )))) ;) })) }) (else_clause "else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" else (if_statement "if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" { (expression_statement "puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();" (assignment_expression "puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00032290)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00032290)()" (parenthesized_expression "(*(code *)PTR___errno_location_00032290)" ( (pointer_expression "*(code *)PTR___errno_location_00032290" * (cast_expression "(code *)PTR___errno_location_00032290" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (return_statement "return -1;" return number_literal ;) })))) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "int close_stream(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(param_1);\n  iVar3 = (*(code *)PTR_fclose_00032248)(param_1);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}\n\n" (function_definition "int close_stream(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(param_1);\n  iVar3 = (*(code *)PTR_fclose_00032248)(param_1);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}" primitive_type (function_declarator "close_stream(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(param_1);\n  iVar3 = (*(code *)PTR_fclose_00032248)(param_1);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (expression_statement "iVar1 = (*(code *)PTR___fpending_000322e8)();" (assignment_expression "iVar1 = (*(code *)PTR___fpending_000322e8)()" identifier = (call_expression "(*(code *)PTR___fpending_000322e8)()" (parenthesized_expression "(*(code *)PTR___fpending_000322e8)" ( (pointer_expression "*(code *)PTR___fpending_000322e8" * (cast_expression "(code *)PTR___fpending_000322e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "iVar2 = (*(code *)PTR_ferror_00032324)(param_1);" (assignment_expression "iVar2 = (*(code *)PTR_ferror_00032324)(param_1)" identifier = (call_expression "(*(code *)PTR_ferror_00032324)(param_1)" (parenthesized_expression "(*(code *)PTR_ferror_00032324)" ( (pointer_expression "*(code *)PTR_ferror_00032324" * (cast_expression "(code *)PTR_ferror_00032324" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar3 = (*(code *)PTR_fclose_00032248)(param_1);" (assignment_expression "iVar3 = (*(code *)PTR_fclose_00032248)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_00032248)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_00032248)" ( (pointer_expression "*(code *)PTR_fclose_00032248" * (cast_expression "(code *)PTR_fclose_00032248" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }" { (if_statement "if (iVar3 == 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }" { (expression_statement "piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();" (assignment_expression "piVar4 = (int *)(*(code *)PTR___errno_location_00032290)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_00032290)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00032290)()" (parenthesized_expression "(*(code *)PTR___errno_location_00032290)" ( (pointer_expression "*(code *)PTR___errno_location_00032290" * (cast_expression "(code *)PTR___errno_location_00032290" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (return_statement "return -(uint)(*piVar4 != 9);" return (unary_expression "-(uint)(*piVar4 != 9)" - (call_expression "(uint)(*piVar4 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar4 != 9)" ( (binary_expression "*piVar4 != 9" (pointer_expression "*piVar4" * identifier) != number_literal) )))) ;) })) }) (else_clause "else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" else (if_statement "if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" { (expression_statement "puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();" (assignment_expression "puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00032290)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00032290)()" (parenthesized_expression "(*(code *)PTR___errno_location_00032290)" ( (pointer_expression "*(code *)PTR___errno_location_00032290" * (cast_expression "(code *)PTR___errno_location_00032290" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (return_statement "return -1;" return number_literal ;) })))) (return_statement "return -1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (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 (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 )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (return_statement return (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) != LIT) )))) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return LIT ;) })))) (return_statement return LIT ;) })))
(function_definition "int close_stream(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(param_1);\n  iVar3 = (*(code *)PTR_fclose_00032248)(param_1);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}" (primitive_type "int") (function_declarator "close_stream(undefined4 param_1)" (identifier "close_stream") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 *puVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_000322e8)();\n  iVar2 = (*(code *)PTR_ferror_00032324)(param_1);\n  iVar3 = (*(code *)PTR_fclose_00032248)(param_1);\n  if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }\n  return -1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "undefined4 *puVar5;" (type_identifier "undefined4") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (expression_statement "iVar1 = (*(code *)PTR___fpending_000322e8)();" (assignment_expression "iVar1 = (*(code *)PTR___fpending_000322e8)()" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR___fpending_000322e8)()" (parenthesized_expression "(*(code *)PTR___fpending_000322e8)" (( "(") (pointer_expression "*(code *)PTR___fpending_000322e8" (* "*") (cast_expression "(code *)PTR___fpending_000322e8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___fpending_000322e8"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar2 = (*(code *)PTR_ferror_00032324)(param_1);" (assignment_expression "iVar2 = (*(code *)PTR_ferror_00032324)(param_1)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_ferror_00032324)(param_1)" (parenthesized_expression "(*(code *)PTR_ferror_00032324)" (( "(") (pointer_expression "*(code *)PTR_ferror_00032324" (* "*") (cast_expression "(code *)PTR_ferror_00032324" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ferror_00032324"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "iVar3 = (*(code *)PTR_fclose_00032248)(param_1);" (assignment_expression "iVar3 = (*(code *)PTR_fclose_00032248)(param_1)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_fclose_00032248)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_00032248)" (( "(") (pointer_expression "*(code *)PTR_fclose_00032248" (* "*") (cast_expression "(code *)PTR_fclose_00032248" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_00032248"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }\n  else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (iVar3 == 0) {\n      return 0;\n    }\n    if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }\n  }" ({ "{") (if_statement "if (iVar3 == 0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (iVar1 == 0) {\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();\n      return -(uint)(*piVar4 != 9);\n    }" ({ "{") (expression_statement "piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();" (assignment_expression "piVar4 = (int *)(*(code *)PTR___errno_location_00032290)()" (identifier "piVar4") (= "=") (cast_expression "(int *)(*(code *)PTR___errno_location_00032290)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_00032290)()" (parenthesized_expression "(*(code *)PTR___errno_location_00032290)" (( "(") (pointer_expression "*(code *)PTR___errno_location_00032290" (* "*") (cast_expression "(code *)PTR___errno_location_00032290" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_00032290"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (return_statement "return -(uint)(*piVar4 != 9);" (return "return") (unary_expression "-(uint)(*piVar4 != 9)" (- "-") (call_expression "(uint)(*piVar4 != 9)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*piVar4 != 9)" (( "(") (binary_expression "*piVar4 != 9" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (!= "!=") (number_literal "9")) () ")")))) (; ";")) (} "}"))) (} "}")) (else_clause "else if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" (else "else") (if_statement "if (iVar3 == 0) {\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();\n    *puVar5 = 0;\n    return -1;\n  }" ({ "{") (expression_statement "puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();" (assignment_expression "puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)()" (identifier "puVar5") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00032290)()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_00032290)()" (parenthesized_expression "(*(code *)PTR___errno_location_00032290)" (( "(") (pointer_expression "*(code *)PTR___errno_location_00032290" (* "*") (cast_expression "(code *)PTR___errno_location_00032290" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_00032290"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" (* "*") (identifier "puVar5")) (= "=") (number_literal "0")) (; ";")) (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))))) (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator 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)))) (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))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (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))))) (return_statement (unary_expression argument: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement (number_literal)))))) (return_statement (number_literal)))))

int MASKED(undefined4 param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  undefined4 *puVar5;
  
  iVar1 = (*(code *)PTR___fpending_000322e8)();
  iVar2 = (*(code *)PTR_ferror_00032324)(param_1);
  iVar3 = (*(code *)PTR_fclose_00032248)(param_1);
  if (iVar2 == 0) {
    if (iVar3 == 0) {
      return 0;
    }
    if (iVar1 == 0) {
      piVar4 = (int *)(*(code *)PTR___errno_location_00032290)();
      return -(uint)(*piVar4 != 9);
    }
  }
  else if (iVar3 == 0) {
    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_00032290)();
    *puVar5 = 0;
    return -1;
  }
  return -1;
}

