
int rpl_fclose(FILE *fp)

{
  int iVar1;
  int *piVar2;
  undefined4 uVar3;
  undefined4 in_a1;
  int iVar4;
  longlong lVar5;
  
  iVar1 = (*(code *)PTR_fileno_0002d26c)();
  if (-1 < iVar1) {
    iVar1 = (*(code *)PTR___freading_0002d29c)(fp);
    if (iVar1 != 0) {
      uVar3 = (*(code *)PTR_fileno_0002d26c)(fp);
      lVar5 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1);
      if (lVar5 == -1) goto LAB_0001885c;
    }
    iVar1 = rpl_fflush(fp);
    if (iVar1 != 0) {
      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();
      iVar4 = *piVar2;
      iVar1 = (*(code *)PTR_fclose_0002d240)(fp);
      if (iVar4 != 0) {
        iVar1 = -1;
        *piVar2 = iVar4;
      }
      return iVar1;
    }
  }
LAB_0001885c:
                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  iVar1 = (*(code *)PTR_fclose_0002d240)(fp);
  return iVar1;
}



undefined4 rpl_fclose(undefined4 param_1,undefined4 param_2)

{
  int iVar1;
  int *piVar2;
  undefined4 uVar3;
  longlong lVar4;
  
  iVar1 = (*(code *)PTR_fileno_0002d26c)();
  if (-1 < iVar1) {
    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);
    if (iVar1 != 0) {
      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);
      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);
      if (lVar4 == -1) goto LAB_0001885c;
    }
    iVar1 = rpl_fflush(param_1);
    if (iVar1 != 0) {
      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();
      iVar1 = *piVar2;
      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);
      if (iVar1 != 0) {
        uVar3 = 0xffffffff;
        *piVar2 = iVar1;
      }
      return uVar3;
    }
  }
LAB_0001885c:
                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);
  return uVar3;
}


lui gp,0x2
addiu gp,gp,-0x36b0
addu gp,gp,t9
addiu sp,sp,-0x30
lw t9,-0x7e64(gp)
sw gp,0x18(sp)
sw s0,0x24(sp)
or s0,a0,zero
sw ra,0x2c(sp)
jalr t9
_sw s1,0x28(sp)
bltz v0,0x0001885c
_lw gp,0x18(sp)
lw t9,-0x7e34(gp)
jalr t9
_or a0,s0,zero
bne v0,zero,0x0001881c
_lw gp,0x18(sp)
lw t9,-0x7f00(gp)
bal 0x00018a50
_or a0,s0,zero
beq v0,zero,0x0001885c
_lw gp,0x18(sp)
lw t9,-0x7e60(gp)
jalr t9
_nop
or a0,s0,zero
lw gp,0x18(sp)
or s0,v0,zero
lw t9,-0x7e90(gp)
jalr t9
_lw s1,0x0(v0)
bne s1,zero,0x00018878
_nop
lw ra,0x2c(sp)
lw s1,0x28(sp)
lw s0,0x24(sp)
jr ra
_addiu sp,sp,0x30
lw t9,-0x7e64(gp)
jalr t9
_or a0,s0,zero
or a3,zero,zero
lw gp,0x18(sp)
or a0,v0,zero
li v0,0x1
or a2,zero,zero
lw t9,-0x7e1c(gp)
jalr t9
_sw v0,0x10(sp)
li a0,-0x1
bne v0,a0,0x000187c8
_lw gp,0x18(sp)
bne v1,v0,0x000187cc
_lw t9,-0x7f00(gp)
lw ra,0x2c(sp)
or a0,s0,zero
lw s1,0x28(sp)
lw s0,0x24(sp)
lw t9,-0x7e90(gp)
jr t9
_addiu sp,sp,0x30
li v0,-0x1
b 0x00018808
_sw s1,0x0(s0)
(translation_unit "undefined4 rpl_fclose(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }\nLAB_0001885c:\n                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n  return uVar3;\n}\n\n" (function_definition "undefined4 rpl_fclose(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }\nLAB_0001885c:\n                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n  return uVar3;\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  int *piVar2;\n  undefined4 uVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }\nLAB_0001885c:\n                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "longlong lVar4;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR_fileno_0002d26c)();" (assignment_expression "iVar1 = (*(code *)PTR_fileno_0002d26c)()" identifier = (call_expression "(*(code *)PTR_fileno_0002d26c)()" (parenthesized_expression "(*(code *)PTR_fileno_0002d26c)" ( (pointer_expression "*(code *)PTR_fileno_0002d26c" * (cast_expression "(code *)PTR_fileno_0002d26c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }" { (expression_statement "iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);" (assignment_expression "iVar1 = (*(code *)PTR___freading_0002d29c)(param_1)" identifier = (call_expression "(*(code *)PTR___freading_0002d29c)(param_1)" (parenthesized_expression "(*(code *)PTR___freading_0002d29c)" ( (pointer_expression "*(code *)PTR___freading_0002d29c" * (cast_expression "(code *)PTR___freading_0002d29c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }" { (expression_statement "uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);" (assignment_expression "uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1)" identifier = (call_expression "(*(code *)PTR_fileno_0002d26c)(param_1)" (parenthesized_expression "(*(code *)PTR_fileno_0002d26c)" ( (pointer_expression "*(code *)PTR_fileno_0002d26c" * (cast_expression "(code *)PTR_fileno_0002d26c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);" (assignment_expression "lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1)" identifier = (call_expression "(*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1)" (parenthesized_expression "(*(code *)PTR_lseek64_0002d2b4)" ( (pointer_expression "*(code *)PTR_lseek64_0002d2b4" * (cast_expression "(code *)PTR_lseek64_0002d2b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3,param_2,0,0,1)" ( identifier , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if (lVar4 == -1) goto LAB_0001885c;" if (parenthesized_expression "(lVar4 == -1)" ( (binary_expression "lVar4 == -1" identifier == number_literal) )) (goto_statement "goto LAB_0001885c;" 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      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }" { (expression_statement "piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();" (assignment_expression "piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0002d270)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002d270)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002d270)" ( (pointer_expression "*(code *)PTR___errno_location_0002d270" * (cast_expression "(code *)PTR___errno_location_0002d270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);" (assignment_expression "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_0002d240)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002d240)" ( (pointer_expression "*(code *)PTR_fclose_0002d240" * (cast_expression "(code *)PTR_fclose_0002d240" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) })) (return_statement "return uVar3;" return identifier ;) })) })) (labeled_statement "LAB_0001885c:\n                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);" statement_identifier : comment comment (expression_statement "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);" (assignment_expression "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_0002d240)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002d240)" ( (pointer_expression "*(code *)PTR_fclose_0002d240" * (cast_expression "(code *)PTR_fclose_0002d240" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;)) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "int rpl_fclose(FILE *fp)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  undefined4 in_a1;\n  int iVar4;\n  longlong lVar5;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(fp);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(fp);\n      lVar5 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1);\n      if (lVar5 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(fp);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar4 = *piVar2;\n      iVar1 = (*(code *)PTR_fclose_0002d240)(fp);\n      if (iVar4 != 0) {\n        iVar1 = -1;\n        *piVar2 = iVar4;\n      }\n      return iVar1;\n    }\n  }\nLAB_0001885c:\n                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  iVar1 = (*(code *)PTR_fclose_0002d240)(fp);\n  return iVar1;\n}\n\n" (function_definition "int rpl_fclose(FILE *fp)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  undefined4 in_a1;\n  int iVar4;\n  longlong lVar5;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(fp);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(fp);\n      lVar5 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1);\n      if (lVar5 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(fp);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar4 = *piVar2;\n      iVar1 = (*(code *)PTR_fclose_0002d240)(fp);\n      if (iVar4 != 0) {\n        iVar1 = -1;\n        *piVar2 = iVar4;\n      }\n      return iVar1;\n    }\n  }\nLAB_0001885c:\n                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  iVar1 = (*(code *)PTR_fclose_0002d240)(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  int *piVar2;\n  undefined4 uVar3;\n  undefined4 in_a1;\n  int iVar4;\n  longlong lVar5;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(fp);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(fp);\n      lVar5 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1);\n      if (lVar5 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(fp);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar4 = *piVar2;\n      iVar1 = (*(code *)PTR_fclose_0002d240)(fp);\n      if (iVar4 != 0) {\n        iVar1 = -1;\n        *piVar2 = iVar4;\n      }\n      return iVar1;\n    }\n  }\nLAB_0001885c:\n                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  iVar1 = (*(code *)PTR_fclose_0002d240)(fp);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier 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_0002d26c)();" (assignment_expression "iVar1 = (*(code *)PTR_fileno_0002d26c)()" identifier = (call_expression "(*(code *)PTR_fileno_0002d26c)()" (parenthesized_expression "(*(code *)PTR_fileno_0002d26c)" ( (pointer_expression "*(code *)PTR_fileno_0002d26c" * (cast_expression "(code *)PTR_fileno_0002d26c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(fp);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(fp);\n      lVar5 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1);\n      if (lVar5 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(fp);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar4 = *piVar2;\n      iVar1 = (*(code *)PTR_fclose_0002d240)(fp);\n      if (iVar4 != 0) {\n        iVar1 = -1;\n        *piVar2 = iVar4;\n      }\n      return iVar1;\n    }\n  }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n    iVar1 = (*(code *)PTR___freading_0002d29c)(fp);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(fp);\n      lVar5 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1);\n      if (lVar5 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(fp);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar4 = *piVar2;\n      iVar1 = (*(code *)PTR_fclose_0002d240)(fp);\n      if (iVar4 != 0) {\n        iVar1 = -1;\n        *piVar2 = iVar4;\n      }\n      return iVar1;\n    }\n  }" { (expression_statement "iVar1 = (*(code *)PTR___freading_0002d29c)(fp);" (assignment_expression "iVar1 = (*(code *)PTR___freading_0002d29c)(fp)" identifier = (call_expression "(*(code *)PTR___freading_0002d29c)(fp)" (parenthesized_expression "(*(code *)PTR___freading_0002d29c)" ( (pointer_expression "*(code *)PTR___freading_0002d29c" * (cast_expression "(code *)PTR___freading_0002d29c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fp)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(fp);\n      lVar5 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1);\n      if (lVar5 == -1) goto LAB_0001885c;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(fp);\n      lVar5 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1);\n      if (lVar5 == -1) goto LAB_0001885c;\n    }" { (expression_statement "uVar3 = (*(code *)PTR_fileno_0002d26c)(fp);" (assignment_expression "uVar3 = (*(code *)PTR_fileno_0002d26c)(fp)" identifier = (call_expression "(*(code *)PTR_fileno_0002d26c)(fp)" (parenthesized_expression "(*(code *)PTR_fileno_0002d26c)" ( (pointer_expression "*(code *)PTR_fileno_0002d26c" * (cast_expression "(code *)PTR_fileno_0002d26c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fp)" ( identifier )))) ;) (expression_statement "lVar5 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1);" (assignment_expression "lVar5 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1)" identifier = (call_expression "(*(code *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1)" (parenthesized_expression "(*(code *)PTR_lseek64_0002d2b4)" ( (pointer_expression "*(code *)PTR_lseek64_0002d2b4" * (cast_expression "(code *)PTR_lseek64_0002d2b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3,in_a1,0,0,1)" ( identifier , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if (lVar5 == -1) goto LAB_0001885c;" if (parenthesized_expression "(lVar5 == -1)" ( (binary_expression "lVar5 == -1" identifier == number_literal) )) (goto_statement "goto LAB_0001885c;" 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      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar4 = *piVar2;\n      iVar1 = (*(code *)PTR_fclose_0002d240)(fp);\n      if (iVar4 != 0) {\n        iVar1 = -1;\n        *piVar2 = iVar4;\n      }\n      return iVar1;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar4 = *piVar2;\n      iVar1 = (*(code *)PTR_fclose_0002d240)(fp);\n      if (iVar4 != 0) {\n        iVar1 = -1;\n        *piVar2 = iVar4;\n      }\n      return iVar1;\n    }" { (expression_statement "piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();" (assignment_expression "piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0002d270)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002d270)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002d270)" ( (pointer_expression "*(code *)PTR___errno_location_0002d270" * (cast_expression "(code *)PTR___errno_location_0002d270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar4 = *piVar2;" (assignment_expression "iVar4 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "iVar1 = (*(code *)PTR_fclose_0002d240)(fp);" (assignment_expression "iVar1 = (*(code *)PTR_fclose_0002d240)(fp)" identifier = (call_expression "(*(code *)PTR_fclose_0002d240)(fp)" (parenthesized_expression "(*(code *)PTR_fclose_0002d240)" ( (pointer_expression "*(code *)PTR_fclose_0002d240" * (cast_expression "(code *)PTR_fclose_0002d240" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fp)" ( identifier )))) ;) (if_statement "if (iVar4 != 0) {\n        iVar1 = -1;\n        *piVar2 = iVar4;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        iVar1 = -1;\n        *piVar2 = iVar4;\n      }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) (expression_statement "*piVar2 = iVar4;" (assignment_expression "*piVar2 = iVar4" (pointer_expression "*piVar2" * identifier) = identifier) ;) })) (return_statement "return iVar1;" return identifier ;) })) })) (labeled_statement "LAB_0001885c:\n                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  iVar1 = (*(code *)PTR_fclose_0002d240)(fp);" statement_identifier : comment comment (expression_statement "iVar1 = (*(code *)PTR_fclose_0002d240)(fp);" (assignment_expression "iVar1 = (*(code *)PTR_fclose_0002d240)(fp)" identifier = (call_expression "(*(code *)PTR_fclose_0002d240)(fp)" (parenthesized_expression "(*(code *)PTR_fclose_0002d240)" ( (pointer_expression "*(code *)PTR_fclose_0002d240" * (cast_expression "(code *)PTR_fclose_0002d240" ( (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  int *piVar2;\n  undefined4 uVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }\nLAB_0001885c:\n                    \n                    \n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n  return uVar3;\n}\n\n" (function_definition "undefined4 rpl_fclose(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }\nLAB_0001885c:\n                    \n                    \n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n  return uVar3;\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  int *piVar2;\n  undefined4 uVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }\nLAB_0001885c:\n                    \n                    \n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "longlong lVar4;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR_fileno_0002d26c)();" (assignment_expression "iVar1 = (*(code *)PTR_fileno_0002d26c)()" identifier = (call_expression "(*(code *)PTR_fileno_0002d26c)()" (parenthesized_expression "(*(code *)PTR_fileno_0002d26c)" ( (pointer_expression "*(code *)PTR_fileno_0002d26c" * (cast_expression "(code *)PTR_fileno_0002d26c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }" { (expression_statement "iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);" (assignment_expression "iVar1 = (*(code *)PTR___freading_0002d29c)(param_1)" identifier = (call_expression "(*(code *)PTR___freading_0002d29c)(param_1)" (parenthesized_expression "(*(code *)PTR___freading_0002d29c)" ( (pointer_expression "*(code *)PTR___freading_0002d29c" * (cast_expression "(code *)PTR___freading_0002d29c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }" { (expression_statement "uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);" (assignment_expression "uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1)" identifier = (call_expression "(*(code *)PTR_fileno_0002d26c)(param_1)" (parenthesized_expression "(*(code *)PTR_fileno_0002d26c)" ( (pointer_expression "*(code *)PTR_fileno_0002d26c" * (cast_expression "(code *)PTR_fileno_0002d26c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);" (assignment_expression "lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1)" identifier = (call_expression "(*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1)" (parenthesized_expression "(*(code *)PTR_lseek64_0002d2b4)" ( (pointer_expression "*(code *)PTR_lseek64_0002d2b4" * (cast_expression "(code *)PTR_lseek64_0002d2b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3,param_2,0,0,1)" ( identifier , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if (lVar4 == -1) goto LAB_0001885c;" if (parenthesized_expression "(lVar4 == -1)" ( (binary_expression "lVar4 == -1" identifier == number_literal) )) (goto_statement "goto LAB_0001885c;" 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      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }" { (expression_statement "piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();" (assignment_expression "piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0002d270)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0002d270)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002d270)" ( (pointer_expression "*(code *)PTR___errno_location_0002d270" * (cast_expression "(code *)PTR___errno_location_0002d270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);" (assignment_expression "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_0002d240)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002d240)" ( (pointer_expression "*(code *)PTR_fclose_0002d240" * (cast_expression "(code *)PTR_fclose_0002d240" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) })) (return_statement "return uVar3;" return identifier ;) })) })) (labeled_statement "LAB_0001885c:\n                    \n                    \n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);" statement_identifier : (expression_statement "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);" (assignment_expression "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1)" identifier = (call_expression "(*(code *)PTR_fclose_0002d240)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002d240)" ( (pointer_expression "*(code *)PTR_fclose_0002d240" * (cast_expression "(code *)PTR_fclose_0002d240" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;)) (return_statement "return uVar3;" 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 (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (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 )))) ;) (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 { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (return_statement return IDENT ;) })) })) (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  int *piVar2;\n  undefined4 uVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }\nLAB_0001885c:\n                    \n                    \n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n  return uVar3;\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  int *piVar2;\n  undefined4 uVar3;\n  longlong lVar4;\n  \n  iVar1 = (*(code *)PTR_fileno_0002d26c)();\n  if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }\nLAB_0001885c:\n                    \n                    \n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n  return uVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "longlong lVar4;" (type_identifier "longlong") (identifier "lVar4") (; ";")) (expression_statement "iVar1 = (*(code *)PTR_fileno_0002d26c)();" (assignment_expression "iVar1 = (*(code *)PTR_fileno_0002d26c)()" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_fileno_0002d26c)()" (parenthesized_expression "(*(code *)PTR_fileno_0002d26c)" (( "(") (pointer_expression "*(code *)PTR_fileno_0002d26c" (* "*") (cast_expression "(code *)PTR_fileno_0002d26c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fileno_0002d26c"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (-1 < iVar1) {\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }" (if "if") (parenthesized_expression "(-1 < iVar1)" (( "(") (binary_expression "-1 < iVar1" (number_literal "-1") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);\n    if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }\n    iVar1 = rpl_fflush(param_1);\n    if (iVar1 != 0) {\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }\n  }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);" (assignment_expression "iVar1 = (*(code *)PTR___freading_0002d29c)(param_1)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR___freading_0002d29c)(param_1)" (parenthesized_expression "(*(code *)PTR___freading_0002d29c)" (( "(") (pointer_expression "*(code *)PTR___freading_0002d29c" (* "*") (cast_expression "(code *)PTR___freading_0002d29c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___freading_0002d29c"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);\n      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);\n      if (lVar4 == -1) goto LAB_0001885c;\n    }" ({ "{") (expression_statement "uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);" (assignment_expression "uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1)" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_fileno_0002d26c)(param_1)" (parenthesized_expression "(*(code *)PTR_fileno_0002d26c)" (( "(") (pointer_expression "*(code *)PTR_fileno_0002d26c" (* "*") (cast_expression "(code *)PTR_fileno_0002d26c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fileno_0002d26c"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);" (assignment_expression "lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1)" (identifier "lVar4") (= "=") (call_expression "(*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1)" (parenthesized_expression "(*(code *)PTR_lseek64_0002d2b4)" (( "(") (pointer_expression "*(code *)PTR_lseek64_0002d2b4" (* "*") (cast_expression "(code *)PTR_lseek64_0002d2b4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_lseek64_0002d2b4"))) () ")")) (argument_list "(uVar3,param_2,0,0,1)" (( "(") (identifier "uVar3") (, ",") (identifier "param_2") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (lVar4 == -1) goto LAB_0001885c;" (if "if") (parenthesized_expression "(lVar4 == -1)" (( "(") (binary_expression "lVar4 == -1" (identifier "lVar4") (== "==") (number_literal "-1")) () ")")) (goto_statement "goto LAB_0001885c;" (goto "goto") (statement_identifier "LAB_0001885c") (; ";"))) (} "}"))) (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      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();\n      iVar1 = *piVar2;\n      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);\n      if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }\n      return uVar3;\n    }" ({ "{") (expression_statement "piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();" (assignment_expression "piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)()" (identifier "piVar2") (= "=") (cast_expression "(int *)(*(code *)PTR___errno_location_0002d270)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_0002d270)()" (parenthesized_expression "(*(code *)PTR___errno_location_0002d270)" (( "(") (pointer_expression "*(code *)PTR___errno_location_0002d270" (* "*") (cast_expression "(code *)PTR___errno_location_0002d270" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_0002d270"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" (identifier "iVar1") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (expression_statement "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);" (assignment_expression "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1)" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_fclose_0002d240)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002d240)" (( "(") (pointer_expression "*(code *)PTR_fclose_0002d240" (* "*") (cast_expression "(code *)PTR_fclose_0002d240" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_0002d240"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar3 = 0xffffffff;\n        *piVar2 = iVar1;\n      }" ({ "{") (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" (identifier "uVar3") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (} "}"))) (labeled_statement "LAB_0001885c:\n                    \n                    \n  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);" (statement_identifier "LAB_0001885c") (: ":") (expression_statement "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);" (assignment_expression "uVar3 = (*(code *)PTR_fclose_0002d240)(param_1)" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_fclose_0002d240)(param_1)" (parenthesized_expression "(*(code *)PTR_fclose_0002d240)" (( "(") (pointer_expression "*(code *)PTR_fclose_0002d240" (* "*") (cast_expression "(code *)PTR_fclose_0002d240" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_0002d240"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";"))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

int function_1(type_1 *fp)

{
  int var_1;
  int *piVar2;
  type_2 uVar3;
  type_2 in_a1;
  int var_4;
  type_3 var_2;
  
  var_1 = (*(type_4 *)PTR_fileno_0002d26c)();
  if (-1 < var_1) {
    var_1 = (*(type_4 *)PTR___freading_0002d29c)(fp);
    if (var_1 != 0) {
      uVar3 = (*(type_4 *)PTR_fileno_0002d26c)(fp);
      var_2 = (*(type_4 *)PTR_lseek64_0002d2b4)(uVar3,in_a1,0,0,1);
      if (var_2 == -1) goto LAB_0001885c;
    }
    var_1 = var_3(fp);
    if (var_1 != 0) {
      piVar2 = (int *)(*(type_4 *)PTR___errno_location_0002d270)();
      var_4 = *piVar2;
      var_1 = (*(type_4 *)PTR_fclose_0002d240)(fp);
      if (var_4 != 0) {
        var_1 = -1;
        *piVar2 = var_4;
      }
      return var_1;
    }
  }
LAB_0001885c:
                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  var_1 = (*(type_4 *)PTR_fclose_0002d240)(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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) 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))))) (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 (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))))) (return_statement (identifier)))))) (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;
  int *piVar2;
  undefined4 uVar3;
  longlong lVar4;
  
  iVar1 = (*(code *)PTR_fileno_0002d26c)();
  if (-1 < iVar1) {
    iVar1 = (*(code *)PTR___freading_0002d29c)(param_1);
    if (iVar1 != 0) {
      uVar3 = (*(code *)PTR_fileno_0002d26c)(param_1);
      lVar4 = (*(code *)PTR_lseek64_0002d2b4)(uVar3,param_2,0,0,1);
      if (lVar4 == -1) goto LAB_0001885c;
    }
    iVar1 = rpl_fflush(param_1);
    if (iVar1 != 0) {
      piVar2 = (int *)(*(code *)PTR___errno_location_0002d270)();
      iVar1 = *piVar2;
      uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);
      if (iVar1 != 0) {
        uVar3 = 0xffffffff;
        *piVar2 = iVar1;
      }
      return uVar3;
    }
  }
LAB_0001885c:
                    /* WARNING: Could not recover jumptable at 0x00018870. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  uVar3 = (*(code *)PTR_fclose_0002d240)(param_1);
  return uVar3;
}

