
void section_add_load_file(section_add *pa)

{
  char *pcVar1;
  int iVar2;
  FILE *__stream;
  bfd_byte *pbVar3;
  size_t sVar4;
  char *pcVar5;
  int *piVar6;
  char *format;
  size_t sVar7;
  size_t sVar8;
  
  __stream = fopen(pa->filename,"r");
  if (__stream == (FILE *)0x0) {
    piVar6 = __errno_location();
    pcVar5 = strerror(*piVar6);
    pcVar1 = pa->filename;
    format = (char *)dcgettext(0,"cannot open: %s: %s",5);
                    /* WARNING: Subroutine does not return */
    fatal(format,pcVar1,pcVar5);
  }
  sVar8 = 0x1000;
  sVar7 = 0;
  pbVar3 = (bfd_byte *)xmalloc(0x1000);
  pa->contents = pbVar3;
  while( true ) {
    iVar2 = feof(__stream);
    if (iVar2 != 0) {
      pa->size = sVar7;
      fclose(__stream);
      return;
    }
    pbVar3 = pa->contents;
    if (sVar7 == sVar8) {
      sVar8 = sVar7 * 2;
      pbVar3 = (bfd_byte *)xrealloc(pbVar3,sVar8);
      pa->contents = pbVar3;
    }
    sVar4 = fread(pbVar3 + sVar7,1,sVar8 - sVar7,__stream);
    iVar2 = ferror(__stream);
    if (iVar2 != 0) break;
    sVar7 = sVar7 + sVar4;
  }
  pcVar1 = pa->filename;
  pcVar5 = (char *)dcgettext(0,"%s: fread failed",5);
                    /* WARNING: Subroutine does not return */
  fatal(pcVar5,pcVar1);
}



void FUN_00107a10(long param_1)

{
  int iVar1;
  FILE *__stream;
  undefined8 uVar2;
  size_t sVar3;
  long lVar4;
  undefined8 uVar5;
  int *piVar6;
  char *pcVar7;
  long lVar8;
  long lVar9;
  
  __stream = fopen(*(char **)(param_1 + 0x10),"r");
  if (__stream == (FILE *)0x0) {
    piVar6 = __errno_location();
    pcVar7 = strerror(*piVar6);
    uVar2 = *(undefined8 *)(param_1 + 0x10);
    uVar5 = dcgettext(0,"cannot open: %s: %s",5);
                    /* WARNING: Subroutine does not return */
    FUN_0011b5c0(uVar5,uVar2,pcVar7);
  }
  lVar9 = 0x1000;
  lVar8 = 0;
  uVar2 = xmalloc(0x1000);
  *(undefined8 *)(param_1 + 0x20) = uVar2;
  while( true ) {
    iVar1 = feof(__stream);
    if (iVar1 != 0) {
      *(long *)(param_1 + 0x18) = lVar8;
      fclose(__stream);
      return;
    }
    lVar4 = *(long *)(param_1 + 0x20);
    if (lVar8 == lVar9) {
      lVar9 = lVar8 * 2;
      lVar4 = xrealloc(lVar4,lVar9);
      *(long *)(param_1 + 0x20) = lVar4;
    }
    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);
    iVar1 = ferror(__stream);
    if (iVar1 != 0) break;
    lVar8 = lVar8 + sVar3;
  }
  uVar2 = *(undefined8 *)(param_1 + 0x10);
  uVar5 = dcgettext(0,"%s: fread failed",5);
                    /* WARNING: Subroutine does not return */
  FUN_0011b5c0(uVar5,uVar2);
}


PUSH R14
LEA RSI,[0x122f7b]
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
MOV RDI,qword ptr [RDI + 0x10]
CALL 0x00104760
TEST RAX,RAX
JZ 0x00107ae0
MOV EDI,0x1000
MOV RBP,RAX
MOV R12D,0x1000
XOR EBX,EBX
CALL 0x00104370
MOV qword ptr [R13 + 0x20],RAX
JMP 0x00107a78
MOV RDX,R12
ADD RDI,RBX
MOV RCX,RBP
MOV ESI,0x1
SUB RDX,RBX
CALL 0x00104150
MOV RDI,RBP
MOV R14,RAX
CALL 0x00104110
TEST EAX,EAX
JNZ 0x00107abc
ADD RBX,R14
MOV RDI,RBP
CALL 0x001044c0
TEST EAX,EAX
JNZ 0x00107aa8
MOV RDI,qword ptr [R13 + 0x20]
CMP RBX,R12
JNZ 0x00107a50
LEA R12,[RBX + RBX*0x1]
MOV RSI,R12
CALL 0x001042b0
MOV RDI,RAX
MOV qword ptr [R13 + 0x20],RAX
JMP 0x00107a50
MOV qword ptr [R13 + 0x18],RBX
MOV RDI,RBP
POP RBX
POP RBP
POP R12
POP R13
POP R14
JMP 0x001041f0
MOV RBX,qword ptr [R13 + 0x10]
LEA RSI,[0x11e04b]
XOR EDI,EDI
MOV EDX,0x5
CALL 0x00104240
MOV RDI,RAX
MOV RSI,RBX
XOR EAX,EAX
CALL 0x0011b5c0
CALL 0x001040a0
MOV EDI,dword ptr [RAX]
CALL 0x001048d0
MOV RBX,qword ptr [R13 + 0x10]
MOV EDX,0x5
XOR EDI,EDI
LEA RSI,[0x11e05c]
MOV RBP,RAX
CALL 0x00104240
MOV RDX,RBP
MOV RSI,RBX
MOV RDI,RAX
XOR EAX,EAX
CALL 0x0011b5c0
(translation_unit "void FUN_00107a10(long param_1)\n\n{\n  int iVar1;\n  FILE *__stream;\n  undefined8 uVar2;\n  size_t sVar3;\n  long lVar4;\n  undefined8 uVar5;\n  int *piVar6;\n  char *pcVar7;\n  long lVar8;\n  long lVar9;\n  \n  __stream = fopen(*(char **)(param_1 + 0x10),"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    /* WARNING: Subroutine does not return */\n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }\n  lVar9 = 0x1000;\n  lVar8 = 0;\n  uVar2 = xmalloc(0x1000);\n  *(undefined8 *)(param_1 + 0x20) = uVar2;\n  while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }\n  uVar2 = *(undefined8 *)(param_1 + 0x10);\n  uVar5 = dcgettext(0,"%s: fread failed",5);\n                    /* WARNING: Subroutine does not return */\n  FUN_0011b5c0(uVar5,uVar2);\n}\n\n" (function_definition "void FUN_00107a10(long param_1)\n\n{\n  int iVar1;\n  FILE *__stream;\n  undefined8 uVar2;\n  size_t sVar3;\n  long lVar4;\n  undefined8 uVar5;\n  int *piVar6;\n  char *pcVar7;\n  long lVar8;\n  long lVar9;\n  \n  __stream = fopen(*(char **)(param_1 + 0x10),"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    /* WARNING: Subroutine does not return */\n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }\n  lVar9 = 0x1000;\n  lVar8 = 0;\n  uVar2 = xmalloc(0x1000);\n  *(undefined8 *)(param_1 + 0x20) = uVar2;\n  while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }\n  uVar2 = *(undefined8 *)(param_1 + 0x10);\n  uVar5 = dcgettext(0,"%s: fread failed",5);\n                    /* WARNING: Subroutine does not return */\n  FUN_0011b5c0(uVar5,uVar2);\n}" primitive_type (function_declarator "FUN_00107a10(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  FILE *__stream;\n  undefined8 uVar2;\n  size_t sVar3;\n  long lVar4;\n  undefined8 uVar5;\n  int *piVar6;\n  char *pcVar7;\n  long lVar8;\n  long lVar9;\n  \n  __stream = fopen(*(char **)(param_1 + 0x10),"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    /* WARNING: Subroutine does not return */\n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }\n  lVar9 = 0x1000;\n  lVar8 = 0;\n  uVar2 = xmalloc(0x1000);\n  *(undefined8 *)(param_1 + 0x20) = uVar2;\n  while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }\n  uVar2 = *(undefined8 *)(param_1 + 0x10);\n  uVar5 = dcgettext(0,"%s: fread failed",5);\n                    /* WARNING: Subroutine does not return */\n  FUN_0011b5c0(uVar5,uVar2);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "long lVar8;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar9;" (sized_type_specifier "long" long) identifier ;) (expression_statement "__stream = fopen(*(char **)(param_1 + 0x10),"r");" (assignment_expression "__stream = fopen(*(char **)(param_1 + 0x10),"r")" identifier = (call_expression "fopen(*(char **)(param_1 + 0x10),"r")" identifier (argument_list "(*(char **)(param_1 + 0x10),"r")" ( (pointer_expression "*(char **)(param_1 + 0x10)" * (cast_expression "(char **)(param_1 + 0x10)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , (string_literal ""r"" " string_content ") )))) ;) (if_statement "if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    /* WARNING: Subroutine does not return */\n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    /* WARNING: Subroutine does not return */\n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }" { (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar7 = strerror(*piVar6);" (assignment_expression "pcVar7 = strerror(*piVar6)" identifier = (call_expression "strerror(*piVar6)" identifier (argument_list "(*piVar6)" ( (pointer_expression "*piVar6" * identifier) )))) ;) (expression_statement "uVar2 = *(undefined8 *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(undefined8 *)(param_1 + 0x10)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = dcgettext(0,"cannot open: %s: %s",5);" (assignment_expression "uVar5 = dcgettext(0,"cannot open: %s: %s",5)" identifier = (call_expression "dcgettext(0,"cannot open: %s: %s",5)" identifier (argument_list "(0,"cannot open: %s: %s",5)" ( number_literal , (string_literal ""cannot open: %s: %s"" " string_content ") , number_literal )))) ;) comment (expression_statement "FUN_0011b5c0(uVar5,uVar2,pcVar7);" (call_expression "FUN_0011b5c0(uVar5,uVar2,pcVar7)" identifier (argument_list "(uVar5,uVar2,pcVar7)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "lVar9 = 0x1000;" (assignment_expression "lVar9 = 0x1000" identifier = number_literal) ;) (expression_statement "lVar8 = 0;" (assignment_expression "lVar8 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = xmalloc(0x1000);" (assignment_expression "uVar2 = xmalloc(0x1000)" identifier = (call_expression "xmalloc(0x1000)" identifier (argument_list "(0x1000)" ( number_literal )))) ;) (expression_statement "*(undefined8 *)(param_1 + 0x20) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x20) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x20)" * (cast_expression "(undefined8 *)(param_1 + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (while_statement "while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }" { (expression_statement "iVar1 = feof(__stream);" (assignment_expression "iVar1 = feof(__stream)" identifier = (call_expression "feof(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }" { (expression_statement "*(long *)(param_1 + 0x18) = lVar8;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar8" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "lVar4 = *(long *)(param_1 + 0x20);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x20)" identifier = (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) ;) (if_statement "if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }" if (parenthesized_expression "(lVar8 == lVar9)" ( (binary_expression "lVar8 == lVar9" identifier == identifier) )) (compound_statement "{\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }" { (expression_statement "lVar9 = lVar8 * 2;" (assignment_expression "lVar9 = lVar8 * 2" identifier = (binary_expression "lVar8 * 2" identifier * number_literal)) ;) (expression_statement "lVar4 = xrealloc(lVar4,lVar9);" (assignment_expression "lVar4 = xrealloc(lVar4,lVar9)" identifier = (call_expression "xrealloc(lVar4,lVar9)" identifier (argument_list "(lVar4,lVar9)" ( identifier , identifier )))) ;) (expression_statement "*(long *)(param_1 + 0x20) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x20) = lVar4" (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);" (assignment_expression "sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream)" identifier = (call_expression "fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream)" identifier (argument_list "((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream)" ( (cast_expression "(void *)(lVar4 + lVar8)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar4 + lVar8)" ( (binary_expression "lVar4 + lVar8" identifier + identifier) ))) , number_literal , (binary_expression "lVar9 - lVar8" identifier - identifier) , identifier )))) ;) (expression_statement "iVar1 = ferror(__stream);" (assignment_expression "iVar1 = ferror(__stream)" identifier = (call_expression "ferror(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) break;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar8 = lVar8 + sVar3;" (assignment_expression "lVar8 = lVar8 + sVar3" identifier = (binary_expression "lVar8 + sVar3" identifier + identifier)) ;) })) (expression_statement "uVar2 = *(undefined8 *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(undefined8 *)(param_1 + 0x10)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = dcgettext(0,"%s: fread failed",5);" (assignment_expression "uVar5 = dcgettext(0,"%s: fread failed",5)" identifier = (call_expression "dcgettext(0,"%s: fread failed",5)" identifier (argument_list "(0,"%s: fread failed",5)" ( number_literal , (string_literal ""%s: fread failed"" " string_content ") , number_literal )))) ;) comment (expression_statement "FUN_0011b5c0(uVar5,uVar2);" (call_expression "FUN_0011b5c0(uVar5,uVar2)" identifier (argument_list "(uVar5,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit "void section_add_load_file(section_add *pa)\n\n{\n  char *pcVar1;\n  int iVar2;\n  FILE *__stream;\n  bfd_byte *pbVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int *piVar6;\n  char *format;\n  size_t sVar7;\n  size_t sVar8;\n  \n  __stream = fopen(pa->filename,"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar5 = strerror(*piVar6);\n    pcVar1 = pa->filename;\n    format = (char *)dcgettext(0,"cannot open: %s: %s",5);\n                    /* WARNING: Subroutine does not return */\n    fatal(format,pcVar1,pcVar5);\n  }\n  sVar8 = 0x1000;\n  sVar7 = 0;\n  pbVar3 = (bfd_byte *)xmalloc(0x1000);\n  pa->contents = pbVar3;\n  while( true ) {\n    iVar2 = feof(__stream);\n    if (iVar2 != 0) {\n      pa->size = sVar7;\n      fclose(__stream);\n      return;\n    }\n    pbVar3 = pa->contents;\n    if (sVar7 == sVar8) {\n      sVar8 = sVar7 * 2;\n      pbVar3 = (bfd_byte *)xrealloc(pbVar3,sVar8);\n      pa->contents = pbVar3;\n    }\n    sVar4 = fread(pbVar3 + sVar7,1,sVar8 - sVar7,__stream);\n    iVar2 = ferror(__stream);\n    if (iVar2 != 0) break;\n    sVar7 = sVar7 + sVar4;\n  }\n  pcVar1 = pa->filename;\n  pcVar5 = (char *)dcgettext(0,"%s: fread failed",5);\n                    /* WARNING: Subroutine does not return */\n  fatal(pcVar5,pcVar1);\n}\n\n" (function_definition "void section_add_load_file(section_add *pa)\n\n{\n  char *pcVar1;\n  int iVar2;\n  FILE *__stream;\n  bfd_byte *pbVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int *piVar6;\n  char *format;\n  size_t sVar7;\n  size_t sVar8;\n  \n  __stream = fopen(pa->filename,"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar5 = strerror(*piVar6);\n    pcVar1 = pa->filename;\n    format = (char *)dcgettext(0,"cannot open: %s: %s",5);\n                    /* WARNING: Subroutine does not return */\n    fatal(format,pcVar1,pcVar5);\n  }\n  sVar8 = 0x1000;\n  sVar7 = 0;\n  pbVar3 = (bfd_byte *)xmalloc(0x1000);\n  pa->contents = pbVar3;\n  while( true ) {\n    iVar2 = feof(__stream);\n    if (iVar2 != 0) {\n      pa->size = sVar7;\n      fclose(__stream);\n      return;\n    }\n    pbVar3 = pa->contents;\n    if (sVar7 == sVar8) {\n      sVar8 = sVar7 * 2;\n      pbVar3 = (bfd_byte *)xrealloc(pbVar3,sVar8);\n      pa->contents = pbVar3;\n    }\n    sVar4 = fread(pbVar3 + sVar7,1,sVar8 - sVar7,__stream);\n    iVar2 = ferror(__stream);\n    if (iVar2 != 0) break;\n    sVar7 = sVar7 + sVar4;\n  }\n  pcVar1 = pa->filename;\n  pcVar5 = (char *)dcgettext(0,"%s: fread failed",5);\n                    /* WARNING: Subroutine does not return */\n  fatal(pcVar5,pcVar1);\n}" primitive_type (function_declarator "section_add_load_file(section_add *pa)" identifier (parameter_list "(section_add *pa)" ( (parameter_declaration "section_add *pa" type_identifier (pointer_declarator "*pa" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  FILE *__stream;\n  bfd_byte *pbVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int *piVar6;\n  char *format;\n  size_t sVar7;\n  size_t sVar8;\n  \n  __stream = fopen(pa->filename,"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar5 = strerror(*piVar6);\n    pcVar1 = pa->filename;\n    format = (char *)dcgettext(0,"cannot open: %s: %s",5);\n                    /* WARNING: Subroutine does not return */\n    fatal(format,pcVar1,pcVar5);\n  }\n  sVar8 = 0x1000;\n  sVar7 = 0;\n  pbVar3 = (bfd_byte *)xmalloc(0x1000);\n  pa->contents = pbVar3;\n  while( true ) {\n    iVar2 = feof(__stream);\n    if (iVar2 != 0) {\n      pa->size = sVar7;\n      fclose(__stream);\n      return;\n    }\n    pbVar3 = pa->contents;\n    if (sVar7 == sVar8) {\n      sVar8 = sVar7 * 2;\n      pbVar3 = (bfd_byte *)xrealloc(pbVar3,sVar8);\n      pa->contents = pbVar3;\n    }\n    sVar4 = fread(pbVar3 + sVar7,1,sVar8 - sVar7,__stream);\n    iVar2 = ferror(__stream);\n    if (iVar2 != 0) break;\n    sVar7 = sVar7 + sVar4;\n  }\n  pcVar1 = pa->filename;\n  pcVar5 = (char *)dcgettext(0,"%s: fread failed",5);\n                    /* WARNING: Subroutine does not return */\n  fatal(pcVar5,pcVar1);\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "bfd_byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "char *format;" primitive_type (pointer_declarator "*format" * identifier) ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "size_t sVar8;" primitive_type identifier ;) (expression_statement "__stream = fopen(pa->filename,"r");" (assignment_expression "__stream = fopen(pa->filename,"r")" identifier = (call_expression "fopen(pa->filename,"r")" identifier (argument_list "(pa->filename,"r")" ( (field_expression "pa->filename" identifier -> field_identifier) , (string_literal ""r"" " string_content ") )))) ;) (if_statement "if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar5 = strerror(*piVar6);\n    pcVar1 = pa->filename;\n    format = (char *)dcgettext(0,"cannot open: %s: %s",5);\n                    /* WARNING: Subroutine does not return */\n    fatal(format,pcVar1,pcVar5);\n  }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar6 = __errno_location();\n    pcVar5 = strerror(*piVar6);\n    pcVar1 = pa->filename;\n    format = (char *)dcgettext(0,"cannot open: %s: %s",5);\n                    /* WARNING: Subroutine does not return */\n    fatal(format,pcVar1,pcVar5);\n  }" { (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar5 = strerror(*piVar6);" (assignment_expression "pcVar5 = strerror(*piVar6)" identifier = (call_expression "strerror(*piVar6)" identifier (argument_list "(*piVar6)" ( (pointer_expression "*piVar6" * identifier) )))) ;) (expression_statement "pcVar1 = pa->filename;" (assignment_expression "pcVar1 = pa->filename" identifier = (field_expression "pa->filename" identifier -> field_identifier)) ;) (expression_statement "format = (char *)dcgettext(0,"cannot open: %s: %s",5);" (assignment_expression "format = (char *)dcgettext(0,"cannot open: %s: %s",5)" identifier = (cast_expression "(char *)dcgettext(0,"cannot open: %s: %s",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"cannot open: %s: %s",5)" identifier (argument_list "(0,"cannot open: %s: %s",5)" ( number_literal , (string_literal ""cannot open: %s: %s"" " string_content ") , number_literal ))))) ;) comment (expression_statement "fatal(format,pcVar1,pcVar5);" (call_expression "fatal(format,pcVar1,pcVar5)" identifier (argument_list "(format,pcVar1,pcVar5)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "sVar8 = 0x1000;" (assignment_expression "sVar8 = 0x1000" identifier = number_literal) ;) (expression_statement "sVar7 = 0;" (assignment_expression "sVar7 = 0" identifier = number_literal) ;) (expression_statement "pbVar3 = (bfd_byte *)xmalloc(0x1000);" (assignment_expression "pbVar3 = (bfd_byte *)xmalloc(0x1000)" identifier = (cast_expression "(bfd_byte *)xmalloc(0x1000)" ( (type_descriptor "bfd_byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x1000)" identifier (argument_list "(0x1000)" ( number_literal ))))) ;) (expression_statement "pa->contents = pbVar3;" (assignment_expression "pa->contents = pbVar3" (field_expression "pa->contents" identifier -> field_identifier) = identifier) ;) (while_statement "while( true ) {\n    iVar2 = feof(__stream);\n    if (iVar2 != 0) {\n      pa->size = sVar7;\n      fclose(__stream);\n      return;\n    }\n    pbVar3 = pa->contents;\n    if (sVar7 == sVar8) {\n      sVar8 = sVar7 * 2;\n      pbVar3 = (bfd_byte *)xrealloc(pbVar3,sVar8);\n      pa->contents = pbVar3;\n    }\n    sVar4 = fread(pbVar3 + sVar7,1,sVar8 - sVar7,__stream);\n    iVar2 = ferror(__stream);\n    if (iVar2 != 0) break;\n    sVar7 = sVar7 + sVar4;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar2 = feof(__stream);\n    if (iVar2 != 0) {\n      pa->size = sVar7;\n      fclose(__stream);\n      return;\n    }\n    pbVar3 = pa->contents;\n    if (sVar7 == sVar8) {\n      sVar8 = sVar7 * 2;\n      pbVar3 = (bfd_byte *)xrealloc(pbVar3,sVar8);\n      pa->contents = pbVar3;\n    }\n    sVar4 = fread(pbVar3 + sVar7,1,sVar8 - sVar7,__stream);\n    iVar2 = ferror(__stream);\n    if (iVar2 != 0) break;\n    sVar7 = sVar7 + sVar4;\n  }" { (expression_statement "iVar2 = feof(__stream);" (assignment_expression "iVar2 = feof(__stream)" identifier = (call_expression "feof(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      pa->size = sVar7;\n      fclose(__stream);\n      return;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      pa->size = sVar7;\n      fclose(__stream);\n      return;\n    }" { (expression_statement "pa->size = sVar7;" (assignment_expression "pa->size = sVar7" (field_expression "pa->size" identifier -> field_identifier) = identifier) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "pbVar3 = pa->contents;" (assignment_expression "pbVar3 = pa->contents" identifier = (field_expression "pa->contents" identifier -> field_identifier)) ;) (if_statement "if (sVar7 == sVar8) {\n      sVar8 = sVar7 * 2;\n      pbVar3 = (bfd_byte *)xrealloc(pbVar3,sVar8);\n      pa->contents = pbVar3;\n    }" if (parenthesized_expression "(sVar7 == sVar8)" ( (binary_expression "sVar7 == sVar8" identifier == identifier) )) (compound_statement "{\n      sVar8 = sVar7 * 2;\n      pbVar3 = (bfd_byte *)xrealloc(pbVar3,sVar8);\n      pa->contents = pbVar3;\n    }" { (expression_statement "sVar8 = sVar7 * 2;" (assignment_expression "sVar8 = sVar7 * 2" identifier = (binary_expression "sVar7 * 2" identifier * number_literal)) ;) (expression_statement "pbVar3 = (bfd_byte *)xrealloc(pbVar3,sVar8);" (assignment_expression "pbVar3 = (bfd_byte *)xrealloc(pbVar3,sVar8)" identifier = (cast_expression "(bfd_byte *)xrealloc(pbVar3,sVar8)" ( (type_descriptor "bfd_byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xrealloc(pbVar3,sVar8)" identifier (argument_list "(pbVar3,sVar8)" ( identifier , identifier ))))) ;) (expression_statement "pa->contents = pbVar3;" (assignment_expression "pa->contents = pbVar3" (field_expression "pa->contents" identifier -> field_identifier) = identifier) ;) })) (expression_statement "sVar4 = fread(pbVar3 + sVar7,1,sVar8 - sVar7,__stream);" (assignment_expression "sVar4 = fread(pbVar3 + sVar7,1,sVar8 - sVar7,__stream)" identifier = (call_expression "fread(pbVar3 + sVar7,1,sVar8 - sVar7,__stream)" identifier (argument_list "(pbVar3 + sVar7,1,sVar8 - sVar7,__stream)" ( (binary_expression "pbVar3 + sVar7" identifier + identifier) , number_literal , (binary_expression "sVar8 - sVar7" identifier - identifier) , identifier )))) ;) (expression_statement "iVar2 = ferror(__stream);" (assignment_expression "iVar2 = ferror(__stream)" identifier = (call_expression "ferror(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) break;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "sVar7 = sVar7 + sVar4;" (assignment_expression "sVar7 = sVar7 + sVar4" identifier = (binary_expression "sVar7 + sVar4" identifier + identifier)) ;) })) (expression_statement "pcVar1 = pa->filename;" (assignment_expression "pcVar1 = pa->filename" identifier = (field_expression "pa->filename" identifier -> field_identifier)) ;) (expression_statement "pcVar5 = (char *)dcgettext(0,"%s: fread failed",5);" (assignment_expression "pcVar5 = (char *)dcgettext(0,"%s: fread failed",5)" identifier = (cast_expression "(char *)dcgettext(0,"%s: fread failed",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"%s: fread failed",5)" identifier (argument_list "(0,"%s: fread failed",5)" ( number_literal , (string_literal ""%s: fread failed"" " string_content ") , number_literal ))))) ;) comment (expression_statement "fatal(pcVar5,pcVar1);" (call_expression "fatal(pcVar5,pcVar1)" identifier (argument_list "(pcVar5,pcVar1)" ( identifier , identifier ))) ;) })))
(translation_unit "void FUN_00107a10(long param_1)\n\n{\n  int iVar1;\n  FILE *__stream;\n  undefined8 uVar2;\n  size_t sVar3;\n  long lVar4;\n  undefined8 uVar5;\n  int *piVar6;\n  char *pcVar7;\n  long lVar8;\n  long lVar9;\n  \n  __stream = fopen(*(char **)(param_1 + 0x10),"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    \n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }\n  lVar9 = 0x1000;\n  lVar8 = 0;\n  uVar2 = xmalloc(0x1000);\n  *(undefined8 *)(param_1 + 0x20) = uVar2;\n  while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }\n  uVar2 = *(undefined8 *)(param_1 + 0x10);\n  uVar5 = dcgettext(0,"%s: fread failed",5);\n                    \n  FUN_0011b5c0(uVar5,uVar2);\n}\n\n" (function_definition "void FUN_00107a10(long param_1)\n\n{\n  int iVar1;\n  FILE *__stream;\n  undefined8 uVar2;\n  size_t sVar3;\n  long lVar4;\n  undefined8 uVar5;\n  int *piVar6;\n  char *pcVar7;\n  long lVar8;\n  long lVar9;\n  \n  __stream = fopen(*(char **)(param_1 + 0x10),"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    \n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }\n  lVar9 = 0x1000;\n  lVar8 = 0;\n  uVar2 = xmalloc(0x1000);\n  *(undefined8 *)(param_1 + 0x20) = uVar2;\n  while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }\n  uVar2 = *(undefined8 *)(param_1 + 0x10);\n  uVar5 = dcgettext(0,"%s: fread failed",5);\n                    \n  FUN_0011b5c0(uVar5,uVar2);\n}" primitive_type (function_declarator "FUN_00107a10(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  FILE *__stream;\n  undefined8 uVar2;\n  size_t sVar3;\n  long lVar4;\n  undefined8 uVar5;\n  int *piVar6;\n  char *pcVar7;\n  long lVar8;\n  long lVar9;\n  \n  __stream = fopen(*(char **)(param_1 + 0x10),"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    \n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }\n  lVar9 = 0x1000;\n  lVar8 = 0;\n  uVar2 = xmalloc(0x1000);\n  *(undefined8 *)(param_1 + 0x20) = uVar2;\n  while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }\n  uVar2 = *(undefined8 *)(param_1 + 0x10);\n  uVar5 = dcgettext(0,"%s: fread failed",5);\n                    \n  FUN_0011b5c0(uVar5,uVar2);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "long lVar8;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar9;" (sized_type_specifier "long" long) identifier ;) (expression_statement "__stream = fopen(*(char **)(param_1 + 0x10),"r");" (assignment_expression "__stream = fopen(*(char **)(param_1 + 0x10),"r")" identifier = (call_expression "fopen(*(char **)(param_1 + 0x10),"r")" identifier (argument_list "(*(char **)(param_1 + 0x10),"r")" ( (pointer_expression "*(char **)(param_1 + 0x10)" * (cast_expression "(char **)(param_1 + 0x10)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , (string_literal ""r"" " string_content ") )))) ;) (if_statement "if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    \n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    \n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }" { (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar7 = strerror(*piVar6);" (assignment_expression "pcVar7 = strerror(*piVar6)" identifier = (call_expression "strerror(*piVar6)" identifier (argument_list "(*piVar6)" ( (pointer_expression "*piVar6" * identifier) )))) ;) (expression_statement "uVar2 = *(undefined8 *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(undefined8 *)(param_1 + 0x10)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = dcgettext(0,"cannot open: %s: %s",5);" (assignment_expression "uVar5 = dcgettext(0,"cannot open: %s: %s",5)" identifier = (call_expression "dcgettext(0,"cannot open: %s: %s",5)" identifier (argument_list "(0,"cannot open: %s: %s",5)" ( number_literal , (string_literal ""cannot open: %s: %s"" " string_content ") , number_literal )))) ;) (expression_statement "FUN_0011b5c0(uVar5,uVar2,pcVar7);" (call_expression "FUN_0011b5c0(uVar5,uVar2,pcVar7)" identifier (argument_list "(uVar5,uVar2,pcVar7)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "lVar9 = 0x1000;" (assignment_expression "lVar9 = 0x1000" identifier = number_literal) ;) (expression_statement "lVar8 = 0;" (assignment_expression "lVar8 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = xmalloc(0x1000);" (assignment_expression "uVar2 = xmalloc(0x1000)" identifier = (call_expression "xmalloc(0x1000)" identifier (argument_list "(0x1000)" ( number_literal )))) ;) (expression_statement "*(undefined8 *)(param_1 + 0x20) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x20) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x20)" * (cast_expression "(undefined8 *)(param_1 + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (while_statement "while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }" { (expression_statement "iVar1 = feof(__stream);" (assignment_expression "iVar1 = feof(__stream)" identifier = (call_expression "feof(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }" { (expression_statement "*(long *)(param_1 + 0x18) = lVar8;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar8" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "lVar4 = *(long *)(param_1 + 0x20);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x20)" identifier = (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) ;) (if_statement "if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }" if (parenthesized_expression "(lVar8 == lVar9)" ( (binary_expression "lVar8 == lVar9" identifier == identifier) )) (compound_statement "{\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }" { (expression_statement "lVar9 = lVar8 * 2;" (assignment_expression "lVar9 = lVar8 * 2" identifier = (binary_expression "lVar8 * 2" identifier * number_literal)) ;) (expression_statement "lVar4 = xrealloc(lVar4,lVar9);" (assignment_expression "lVar4 = xrealloc(lVar4,lVar9)" identifier = (call_expression "xrealloc(lVar4,lVar9)" identifier (argument_list "(lVar4,lVar9)" ( identifier , identifier )))) ;) (expression_statement "*(long *)(param_1 + 0x20) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x20) = lVar4" (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);" (assignment_expression "sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream)" identifier = (call_expression "fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream)" identifier (argument_list "((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream)" ( (cast_expression "(void *)(lVar4 + lVar8)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar4 + lVar8)" ( (binary_expression "lVar4 + lVar8" identifier + identifier) ))) , number_literal , (binary_expression "lVar9 - lVar8" identifier - identifier) , identifier )))) ;) (expression_statement "iVar1 = ferror(__stream);" (assignment_expression "iVar1 = ferror(__stream)" identifier = (call_expression "ferror(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) break;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar8 = lVar8 + sVar3;" (assignment_expression "lVar8 = lVar8 + sVar3" identifier = (binary_expression "lVar8 + sVar3" identifier + identifier)) ;) })) (expression_statement "uVar2 = *(undefined8 *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(undefined8 *)(param_1 + 0x10)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = dcgettext(0,"%s: fread failed",5);" (assignment_expression "uVar5 = dcgettext(0,"%s: fread failed",5)" identifier = (call_expression "dcgettext(0,"%s: fread failed",5)" identifier (argument_list "(0,"%s: fread failed",5)" ( number_literal , (string_literal ""%s: fread failed"" " string_content ") , number_literal )))) ;) (expression_statement "FUN_0011b5c0(uVar5,uVar2);" (call_expression "FUN_0011b5c0(uVar5,uVar2)" identifier (argument_list "(uVar5,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (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 = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) , LIT , (binary_expression IDENT - IDENT) , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })))
(function_definition "void FUN_00107a10(long param_1)\n\n{\n  int iVar1;\n  FILE *__stream;\n  undefined8 uVar2;\n  size_t sVar3;\n  long lVar4;\n  undefined8 uVar5;\n  int *piVar6;\n  char *pcVar7;\n  long lVar8;\n  long lVar9;\n  \n  __stream = fopen(*(char **)(param_1 + 0x10),"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    \n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }\n  lVar9 = 0x1000;\n  lVar8 = 0;\n  uVar2 = xmalloc(0x1000);\n  *(undefined8 *)(param_1 + 0x20) = uVar2;\n  while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }\n  uVar2 = *(undefined8 *)(param_1 + 0x10);\n  uVar5 = dcgettext(0,"%s: fread failed",5);\n                    \n  FUN_0011b5c0(uVar5,uVar2);\n}" (primitive_type "void") (function_declarator "FUN_00107a10(long param_1)" (identifier "FUN_00107a10") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  FILE *__stream;\n  undefined8 uVar2;\n  size_t sVar3;\n  long lVar4;\n  undefined8 uVar5;\n  int *piVar6;\n  char *pcVar7;\n  long lVar8;\n  long lVar9;\n  \n  __stream = fopen(*(char **)(param_1 + 0x10),"r");\n  if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    \n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }\n  lVar9 = 0x1000;\n  lVar8 = 0;\n  uVar2 = xmalloc(0x1000);\n  *(undefined8 *)(param_1 + 0x20) = uVar2;\n  while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }\n  uVar2 = *(undefined8 *)(param_1 + 0x10);\n  uVar5 = dcgettext(0,"%s: fread failed",5);\n                    \n  FUN_0011b5c0(uVar5,uVar2);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "FILE *__stream;" (type_identifier "FILE") (pointer_declarator "*__stream" (* "*") (identifier "__stream")) (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "long lVar4;" (sized_type_specifier "long" (long "long")) (identifier "lVar4") (; ";")) (declaration "undefined8 uVar5;" (type_identifier "undefined8") (identifier "uVar5") (; ";")) (declaration "int *piVar6;" (primitive_type "int") (pointer_declarator "*piVar6" (* "*") (identifier "piVar6")) (; ";")) (declaration "char *pcVar7;" (primitive_type "char") (pointer_declarator "*pcVar7" (* "*") (identifier "pcVar7")) (; ";")) (declaration "long lVar8;" (sized_type_specifier "long" (long "long")) (identifier "lVar8") (; ";")) (declaration "long lVar9;" (sized_type_specifier "long" (long "long")) (identifier "lVar9") (; ";")) (expression_statement "__stream = fopen(*(char **)(param_1 + 0x10),"r");" (assignment_expression "__stream = fopen(*(char **)(param_1 + 0x10),"r")" (identifier "__stream") (= "=") (call_expression "fopen(*(char **)(param_1 + 0x10),"r")" (identifier "fopen") (argument_list "(*(char **)(param_1 + 0x10),"r")" (( "(") (pointer_expression "*(char **)(param_1 + 0x10)" (* "*") (cast_expression "(char **)(param_1 + 0x10)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (string_literal ""r"" (" """) (string_content "r") (" """)) () ")")))) (; ";")) (if_statement "if (__stream == (FILE *)0x0) {\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    \n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }" (if "if") (parenthesized_expression "(__stream == (FILE *)0x0)" (( "(") (binary_expression "__stream == (FILE *)0x0" (identifier "__stream") (== "==") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    piVar6 = __errno_location();\n    pcVar7 = strerror(*piVar6);\n    uVar2 = *(undefined8 *)(param_1 + 0x10);\n    uVar5 = dcgettext(0,"cannot open: %s: %s",5);\n                    \n    FUN_0011b5c0(uVar5,uVar2,pcVar7);\n  }" ({ "{") (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" (identifier "piVar6") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar7 = strerror(*piVar6);" (assignment_expression "pcVar7 = strerror(*piVar6)" (identifier "pcVar7") (= "=") (call_expression "strerror(*piVar6)" (identifier "strerror") (argument_list "(*piVar6)" (( "(") (pointer_expression "*piVar6" (* "*") (identifier "piVar6")) () ")")))) (; ";")) (expression_statement "uVar2 = *(undefined8 *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(undefined8 *)(param_1 + 0x10)" (identifier "uVar2") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uVar5 = dcgettext(0,"cannot open: %s: %s",5);" (assignment_expression "uVar5 = dcgettext(0,"cannot open: %s: %s",5)" (identifier "uVar5") (= "=") (call_expression "dcgettext(0,"cannot open: %s: %s",5)" (identifier "dcgettext") (argument_list "(0,"cannot open: %s: %s",5)" (( "(") (number_literal "0") (, ",") (string_literal ""cannot open: %s: %s"" (" """) (string_content "cannot open: %s: %s") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_0011b5c0(uVar5,uVar2,pcVar7);" (call_expression "FUN_0011b5c0(uVar5,uVar2,pcVar7)" (identifier "FUN_0011b5c0") (argument_list "(uVar5,uVar2,pcVar7)" (( "(") (identifier "uVar5") (, ",") (identifier "uVar2") (, ",") (identifier "pcVar7") () ")"))) (; ";")) (} "}"))) (expression_statement "lVar9 = 0x1000;" (assignment_expression "lVar9 = 0x1000" (identifier "lVar9") (= "=") (number_literal "0x1000")) (; ";")) (expression_statement "lVar8 = 0;" (assignment_expression "lVar8 = 0" (identifier "lVar8") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = xmalloc(0x1000);" (assignment_expression "uVar2 = xmalloc(0x1000)" (identifier "uVar2") (= "=") (call_expression "xmalloc(0x1000)" (identifier "xmalloc") (argument_list "(0x1000)" (( "(") (number_literal "0x1000") () ")")))) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0x20) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x20) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (while_statement "while( true ) {\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    iVar1 = feof(__stream);\n    if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }\n    lVar4 = *(long *)(param_1 + 0x20);\n    if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }\n    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);\n    iVar1 = ferror(__stream);\n    if (iVar1 != 0) break;\n    lVar8 = lVar8 + sVar3;\n  }" ({ "{") (expression_statement "iVar1 = feof(__stream);" (assignment_expression "iVar1 = feof(__stream)" (identifier "iVar1") (= "=") (call_expression "feof(__stream)" (identifier "feof") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      *(long *)(param_1 + 0x18) = lVar8;\n      fclose(__stream);\n      return;\n    }" ({ "{") (expression_statement "*(long *)(param_1 + 0x18) = lVar8;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar8" (pointer_expression "*(long *)(param_1 + 0x18)" (* "*") (cast_expression "(long *)(param_1 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "lVar8")) (; ";")) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" (identifier "fclose") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "lVar4 = *(long *)(param_1 + 0x20);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x20)" (identifier "lVar4") (= "=") (pointer_expression "*(long *)(param_1 + 0x20)" (* "*") (cast_expression "(long *)(param_1 + 0x20)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")"))))) (; ";")) (if_statement "if (lVar8 == lVar9) {\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }" (if "if") (parenthesized_expression "(lVar8 == lVar9)" (( "(") (binary_expression "lVar8 == lVar9" (identifier "lVar8") (== "==") (identifier "lVar9")) () ")")) (compound_statement "{\n      lVar9 = lVar8 * 2;\n      lVar4 = xrealloc(lVar4,lVar9);\n      *(long *)(param_1 + 0x20) = lVar4;\n    }" ({ "{") (expression_statement "lVar9 = lVar8 * 2;" (assignment_expression "lVar9 = lVar8 * 2" (identifier "lVar9") (= "=") (binary_expression "lVar8 * 2" (identifier "lVar8") (* "*") (number_literal "2"))) (; ";")) (expression_statement "lVar4 = xrealloc(lVar4,lVar9);" (assignment_expression "lVar4 = xrealloc(lVar4,lVar9)" (identifier "lVar4") (= "=") (call_expression "xrealloc(lVar4,lVar9)" (identifier "xrealloc") (argument_list "(lVar4,lVar9)" (( "(") (identifier "lVar4") (, ",") (identifier "lVar9") () ")")))) (; ";")) (expression_statement "*(long *)(param_1 + 0x20) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x20) = lVar4" (pointer_expression "*(long *)(param_1 + 0x20)" (* "*") (cast_expression "(long *)(param_1 + 0x20)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "lVar4")) (; ";")) (} "}"))) (expression_statement "sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);" (assignment_expression "sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream)" (identifier "sVar3") (= "=") (call_expression "fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream)" (identifier "fread") (argument_list "((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream)" (( "(") (cast_expression "(void *)(lVar4 + lVar8)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar4 + lVar8)" (( "(") (binary_expression "lVar4 + lVar8" (identifier "lVar4") (+ "+") (identifier "lVar8")) () ")"))) (, ",") (number_literal "1") (, ",") (binary_expression "lVar9 - lVar8" (identifier "lVar9") (- "-") (identifier "lVar8")) (, ",") (identifier "__stream") () ")")))) (; ";")) (expression_statement "iVar1 = ferror(__stream);" (assignment_expression "iVar1 = ferror(__stream)" (identifier "iVar1") (= "=") (call_expression "ferror(__stream)" (identifier "ferror") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) break;" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar8 = lVar8 + sVar3;" (assignment_expression "lVar8 = lVar8 + sVar3" (identifier "lVar8") (= "=") (binary_expression "lVar8 + sVar3" (identifier "lVar8") (+ "+") (identifier "sVar3"))) (; ";")) (} "}"))) (expression_statement "uVar2 = *(undefined8 *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(undefined8 *)(param_1 + 0x10)" (identifier "uVar2") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uVar5 = dcgettext(0,"%s: fread failed",5);" (assignment_expression "uVar5 = dcgettext(0,"%s: fread failed",5)" (identifier "uVar5") (= "=") (call_expression "dcgettext(0,"%s: fread failed",5)" (identifier "dcgettext") (argument_list "(0,"%s: fread failed",5)" (( "(") (number_literal "0") (, ",") (string_literal ""%s: fread failed"" (" """) (string_content "%s: fread failed") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_0011b5c0(uVar5,uVar2);" (call_expression "FUN_0011b5c0(uVar5,uVar2)" (identifier "FUN_0011b5c0") (argument_list "(uVar5,uVar2)" (( "(") (identifier "uVar5") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}")))

void function_1(type_1 *pa)

{
  char *pcVar1;
  int var_9;
  type_2 *var_2;
  type_3 *var_15;
  size_t var_17;
  char *pcVar5;
  int *piVar6;
  char *format;
  size_t var_11;
  size_t var_12;
  
  var_2 = var_1(pa->filename,"r");
  if (var_2 == (type_2 *)0x0) {
    piVar6 = var_3();
    pcVar5 = var_4(*piVar6);
    pcVar1 = pa->filename;
    format = (char *)var_5(0,"cannot open: %s: %s",5);
                    /* WARNING: Subroutine does not return */
    var_6(format,pcVar1,pcVar5);
  }
  var_12 = 0x1000;
  var_11 = 0;
  var_15 = (type_3 *)var_7(0x1000);
  pa->contents = var_15;
  while( true ) {
    var_9 = var_8(var_2);
    if (var_9 != 0) {
      pa->size = var_11;
      var_10(var_2);
      return;
    }
    var_15 = pa->contents;
    if (var_11 == var_12) {
      var_12 = var_11 * 2;
      var_15 = (type_3 *)var_13(var_15,var_12);
      pa->contents = var_15;
    }
    var_17 = var_14(var_15 + var_11,1,var_12 - var_11,var_2);
    var_9 = var_16(var_2);
    if (var_9 != 0) break;
    var_11 = var_11 + var_17;
  }
  pcVar1 = pa->filename;
  pcVar5 = (char *)var_5(0,"%s: fread failed",5);
                    /* WARNING: Subroutine does not return */
  var_6(pcVar5,pcVar1);
}


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

void MASKED(long param_1)

{
  int iVar1;
  FILE *__stream;
  undefined8 uVar2;
  size_t sVar3;
  long lVar4;
  undefined8 uVar5;
  int *piVar6;
  char *pcVar7;
  long lVar8;
  long lVar9;
  
  __stream = fopen(*(char **)(param_1 + 0x10),"r");
  if (__stream == (FILE *)0x0) {
    piVar6 = __errno_location();
    pcVar7 = strerror(*piVar6);
    uVar2 = *(undefined8 *)(param_1 + 0x10);
    uVar5 = dcgettext(0,"cannot open: %s: %s",5);
                    /* WARNING: Subroutine does not return */
    FUN_0011b5c0(uVar5,uVar2,pcVar7);
  }
  lVar9 = 0x1000;
  lVar8 = 0;
  uVar2 = xmalloc(0x1000);
  *(undefined8 *)(param_1 + 0x20) = uVar2;
  while( true ) {
    iVar1 = feof(__stream);
    if (iVar1 != 0) {
      *(long *)(param_1 + 0x18) = lVar8;
      fclose(__stream);
      return;
    }
    lVar4 = *(long *)(param_1 + 0x20);
    if (lVar8 == lVar9) {
      lVar9 = lVar8 * 2;
      lVar4 = xrealloc(lVar4,lVar9);
      *(long *)(param_1 + 0x20) = lVar4;
    }
    sVar3 = fread((void *)(lVar4 + lVar8),1,lVar9 - lVar8,__stream);
    iVar1 = ferror(__stream);
    if (iVar1 != 0) break;
    lVar8 = lVar8 + sVar3;
  }
  uVar2 = *(undefined8 *)(param_1 + 0x10);
  uVar5 = dcgettext(0,"%s: fread failed",5);
                    /* WARNING: Subroutine does not return */
  FUN_0011b5c0(uVar5,uVar2);
}

