
int close_stream(FILE *stream)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  uint uVar5;
  
  iVar1 = (*(code *)PTR___fpending_0002a25c)();
  uVar5 = stream->_flags;
  iVar2 = rpl_fclose(stream);
  if ((uVar5 & 0x20) == 0) {
    if (iVar2 != 0) {
      if (iVar1 == 0) {
        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();
        iVar2 = -(uint)(*piVar3 != 9);
      }
      else {
        iVar2 = -1;
      }
    }
  }
  else if (iVar2 == 0) {
    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();
    *puVar4 = 0;
    iVar2 = -1;
  }
  else {
    iVar2 = -1;
  }
  return iVar2;
}



int close_stream(uint *param_1)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  uint uVar5;
  
  iVar1 = (*(code *)PTR___fpending_0002a25c)();
  uVar5 = *param_1;
  iVar2 = rpl_fclose(param_1);
  if ((uVar5 & 0x20) == 0) {
    if (iVar2 != 0) {
      if (iVar1 == 0) {
        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();
        iVar2 = -(uint)(*piVar3 != 9);
      }
      else {
        iVar2 = -1;
      }
    }
  }
  else if (iVar2 == 0) {
    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();
    *puVar4 = 0;
    iVar2 = -1;
  }
  else {
    iVar2 = -1;
  }
  return iVar2;
}


lui gp,0x2
addiu gp,gp,-0x57d0
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
sw gp,0x10(sp)
or s1,a0,zero
lw t9,-0x7e64(gp)
jalr t9
_nop
lw gp,0x10(sp)
or s2,v0,zero
lw s0,0x0(s1)
andi s0,s0,0x20
or a0,s1,zero
lw t9,-0x7f14(gp)
bal 0x00017a80
_nop
lw gp,0x10(sp)
bne s0,zero,0x00017934
_nop
beq v0,zero,0x00017920
_lw ra,0x24(sp)
bne s2,zero,0x00017954
_lw t9,-0x7ea4(gp)
jalr t9
_nop
lw gp,0x10(sp)
lw v0,0x0(v0)
xori v0,v0,0x9
sltu v0,zero,v0
subu v0,zero,v0
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
bne v0,zero,0x0001795c
_lw t9,-0x7ea4(gp)
jalr t9
_nop
lw gp,0x10(sp)
sw zero,0x0(v0)
b 0x0001791c
_li v0,-0x1
b 0x0001791c
_li v0,-0x1
b 0x0001791c
_li v0,-0x1
(translation_unit "int close_stream(uint *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = *param_1;\n  iVar2 = rpl_fclose(param_1);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}\n\n" (function_definition "int close_stream(uint *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = *param_1;\n  iVar2 = rpl_fclose(param_1);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "close_stream(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = *param_1;\n  iVar2 = rpl_fclose(param_1);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR___fpending_0002a25c)();" (assignment_expression "iVar1 = (*(code *)PTR___fpending_0002a25c)()" identifier = (call_expression "(*(code *)PTR___fpending_0002a25c)()" (parenthesized_expression "(*(code *)PTR___fpending_0002a25c)" ( (pointer_expression "*(code *)PTR___fpending_0002a25c" * (cast_expression "(code *)PTR___fpending_0002a25c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "uVar5 = *param_1;" (assignment_expression "uVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar2 = rpl_fclose(param_1);" (assignment_expression "iVar2 = rpl_fclose(param_1)" identifier = (call_expression "rpl_fclose(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" if (parenthesized_expression "((uVar5 & 0x20) == 0)" ( (binary_expression "(uVar5 & 0x20) == 0" (parenthesized_expression "(uVar5 & 0x20)" ( (binary_expression "uVar5 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }" { (if_statement "if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }" { (if_statement "if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }" { (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0002a21c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002a21c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a21c)" ( (pointer_expression "*(code *)PTR___errno_location_0002a21c" * (cast_expression "(code *)PTR___errno_location_0002a21c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar2 = -(uint)(*piVar3 != 9);" (assignment_expression "iVar2 = -(uint)(*piVar3 != 9)" identifier = (unary_expression "-(uint)(*piVar3 != 9)" - (call_expression "(uint)(*piVar3 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 != 9)" ( (binary_expression "*piVar3 != 9" (pointer_expression "*piVar3" * identifier) != number_literal) ))))) ;) }) (else_clause "else {\n        iVar2 = -1;\n      }" else (compound_statement "{\n        iVar2 = -1;\n      }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }))) })) }) (else_clause "else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" else (if_statement "if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }" { (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002a21c)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002a21c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a21c)" ( (pointer_expression "*(code *)PTR___errno_location_0002a21c" * (cast_expression "(code *)PTR___errno_location_0002a21c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = -1;\n  }" else (compound_statement "{\n    iVar2 = -1;\n  }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }))))) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int close_stream(FILE *stream)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = stream->_flags;\n  iVar2 = rpl_fclose(stream);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}\n\n" (function_definition "int close_stream(FILE *stream)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = stream->_flags;\n  iVar2 = rpl_fclose(stream);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\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 *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = stream->_flags;\n  iVar2 = rpl_fclose(stream);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR___fpending_0002a25c)();" (assignment_expression "iVar1 = (*(code *)PTR___fpending_0002a25c)()" identifier = (call_expression "(*(code *)PTR___fpending_0002a25c)()" (parenthesized_expression "(*(code *)PTR___fpending_0002a25c)" ( (pointer_expression "*(code *)PTR___fpending_0002a25c" * (cast_expression "(code *)PTR___fpending_0002a25c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "uVar5 = stream->_flags;" (assignment_expression "uVar5 = stream->_flags" identifier = (field_expression "stream->_flags" identifier -> field_identifier)) ;) (expression_statement "iVar2 = rpl_fclose(stream);" (assignment_expression "iVar2 = rpl_fclose(stream)" identifier = (call_expression "rpl_fclose(stream)" identifier (argument_list "(stream)" ( identifier )))) ;) (if_statement "if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" if (parenthesized_expression "((uVar5 & 0x20) == 0)" ( (binary_expression "(uVar5 & 0x20) == 0" (parenthesized_expression "(uVar5 & 0x20)" ( (binary_expression "uVar5 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }" { (if_statement "if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }" { (if_statement "if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }" { (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0002a21c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002a21c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a21c)" ( (pointer_expression "*(code *)PTR___errno_location_0002a21c" * (cast_expression "(code *)PTR___errno_location_0002a21c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar2 = -(uint)(*piVar3 != 9);" (assignment_expression "iVar2 = -(uint)(*piVar3 != 9)" identifier = (unary_expression "-(uint)(*piVar3 != 9)" - (call_expression "(uint)(*piVar3 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 != 9)" ( (binary_expression "*piVar3 != 9" (pointer_expression "*piVar3" * identifier) != number_literal) ))))) ;) }) (else_clause "else {\n        iVar2 = -1;\n      }" else (compound_statement "{\n        iVar2 = -1;\n      }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }))) })) }) (else_clause "else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" else (if_statement "if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }" { (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002a21c)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002a21c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a21c)" ( (pointer_expression "*(code *)PTR___errno_location_0002a21c" * (cast_expression "(code *)PTR___errno_location_0002a21c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = -1;\n  }" else (compound_statement "{\n    iVar2 = -1;\n  }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }))))) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int close_stream(uint *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = *param_1;\n  iVar2 = rpl_fclose(param_1);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}\n\n" (function_definition "int close_stream(uint *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = *param_1;\n  iVar2 = rpl_fclose(param_1);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "close_stream(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = *param_1;\n  iVar2 = rpl_fclose(param_1);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR___fpending_0002a25c)();" (assignment_expression "iVar1 = (*(code *)PTR___fpending_0002a25c)()" identifier = (call_expression "(*(code *)PTR___fpending_0002a25c)()" (parenthesized_expression "(*(code *)PTR___fpending_0002a25c)" ( (pointer_expression "*(code *)PTR___fpending_0002a25c" * (cast_expression "(code *)PTR___fpending_0002a25c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "uVar5 = *param_1;" (assignment_expression "uVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar2 = rpl_fclose(param_1);" (assignment_expression "iVar2 = rpl_fclose(param_1)" identifier = (call_expression "rpl_fclose(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" if (parenthesized_expression "((uVar5 & 0x20) == 0)" ( (binary_expression "(uVar5 & 0x20) == 0" (parenthesized_expression "(uVar5 & 0x20)" ( (binary_expression "uVar5 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }" { (if_statement "if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }" { (if_statement "if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }" { (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0002a21c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002a21c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a21c)" ( (pointer_expression "*(code *)PTR___errno_location_0002a21c" * (cast_expression "(code *)PTR___errno_location_0002a21c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar2 = -(uint)(*piVar3 != 9);" (assignment_expression "iVar2 = -(uint)(*piVar3 != 9)" identifier = (unary_expression "-(uint)(*piVar3 != 9)" - (call_expression "(uint)(*piVar3 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 != 9)" ( (binary_expression "*piVar3 != 9" (pointer_expression "*piVar3" * identifier) != number_literal) ))))) ;) }) (else_clause "else {\n        iVar2 = -1;\n      }" else (compound_statement "{\n        iVar2 = -1;\n      }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }))) })) }) (else_clause "else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" else (if_statement "if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }" { (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002a21c)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002a21c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a21c)" ( (pointer_expression "*(code *)PTR___errno_location_0002a21c" * (cast_expression "(code *)PTR___errno_location_0002a21c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = -1;\n  }" else (compound_statement "{\n    iVar2 = -1;\n  }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }))))) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * 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 ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (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 IDENT = (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) != LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_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) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))))) (return_statement return IDENT ;) })))
(function_definition "int close_stream(uint *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = *param_1;\n  iVar2 = rpl_fclose(param_1);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}" (primitive_type "int") (function_declarator "close_stream(uint *param_1)" (identifier "close_stream") (parameter_list "(uint *param_1)" (( "(") (parameter_declaration "uint *param_1" (type_identifier "uint") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint uVar5;\n  \n  iVar1 = (*(code *)PTR___fpending_0002a25c)();\n  uVar5 = *param_1;\n  iVar2 = rpl_fclose(param_1);\n  if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (expression_statement "iVar1 = (*(code *)PTR___fpending_0002a25c)();" (assignment_expression "iVar1 = (*(code *)PTR___fpending_0002a25c)()" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR___fpending_0002a25c)()" (parenthesized_expression "(*(code *)PTR___fpending_0002a25c)" (( "(") (pointer_expression "*(code *)PTR___fpending_0002a25c" (* "*") (cast_expression "(code *)PTR___fpending_0002a25c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___fpending_0002a25c"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar5 = *param_1;" (assignment_expression "uVar5 = *param_1" (identifier "uVar5") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "iVar2 = rpl_fclose(param_1);" (assignment_expression "iVar2 = rpl_fclose(param_1)" (identifier "iVar2") (= "=") (call_expression "rpl_fclose(param_1)" (identifier "rpl_fclose") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((uVar5 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" (if "if") (parenthesized_expression "((uVar5 & 0x20) == 0)" (( "(") (binary_expression "(uVar5 & 0x20) == 0" (parenthesized_expression "(uVar5 & 0x20)" (( "(") (binary_expression "uVar5 & 0x20" (identifier "uVar5") (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }" ({ "{") (if_statement "if (iVar2 != 0) {\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }" ({ "{") (if_statement "if (iVar1 == 0) {\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();\n        iVar2 = -(uint)(*piVar3 != 9);\n      }" ({ "{") (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)()" (identifier "piVar3") (= "=") (cast_expression "(int *)(*(code *)PTR___errno_location_0002a21c)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_0002a21c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a21c)" (( "(") (pointer_expression "*(code *)PTR___errno_location_0002a21c" (* "*") (cast_expression "(code *)PTR___errno_location_0002a21c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_0002a21c"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "iVar2 = -(uint)(*piVar3 != 9);" (assignment_expression "iVar2 = -(uint)(*piVar3 != 9)" (identifier "iVar2") (= "=") (unary_expression "-(uint)(*piVar3 != 9)" (- "-") (call_expression "(uint)(*piVar3 != 9)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*piVar3 != 9)" (( "(") (binary_expression "*piVar3 != 9" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (!= "!=") (number_literal "9")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n        iVar2 = -1;\n      }" (else "else") (compound_statement "{\n        iVar2 = -1;\n      }" ({ "{") (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" (identifier "iVar2") (= "=") (number_literal "-1")) (; ";")) (} "}")))) (} "}"))) (} "}")) (else_clause "else if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" (else "else") (if_statement "if (iVar2 == 0) {\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();\n    *puVar4 = 0;\n    iVar2 = -1;\n  }" ({ "{") (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)()" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0002a21c)()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_0002a21c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a21c)" (( "(") (pointer_expression "*(code *)PTR___errno_location_0002a21c" (* "*") (cast_expression "(code *)PTR___errno_location_0002a21c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_0002a21c"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" (identifier "iVar2") (= "=") (number_literal "-1")) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = -1;\n  }" (else "else") (compound_statement "{\n    iVar2 = -1;\n  }" ({ "{") (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" (identifier "iVar2") (= "=") (number_literal "-1")) (; ";")) (} "}")))))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

int function_1(type_1 *stream)

{
  int var_4;
  int var_3;
  int *piVar3;
  type_2 *puVar4;
  type_3 var_2;
  
  var_4 = (*(type_4 *)PTR___fpending_0002a25c)();
  var_2 = stream->_flags;
  var_3 = var_1(stream);
  if ((var_2 & 0x20) == 0) {
    if (var_3 != 0) {
      if (var_4 == 0) {
        piVar3 = (int *)(*(type_4 *)PTR___errno_location_0002a21c)();
        var_3 = -(type_3)(*piVar3 != 9);
      }
      else {
        var_3 = -1;
      }
    }
  }
  else if (var_3 == 0) {
    puVar4 = (type_2 *)(*(type_4 *)PTR___errno_location_0002a21c)();
    *puVar4 = 0;
    var_3 = -1;
  }
  else {
    var_3 = -1;
  }
  return var_3;
}


(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: (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))) (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)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (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))))) (expression_statement (assignment_expression left: (identifier) right: (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 (compound_statement (expression_statement (assignment_expression left: (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))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))) (return_statement (identifier)))))

int MASKED(uint *param_1)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  uint uVar5;
  
  iVar1 = (*(code *)PTR___fpending_0002a25c)();
  uVar5 = *param_1;
  iVar2 = rpl_fclose(param_1);
  if ((uVar5 & 0x20) == 0) {
    if (iVar2 != 0) {
      if (iVar1 == 0) {
        piVar3 = (int *)(*(code *)PTR___errno_location_0002a21c)();
        iVar2 = -(uint)(*piVar3 != 9);
      }
      else {
        iVar2 = -1;
      }
    }
  }
  else if (iVar2 == 0) {
    puVar4 = (undefined4 *)(*(code *)PTR___errno_location_0002a21c)();
    *puVar4 = 0;
    iVar2 = -1;
  }
  else {
    iVar2 = -1;
  }
  return iVar2;
}

