
char * xmalloc_reads(int fd,size_t *maxsz_p)

{
  undefined *puVar1;
  ssize_t sVar2;
  char *buf;
  char *pcVar3;
  uint uVar4;
  uint uVar5;
  uint uVar6;
  
  puVar1 = PTR_xrealloc_001312c8;
  if (maxsz_p == (size_t *)0x0) {
    uVar4 = 0x7ffff000;
  }
  else {
    uVar4 = *maxsz_p;
  }
  pcVar3 = (char *)0x0;
  uVar6 = 0;
  do {
    uVar5 = uVar6 + 0x80;
    pcVar3 = (char *)(*(code *)puVar1)(pcVar3,uVar5);
    buf = pcVar3 + uVar6;
    do {
      sVar2 = nonblock_immune_read(fd,buf,1);
      if (sVar2 != 1) {
        if (buf == pcVar3) {
          (*(code *)PTR_free_00132180)(pcVar3);
          return (char *)0x0;
        }
LAB_000fe6b8:
        *buf = '\0';
        if (maxsz_p != (size_t *)0x0) {
          *maxsz_p = (int)buf - (int)pcVar3;
        }
        pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));
        return pcVar3;
      }
      if ((*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5)) goto LAB_000fe6b8;
      uVar6 = uVar5;
    } while ((int)buf - (int)pcVar3 != uVar5);
  } while( true );
}



undefined4 FUN_000fe584(undefined4 param_1,uint *param_2)

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  char *pcVar4;
  char *pcVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  
  puVar1 = PTR_FUN_001312c8;
  if (param_2 == (uint *)0x0) {
    uVar6 = 0x7ffff000;
  }
  else {
    uVar6 = *param_2;
  }
  pcVar5 = (char *)0x0;
  uVar8 = 0;
  do {
    uVar7 = uVar8 + 0x80;
    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);
    pcVar4 = pcVar5 + uVar8;
    do {
      iVar2 = FUN_000fe478(param_1,pcVar4,1);
      if (iVar2 != 1) {
        if (pcVar4 == pcVar5) {
          (*(code *)PTR_free_00132180)(pcVar5);
          return 0;
        }
LAB_000fe6b8:
        *pcVar4 = '\0';
        if (param_2 != (uint *)0x0) {
          *param_2 = (int)pcVar4 - (int)pcVar5;
        }
        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));
        return uVar3;
      }
      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;
      uVar8 = uVar7;
    } while ((int)pcVar4 - (int)pcVar5 != uVar7);
  } while( true );
}


lui gp,0x4
addiu gp,gp,-0x5434
addu gp,gp,t9
addiu sp,sp,-0x48
sw ra,0x44(sp)
sw s8,0x40(sp)
sw s7,0x3c(sp)
sw s6,0x38(sp)
sw s5,0x34(sp)
sw s4,0x30(sp)
sw s3,0x2c(sp)
sw s2,0x28(sp)
sw s1,0x24(sp)
sw s0,0x20(sp)
sw gp,0x10(sp)
sw a0,0x48(sp)
beq a1,zero,0x000fe618
_or s2,a1,zero
lw s3,0x0(a1)
or s5,zero,zero
or s1,zero,zero
lw v0,-0x7e88(gp)
sw v0,0x18(sp)
lw s7,-0x78b8(gp)
li s6,0xa
addiu s4,s5,0x80
or a1,s4,zero
or a0,s1,zero
lw t9,0x18(sp)
jalr t9
_nop
lw gp,0x10(sp)
or s1,v0,zero
addu s0,v0,s5
sltu s8,s4,s3
b 0x000fe630
_sw s4,0x1c(sp)
lui s3,0x7fff
b 0x000fe5d0
_ori s3,s3,0xf000
subu v0,s0,s1
beq v0,s4,0x000fe5e8
_lw s5,0x1c(sp)
li a2,0x1
or a1,s0,zero
lw a0,0x48(sp)
or t9,s7,zero
bal 0x000fe478
_nop
lw gp,0x10(sp)
li v1,0x1
beq v0,v1,0x000fe6a4
_nop
bne s0,s1,0x000fe6b8
_or a0,s1,zero
lw t9,-0x6fd0(gp)
jalr t9
_nop
lw gp,0x10(sp)
or v0,zero,zero
lw ra,0x44(sp)
lw s8,0x40(sp)
lw s7,0x3c(sp)
lw s6,0x38(sp)
lw s5,0x34(sp)
lw s4,0x30(sp)
lw s3,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x48
lbu v0,0x0(s0)
beq v0,s6,0x000fe6b8
_nop
bne s8,zero,0x000fe624
_addiu s0,s0,0x1
beq s2,zero,0x000fe6c8
_sb zero,0x0(s0)
subu v0,s0,s1
sw v0,0x0(s2)
addiu a1,s0,0x1
subu a1,a1,s1
or a0,s1,zero
lw t9,-0x7e88(gp)
jalr t9
_nop
lw gp,0x10(sp)
b 0x000fe678
_lw ra,0x44(sp)
(translation_unit "undefined4 FUN_000fe584(undefined4 param_1,uint *param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  char *pcVar5;\n  uint uVar6;\n  uint uVar7;\n  uint uVar8;\n  \n  puVar1 = PTR_FUN_001312c8;\n  if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }\n  pcVar5 = (char *)0x0;\n  uVar8 = 0;\n  do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );\n}\n\n" (function_definition "undefined4 FUN_000fe584(undefined4 param_1,uint *param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  char *pcVar5;\n  uint uVar6;\n  uint uVar7;\n  uint uVar8;\n  \n  puVar1 = PTR_FUN_001312c8;\n  if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }\n  pcVar5 = (char *)0x0;\n  uVar8 = 0;\n  do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );\n}" type_identifier (function_declarator "FUN_000fe584(undefined4 param_1,uint *param_2)" identifier (parameter_list "(undefined4 param_1,uint *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  char *pcVar5;\n  uint uVar6;\n  uint uVar7;\n  uint uVar8;\n  \n  puVar1 = PTR_FUN_001312c8;\n  if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }\n  pcVar5 = (char *)0x0;\n  uVar8 = 0;\n  do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (expression_statement "puVar1 = PTR_FUN_001312c8;" (assignment_expression "puVar1 = PTR_FUN_001312c8" identifier = identifier) ;) (if_statement "if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }" if (parenthesized_expression "(param_2 == (uint *)0x0)" ( (binary_expression "param_2 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar6 = 0x7ffff000;\n  }" { (expression_statement "uVar6 = 0x7ffff000;" (assignment_expression "uVar6 = 0x7ffff000" identifier = number_literal) ;) }) (else_clause "else {\n    uVar6 = *param_2;\n  }" else (compound_statement "{\n    uVar6 = *param_2;\n  }" { (expression_statement "uVar6 = *param_2;" (assignment_expression "uVar6 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) }))) (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (do_statement "do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );" do (compound_statement "{\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  }" { (expression_statement "uVar7 = uVar8 + 0x80;" (assignment_expression "uVar7 = uVar8 + 0x80" identifier = (binary_expression "uVar8 + 0x80" identifier + number_literal)) ;) (expression_statement "pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);" (assignment_expression "pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7)" identifier = (cast_expression "(char *)(*(code *)puVar1)(pcVar5,uVar7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar1)(pcVar5,uVar7)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar5,uVar7)" ( identifier , identifier ))))) ;) (expression_statement "pcVar4 = pcVar5 + uVar8;" (assignment_expression "pcVar4 = pcVar5 + uVar8" identifier = (binary_expression "pcVar5 + uVar8" identifier + identifier)) ;) (do_statement "do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);" do (compound_statement "{\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    }" { (expression_statement "iVar2 = FUN_000fe478(param_1,pcVar4,1);" (assignment_expression "iVar2 = FUN_000fe478(param_1,pcVar4,1)" identifier = (call_expression "FUN_000fe478(param_1,pcVar4,1)" identifier (argument_list "(param_1,pcVar4,1)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }" if (parenthesized_expression "(iVar2 != 1)" ( (binary_expression "iVar2 != 1" identifier != number_literal) )) (compound_statement "{\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }" { (if_statement "if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }" if (parenthesized_expression "(pcVar4 == pcVar5)" ( (binary_expression "pcVar4 == pcVar5" identifier == identifier) )) (compound_statement "{\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }" { (expression_statement "(*(code *)PTR_free_00132180)(pcVar5);" (call_expression "(*(code *)PTR_free_00132180)(pcVar5)" (parenthesized_expression "(*(code *)PTR_free_00132180)" ( (pointer_expression "*(code *)PTR_free_00132180" * (cast_expression "(code *)PTR_free_00132180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar5)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (labeled_statement "LAB_000fe6b8:\n        *pcVar4 = '\0';" statement_identifier : (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;)) (if_statement "if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }" if (parenthesized_expression "(param_2 != (uint *)0x0)" ( (binary_expression "param_2 != (uint *)0x0" identifier != (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }" { (expression_statement "*param_2 = (int)pcVar4 - (int)pcVar5;" (assignment_expression "*param_2 = (int)pcVar4 - (int)pcVar5" (pointer_expression "*param_2" * identifier) = (binary_expression "(int)pcVar4 - (int)pcVar5" (cast_expression "(int)pcVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) (expression_statement "uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));" (assignment_expression "uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5))" identifier = (call_expression "(*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5))" (parenthesized_expression "(*(code *)PTR_FUN_001312c8)" ( (pointer_expression "*(code *)PTR_FUN_001312c8" * (cast_expression "(code *)PTR_FUN_001312c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar5,pcVar4 + (1 - (int)pcVar5))" ( identifier , (binary_expression "pcVar4 + (1 - (int)pcVar5)" identifier + (parenthesized_expression "(1 - (int)pcVar5)" ( (binary_expression "1 - (int)pcVar5" number_literal - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (return_statement "return uVar3;" return identifier ;) })) (if_statement "if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;" if (parenthesized_expression "((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7))" ( (binary_expression "(*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)" (parenthesized_expression "(*pcVar4 == '\n')" ( (binary_expression "*pcVar4 == '\n'" (pointer_expression "*pcVar4" * identifier) == (char_literal "'\n'" ' escape_sequence ')) )) || (parenthesized_expression "(pcVar4 = pcVar4 + 1, uVar6 <= uVar7)" ( (comma_expression "pcVar4 = pcVar4 + 1, uVar6 <= uVar7" (assignment_expression "pcVar4 = pcVar4 + 1" identifier = (binary_expression "pcVar4 + 1" identifier + number_literal)) , (binary_expression "uVar6 <= uVar7" identifier <= identifier)) ))) )) (goto_statement "goto LAB_000fe6b8;" goto statement_identifier ;)) (expression_statement "uVar8 = uVar7;" (assignment_expression "uVar8 = uVar7" identifier = identifier) ;) }) while (parenthesized_expression "((int)pcVar4 - (int)pcVar5 != uVar7)" ( (binary_expression "(int)pcVar4 - (int)pcVar5 != uVar7" (binary_expression "(int)pcVar4 - (int)pcVar5" (cast_expression "(int)pcVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier)) != identifier) )) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "char * xmalloc_reads(int fd,size_t *maxsz_p)\n\n{\n  undefined *puVar1;\n  ssize_t sVar2;\n  char *buf;\n  char *pcVar3;\n  uint uVar4;\n  uint uVar5;\n  uint uVar6;\n  \n  puVar1 = PTR_xrealloc_001312c8;\n  if (maxsz_p == (size_t *)0x0) {\n    uVar4 = 0x7ffff000;\n  }\n  else {\n    uVar4 = *maxsz_p;\n  }\n  pcVar3 = (char *)0x0;\n  uVar6 = 0;\n  do {\n    uVar5 = uVar6 + 0x80;\n    pcVar3 = (char *)(*(code *)puVar1)(pcVar3,uVar5);\n    buf = pcVar3 + uVar6;\n    do {\n      sVar2 = nonblock_immune_read(fd,buf,1);\n      if (sVar2 != 1) {\n        if (buf == pcVar3) {\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }\nLAB_000fe6b8:\n        *buf = '\0';\n        if (maxsz_p != (size_t *)0x0) {\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }\n        pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));\n        return pcVar3;\n      }\n      if ((*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5)) goto LAB_000fe6b8;\n      uVar6 = uVar5;\n    } while ((int)buf - (int)pcVar3 != uVar5);\n  } while( true );\n}\n\n" (function_definition "char * xmalloc_reads(int fd,size_t *maxsz_p)\n\n{\n  undefined *puVar1;\n  ssize_t sVar2;\n  char *buf;\n  char *pcVar3;\n  uint uVar4;\n  uint uVar5;\n  uint uVar6;\n  \n  puVar1 = PTR_xrealloc_001312c8;\n  if (maxsz_p == (size_t *)0x0) {\n    uVar4 = 0x7ffff000;\n  }\n  else {\n    uVar4 = *maxsz_p;\n  }\n  pcVar3 = (char *)0x0;\n  uVar6 = 0;\n  do {\n    uVar5 = uVar6 + 0x80;\n    pcVar3 = (char *)(*(code *)puVar1)(pcVar3,uVar5);\n    buf = pcVar3 + uVar6;\n    do {\n      sVar2 = nonblock_immune_read(fd,buf,1);\n      if (sVar2 != 1) {\n        if (buf == pcVar3) {\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }\nLAB_000fe6b8:\n        *buf = '\0';\n        if (maxsz_p != (size_t *)0x0) {\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }\n        pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));\n        return pcVar3;\n      }\n      if ((*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5)) goto LAB_000fe6b8;\n      uVar6 = uVar5;\n    } while ((int)buf - (int)pcVar3 != uVar5);\n  } while( true );\n}" primitive_type (pointer_declarator "* xmalloc_reads(int fd,size_t *maxsz_p)" * (function_declarator "xmalloc_reads(int fd,size_t *maxsz_p)" identifier (parameter_list "(int fd,size_t *maxsz_p)" ( (parameter_declaration "int fd" primitive_type identifier) , (parameter_declaration "size_t *maxsz_p" primitive_type (pointer_declarator "*maxsz_p" * identifier)) )))) (compound_statement "{\n  undefined *puVar1;\n  ssize_t sVar2;\n  char *buf;\n  char *pcVar3;\n  uint uVar4;\n  uint uVar5;\n  uint uVar6;\n  \n  puVar1 = PTR_xrealloc_001312c8;\n  if (maxsz_p == (size_t *)0x0) {\n    uVar4 = 0x7ffff000;\n  }\n  else {\n    uVar4 = *maxsz_p;\n  }\n  pcVar3 = (char *)0x0;\n  uVar6 = 0;\n  do {\n    uVar5 = uVar6 + 0x80;\n    pcVar3 = (char *)(*(code *)puVar1)(pcVar3,uVar5);\n    buf = pcVar3 + uVar6;\n    do {\n      sVar2 = nonblock_immune_read(fd,buf,1);\n      if (sVar2 != 1) {\n        if (buf == pcVar3) {\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }\nLAB_000fe6b8:\n        *buf = '\0';\n        if (maxsz_p != (size_t *)0x0) {\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }\n        pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));\n        return pcVar3;\n      }\n      if ((*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5)) goto LAB_000fe6b8;\n      uVar6 = uVar5;\n    } while ((int)buf - (int)pcVar3 != uVar5);\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "char *buf;" primitive_type (pointer_declarator "*buf" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (expression_statement "puVar1 = PTR_xrealloc_001312c8;" (assignment_expression "puVar1 = PTR_xrealloc_001312c8" identifier = identifier) ;) (if_statement "if (maxsz_p == (size_t *)0x0) {\n    uVar4 = 0x7ffff000;\n  }\n  else {\n    uVar4 = *maxsz_p;\n  }" if (parenthesized_expression "(maxsz_p == (size_t *)0x0)" ( (binary_expression "maxsz_p == (size_t *)0x0" identifier == (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar4 = 0x7ffff000;\n  }" { (expression_statement "uVar4 = 0x7ffff000;" (assignment_expression "uVar4 = 0x7ffff000" identifier = number_literal) ;) }) (else_clause "else {\n    uVar4 = *maxsz_p;\n  }" else (compound_statement "{\n    uVar4 = *maxsz_p;\n  }" { (expression_statement "uVar4 = *maxsz_p;" (assignment_expression "uVar4 = *maxsz_p" identifier = (pointer_expression "*maxsz_p" * identifier)) ;) }))) (expression_statement "pcVar3 = (char *)0x0;" (assignment_expression "pcVar3 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (do_statement "do {\n    uVar5 = uVar6 + 0x80;\n    pcVar3 = (char *)(*(code *)puVar1)(pcVar3,uVar5);\n    buf = pcVar3 + uVar6;\n    do {\n      sVar2 = nonblock_immune_read(fd,buf,1);\n      if (sVar2 != 1) {\n        if (buf == pcVar3) {\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }\nLAB_000fe6b8:\n        *buf = '\0';\n        if (maxsz_p != (size_t *)0x0) {\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }\n        pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));\n        return pcVar3;\n      }\n      if ((*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5)) goto LAB_000fe6b8;\n      uVar6 = uVar5;\n    } while ((int)buf - (int)pcVar3 != uVar5);\n  } while( true );" do (compound_statement "{\n    uVar5 = uVar6 + 0x80;\n    pcVar3 = (char *)(*(code *)puVar1)(pcVar3,uVar5);\n    buf = pcVar3 + uVar6;\n    do {\n      sVar2 = nonblock_immune_read(fd,buf,1);\n      if (sVar2 != 1) {\n        if (buf == pcVar3) {\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }\nLAB_000fe6b8:\n        *buf = '\0';\n        if (maxsz_p != (size_t *)0x0) {\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }\n        pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));\n        return pcVar3;\n      }\n      if ((*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5)) goto LAB_000fe6b8;\n      uVar6 = uVar5;\n    } while ((int)buf - (int)pcVar3 != uVar5);\n  }" { (expression_statement "uVar5 = uVar6 + 0x80;" (assignment_expression "uVar5 = uVar6 + 0x80" identifier = (binary_expression "uVar6 + 0x80" identifier + number_literal)) ;) (expression_statement "pcVar3 = (char *)(*(code *)puVar1)(pcVar3,uVar5);" (assignment_expression "pcVar3 = (char *)(*(code *)puVar1)(pcVar3,uVar5)" identifier = (cast_expression "(char *)(*(code *)puVar1)(pcVar3,uVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar1)(pcVar3,uVar5)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar3,uVar5)" ( identifier , identifier ))))) ;) (expression_statement "buf = pcVar3 + uVar6;" (assignment_expression "buf = pcVar3 + uVar6" identifier = (binary_expression "pcVar3 + uVar6" identifier + identifier)) ;) (do_statement "do {\n      sVar2 = nonblock_immune_read(fd,buf,1);\n      if (sVar2 != 1) {\n        if (buf == pcVar3) {\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }\nLAB_000fe6b8:\n        *buf = '\0';\n        if (maxsz_p != (size_t *)0x0) {\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }\n        pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));\n        return pcVar3;\n      }\n      if ((*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5)) goto LAB_000fe6b8;\n      uVar6 = uVar5;\n    } while ((int)buf - (int)pcVar3 != uVar5);" do (compound_statement "{\n      sVar2 = nonblock_immune_read(fd,buf,1);\n      if (sVar2 != 1) {\n        if (buf == pcVar3) {\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }\nLAB_000fe6b8:\n        *buf = '\0';\n        if (maxsz_p != (size_t *)0x0) {\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }\n        pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));\n        return pcVar3;\n      }\n      if ((*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5)) goto LAB_000fe6b8;\n      uVar6 = uVar5;\n    }" { (expression_statement "sVar2 = nonblock_immune_read(fd,buf,1);" (assignment_expression "sVar2 = nonblock_immune_read(fd,buf,1)" identifier = (call_expression "nonblock_immune_read(fd,buf,1)" identifier (argument_list "(fd,buf,1)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (sVar2 != 1) {\n        if (buf == pcVar3) {\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }\nLAB_000fe6b8:\n        *buf = '\0';\n        if (maxsz_p != (size_t *)0x0) {\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }\n        pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));\n        return pcVar3;\n      }" if (parenthesized_expression "(sVar2 != 1)" ( (binary_expression "sVar2 != 1" identifier != number_literal) )) (compound_statement "{\n        if (buf == pcVar3) {\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }\nLAB_000fe6b8:\n        *buf = '\0';\n        if (maxsz_p != (size_t *)0x0) {\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }\n        pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));\n        return pcVar3;\n      }" { (if_statement "if (buf == pcVar3) {\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }" if (parenthesized_expression "(buf == pcVar3)" ( (binary_expression "buf == pcVar3" identifier == identifier) )) (compound_statement "{\n          (*(code *)PTR_free_00132180)(pcVar3);\n          return (char *)0x0;\n        }" { (expression_statement "(*(code *)PTR_free_00132180)(pcVar3);" (call_expression "(*(code *)PTR_free_00132180)(pcVar3)" (parenthesized_expression "(*(code *)PTR_free_00132180)" ( (pointer_expression "*(code *)PTR_free_00132180" * (cast_expression "(code *)PTR_free_00132180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar3)" ( identifier ))) ;) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (labeled_statement "LAB_000fe6b8:\n        *buf = '\0';" statement_identifier : (expression_statement "*buf = '\0';" (assignment_expression "*buf = '\0'" (pointer_expression "*buf" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;)) (if_statement "if (maxsz_p != (size_t *)0x0) {\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }" if (parenthesized_expression "(maxsz_p != (size_t *)0x0)" ( (binary_expression "maxsz_p != (size_t *)0x0" identifier != (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          *maxsz_p = (int)buf - (int)pcVar3;\n        }" { (expression_statement "*maxsz_p = (int)buf - (int)pcVar3;" (assignment_expression "*maxsz_p = (int)buf - (int)pcVar3" (pointer_expression "*maxsz_p" * identifier) = (binary_expression "(int)buf - (int)pcVar3" (cast_expression "(int)buf" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) (expression_statement "pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3));" (assignment_expression "pcVar3 = (char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3))" identifier = (cast_expression "(char *)(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xrealloc_001312c8)(pcVar3,buf + (1 - (int)pcVar3))" (parenthesized_expression "(*(code *)PTR_xrealloc_001312c8)" ( (pointer_expression "*(code *)PTR_xrealloc_001312c8" * (cast_expression "(code *)PTR_xrealloc_001312c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar3,buf + (1 - (int)pcVar3))" ( identifier , (binary_expression "buf + (1 - (int)pcVar3)" identifier + (parenthesized_expression "(1 - (int)pcVar3)" ( (binary_expression "1 - (int)pcVar3" number_literal - (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))))) ;) (return_statement "return pcVar3;" return identifier ;) })) (if_statement "if ((*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5)) goto LAB_000fe6b8;" if (parenthesized_expression "((*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5))" ( (binary_expression "(*buf == '\n') || (buf = buf + 1, uVar4 <= uVar5)" (parenthesized_expression "(*buf == '\n')" ( (binary_expression "*buf == '\n'" (pointer_expression "*buf" * identifier) == (char_literal "'\n'" ' escape_sequence ')) )) || (parenthesized_expression "(buf = buf + 1, uVar4 <= uVar5)" ( (comma_expression "buf = buf + 1, uVar4 <= uVar5" (assignment_expression "buf = buf + 1" identifier = (binary_expression "buf + 1" identifier + number_literal)) , (binary_expression "uVar4 <= uVar5" identifier <= identifier)) ))) )) (goto_statement "goto LAB_000fe6b8;" goto statement_identifier ;)) (expression_statement "uVar6 = uVar5;" (assignment_expression "uVar6 = uVar5" identifier = identifier) ;) }) while (parenthesized_expression "((int)buf - (int)pcVar3 != uVar5)" ( (binary_expression "(int)buf - (int)pcVar3 != uVar5" (binary_expression "(int)buf - (int)pcVar3" (cast_expression "(int)buf" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier)) != identifier) )) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "undefined4 FUN_000fe584(undefined4 param_1,uint *param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  char *pcVar5;\n  uint uVar6;\n  uint uVar7;\n  uint uVar8;\n  \n  puVar1 = PTR_FUN_001312c8;\n  if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }\n  pcVar5 = (char *)0x0;\n  uVar8 = 0;\n  do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );\n}\n\n" (function_definition "undefined4 FUN_000fe584(undefined4 param_1,uint *param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  char *pcVar5;\n  uint uVar6;\n  uint uVar7;\n  uint uVar8;\n  \n  puVar1 = PTR_FUN_001312c8;\n  if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }\n  pcVar5 = (char *)0x0;\n  uVar8 = 0;\n  do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );\n}" type_identifier (function_declarator "FUN_000fe584(undefined4 param_1,uint *param_2)" identifier (parameter_list "(undefined4 param_1,uint *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  char *pcVar5;\n  uint uVar6;\n  uint uVar7;\n  uint uVar8;\n  \n  puVar1 = PTR_FUN_001312c8;\n  if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }\n  pcVar5 = (char *)0x0;\n  uVar8 = 0;\n  do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (expression_statement "puVar1 = PTR_FUN_001312c8;" (assignment_expression "puVar1 = PTR_FUN_001312c8" identifier = identifier) ;) (if_statement "if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }" if (parenthesized_expression "(param_2 == (uint *)0x0)" ( (binary_expression "param_2 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar6 = 0x7ffff000;\n  }" { (expression_statement "uVar6 = 0x7ffff000;" (assignment_expression "uVar6 = 0x7ffff000" identifier = number_literal) ;) }) (else_clause "else {\n    uVar6 = *param_2;\n  }" else (compound_statement "{\n    uVar6 = *param_2;\n  }" { (expression_statement "uVar6 = *param_2;" (assignment_expression "uVar6 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) }))) (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (do_statement "do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );" do (compound_statement "{\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  }" { (expression_statement "uVar7 = uVar8 + 0x80;" (assignment_expression "uVar7 = uVar8 + 0x80" identifier = (binary_expression "uVar8 + 0x80" identifier + number_literal)) ;) (expression_statement "pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);" (assignment_expression "pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7)" identifier = (cast_expression "(char *)(*(code *)puVar1)(pcVar5,uVar7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar1)(pcVar5,uVar7)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar5,uVar7)" ( identifier , identifier ))))) ;) (expression_statement "pcVar4 = pcVar5 + uVar8;" (assignment_expression "pcVar4 = pcVar5 + uVar8" identifier = (binary_expression "pcVar5 + uVar8" identifier + identifier)) ;) (do_statement "do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);" do (compound_statement "{\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    }" { (expression_statement "iVar2 = FUN_000fe478(param_1,pcVar4,1);" (assignment_expression "iVar2 = FUN_000fe478(param_1,pcVar4,1)" identifier = (call_expression "FUN_000fe478(param_1,pcVar4,1)" identifier (argument_list "(param_1,pcVar4,1)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }" if (parenthesized_expression "(iVar2 != 1)" ( (binary_expression "iVar2 != 1" identifier != number_literal) )) (compound_statement "{\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }" { (if_statement "if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }" if (parenthesized_expression "(pcVar4 == pcVar5)" ( (binary_expression "pcVar4 == pcVar5" identifier == identifier) )) (compound_statement "{\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }" { (expression_statement "(*(code *)PTR_free_00132180)(pcVar5);" (call_expression "(*(code *)PTR_free_00132180)(pcVar5)" (parenthesized_expression "(*(code *)PTR_free_00132180)" ( (pointer_expression "*(code *)PTR_free_00132180" * (cast_expression "(code *)PTR_free_00132180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar5)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (labeled_statement "LAB_000fe6b8:\n        *pcVar4 = '\0';" statement_identifier : (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;)) (if_statement "if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }" if (parenthesized_expression "(param_2 != (uint *)0x0)" ( (binary_expression "param_2 != (uint *)0x0" identifier != (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }" { (expression_statement "*param_2 = (int)pcVar4 - (int)pcVar5;" (assignment_expression "*param_2 = (int)pcVar4 - (int)pcVar5" (pointer_expression "*param_2" * identifier) = (binary_expression "(int)pcVar4 - (int)pcVar5" (cast_expression "(int)pcVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) (expression_statement "uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));" (assignment_expression "uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5))" identifier = (call_expression "(*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5))" (parenthesized_expression "(*(code *)PTR_FUN_001312c8)" ( (pointer_expression "*(code *)PTR_FUN_001312c8" * (cast_expression "(code *)PTR_FUN_001312c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar5,pcVar4 + (1 - (int)pcVar5))" ( identifier , (binary_expression "pcVar4 + (1 - (int)pcVar5)" identifier + (parenthesized_expression "(1 - (int)pcVar5)" ( (binary_expression "1 - (int)pcVar5" number_literal - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (return_statement "return uVar3;" return identifier ;) })) (if_statement "if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;" if (parenthesized_expression "((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7))" ( (binary_expression "(*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)" (parenthesized_expression "(*pcVar4 == '\n')" ( (binary_expression "*pcVar4 == '\n'" (pointer_expression "*pcVar4" * identifier) == (char_literal "'\n'" ' escape_sequence ')) )) || (parenthesized_expression "(pcVar4 = pcVar4 + 1, uVar6 <= uVar7)" ( (comma_expression "pcVar4 = pcVar4 + 1, uVar6 <= uVar7" (assignment_expression "pcVar4 = pcVar4 + 1" identifier = (binary_expression "pcVar4 + 1" identifier + number_literal)) , (binary_expression "uVar6 <= uVar7" identifier <= identifier)) ))) )) (goto_statement "goto LAB_000fe6b8;" goto statement_identifier ;)) (expression_statement "uVar8 = uVar7;" (assignment_expression "uVar8 = uVar7" identifier = identifier) ;) }) while (parenthesized_expression "((int)pcVar4 - (int)pcVar5 != uVar7)" ( (binary_expression "(int)pcVar4 - (int)pcVar5 != uVar7" (binary_expression "(int)pcVar4 - (int)pcVar5" (cast_expression "(int)pcVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier)) != identifier) )) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (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 ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression IDENT + (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) )))) ;) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT + LIT)) , (binary_expression IDENT <= IDENT)) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) != IDENT) )) ;) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "undefined4 FUN_000fe584(undefined4 param_1,uint *param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  char *pcVar5;\n  uint uVar6;\n  uint uVar7;\n  uint uVar8;\n  \n  puVar1 = PTR_FUN_001312c8;\n  if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }\n  pcVar5 = (char *)0x0;\n  uVar8 = 0;\n  do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );\n}" (type_identifier "undefined4") (function_declarator "FUN_000fe584(undefined4 param_1,uint *param_2)" (identifier "FUN_000fe584") (parameter_list "(undefined4 param_1,uint *param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "uint *param_2" (type_identifier "uint") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  char *pcVar5;\n  uint uVar6;\n  uint uVar7;\n  uint uVar8;\n  \n  puVar1 = PTR_FUN_001312c8;\n  if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }\n  pcVar5 = (char *)0x0;\n  uVar8 = 0;\n  do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (expression_statement "puVar1 = PTR_FUN_001312c8;" (assignment_expression "puVar1 = PTR_FUN_001312c8" (identifier "puVar1") (= "=") (identifier "PTR_FUN_001312c8")) (; ";")) (if_statement "if (param_2 == (uint *)0x0) {\n    uVar6 = 0x7ffff000;\n  }\n  else {\n    uVar6 = *param_2;\n  }" (if "if") (parenthesized_expression "(param_2 == (uint *)0x0)" (( "(") (binary_expression "param_2 == (uint *)0x0" (identifier "param_2") (== "==") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar6 = 0x7ffff000;\n  }" ({ "{") (expression_statement "uVar6 = 0x7ffff000;" (assignment_expression "uVar6 = 0x7ffff000" (identifier "uVar6") (= "=") (number_literal "0x7ffff000")) (; ";")) (} "}")) (else_clause "else {\n    uVar6 = *param_2;\n  }" (else "else") (compound_statement "{\n    uVar6 = *param_2;\n  }" ({ "{") (expression_statement "uVar6 = *param_2;" (assignment_expression "uVar6 = *param_2" (identifier "uVar6") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (} "}")))) (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" (identifier "pcVar5") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" (identifier "uVar8") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  } while( true );" (do "do") (compound_statement "{\n    uVar7 = uVar8 + 0x80;\n    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);\n    pcVar4 = pcVar5 + uVar8;\n    do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);\n  }" ({ "{") (expression_statement "uVar7 = uVar8 + 0x80;" (assignment_expression "uVar7 = uVar8 + 0x80" (identifier "uVar7") (= "=") (binary_expression "uVar8 + 0x80" (identifier "uVar8") (+ "+") (number_literal "0x80"))) (; ";")) (expression_statement "pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);" (assignment_expression "pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7)" (identifier "pcVar5") (= "=") (cast_expression "(char *)(*(code *)puVar1)(pcVar5,uVar7)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)puVar1)(pcVar5,uVar7)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(pcVar5,uVar7)" (( "(") (identifier "pcVar5") (, ",") (identifier "uVar7") () ")"))))) (; ";")) (expression_statement "pcVar4 = pcVar5 + uVar8;" (assignment_expression "pcVar4 = pcVar5 + uVar8" (identifier "pcVar4") (= "=") (binary_expression "pcVar5 + uVar8" (identifier "pcVar5") (+ "+") (identifier "uVar8"))) (; ";")) (do_statement "do {\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    } while ((int)pcVar4 - (int)pcVar5 != uVar7);" (do "do") (compound_statement "{\n      iVar2 = FUN_000fe478(param_1,pcVar4,1);\n      if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }\n      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;\n      uVar8 = uVar7;\n    }" ({ "{") (expression_statement "iVar2 = FUN_000fe478(param_1,pcVar4,1);" (assignment_expression "iVar2 = FUN_000fe478(param_1,pcVar4,1)" (identifier "iVar2") (= "=") (call_expression "FUN_000fe478(param_1,pcVar4,1)" (identifier "FUN_000fe478") (argument_list "(param_1,pcVar4,1)" (( "(") (identifier "param_1") (, ",") (identifier "pcVar4") (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (iVar2 != 1) {\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }" (if "if") (parenthesized_expression "(iVar2 != 1)" (( "(") (binary_expression "iVar2 != 1" (identifier "iVar2") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n        if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }\nLAB_000fe6b8:\n        *pcVar4 = '\0';\n        if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }\n        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));\n        return uVar3;\n      }" ({ "{") (if_statement "if (pcVar4 == pcVar5) {\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }" (if "if") (parenthesized_expression "(pcVar4 == pcVar5)" (( "(") (binary_expression "pcVar4 == pcVar5" (identifier "pcVar4") (== "==") (identifier "pcVar5")) () ")")) (compound_statement "{\n          (*(code *)PTR_free_00132180)(pcVar5);\n          return 0;\n        }" ({ "{") (expression_statement "(*(code *)PTR_free_00132180)(pcVar5);" (call_expression "(*(code *)PTR_free_00132180)(pcVar5)" (parenthesized_expression "(*(code *)PTR_free_00132180)" (( "(") (pointer_expression "*(code *)PTR_free_00132180" (* "*") (cast_expression "(code *)PTR_free_00132180" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_00132180"))) () ")")) (argument_list "(pcVar5)" (( "(") (identifier "pcVar5") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (labeled_statement "LAB_000fe6b8:\n        *pcVar4 = '\0';" (statement_identifier "LAB_000fe6b8") (: ":") (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";"))) (if_statement "if (param_2 != (uint *)0x0) {\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }" (if "if") (parenthesized_expression "(param_2 != (uint *)0x0)" (( "(") (binary_expression "param_2 != (uint *)0x0" (identifier "param_2") (!= "!=") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          *param_2 = (int)pcVar4 - (int)pcVar5;\n        }" ({ "{") (expression_statement "*param_2 = (int)pcVar4 - (int)pcVar5;" (assignment_expression "*param_2 = (int)pcVar4 - (int)pcVar5" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "(int)pcVar4 - (int)pcVar5" (cast_expression "(int)pcVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar4")) (- "-") (cast_expression "(int)pcVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar5")))) (; ";")) (} "}"))) (expression_statement "uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));" (assignment_expression "uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5))" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5))" (parenthesized_expression "(*(code *)PTR_FUN_001312c8)" (( "(") (pointer_expression "*(code *)PTR_FUN_001312c8" (* "*") (cast_expression "(code *)PTR_FUN_001312c8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_001312c8"))) () ")")) (argument_list "(pcVar5,pcVar4 + (1 - (int)pcVar5))" (( "(") (identifier "pcVar5") (, ",") (binary_expression "pcVar4 + (1 - (int)pcVar5)" (identifier "pcVar4") (+ "+") (parenthesized_expression "(1 - (int)pcVar5)" (( "(") (binary_expression "1 - (int)pcVar5" (number_literal "1") (- "-") (cast_expression "(int)pcVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar5"))) () ")"))) () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (if_statement "if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;" (if "if") (parenthesized_expression "((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7))" (( "(") (binary_expression "(*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)" (parenthesized_expression "(*pcVar4 == '\n')" (( "(") (binary_expression "*pcVar4 == '\n'" (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4")) (== "==") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(pcVar4 = pcVar4 + 1, uVar6 <= uVar7)" (( "(") (comma_expression "pcVar4 = pcVar4 + 1, uVar6 <= uVar7" (assignment_expression "pcVar4 = pcVar4 + 1" (identifier "pcVar4") (= "=") (binary_expression "pcVar4 + 1" (identifier "pcVar4") (+ "+") (number_literal "1"))) (, ",") (binary_expression "uVar6 <= uVar7" (identifier "uVar6") (<= "<=") (identifier "uVar7"))) () ")"))) () ")")) (goto_statement "goto LAB_000fe6b8;" (goto "goto") (statement_identifier "LAB_000fe6b8") (; ";"))) (expression_statement "uVar8 = uVar7;" (assignment_expression "uVar8 = uVar7" (identifier "uVar8") (= "=") (identifier "uVar7")) (; ";")) (} "}")) (while "while") (parenthesized_expression "((int)pcVar4 - (int)pcVar5 != uVar7)" (( "(") (binary_expression "(int)pcVar4 - (int)pcVar5 != uVar7" (binary_expression "(int)pcVar4 - (int)pcVar5" (cast_expression "(int)pcVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar4")) (- "-") (cast_expression "(int)pcVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar5"))) (!= "!=") (identifier "uVar7")) () ")")) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))
(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: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (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: (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 (identifier) (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) 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)))) (return_statement (number_literal)))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (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) (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))))) (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (identifier) right: (identifier)))))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (identifier))))) condition: (parenthesized_expression (true))))))

undefined4 MASKED(undefined4 param_1,uint *param_2)

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  char *pcVar4;
  char *pcVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  
  puVar1 = PTR_FUN_001312c8;
  if (param_2 == (uint *)0x0) {
    uVar6 = 0x7ffff000;
  }
  else {
    uVar6 = *param_2;
  }
  pcVar5 = (char *)0x0;
  uVar8 = 0;
  do {
    uVar7 = uVar8 + 0x80;
    pcVar5 = (char *)(*(code *)puVar1)(pcVar5,uVar7);
    pcVar4 = pcVar5 + uVar8;
    do {
      iVar2 = FUN_000fe478(param_1,pcVar4,1);
      if (iVar2 != 1) {
        if (pcVar4 == pcVar5) {
          (*(code *)PTR_free_00132180)(pcVar5);
          return 0;
        }
LAB_000fe6b8:
        *pcVar4 = '\0';
        if (param_2 != (uint *)0x0) {
          *param_2 = (int)pcVar4 - (int)pcVar5;
        }
        uVar3 = (*(code *)PTR_FUN_001312c8)(pcVar5,pcVar4 + (1 - (int)pcVar5));
        return uVar3;
      }
      if ((*pcVar4 == '\n') || (pcVar4 = pcVar4 + 1, uVar6 <= uVar7)) goto LAB_000fe6b8;
      uVar8 = uVar7;
    } while ((int)pcVar4 - (int)pcVar5 != uVar7);
  } while( true );
}

