
char * read_body(FILE *fp)

{
  char *pcVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  iVar5 = 0x80;
  pcVar1 = (char *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);
  *pcVar1 = '\0';
  iVar3 = 0;
  while( true ) {
    iVar4 = iVar3 + 1;
    iVar2 = (*(code *)PTR_fgetc_000b2e00)(fp);
    if ((iVar2 == 0xd) || (iVar2 == 10)) break;
    if (iVar2 == -1) {
      return pcVar1;
    }
    if (iVar5 <= iVar4) {
      iVar5 = iVar5 + 0x80;
      pcVar1 = (char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1);
    }
    pcVar1[iVar3] = (char)iVar2;
    pcVar1[iVar4] = '\0';
    iVar3 = iVar4;
  }
  iVar3 = (*(code *)PTR_fgetc_000b2e00)(fp);
  if ((iVar3 != 0xd) && (iVar3 != 10)) {
    (*(code *)PTR_ungetc_000b2e20)(iVar3,fp);
  }
  return pcVar1;
}



undefined1 * FUN_0006af34(undefined4 param_1)

{
  undefined1 *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  iVar5 = 0x80;
  puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);
  *puVar1 = 0;
  iVar3 = 0;
  while( true ) {
    iVar4 = iVar3 + 1;
    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);
    if ((iVar2 == 0xd) || (iVar2 == 10)) break;
    if (iVar2 == -1) {
      return puVar1;
    }
    if (iVar5 <= iVar4) {
      iVar5 = iVar5 + 0x80;
      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);
    }
    puVar1[iVar3] = (char)iVar2;
    puVar1[iVar4] = 0;
    iVar3 = iVar4;
  }
  iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);
  if ((iVar3 != 0xd) && (iVar3 != 10)) {
    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);
  }
  return puVar1;
}


lui gp,0x5
addiu gp,gp,-0xbc4
addu gp,gp,t9
addiu sp,sp,-0x40
lw t9,-0x7f68(gp)
li a1,0x1
sw s5,0x2c(sp)
or s5,a0,zero
li a0,0x80
sw gp,0x10(sp)
sw s8,0x38(sp)
li s8,-0x1
sw s7,0x34(sp)
li s7,0xa
sw s6,0x30(sp)
li s6,0xd
sw s4,0x28(sp)
li s4,0x80
sw s3,0x24(sp)
sw s2,0x20(sp)
or s2,zero,zero
sw ra,0x3c(sp)
sw s1,0x1c(sp)
jalr t9
_sw s0,0x18(sp)
lw gp,0x10(sp)
or s3,v0,zero
b 0x0006afbc
_sb zero,0x0(v0)
addu v1,s3,s2
addu v0,s3,s1
or s2,s1,zero
sb s0,0x0(v1)
sb zero,0x0(v0)
lw t9,-0x7570(gp)
or a0,s5,zero
jalr t9
_addiu s1,s2,0x1
slt v1,s1,s4
lw gp,0x10(sp)
beq v0,s6,0x0006b018
_or s0,v0,zero
beq v0,s7,0x0006b01c
_lw t9,-0x7570(gp)
beq v0,s8,0x0006b050
_lw ra,0x3c(sp)
bne v1,zero,0x0006afac
_addu v1,s3,s2
lw t9,-0x7fb4(gp)
addiu s4,s4,0x80
li a2,0x1
or a0,s3,zero
jalr t9
_or a1,s4,zero
lw gp,0x10(sp)
b 0x0006afa8
_or s3,v0,zero
lw t9,-0x7570(gp)
jalr t9
_or a0,s5,zero
li v1,0xd
beq v0,v1,0x0006b04c
_lw gp,0x10(sp)
li v1,0xa
beq v0,v1,0x0006b050
_lw ra,0x3c(sp)
lw t9,-0x7550(gp)
or a1,s5,zero
jalr t9
_or a0,v0,zero
lw ra,0x3c(sp)
or v0,s3,zero
lw s8,0x38(sp)
lw s7,0x34(sp)
lw s6,0x30(sp)
lw s5,0x2c(sp)
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x40
(translation_unit "undefined1 * FUN_0006af34(undefined4 param_1)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *puVar1 = 0;\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }\n  return puVar1;\n}\n\n" (function_definition "undefined1 * FUN_0006af34(undefined4 param_1)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *puVar1 = 0;\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_0006af34(undefined4 param_1)" * (function_declarator "FUN_0006af34(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) )))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *puVar1 = 0;\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }\n  return puVar1;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" identifier = number_literal) ;) (expression_statement "puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);" (assignment_expression "puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_safemalloc_000b2408)(0x80,1)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b2408)" ( (pointer_expression "*(code *)PTR_safemalloc_000b2408" * (cast_expression "(code *)PTR_safemalloc_000b2408" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0x80,1)" ( number_literal , number_literal ))))) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }" { (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);" (assignment_expression "iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1)" identifier = (call_expression "(*(code *)PTR_fgetc_000b2e00)(param_1)" (parenthesized_expression "(*(code *)PTR_fgetc_000b2e00)" ( (pointer_expression "*(code *)PTR_fgetc_000b2e00" * (cast_expression "(code *)PTR_fgetc_000b2e00" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((iVar2 == 0xd) || (iVar2 == 10)) break;" if (parenthesized_expression "((iVar2 == 0xd) || (iVar2 == 10))" ( (binary_expression "(iVar2 == 0xd) || (iVar2 == 10)" (parenthesized_expression "(iVar2 == 0xd)" ( (binary_expression "iVar2 == 0xd" identifier == number_literal) )) || (parenthesized_expression "(iVar2 == 10)" ( (binary_expression "iVar2 == 10" identifier == number_literal) ))) )) (break_statement "break;" break ;)) (if_statement "if (iVar2 == -1) {\n      return puVar1;\n    }" if (parenthesized_expression "(iVar2 == -1)" ( (binary_expression "iVar2 == -1" identifier == number_literal) )) (compound_statement "{\n      return puVar1;\n    }" { (return_statement "return puVar1;" return identifier ;) })) (if_statement "if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }" if (parenthesized_expression "(iVar5 <= iVar4)" ( (binary_expression "iVar5 <= iVar4" identifier <= identifier) )) (compound_statement "{\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }" { (expression_statement "iVar5 = iVar5 + 0x80;" (assignment_expression "iVar5 = iVar5 + 0x80" identifier = (binary_expression "iVar5 + 0x80" identifier + number_literal)) ;) (expression_statement "puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);" (assignment_expression "puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1)" (parenthesized_expression "(*(code *)PTR_saferealloc_000b23bc)" ( (pointer_expression "*(code *)PTR_saferealloc_000b23bc" * (cast_expression "(code *)PTR_saferealloc_000b23bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar1,iVar5,1)" ( identifier , identifier , number_literal ))))) ;) })) (expression_statement "puVar1[iVar3] = (char)iVar2;" (assignment_expression "puVar1[iVar3] = (char)iVar2" (subscript_expression "puVar1[iVar3]" identifier [ identifier ]) = (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "puVar1[iVar4] = 0;" (assignment_expression "puVar1[iVar4] = 0" (subscript_expression "puVar1[iVar4]" identifier [ identifier ]) = number_literal) ;) (expression_statement "iVar3 = iVar4;" (assignment_expression "iVar3 = iVar4" identifier = identifier) ;) })) (expression_statement "iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);" (assignment_expression "iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1)" identifier = (call_expression "(*(code *)PTR_fgetc_000b2e00)(param_1)" (parenthesized_expression "(*(code *)PTR_fgetc_000b2e00)" ( (pointer_expression "*(code *)PTR_fgetc_000b2e00" * (cast_expression "(code *)PTR_fgetc_000b2e00" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }" if (parenthesized_expression "((iVar3 != 0xd) && (iVar3 != 10))" ( (binary_expression "(iVar3 != 0xd) && (iVar3 != 10)" (parenthesized_expression "(iVar3 != 0xd)" ( (binary_expression "iVar3 != 0xd" identifier != number_literal) )) && (parenthesized_expression "(iVar3 != 10)" ( (binary_expression "iVar3 != 10" identifier != number_literal) ))) )) (compound_statement "{\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }" { (expression_statement "(*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);" (call_expression "(*(code *)PTR_ungetc_000b2e20)(iVar3,param_1)" (parenthesized_expression "(*(code *)PTR_ungetc_000b2e20)" ( (pointer_expression "*(code *)PTR_ungetc_000b2e20" * (cast_expression "(code *)PTR_ungetc_000b2e20" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3,param_1)" ( identifier , identifier ))) ;) })) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit "char * read_body(FILE *fp)\n\n{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  pcVar1 = (char *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *pcVar1 = '\0';\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(fp);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return pcVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      pcVar1 = (char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1);\n    }\n    pcVar1[iVar3] = (char)iVar2;\n    pcVar1[iVar4] = '\0';\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(fp);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,fp);\n  }\n  return pcVar1;\n}\n\n" (function_definition "char * read_body(FILE *fp)\n\n{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  pcVar1 = (char *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *pcVar1 = '\0';\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(fp);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return pcVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      pcVar1 = (char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1);\n    }\n    pcVar1[iVar3] = (char)iVar2;\n    pcVar1[iVar4] = '\0';\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(fp);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,fp);\n  }\n  return pcVar1;\n}" primitive_type (pointer_declarator "* read_body(FILE *fp)" * (function_declarator "read_body(FILE *fp)" identifier (parameter_list "(FILE *fp)" ( (parameter_declaration "FILE *fp" type_identifier (pointer_declarator "*fp" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  pcVar1 = (char *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *pcVar1 = '\0';\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(fp);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return pcVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      pcVar1 = (char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1);\n    }\n    pcVar1[iVar3] = (char)iVar2;\n    pcVar1[iVar4] = '\0';\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(fp);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,fp);\n  }\n  return pcVar1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" identifier = number_literal) ;) (expression_statement "pcVar1 = (char *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_safemalloc_000b2408)(0x80,1)" identifier = (cast_expression "(char *)(*(code *)PTR_safemalloc_000b2408)(0x80,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_safemalloc_000b2408)(0x80,1)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b2408)" ( (pointer_expression "*(code *)PTR_safemalloc_000b2408" * (cast_expression "(code *)PTR_safemalloc_000b2408" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0x80,1)" ( number_literal , number_literal ))))) ;) (expression_statement "*pcVar1 = '\0';" (assignment_expression "*pcVar1 = '\0'" (pointer_expression "*pcVar1" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(fp);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return pcVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      pcVar1 = (char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1);\n    }\n    pcVar1[iVar3] = (char)iVar2;\n    pcVar1[iVar4] = '\0';\n    iVar3 = iVar4;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(fp);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return pcVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      pcVar1 = (char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1);\n    }\n    pcVar1[iVar3] = (char)iVar2;\n    pcVar1[iVar4] = '\0';\n    iVar3 = iVar4;\n  }" { (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "iVar2 = (*(code *)PTR_fgetc_000b2e00)(fp);" (assignment_expression "iVar2 = (*(code *)PTR_fgetc_000b2e00)(fp)" identifier = (call_expression "(*(code *)PTR_fgetc_000b2e00)(fp)" (parenthesized_expression "(*(code *)PTR_fgetc_000b2e00)" ( (pointer_expression "*(code *)PTR_fgetc_000b2e00" * (cast_expression "(code *)PTR_fgetc_000b2e00" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fp)" ( identifier )))) ;) (if_statement "if ((iVar2 == 0xd) || (iVar2 == 10)) break;" if (parenthesized_expression "((iVar2 == 0xd) || (iVar2 == 10))" ( (binary_expression "(iVar2 == 0xd) || (iVar2 == 10)" (parenthesized_expression "(iVar2 == 0xd)" ( (binary_expression "iVar2 == 0xd" identifier == number_literal) )) || (parenthesized_expression "(iVar2 == 10)" ( (binary_expression "iVar2 == 10" identifier == number_literal) ))) )) (break_statement "break;" break ;)) (if_statement "if (iVar2 == -1) {\n      return pcVar1;\n    }" if (parenthesized_expression "(iVar2 == -1)" ( (binary_expression "iVar2 == -1" identifier == number_literal) )) (compound_statement "{\n      return pcVar1;\n    }" { (return_statement "return pcVar1;" return identifier ;) })) (if_statement "if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      pcVar1 = (char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1);\n    }" if (parenthesized_expression "(iVar5 <= iVar4)" ( (binary_expression "iVar5 <= iVar4" identifier <= identifier) )) (compound_statement "{\n      iVar5 = iVar5 + 0x80;\n      pcVar1 = (char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1);\n    }" { (expression_statement "iVar5 = iVar5 + 0x80;" (assignment_expression "iVar5 = iVar5 + 0x80" identifier = (binary_expression "iVar5 + 0x80" identifier + number_literal)) ;) (expression_statement "pcVar1 = (char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1)" identifier = (cast_expression "(char *)(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_saferealloc_000b23bc)(pcVar1,iVar5,1)" (parenthesized_expression "(*(code *)PTR_saferealloc_000b23bc)" ( (pointer_expression "*(code *)PTR_saferealloc_000b23bc" * (cast_expression "(code *)PTR_saferealloc_000b23bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1,iVar5,1)" ( identifier , identifier , number_literal ))))) ;) })) (expression_statement "pcVar1[iVar3] = (char)iVar2;" (assignment_expression "pcVar1[iVar3] = (char)iVar2" (subscript_expression "pcVar1[iVar3]" identifier [ identifier ]) = (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "pcVar1[iVar4] = '\0';" (assignment_expression "pcVar1[iVar4] = '\0'" (subscript_expression "pcVar1[iVar4]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar3 = iVar4;" (assignment_expression "iVar3 = iVar4" identifier = identifier) ;) })) (expression_statement "iVar3 = (*(code *)PTR_fgetc_000b2e00)(fp);" (assignment_expression "iVar3 = (*(code *)PTR_fgetc_000b2e00)(fp)" identifier = (call_expression "(*(code *)PTR_fgetc_000b2e00)(fp)" (parenthesized_expression "(*(code *)PTR_fgetc_000b2e00)" ( (pointer_expression "*(code *)PTR_fgetc_000b2e00" * (cast_expression "(code *)PTR_fgetc_000b2e00" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fp)" ( identifier )))) ;) (if_statement "if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,fp);\n  }" if (parenthesized_expression "((iVar3 != 0xd) && (iVar3 != 10))" ( (binary_expression "(iVar3 != 0xd) && (iVar3 != 10)" (parenthesized_expression "(iVar3 != 0xd)" ( (binary_expression "iVar3 != 0xd" identifier != number_literal) )) && (parenthesized_expression "(iVar3 != 10)" ( (binary_expression "iVar3 != 10" identifier != number_literal) ))) )) (compound_statement "{\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,fp);\n  }" { (expression_statement "(*(code *)PTR_ungetc_000b2e20)(iVar3,fp);" (call_expression "(*(code *)PTR_ungetc_000b2e20)(iVar3,fp)" (parenthesized_expression "(*(code *)PTR_ungetc_000b2e20)" ( (pointer_expression "*(code *)PTR_ungetc_000b2e20" * (cast_expression "(code *)PTR_ungetc_000b2e20" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3,fp)" ( identifier , identifier ))) ;) })) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "undefined1 * FUN_0006af34(undefined4 param_1)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *puVar1 = 0;\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }\n  return puVar1;\n}\n\n" (function_definition "undefined1 * FUN_0006af34(undefined4 param_1)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *puVar1 = 0;\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_0006af34(undefined4 param_1)" * (function_declarator "FUN_0006af34(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) )))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *puVar1 = 0;\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }\n  return puVar1;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" identifier = number_literal) ;) (expression_statement "puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);" (assignment_expression "puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_safemalloc_000b2408)(0x80,1)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b2408)" ( (pointer_expression "*(code *)PTR_safemalloc_000b2408" * (cast_expression "(code *)PTR_safemalloc_000b2408" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0x80,1)" ( number_literal , number_literal ))))) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }" { (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);" (assignment_expression "iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1)" identifier = (call_expression "(*(code *)PTR_fgetc_000b2e00)(param_1)" (parenthesized_expression "(*(code *)PTR_fgetc_000b2e00)" ( (pointer_expression "*(code *)PTR_fgetc_000b2e00" * (cast_expression "(code *)PTR_fgetc_000b2e00" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((iVar2 == 0xd) || (iVar2 == 10)) break;" if (parenthesized_expression "((iVar2 == 0xd) || (iVar2 == 10))" ( (binary_expression "(iVar2 == 0xd) || (iVar2 == 10)" (parenthesized_expression "(iVar2 == 0xd)" ( (binary_expression "iVar2 == 0xd" identifier == number_literal) )) || (parenthesized_expression "(iVar2 == 10)" ( (binary_expression "iVar2 == 10" identifier == number_literal) ))) )) (break_statement "break;" break ;)) (if_statement "if (iVar2 == -1) {\n      return puVar1;\n    }" if (parenthesized_expression "(iVar2 == -1)" ( (binary_expression "iVar2 == -1" identifier == number_literal) )) (compound_statement "{\n      return puVar1;\n    }" { (return_statement "return puVar1;" return identifier ;) })) (if_statement "if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }" if (parenthesized_expression "(iVar5 <= iVar4)" ( (binary_expression "iVar5 <= iVar4" identifier <= identifier) )) (compound_statement "{\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }" { (expression_statement "iVar5 = iVar5 + 0x80;" (assignment_expression "iVar5 = iVar5 + 0x80" identifier = (binary_expression "iVar5 + 0x80" identifier + number_literal)) ;) (expression_statement "puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);" (assignment_expression "puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1)" (parenthesized_expression "(*(code *)PTR_saferealloc_000b23bc)" ( (pointer_expression "*(code *)PTR_saferealloc_000b23bc" * (cast_expression "(code *)PTR_saferealloc_000b23bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar1,iVar5,1)" ( identifier , identifier , number_literal ))))) ;) })) (expression_statement "puVar1[iVar3] = (char)iVar2;" (assignment_expression "puVar1[iVar3] = (char)iVar2" (subscript_expression "puVar1[iVar3]" identifier [ identifier ]) = (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "puVar1[iVar4] = 0;" (assignment_expression "puVar1[iVar4] = 0" (subscript_expression "puVar1[iVar4]" identifier [ identifier ]) = number_literal) ;) (expression_statement "iVar3 = iVar4;" (assignment_expression "iVar3 = iVar4" identifier = identifier) ;) })) (expression_statement "iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);" (assignment_expression "iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1)" identifier = (call_expression "(*(code *)PTR_fgetc_000b2e00)(param_1)" (parenthesized_expression "(*(code *)PTR_fgetc_000b2e00)" ( (pointer_expression "*(code *)PTR_fgetc_000b2e00" * (cast_expression "(code *)PTR_fgetc_000b2e00" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }" if (parenthesized_expression "((iVar3 != 0xd) && (iVar3 != 10))" ( (binary_expression "(iVar3 != 0xd) && (iVar3 != 10)" (parenthesized_expression "(iVar3 != 0xd)" ( (binary_expression "iVar3 != 0xd" identifier != number_literal) )) && (parenthesized_expression "(iVar3 != 10)" ( (binary_expression "iVar3 != 10" identifier != number_literal) ))) )) (compound_statement "{\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }" { (expression_statement "(*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);" (call_expression "(*(code *)PTR_ungetc_000b2e20)(iVar3,param_1)" (parenthesized_expression "(*(code *)PTR_ungetc_000b2e20)" ( (pointer_expression "*(code *)PTR_ungetc_000b2e20" * (cast_expression "(code *)PTR_ungetc_000b2e20" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3,param_1)" ( identifier , identifier ))) ;) })) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (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 ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (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 (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (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 ( IDENT , IDENT , LIT ))))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = 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 (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined1 * FUN_0006af34(undefined4 param_1)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *puVar1 = 0;\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }\n  return puVar1;\n}" (type_identifier "undefined1") (pointer_declarator "* FUN_0006af34(undefined4 param_1)" (* "*") (function_declarator "FUN_0006af34(undefined4 param_1)" (identifier "FUN_0006af34") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")")))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar5 = 0x80;\n  puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);\n  *puVar1 = 0;\n  iVar3 = 0;\n  while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }\n  iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n  if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }\n  return puVar1;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" (identifier "iVar5") (= "=") (number_literal "0x80")) (; ";")) (expression_statement "puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);" (assignment_expression "puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1)" (identifier "puVar1") (= "=") (cast_expression "(undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_safemalloc_000b2408)(0x80,1)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b2408)" (( "(") (pointer_expression "*(code *)PTR_safemalloc_000b2408" (* "*") (cast_expression "(code *)PTR_safemalloc_000b2408" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_safemalloc_000b2408"))) () ")")) (argument_list "(0x80,1)" (( "(") (number_literal "0x80") (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (while_statement "while( true ) {\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    iVar4 = iVar3 + 1;\n    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);\n    if ((iVar2 == 0xd) || (iVar2 == 10)) break;\n    if (iVar2 == -1) {\n      return puVar1;\n    }\n    if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }\n    puVar1[iVar3] = (char)iVar2;\n    puVar1[iVar4] = 0;\n    iVar3 = iVar4;\n  }" ({ "{") (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);" (assignment_expression "iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_fgetc_000b2e00)(param_1)" (parenthesized_expression "(*(code *)PTR_fgetc_000b2e00)" (( "(") (pointer_expression "*(code *)PTR_fgetc_000b2e00" (* "*") (cast_expression "(code *)PTR_fgetc_000b2e00" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fgetc_000b2e00"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((iVar2 == 0xd) || (iVar2 == 10)) break;" (if "if") (parenthesized_expression "((iVar2 == 0xd) || (iVar2 == 10))" (( "(") (binary_expression "(iVar2 == 0xd) || (iVar2 == 10)" (parenthesized_expression "(iVar2 == 0xd)" (( "(") (binary_expression "iVar2 == 0xd" (identifier "iVar2") (== "==") (number_literal "0xd")) () ")")) (|| "||") (parenthesized_expression "(iVar2 == 10)" (( "(") (binary_expression "iVar2 == 10" (identifier "iVar2") (== "==") (number_literal "10")) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (iVar2 == -1) {\n      return puVar1;\n    }" (if "if") (parenthesized_expression "(iVar2 == -1)" (( "(") (binary_expression "iVar2 == -1" (identifier "iVar2") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      return puVar1;\n    }" ({ "{") (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}"))) (if_statement "if (iVar5 <= iVar4) {\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }" (if "if") (parenthesized_expression "(iVar5 <= iVar4)" (( "(") (binary_expression "iVar5 <= iVar4" (identifier "iVar5") (<= "<=") (identifier "iVar4")) () ")")) (compound_statement "{\n      iVar5 = iVar5 + 0x80;\n      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);\n    }" ({ "{") (expression_statement "iVar5 = iVar5 + 0x80;" (assignment_expression "iVar5 = iVar5 + 0x80" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 0x80" (identifier "iVar5") (+ "+") (number_literal "0x80"))) (; ";")) (expression_statement "puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);" (assignment_expression "puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1)" (identifier "puVar1") (= "=") (cast_expression "(undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1)" (parenthesized_expression "(*(code *)PTR_saferealloc_000b23bc)" (( "(") (pointer_expression "*(code *)PTR_saferealloc_000b23bc" (* "*") (cast_expression "(code *)PTR_saferealloc_000b23bc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_saferealloc_000b23bc"))) () ")")) (argument_list "(puVar1,iVar5,1)" (( "(") (identifier "puVar1") (, ",") (identifier "iVar5") (, ",") (number_literal "1") () ")"))))) (; ";")) (} "}"))) (expression_statement "puVar1[iVar3] = (char)iVar2;" (assignment_expression "puVar1[iVar3] = (char)iVar2" (subscript_expression "puVar1[iVar3]" (identifier "puVar1") ([ "[") (identifier "iVar3") (] "]")) (= "=") (cast_expression "(char)iVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "iVar2"))) (; ";")) (expression_statement "puVar1[iVar4] = 0;" (assignment_expression "puVar1[iVar4] = 0" (subscript_expression "puVar1[iVar4]" (identifier "puVar1") ([ "[") (identifier "iVar4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar3 = iVar4;" (assignment_expression "iVar3 = iVar4" (identifier "iVar3") (= "=") (identifier "iVar4")) (; ";")) (} "}"))) (expression_statement "iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);" (assignment_expression "iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_fgetc_000b2e00)(param_1)" (parenthesized_expression "(*(code *)PTR_fgetc_000b2e00)" (( "(") (pointer_expression "*(code *)PTR_fgetc_000b2e00" (* "*") (cast_expression "(code *)PTR_fgetc_000b2e00" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fgetc_000b2e00"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((iVar3 != 0xd) && (iVar3 != 10)) {\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }" (if "if") (parenthesized_expression "((iVar3 != 0xd) && (iVar3 != 10))" (( "(") (binary_expression "(iVar3 != 0xd) && (iVar3 != 10)" (parenthesized_expression "(iVar3 != 0xd)" (( "(") (binary_expression "iVar3 != 0xd" (identifier "iVar3") (!= "!=") (number_literal "0xd")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 != 10)" (( "(") (binary_expression "iVar3 != 10" (identifier "iVar3") (!= "!=") (number_literal "10")) () ")"))) () ")")) (compound_statement "{\n    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);\n  }" ({ "{") (expression_statement "(*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);" (call_expression "(*(code *)PTR_ungetc_000b2e20)(iVar3,param_1)" (parenthesized_expression "(*(code *)PTR_ungetc_000b2e20)" (( "(") (pointer_expression "*(code *)PTR_ungetc_000b2e20" (* "*") (cast_expression "(code *)PTR_ungetc_000b2e20" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ungetc_000b2e20"))) () ")")) (argument_list "(iVar3,param_1)" (( "(") (identifier "iVar3") (, ",") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}")))

char * function_1(type_1 *fp)

{
  char *pcVar1;
  int var_2;
  int var_1;
  int var_4;
  int var_3;
  
  var_3 = 0x80;
  pcVar1 = (char *)(*(type_2 *)PTR_safemalloc_000b2408)(0x80,1);
  *pcVar1 = '\0';
  var_1 = 0;
  while( true ) {
    var_4 = var_1 + 1;
    var_2 = (*(type_2 *)PTR_fgetc_000b2e00)(fp);
    if ((var_2 == 0xd) || (var_2 == 10)) break;
    if (var_2 == -1) {
      return pcVar1;
    }
    if (var_3 <= var_4) {
      var_3 = var_3 + 0x80;
      pcVar1 = (char *)(*(type_2 *)PTR_saferealloc_000b23bc)(pcVar1,var_3,1);
    }
    pcVar1[var_1] = (char)var_2;
    pcVar1[var_4] = '\0';
    var_1 = var_4;
  }
  var_1 = (*(type_2 *)PTR_fgetc_000b2e00)(fp);
  if ((var_1 != 0xd) && (var_1 != 10)) {
    (*(type_2 *)PTR_ungetc_000b2e20)(var_1,fp);
  }
  return pcVar1;
}


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

undefined1 * MASKED(undefined4 param_1)

{
  undefined1 *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  iVar5 = 0x80;
  puVar1 = (undefined1 *)(*(code *)PTR_safemalloc_000b2408)(0x80,1);
  *puVar1 = 0;
  iVar3 = 0;
  while( true ) {
    iVar4 = iVar3 + 1;
    iVar2 = (*(code *)PTR_fgetc_000b2e00)(param_1);
    if ((iVar2 == 0xd) || (iVar2 == 10)) break;
    if (iVar2 == -1) {
      return puVar1;
    }
    if (iVar5 <= iVar4) {
      iVar5 = iVar5 + 0x80;
      puVar1 = (undefined1 *)(*(code *)PTR_saferealloc_000b23bc)(puVar1,iVar5,1);
    }
    puVar1[iVar3] = (char)iVar2;
    puVar1[iVar4] = 0;
    iVar3 = iVar4;
  }
  iVar3 = (*(code *)PTR_fgetc_000b2e00)(param_1);
  if ((iVar3 != 0xd) && (iVar3 != 10)) {
    (*(code *)PTR_ungetc_000b2e20)(iVar3,param_1);
  }
  return puVar1;
}

