
int rpl_fclose(FILE *fp)

{
  int iVar1;
  undefined4 uVar2;
  int *piVar3;
  undefined4 in_a1;
  int iVar4;
  longlong lVar5;
  
  iVar1 = (*(code *)PTR_fileno_0002a24c)();
  if (iVar1 < 0) {
    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);
    return iVar1;
  }
  iVar1 = (*(code *)PTR___freading_0002a280)();
  if (iVar1 != 0) {
    uVar2 = (*(code *)PTR_fileno_0002a24c)();
    lVar5 = (*(code *)PTR_lseek64_0002a29c)(uVar2,in_a1,0,0,1);
    if (lVar5 == -1) goto LAB_00016c94;
  }
  iVar1 = rpl_fflush(fp);
  if (iVar1 != 0) {
    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();
    iVar4 = *piVar3;
    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);
    if (iVar4 == 0) {
      return iVar1;
    }
    *piVar3 = iVar4;
    return -1;
  }
LAB_00016c94:
  iVar1 = (*(code *)PTR_fclose_0002a224)(fp);
  return iVar1;
}



undefined4 rpl_fclose(undefined4 param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  int *piVar3;
  longlong lVar4;
  
  iVar1 = (*(code *)PTR_fileno_0002a24c)();
  if (iVar1 < 0) {
    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);
    return uVar2;
  }
  iVar1 = (*(code *)PTR___freading_0002a280)();
  if (iVar1 != 0) {
    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);
    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);
    if (lVar4 == -1) goto LAB_00016c94;
  }
  iVar1 = rpl_fflush(param_1);
  if (iVar1 != 0) {
    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();
    iVar1 = *piVar3;
    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);
    if (iVar1 == 0) {
      return uVar2;
    }
    *piVar3 = iVar1;
    return 0xffffffff;
  }
LAB_00016c94:
  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);
  return uVar2;
}


lui gp,0x2
addiu gp,gp,-0x4ab0
addu gp,gp,t9
addiu sp,sp,-0x30
sw ra,0x2c(sp)
sw s2,0x28(sp)
sw s1,0x24(sp)
sw s0,0x20(sp)
sw gp,0x18(sp)
or s0,a0,zero
lw t9,-0x7e84(gp)
jalr t9
_nop
lw gp,0x18(sp)
bltz v0,0x00016c74
_or a0,s0,zero
lw t9,-0x7e50(gp)
jalr t9
_nop
lw gp,0x18(sp)
beq v0,zero,0x00016c1c
_or a0,s0,zero
lw t9,-0x7e84(gp)
jalr t9
_nop
lw gp,0x18(sp)
li v1,0x1
sw v1,0x10(sp)
or a3,zero,zero
or a2,zero,zero
or a0,v0,zero
lw t9,-0x7e34(gp)
jalr t9
_nop
lw gp,0x18(sp)
li a0,-0x1
beq v0,a0,0x00016c8c
_li v0,-0x1
or a0,s0,zero
lw t9,-0x7f0c(gp)
bal 0x00016cc0
_nop
lw gp,0x18(sp)
beq v0,zero,0x00016c94
_or a0,s0,zero
lw t9,-0x7e80(gp)
jalr t9
_nop
lw gp,0x18(sp)
or s1,v0,zero
lw s2,0x0(v0)
or a0,s0,zero
lw t9,-0x7eac(gp)
jalr t9
_nop
lw gp,0x18(sp)
beq s2,zero,0x00016ca8
_lw ra,0x2c(sp)
sw s2,0x0(s1)
b 0x00016ca4
_li v0,-0x1
lw t9,-0x7eac(gp)
jalr t9
_nop
lw gp,0x18(sp)
b 0x00016ca8
_lw ra,0x2c(sp)
bne v1,v0,0x00016c1c
_or a0,s0,zero
lw t9,-0x7eac(gp)
jalr t9
_nop
lw gp,0x18(sp)
lw ra,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x30
(translation_unit "undefined4 rpl_fclose(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(param_1);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }\nLAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n  return uVar2;\n}\n\n" (function_definition "undefined4 rpl_fclose(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(param_1);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }\nLAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n  return uVar2;\n}" type_identifier (function_declarator "rpl_fclose(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(param_1);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }\nLAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "longlong lVar4;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR_fileno_0002a24c)();" (assignment_expression "iVar1 = (*(code *)PTR_fileno_0002a24c)()" identifier = (call_expression "(*(code *)PTR_fileno_0002a24c)()" (parenthesized_expression "(*(code *)PTR_fileno_0002a24c)" ( (pointer_expression "*(code *)PTR_fileno_0002a24c" * (cast_expression "(code *)PTR_fileno_0002a24c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }" { (expression_statement "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_0002a224)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" ( (pointer_expression "*(code *)PTR_fclose_0002a224" * (cast_expression "(code *)PTR_fclose_0002a224" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (return_statement "return uVar2;" return identifier ;) })) (expression_statement "iVar1 = (*(code *)PTR___freading_0002a280)();" (assignment_expression "iVar1 = (*(code *)PTR___freading_0002a280)()" identifier = (call_expression "(*(code *)PTR___freading_0002a280)()" (parenthesized_expression "(*(code *)PTR___freading_0002a280)" ( (pointer_expression "*(code *)PTR___freading_0002a280" * (cast_expression "(code *)PTR___freading_0002a280" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }" { (expression_statement "uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1)" identifier = (call_expression "(*(code *)PTR_fileno_0002a24c)(param_1)" (parenthesized_expression "(*(code *)PTR_fileno_0002a24c)" ( (pointer_expression "*(code *)PTR_fileno_0002a24c" * (cast_expression "(code *)PTR_fileno_0002a24c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);" (assignment_expression "lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1)" identifier = (call_expression "(*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1)" (parenthesized_expression "(*(code *)PTR_lseek64_0002a29c)" ( (pointer_expression "*(code *)PTR_lseek64_0002a29c" * (cast_expression "(code *)PTR_lseek64_0002a29c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,param_2,0,0,1)" ( identifier , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if (lVar4 == -1) goto LAB_00016c94;" if (parenthesized_expression "(lVar4 == -1)" ( (binary_expression "lVar4 == -1" identifier == number_literal) )) (goto_statement "goto LAB_00016c94;" goto statement_identifier ;)) })) (expression_statement "iVar1 = rpl_fflush(param_1);" (assignment_expression "iVar1 = rpl_fflush(param_1)" identifier = (call_expression "rpl_fflush(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }" { (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0002a250)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002a250)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a250)" ( (pointer_expression "*(code *)PTR___errno_location_0002a250" * (cast_expression "(code *)PTR___errno_location_0002a250" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_0002a224)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" ( (pointer_expression "*(code *)PTR_fclose_0002a224" * (cast_expression "(code *)PTR_fclose_0002a224" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      return uVar2;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return uVar2;\n    }" { (return_statement "return uVar2;" return identifier ;) })) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (return_statement "return 0xffffffff;" return number_literal ;) })) (labeled_statement "LAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" statement_identifier : (expression_statement "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_0002a224)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" ( (pointer_expression "*(code *)PTR_fclose_0002a224" * (cast_expression "(code *)PTR_fclose_0002a224" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;)) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "int rpl_fclose(FILE *fp)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  undefined4 in_a1;\n  int iVar4;\n  longlong lVar5;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n    return iVar1;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)();\n    lVar5 = (*(code *)PTR_lseek64_0002a29c)(uVar2,in_a1,0,0,1);\n    if (lVar5 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(fp);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar4 = *piVar3;\n    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n    if (iVar4 == 0) {\n      return iVar1;\n    }\n    *piVar3 = iVar4;\n    return -1;\n  }\nLAB_00016c94:\n  iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n  return iVar1;\n}\n\n" (function_definition "int rpl_fclose(FILE *fp)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  undefined4 in_a1;\n  int iVar4;\n  longlong lVar5;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n    return iVar1;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)();\n    lVar5 = (*(code *)PTR_lseek64_0002a29c)(uVar2,in_a1,0,0,1);\n    if (lVar5 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(fp);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar4 = *piVar3;\n    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n    if (iVar4 == 0) {\n      return iVar1;\n    }\n    *piVar3 = iVar4;\n    return -1;\n  }\nLAB_00016c94:\n  iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n  return iVar1;\n}" primitive_type (function_declarator "rpl_fclose(FILE *fp)" identifier (parameter_list "(FILE *fp)" ( (parameter_declaration "FILE *fp" type_identifier (pointer_declarator "*fp" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  undefined4 in_a1;\n  int iVar4;\n  longlong lVar5;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n    return iVar1;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)();\n    lVar5 = (*(code *)PTR_lseek64_0002a29c)(uVar2,in_a1,0,0,1);\n    if (lVar5 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(fp);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar4 = *piVar3;\n    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n    if (iVar4 == 0) {\n      return iVar1;\n    }\n    *piVar3 = iVar4;\n    return -1;\n  }\nLAB_00016c94:\n  iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 in_a1;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "longlong lVar5;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR_fileno_0002a24c)();" (assignment_expression "iVar1 = (*(code *)PTR_fileno_0002a24c)()" identifier = (call_expression "(*(code *)PTR_fileno_0002a24c)()" (parenthesized_expression "(*(code *)PTR_fileno_0002a24c)" ( (pointer_expression "*(code *)PTR_fileno_0002a24c" * (cast_expression "(code *)PTR_fileno_0002a24c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar1 < 0) {\n    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n    return iVar1;\n  }" { (expression_statement "iVar1 = (*(code *)PTR_fclose_0002a224)(fp);" (assignment_expression "iVar1 = (*(code *)PTR_fclose_0002a224)(fp)" identifier = (call_expression "(*(code *)PTR_fclose_0002a224)(fp)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" ( (pointer_expression "*(code *)PTR_fclose_0002a224" * (cast_expression "(code *)PTR_fclose_0002a224" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fp)" ( identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = (*(code *)PTR___freading_0002a280)();" (assignment_expression "iVar1 = (*(code *)PTR___freading_0002a280)()" identifier = (call_expression "(*(code *)PTR___freading_0002a280)()" (parenthesized_expression "(*(code *)PTR___freading_0002a280)" ( (pointer_expression "*(code *)PTR___freading_0002a280" * (cast_expression "(code *)PTR___freading_0002a280" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)();\n    lVar5 = (*(code *)PTR_lseek64_0002a29c)(uVar2,in_a1,0,0,1);\n    if (lVar5 == -1) goto LAB_00016c94;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar2 = (*(code *)PTR_fileno_0002a24c)();\n    lVar5 = (*(code *)PTR_lseek64_0002a29c)(uVar2,in_a1,0,0,1);\n    if (lVar5 == -1) goto LAB_00016c94;\n  }" { (expression_statement "uVar2 = (*(code *)PTR_fileno_0002a24c)();" (assignment_expression "uVar2 = (*(code *)PTR_fileno_0002a24c)()" identifier = (call_expression "(*(code *)PTR_fileno_0002a24c)()" (parenthesized_expression "(*(code *)PTR_fileno_0002a24c)" ( (pointer_expression "*(code *)PTR_fileno_0002a24c" * (cast_expression "(code *)PTR_fileno_0002a24c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "lVar5 = (*(code *)PTR_lseek64_0002a29c)(uVar2,in_a1,0,0,1);" (assignment_expression "lVar5 = (*(code *)PTR_lseek64_0002a29c)(uVar2,in_a1,0,0,1)" identifier = (call_expression "(*(code *)PTR_lseek64_0002a29c)(uVar2,in_a1,0,0,1)" (parenthesized_expression "(*(code *)PTR_lseek64_0002a29c)" ( (pointer_expression "*(code *)PTR_lseek64_0002a29c" * (cast_expression "(code *)PTR_lseek64_0002a29c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,in_a1,0,0,1)" ( identifier , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if (lVar5 == -1) goto LAB_00016c94;" if (parenthesized_expression "(lVar5 == -1)" ( (binary_expression "lVar5 == -1" identifier == number_literal) )) (goto_statement "goto LAB_00016c94;" goto statement_identifier ;)) })) (expression_statement "iVar1 = rpl_fflush(fp);" (assignment_expression "iVar1 = rpl_fflush(fp)" identifier = (call_expression "rpl_fflush(fp)" identifier (argument_list "(fp)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar4 = *piVar3;\n    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n    if (iVar4 == 0) {\n      return iVar1;\n    }\n    *piVar3 = iVar4;\n    return -1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar4 = *piVar3;\n    iVar1 = (*(code *)PTR_fclose_0002a224)(fp);\n    if (iVar4 == 0) {\n      return iVar1;\n    }\n    *piVar3 = iVar4;\n    return -1;\n  }" { (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0002a250)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002a250)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a250)" ( (pointer_expression "*(code *)PTR___errno_location_0002a250" * (cast_expression "(code *)PTR___errno_location_0002a250" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar4 = *piVar3;" (assignment_expression "iVar4 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "iVar1 = (*(code *)PTR_fclose_0002a224)(fp);" (assignment_expression "iVar1 = (*(code *)PTR_fclose_0002a224)(fp)" identifier = (call_expression "(*(code *)PTR_fclose_0002a224)(fp)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" ( (pointer_expression "*(code *)PTR_fclose_0002a224" * (cast_expression "(code *)PTR_fclose_0002a224" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fp)" ( identifier )))) ;) (if_statement "if (iVar4 == 0) {\n      return iVar1;\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "*piVar3 = iVar4;" (assignment_expression "*piVar3 = iVar4" (pointer_expression "*piVar3" * identifier) = identifier) ;) (return_statement "return -1;" return number_literal ;) })) (labeled_statement "LAB_00016c94:\n  iVar1 = (*(code *)PTR_fclose_0002a224)(fp);" statement_identifier : (expression_statement "iVar1 = (*(code *)PTR_fclose_0002a224)(fp);" (assignment_expression "iVar1 = (*(code *)PTR_fclose_0002a224)(fp)" identifier = (call_expression "(*(code *)PTR_fclose_0002a224)(fp)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" ( (pointer_expression "*(code *)PTR_fclose_0002a224" * (cast_expression "(code *)PTR_fclose_0002a224" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fp)" ( identifier )))) ;)) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 rpl_fclose(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(param_1);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }\nLAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n  return uVar2;\n}\n\n" (function_definition "undefined4 rpl_fclose(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(param_1);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }\nLAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n  return uVar2;\n}" type_identifier (function_declarator "rpl_fclose(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(param_1);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }\nLAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "longlong lVar4;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR_fileno_0002a24c)();" (assignment_expression "iVar1 = (*(code *)PTR_fileno_0002a24c)()" identifier = (call_expression "(*(code *)PTR_fileno_0002a24c)()" (parenthesized_expression "(*(code *)PTR_fileno_0002a24c)" ( (pointer_expression "*(code *)PTR_fileno_0002a24c" * (cast_expression "(code *)PTR_fileno_0002a24c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }" { (expression_statement "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_0002a224)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" ( (pointer_expression "*(code *)PTR_fclose_0002a224" * (cast_expression "(code *)PTR_fclose_0002a224" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (return_statement "return uVar2;" return identifier ;) })) (expression_statement "iVar1 = (*(code *)PTR___freading_0002a280)();" (assignment_expression "iVar1 = (*(code *)PTR___freading_0002a280)()" identifier = (call_expression "(*(code *)PTR___freading_0002a280)()" (parenthesized_expression "(*(code *)PTR___freading_0002a280)" ( (pointer_expression "*(code *)PTR___freading_0002a280" * (cast_expression "(code *)PTR___freading_0002a280" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }" { (expression_statement "uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1)" identifier = (call_expression "(*(code *)PTR_fileno_0002a24c)(param_1)" (parenthesized_expression "(*(code *)PTR_fileno_0002a24c)" ( (pointer_expression "*(code *)PTR_fileno_0002a24c" * (cast_expression "(code *)PTR_fileno_0002a24c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);" (assignment_expression "lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1)" identifier = (call_expression "(*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1)" (parenthesized_expression "(*(code *)PTR_lseek64_0002a29c)" ( (pointer_expression "*(code *)PTR_lseek64_0002a29c" * (cast_expression "(code *)PTR_lseek64_0002a29c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,param_2,0,0,1)" ( identifier , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if (lVar4 == -1) goto LAB_00016c94;" if (parenthesized_expression "(lVar4 == -1)" ( (binary_expression "lVar4 == -1" identifier == number_literal) )) (goto_statement "goto LAB_00016c94;" goto statement_identifier ;)) })) (expression_statement "iVar1 = rpl_fflush(param_1);" (assignment_expression "iVar1 = rpl_fflush(param_1)" identifier = (call_expression "rpl_fflush(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }" { (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0002a250)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002a250)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a250)" ( (pointer_expression "*(code *)PTR___errno_location_0002a250" * (cast_expression "(code *)PTR___errno_location_0002a250" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_0002a224)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" ( (pointer_expression "*(code *)PTR_fclose_0002a224" * (cast_expression "(code *)PTR_fclose_0002a224" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      return uVar2;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return uVar2;\n    }" { (return_statement "return uVar2;" return identifier ;) })) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (return_statement "return 0xffffffff;" return number_literal ;) })) (labeled_statement "LAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" statement_identifier : (expression_statement "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_0002a224)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" ( (pointer_expression "*(code *)PTR_fclose_0002a224" * (cast_expression "(code *)PTR_fclose_0002a224" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;)) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE 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 ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , LIT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (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 = (pointer_expression * 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 { (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;)) (return_statement return IDENT ;) })))
(function_definition "undefined4 rpl_fclose(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(param_1);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }\nLAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "rpl_fclose(undefined4 param_1,undefined4 param_2)" (identifier "rpl_fclose") (parameter_list "(undefined4 param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002a24c)();\n  if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }\n  iVar1 = (*(code *)PTR___freading_0002a280)();\n  if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }\n  iVar1 = rpl_fflush(param_1);\n  if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }\nLAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "longlong lVar4;" (type_identifier "longlong") (identifier "lVar4") (; ";")) (expression_statement "iVar1 = (*(code *)PTR_fileno_0002a24c)();" (assignment_expression "iVar1 = (*(code *)PTR_fileno_0002a24c)()" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_fileno_0002a24c)()" (parenthesized_expression "(*(code *)PTR_fileno_0002a24c)" (( "(") (pointer_expression "*(code *)PTR_fileno_0002a24c" (* "*") (cast_expression "(code *)PTR_fileno_0002a24c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fileno_0002a24c"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 < 0) {\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    return uVar2;\n  }" ({ "{") (expression_statement "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_fclose_0002a224)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" (( "(") (pointer_expression "*(code *)PTR_fclose_0002a224" (* "*") (cast_expression "(code *)PTR_fclose_0002a224" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_0002a224"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "iVar1 = (*(code *)PTR___freading_0002a280)();" (assignment_expression "iVar1 = (*(code *)PTR___freading_0002a280)()" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR___freading_0002a280)()" (parenthesized_expression "(*(code *)PTR___freading_0002a280)" (( "(") (pointer_expression "*(code *)PTR___freading_0002a280" (* "*") (cast_expression "(code *)PTR___freading_0002a280" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___freading_0002a280"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);\n    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);\n    if (lVar4 == -1) goto LAB_00016c94;\n  }" ({ "{") (expression_statement "uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_fileno_0002a24c)(param_1)" (parenthesized_expression "(*(code *)PTR_fileno_0002a24c)" (( "(") (pointer_expression "*(code *)PTR_fileno_0002a24c" (* "*") (cast_expression "(code *)PTR_fileno_0002a24c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fileno_0002a24c"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);" (assignment_expression "lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1)" (identifier "lVar4") (= "=") (call_expression "(*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1)" (parenthesized_expression "(*(code *)PTR_lseek64_0002a29c)" (( "(") (pointer_expression "*(code *)PTR_lseek64_0002a29c" (* "*") (cast_expression "(code *)PTR_lseek64_0002a29c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_lseek64_0002a29c"))) () ")")) (argument_list "(uVar2,param_2,0,0,1)" (( "(") (identifier "uVar2") (, ",") (identifier "param_2") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (lVar4 == -1) goto LAB_00016c94;" (if "if") (parenthesized_expression "(lVar4 == -1)" (( "(") (binary_expression "lVar4 == -1" (identifier "lVar4") (== "==") (number_literal "-1")) () ")")) (goto_statement "goto LAB_00016c94;" (goto "goto") (statement_identifier "LAB_00016c94") (; ";"))) (} "}"))) (expression_statement "iVar1 = rpl_fflush(param_1);" (assignment_expression "iVar1 = rpl_fflush(param_1)" (identifier "iVar1") (= "=") (call_expression "rpl_fflush(param_1)" (identifier "rpl_fflush") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\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_0002a250)();\n    iVar1 = *piVar3;\n    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);\n    if (iVar1 == 0) {\n      return uVar2;\n    }\n    *piVar3 = iVar1;\n    return 0xffffffff;\n  }" ({ "{") (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)()" (identifier "piVar3") (= "=") (cast_expression "(int *)(*(code *)PTR___errno_location_0002a250)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_0002a250)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002a250)" (( "(") (pointer_expression "*(code *)PTR___errno_location_0002a250" (* "*") (cast_expression "(code *)PTR___errno_location_0002a250" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_0002a250"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" (identifier "iVar1") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (expression_statement "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_fclose_0002a224)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" (( "(") (pointer_expression "*(code *)PTR_fclose_0002a224" (* "*") (cast_expression "(code *)PTR_fclose_0002a224" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_0002a224"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      return uVar2;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return uVar2;\n    }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (identifier "iVar1")) (; ";")) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (labeled_statement "LAB_00016c94:\n  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" (statement_identifier "LAB_00016c94") (: ":") (expression_statement "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);" (assignment_expression "uVar2 = (*(code *)PTR_fclose_0002a224)(param_1)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_fclose_0002a224)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002a224)" (( "(") (pointer_expression "*(code *)PTR_fclose_0002a224" (* "*") (cast_expression "(code *)PTR_fclose_0002a224" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_0002a224"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

int function_1(type_1 *fp)

{
  int var_1;
  type_2 uVar2;
  int *piVar3;
  type_2 in_a1;
  int var_4;
  type_3 var_2;
  
  var_1 = (*(type_4 *)PTR_fileno_0002a24c)();
  if (var_1 < 0) {
    var_1 = (*(type_4 *)PTR_fclose_0002a224)(fp);
    return var_1;
  }
  var_1 = (*(type_4 *)PTR___freading_0002a280)();
  if (var_1 != 0) {
    uVar2 = (*(type_4 *)PTR_fileno_0002a24c)();
    var_2 = (*(type_4 *)PTR_lseek64_0002a29c)(uVar2,in_a1,0,0,1);
    if (var_2 == -1) goto LAB_00016c94;
  }
  var_1 = var_3(fp);
  if (var_1 != 0) {
    piVar3 = (int *)(*(type_4 *)PTR___errno_location_0002a250)();
    var_4 = *piVar3;
    var_1 = (*(type_4 *)PTR_fclose_0002a224)(fp);
    if (var_4 == 0) {
      return var_1;
    }
    *piVar3 = var_4;
    return -1;
  }
LAB_00016c94:
  var_1 = (*(type_4 *)PTR_fclose_0002a224)(fp);
  return var_1;
}


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

undefined4 MASKED(undefined4 param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  int *piVar3;
  longlong lVar4;
  
  iVar1 = (*(code *)PTR_fileno_0002a24c)();
  if (iVar1 < 0) {
    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);
    return uVar2;
  }
  iVar1 = (*(code *)PTR___freading_0002a280)();
  if (iVar1 != 0) {
    uVar2 = (*(code *)PTR_fileno_0002a24c)(param_1);
    lVar4 = (*(code *)PTR_lseek64_0002a29c)(uVar2,param_2,0,0,1);
    if (lVar4 == -1) goto LAB_00016c94;
  }
  iVar1 = rpl_fflush(param_1);
  if (iVar1 != 0) {
    piVar3 = (int *)(*(code *)PTR___errno_location_0002a250)();
    iVar1 = *piVar3;
    uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);
    if (iVar1 == 0) {
      return uVar2;
    }
    *piVar3 = iVar1;
    return 0xffffffff;
  }
LAB_00016c94:
  uVar2 = (*(code *)PTR_fclose_0002a224)(param_1);
  return uVar2;
}

