
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* DWARF original prototype: void do_read(File_read * this, off_t start, section_size_type size,
   void * p) */

void __thiscall gold::File_read::do_read(File_read *this,off_t start,section_size_type size,void *p)

{
  pointer pcVar1;
  longlong __offset;
  section_size_type sVar2;
  ssize_t sVar3;
  int *piVar4;
  char *format;
  char *pcVar5;
  uint uVar6;
  size_t __nbytes;
  
  if (this->whole_file_view_ == (View *)0x0) {
    reopen_descriptor(this);
    sVar2 = size;
    __offset = start;
    do {
      __nbytes = sVar2;
      sVar3 = pread64(this->descriptor_,p,__nbytes,__offset);
      if (sVar3 < 0) {
        piVar4 = __errno_location();
        pcVar5 = strerror(*piVar4);
        pcVar1 = (this->name_)._M_dataplus._M_p;
        format = (char *)gettext("%s: pread failed: %s");
                    /* WARNING: Subroutine does not return */
        gold_fatal(format,pcVar1,pcVar5);
      }
      __offset = __offset + sVar3;
      p = (void *)((int)p + sVar3);
      if (__nbytes - sVar3 == 0) {
        return;
      }
      sVar2 = __nbytes - sVar3;
    } while (sVar3 != 0);
    uVar6 = size - __nbytes;
  }
  else {
    uVar6 = (int)this->size_ - (int)start;
    if (size <= uVar6) {
      memcpy(p,this->whole_file_view_->data_ + (int)start,size);
      return;
    }
  }
  pcVar1 = (this->name_)._M_dataplus._M_p;
  pcVar5 = (char *)gettext("%s: file too short: read only %lld of %lld bytes at %lld");
                    /* WARNING: Subroutine does not return */
  gold_fatal(pcVar5,pcVar1,uVar6,(int)uVar6 >> 0x1f,size,0,(int)start,start._4_4_);
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

void FUN_0005be40(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)

{
  undefined4 uVar1;
  uint uVar2;
  int *piVar3;
  char *pcVar4;
  undefined4 uVar5;
  uint uVar6;
  size_t __nbytes;
  uint uVar7;
  int iVar8;
  bool bVar9;
  
  if (param_1[0x1b] == 0) {
    FUN_0005bce0(param_1);
    uVar6 = param_4;
    uVar7 = param_2;
    iVar8 = param_3;
    do {
      __nbytes = uVar6;
      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));
      if ((int)uVar2 < 0) {
        piVar3 = __errno_location();
        pcVar4 = strerror(*piVar3);
        uVar1 = *param_1;
        uVar5 = gettext("%s: pread failed: %s");
                    /* WARNING: Subroutine does not return */
        FUN_0005aca0(uVar5,uVar1,pcVar4);
      }
      bVar9 = CARRY4(uVar7,uVar2);
      uVar7 = uVar7 + uVar2;
      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;
      param_5 = (void *)((int)param_5 + uVar2);
      if (__nbytes - uVar2 == 0) {
        return;
      }
      uVar6 = __nbytes - uVar2;
    } while (uVar2 != 0);
    uVar6 = param_4 - __nbytes;
  }
  else {
    uVar6 = param_1[9] - param_2;
    if (param_4 <= uVar6) {
      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);
      return;
    }
  }
  uVar1 = *param_1;
  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");
                    /* WARNING: Subroutine does not return */
  FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);
}


CALL 0x0004fb76
ADD EAX,0x2a61bb
PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x1c
MOV EDI,dword ptr [ESP + 0x30]
MOV EDX,dword ptr [ESP + 0x38]
MOV dword ptr [ESP],EAX
MOV EAX,dword ptr [ESP + 0x34]
MOV EBP,dword ptr [ESP + 0x40]
MOV ECX,dword ptr [EDI + 0x6c]
MOV dword ptr [ESP + 0xc],EDX
MOV dword ptr [ESP + 0x8],EAX
TEST ECX,ECX
JZ 0x0005beb0
MOV EDI,dword ptr [EDI + 0x24]
MOV EDX,EDI
MOV dword ptr [ESP + 0x4],EDI
SUB EDX,EAX
CMP EDX,dword ptr [ESP + 0x3c]
JC 0x0005bf8c
SUB ESP,0x4
ADD EAX,dword ptr [ECX + 0xc]
PUSH dword ptr [ESP + 0x40]
PUSH EAX
PUSH EBP
MOV EBX,dword ptr [ESP + 0x10]
CALL 0x000265c0
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [ESP + 0x3c]
CALL 0x0005bce0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x3c]
MOV EDX,EBP
MOV ESI,dword ptr [ESP + 0x8]
MOV EDI,dword ptr [ESP + 0xc]
MOV EBP,EAX
JMP 0x0005beef
MOV EBX,EAX
MOV ECX,EBP
SAR EBX,0x1f
ADD ESI,EAX
ADC EDI,EBX
ADD EDX,EAX
SUB ECX,EAX
JZ 0x0005bea0
TEST EAX,EAX
JZ 0x0005bf4a
MOV EBP,ECX
SUB ESP,0xc
PUSH EDI
PUSH ESI
PUSH EBP
PUSH EDX
MOV EAX,dword ptr [ESP + 0x4c]
MOV dword ptr [ESP + 0x5c],EDX
PUSH dword ptr [EAX + 0x18]
MOV EBX,dword ptr [ESP + 0x20]
CALL 0x00026b00
ADD ESP,0x20
MOV EDX,dword ptr [ESP + 0x40]
TEST EAX,EAX
JNS 0x0005bed8
MOV EDI,dword ptr [ESP]
MOV EBX,EDI
CALL 0x00026090
SUB ESP,0xc
PUSH dword ptr [EAX]
CALL 0x00026100
MOV EBP,EAX
MOV EAX,dword ptr [ESP + 0x40]
MOV ESI,dword ptr [EAX]
LEA EAX,[EDI + 0xfff1eb3a]
MOV dword ptr [ESP],EAX
CALL 0x000263b0
ADD ESP,0xc
PUSH EBP
PUSH ESI
PUSH EAX
CALL 0x0005aca0
MOV ESI,dword ptr [ESP + 0x3c]
SUB ESI,EBP
MOV EAX,dword ptr [ESP + 0x30]
SUB ESP,0xc
MOV EDI,dword ptr [ESP + 0xc]
MOV EBP,dword ptr [EAX]
LEA EAX,[EDI + 0xfff1ebf0]
MOV EBX,EDI
PUSH EAX
CALL 0x000263b0
ADD ESP,0x10
XOR EDX,EDX
PUSH dword ptr [ESP + 0xc]
MOV ECX,EAX
PUSH dword ptr [ESP + 0xc]
MOV EAX,dword ptr [ESP + 0x44]
PUSH EDX
PUSH EAX
MOV EAX,ESI
CDQ
PUSH EDX
PUSH ESI
PUSH EBP
PUSH ECX
CALL 0x0005aca0
MOV ESI,EDX
JMP 0x0005bf50
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nvoid FUN_0005be40(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)\n\n{\n  undefined4 uVar1;\n  uint uVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  \n  if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }\n  uVar1 = *param_1;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    /* WARNING: Subroutine does not return */\n  FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);\n}\n\n" comment (function_definition "void FUN_0005be40(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)\n\n{\n  undefined4 uVar1;\n  uint uVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  \n  if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }\n  uVar1 = *param_1;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    /* WARNING: Subroutine does not return */\n  FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);\n}" primitive_type (function_declarator "FUN_0005be40(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)" identifier (parameter_list "(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "void *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  uint uVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  \n  if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }\n  uVar1 = *param_1;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    /* WARNING: Subroutine does not return */\n  FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "size_t __nbytes;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (if_statement "if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }" if (parenthesized_expression "(param_1[0x1b] == 0)" ( (binary_expression "param_1[0x1b] == 0" (subscript_expression "param_1[0x1b]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }" { (expression_statement "FUN_0005bce0(param_1);" (call_expression "FUN_0005bce0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "uVar6 = param_4;" (assignment_expression "uVar6 = param_4" identifier = identifier) ;) (expression_statement "uVar7 = param_2;" (assignment_expression "uVar7 = param_2" identifier = identifier) ;) (expression_statement "iVar8 = param_3;" (assignment_expression "iVar8 = param_3" identifier = identifier) ;) (do_statement "do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);" do (compound_statement "{\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    }" { (expression_statement "__nbytes = uVar6;" (assignment_expression "__nbytes = uVar6" identifier = identifier) ;) (expression_statement "uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));" (assignment_expression "uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7))" identifier = (call_expression "pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7))" identifier (argument_list "(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7))" ( (subscript_expression "param_1[6]" identifier [ number_literal ]) , identifier , identifier , (call_expression "CONCAT44(iVar8,uVar7)" identifier (argument_list "(iVar8,uVar7)" ( identifier , identifier ))) )))) ;) (if_statement "if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }" if (parenthesized_expression "((int)uVar2 < 0)" ( (binary_expression "(int)uVar2 < 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = gettext("%s: pread failed: %s");" (assignment_expression "uVar5 = gettext("%s: pread failed: %s")" identifier = (call_expression "gettext("%s: pread failed: %s")" identifier (argument_list "("%s: pread failed: %s")" ( (string_literal ""%s: pread failed: %s"" " string_content ") )))) ;) comment (expression_statement "FUN_0005aca0(uVar5,uVar1,pcVar4);" (call_expression "FUN_0005aca0(uVar5,uVar1,pcVar4)" identifier (argument_list "(uVar5,uVar1,pcVar4)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "bVar9 = CARRY4(uVar7,uVar2);" (assignment_expression "bVar9 = CARRY4(uVar7,uVar2)" identifier = (call_expression "CARRY4(uVar7,uVar2)" identifier (argument_list "(uVar7,uVar2)" ( identifier , identifier )))) ;) (expression_statement "uVar7 = uVar7 + uVar2;" (assignment_expression "uVar7 = uVar7 + uVar2" identifier = (binary_expression "uVar7 + uVar2" identifier + identifier)) ;) (expression_statement "iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;" (assignment_expression "iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9" identifier = (binary_expression "iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9" (binary_expression "iVar8 + ((int)uVar2 >> 0x1f)" identifier + (parenthesized_expression "((int)uVar2 >> 0x1f)" ( (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) + (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (expression_statement "param_5 = (void *)((int)param_5 + uVar2);" (assignment_expression "param_5 = (void *)((int)param_5 + uVar2)" identifier = (cast_expression "(void *)((int)param_5 + uVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_5 + uVar2)" ( (binary_expression "(int)param_5 + uVar2" (cast_expression "(int)param_5" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (if_statement "if (__nbytes - uVar2 == 0) {\n        return;\n      }" if (parenthesized_expression "(__nbytes - uVar2 == 0)" ( (binary_expression "__nbytes - uVar2 == 0" (binary_expression "__nbytes - uVar2" identifier - identifier) == number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "uVar6 = __nbytes - uVar2;" (assignment_expression "uVar6 = __nbytes - uVar2" identifier = (binary_expression "__nbytes - uVar2" identifier - identifier)) ;) }) while (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) ;) (expression_statement "uVar6 = param_4 - __nbytes;" (assignment_expression "uVar6 = param_4 - __nbytes" identifier = (binary_expression "param_4 - __nbytes" identifier - identifier)) ;) }) (else_clause "else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }" else (compound_statement "{\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }" { (expression_statement "uVar6 = param_1[9] - param_2;" (assignment_expression "uVar6 = param_1[9] - param_2" identifier = (binary_expression "param_1[9] - param_2" (subscript_expression "param_1[9]" identifier [ number_literal ]) - identifier)) ;) (if_statement "if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }" if (parenthesized_expression "(param_4 <= uVar6)" ( (binary_expression "param_4 <= uVar6" identifier <= identifier) )) (compound_statement "{\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }" { (expression_statement "memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);" (call_expression "memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4)" identifier (argument_list "(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4)" ( identifier , (cast_expression "(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + *(int *)(param_1[0x1b] + 0xc))" ( (binary_expression "param_2 + *(int *)(param_1[0x1b] + 0xc)" identifier + (pointer_expression "*(int *)(param_1[0x1b] + 0xc)" * (cast_expression "(int *)(param_1[0x1b] + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0x1b] + 0xc)" ( (binary_expression "param_1[0x1b] + 0xc" (subscript_expression "param_1[0x1b]" identifier [ number_literal ]) + number_literal) ))))) ))) , identifier ))) ;) (return_statement "return;" return ;) })) }))) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");" (assignment_expression "uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld")" identifier = (call_expression "gettext("%s: file too short: read only %lld of %lld bytes at %lld")" identifier (argument_list "("%s: file too short: read only %lld of %lld bytes at %lld")" ( (string_literal ""%s: file too short: read only %lld of %lld bytes at %lld"" " string_content ") )))) ;) comment (expression_statement "FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);" (call_expression "FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3)" identifier (argument_list "(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3)" ( identifier , identifier , identifier , (binary_expression "(int)uVar6 >> 0x1f" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) , identifier , number_literal , identifier , identifier ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n/* DWARF original prototype: void do_read(File_read * this, off_t start, section_size_type size,\n   void * p) */\n\nvoid __thiscall gold::File_read::do_read(File_read *this,off_t start,section_size_type size,void *p)\n\n{\n  pointer pcVar1;\n  longlong __offset;\n  section_size_type sVar2;\n  ssize_t sVar3;\n  int *piVar4;\n  char *format;\n  char *pcVar5;\n  uint uVar6;\n  size_t __nbytes;\n  \n  if (this->whole_file_view_ == (View *)0x0) {\n    reopen_descriptor(this);\n    sVar2 = size;\n    __offset = start;\n    do {\n      __nbytes = sVar2;\n      sVar3 = pread64(this->descriptor_,p,__nbytes,__offset);\n      if (sVar3 < 0) {\n        piVar4 = __errno_location();\n        pcVar5 = strerror(*piVar4);\n        pcVar1 = (this->name_)._M_dataplus._M_p;\n        format = (char *)gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        gold_fatal(format,pcVar1,pcVar5);\n      }\n      __offset = __offset + sVar3;\n      p = (void *)((int)p + sVar3);\n      if (__nbytes - sVar3 == 0) {\n        return;\n      }\n      sVar2 = __nbytes - sVar3;\n    } while (sVar3 != 0);\n    uVar6 = size - __nbytes;\n  }\n  else {\n    uVar6 = (int)this->size_ - (int)start;\n    if (size <= uVar6) {\n      memcpy(p,this->whole_file_view_->data_ + (int)start,size);\n      return;\n    }\n  }\n  pcVar1 = (this->name_)._M_dataplus._M_p;\n  pcVar5 = (char *)gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    /* WARNING: Subroutine does not return */\n  gold_fatal(pcVar5,pcVar1,uVar6,(int)uVar6 >> 0x1f,size,0,(int)start,start._4_4_);\n}\n\n" comment comment (function_definition "void __thiscall gold::File_read::do_read(File_read *this,off_t start,section_size_type size,void *p)\n\n{\n  pointer pcVar1;\n  longlong __offset;\n  section_size_type sVar2;\n  ssize_t sVar3;\n  int *piVar4;\n  char *format;\n  char *pcVar5;\n  uint uVar6;\n  size_t __nbytes;\n  \n  if (this->whole_file_view_ == (View *)0x0) {\n    reopen_descriptor(this);\n    sVar2 = size;\n    __offset = start;\n    do {\n      __nbytes = sVar2;\n      sVar3 = pread64(this->descriptor_,p,__nbytes,__offset);\n      if (sVar3 < 0) {\n        piVar4 = __errno_location();\n        pcVar5 = strerror(*piVar4);\n        pcVar1 = (this->name_)._M_dataplus._M_p;\n        format = (char *)gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        gold_fatal(format,pcVar1,pcVar5);\n      }\n      __offset = __offset + sVar3;\n      p = (void *)((int)p + sVar3);\n      if (__nbytes - sVar3 == 0) {\n        return;\n      }\n      sVar2 = __nbytes - sVar3;\n    } while (sVar3 != 0);\n    uVar6 = size - __nbytes;\n  }\n  else {\n    uVar6 = (int)this->size_ - (int)start;\n    if (size <= uVar6) {\n      memcpy(p,this->whole_file_view_->data_ + (int)start,size);\n      return;\n    }\n  }\n  pcVar1 = (this->name_)._M_dataplus._M_p;\n  pcVar5 = (char *)gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    /* WARNING: Subroutine does not return */\n  gold_fatal(pcVar5,pcVar1,uVar6,(int)uVar6 >> 0x1f,size,0,(int)start,start._4_4_);\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "gold::File_read::" identifier : : identifier : :) (function_declarator "do_read(File_read *this,off_t start,section_size_type size,void *p)" identifier (parameter_list "(File_read *this,off_t start,section_size_type size,void *p)" ( (parameter_declaration "File_read *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "off_t start" type_identifier identifier) , (parameter_declaration "section_size_type size" type_identifier identifier) , (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) ))) (compound_statement "{\n  pointer pcVar1;\n  longlong __offset;\n  section_size_type sVar2;\n  ssize_t sVar3;\n  int *piVar4;\n  char *format;\n  char *pcVar5;\n  uint uVar6;\n  size_t __nbytes;\n  \n  if (this->whole_file_view_ == (View *)0x0) {\n    reopen_descriptor(this);\n    sVar2 = size;\n    __offset = start;\n    do {\n      __nbytes = sVar2;\n      sVar3 = pread64(this->descriptor_,p,__nbytes,__offset);\n      if (sVar3 < 0) {\n        piVar4 = __errno_location();\n        pcVar5 = strerror(*piVar4);\n        pcVar1 = (this->name_)._M_dataplus._M_p;\n        format = (char *)gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        gold_fatal(format,pcVar1,pcVar5);\n      }\n      __offset = __offset + sVar3;\n      p = (void *)((int)p + sVar3);\n      if (__nbytes - sVar3 == 0) {\n        return;\n      }\n      sVar2 = __nbytes - sVar3;\n    } while (sVar3 != 0);\n    uVar6 = size - __nbytes;\n  }\n  else {\n    uVar6 = (int)this->size_ - (int)start;\n    if (size <= uVar6) {\n      memcpy(p,this->whole_file_view_->data_ + (int)start,size);\n      return;\n    }\n  }\n  pcVar1 = (this->name_)._M_dataplus._M_p;\n  pcVar5 = (char *)gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    /* WARNING: Subroutine does not return */\n  gold_fatal(pcVar5,pcVar1,uVar6,(int)uVar6 >> 0x1f,size,0,(int)start,start._4_4_);\n}" { (declaration "pointer pcVar1;" type_identifier identifier ;) (declaration "longlong __offset;" type_identifier identifier ;) (declaration "section_size_type sVar2;" type_identifier identifier ;) (declaration "ssize_t sVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "char *format;" primitive_type (pointer_declarator "*format" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "size_t __nbytes;" primitive_type identifier ;) (if_statement "if (this->whole_file_view_ == (View *)0x0) {\n    reopen_descriptor(this);\n    sVar2 = size;\n    __offset = start;\n    do {\n      __nbytes = sVar2;\n      sVar3 = pread64(this->descriptor_,p,__nbytes,__offset);\n      if (sVar3 < 0) {\n        piVar4 = __errno_location();\n        pcVar5 = strerror(*piVar4);\n        pcVar1 = (this->name_)._M_dataplus._M_p;\n        format = (char *)gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        gold_fatal(format,pcVar1,pcVar5);\n      }\n      __offset = __offset + sVar3;\n      p = (void *)((int)p + sVar3);\n      if (__nbytes - sVar3 == 0) {\n        return;\n      }\n      sVar2 = __nbytes - sVar3;\n    } while (sVar3 != 0);\n    uVar6 = size - __nbytes;\n  }\n  else {\n    uVar6 = (int)this->size_ - (int)start;\n    if (size <= uVar6) {\n      memcpy(p,this->whole_file_view_->data_ + (int)start,size);\n      return;\n    }\n  }" if (parenthesized_expression "(this->whole_file_view_ == (View *)0x0)" ( (binary_expression "this->whole_file_view_ == (View *)0x0" (field_expression "this->whole_file_view_" identifier -> field_identifier) == (cast_expression "(View *)0x0" ( (type_descriptor "View *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    reopen_descriptor(this);\n    sVar2 = size;\n    __offset = start;\n    do {\n      __nbytes = sVar2;\n      sVar3 = pread64(this->descriptor_,p,__nbytes,__offset);\n      if (sVar3 < 0) {\n        piVar4 = __errno_location();\n        pcVar5 = strerror(*piVar4);\n        pcVar1 = (this->name_)._M_dataplus._M_p;\n        format = (char *)gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        gold_fatal(format,pcVar1,pcVar5);\n      }\n      __offset = __offset + sVar3;\n      p = (void *)((int)p + sVar3);\n      if (__nbytes - sVar3 == 0) {\n        return;\n      }\n      sVar2 = __nbytes - sVar3;\n    } while (sVar3 != 0);\n    uVar6 = size - __nbytes;\n  }" { (expression_statement "reopen_descriptor(this);" (call_expression "reopen_descriptor(this)" identifier (argument_list "(this)" ( identifier ))) ;) (expression_statement "sVar2 = size;" (assignment_expression "sVar2 = size" identifier = identifier) ;) (expression_statement "__offset = start;" (assignment_expression "__offset = start" identifier = identifier) ;) (do_statement "do {\n      __nbytes = sVar2;\n      sVar3 = pread64(this->descriptor_,p,__nbytes,__offset);\n      if (sVar3 < 0) {\n        piVar4 = __errno_location();\n        pcVar5 = strerror(*piVar4);\n        pcVar1 = (this->name_)._M_dataplus._M_p;\n        format = (char *)gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        gold_fatal(format,pcVar1,pcVar5);\n      }\n      __offset = __offset + sVar3;\n      p = (void *)((int)p + sVar3);\n      if (__nbytes - sVar3 == 0) {\n        return;\n      }\n      sVar2 = __nbytes - sVar3;\n    } while (sVar3 != 0);" do (compound_statement "{\n      __nbytes = sVar2;\n      sVar3 = pread64(this->descriptor_,p,__nbytes,__offset);\n      if (sVar3 < 0) {\n        piVar4 = __errno_location();\n        pcVar5 = strerror(*piVar4);\n        pcVar1 = (this->name_)._M_dataplus._M_p;\n        format = (char *)gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        gold_fatal(format,pcVar1,pcVar5);\n      }\n      __offset = __offset + sVar3;\n      p = (void *)((int)p + sVar3);\n      if (__nbytes - sVar3 == 0) {\n        return;\n      }\n      sVar2 = __nbytes - sVar3;\n    }" { (expression_statement "__nbytes = sVar2;" (assignment_expression "__nbytes = sVar2" identifier = identifier) ;) (expression_statement "sVar3 = pread64(this->descriptor_,p,__nbytes,__offset);" (assignment_expression "sVar3 = pread64(this->descriptor_,p,__nbytes,__offset)" identifier = (call_expression "pread64(this->descriptor_,p,__nbytes,__offset)" identifier (argument_list "(this->descriptor_,p,__nbytes,__offset)" ( (field_expression "this->descriptor_" identifier -> field_identifier) , identifier , identifier , identifier )))) ;) (if_statement "if (sVar3 < 0) {\n        piVar4 = __errno_location();\n        pcVar5 = strerror(*piVar4);\n        pcVar1 = (this->name_)._M_dataplus._M_p;\n        format = (char *)gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        gold_fatal(format,pcVar1,pcVar5);\n      }" if (parenthesized_expression "(sVar3 < 0)" ( (binary_expression "sVar3 < 0" identifier < number_literal) )) (compound_statement "{\n        piVar4 = __errno_location();\n        pcVar5 = strerror(*piVar4);\n        pcVar1 = (this->name_)._M_dataplus._M_p;\n        format = (char *)gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        gold_fatal(format,pcVar1,pcVar5);\n      }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar5 = strerror(*piVar4);" (assignment_expression "pcVar5 = strerror(*piVar4)" identifier = (call_expression "strerror(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) )))) ;) (expression_statement "pcVar1 = (this->name_)._M_dataplus._M_p;" (assignment_expression "pcVar1 = (this->name_)._M_dataplus._M_p" identifier = (field_expression "(this->name_)._M_dataplus._M_p" (field_expression "(this->name_)._M_dataplus" (parenthesized_expression "(this->name_)" ( (field_expression "this->name_" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ;) (expression_statement "format = (char *)gettext("%s: pread failed: %s");" (assignment_expression "format = (char *)gettext("%s: pread failed: %s")" identifier = (cast_expression "(char *)gettext("%s: pread failed: %s")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "gettext("%s: pread failed: %s")" identifier (argument_list "("%s: pread failed: %s")" ( (string_literal ""%s: pread failed: %s"" " string_content ") ))))) ;) comment (expression_statement "gold_fatal(format,pcVar1,pcVar5);" (call_expression "gold_fatal(format,pcVar1,pcVar5)" identifier (argument_list "(format,pcVar1,pcVar5)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "__offset = __offset + sVar3;" (assignment_expression "__offset = __offset + sVar3" identifier = (binary_expression "__offset + sVar3" identifier + identifier)) ;) (expression_statement "p = (void *)((int)p + sVar3);" (assignment_expression "p = (void *)((int)p + sVar3)" identifier = (cast_expression "(void *)((int)p + sVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)p + sVar3)" ( (binary_expression "(int)p + sVar3" (cast_expression "(int)p" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (if_statement "if (__nbytes - sVar3 == 0) {\n        return;\n      }" if (parenthesized_expression "(__nbytes - sVar3 == 0)" ( (binary_expression "__nbytes - sVar3 == 0" (binary_expression "__nbytes - sVar3" identifier - identifier) == number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "sVar2 = __nbytes - sVar3;" (assignment_expression "sVar2 = __nbytes - sVar3" identifier = (binary_expression "__nbytes - sVar3" identifier - identifier)) ;) }) while (parenthesized_expression "(sVar3 != 0)" ( (binary_expression "sVar3 != 0" identifier != number_literal) )) ;) (expression_statement "uVar6 = size - __nbytes;" (assignment_expression "uVar6 = size - __nbytes" identifier = (binary_expression "size - __nbytes" identifier - identifier)) ;) }) (else_clause "else {\n    uVar6 = (int)this->size_ - (int)start;\n    if (size <= uVar6) {\n      memcpy(p,this->whole_file_view_->data_ + (int)start,size);\n      return;\n    }\n  }" else (compound_statement "{\n    uVar6 = (int)this->size_ - (int)start;\n    if (size <= uVar6) {\n      memcpy(p,this->whole_file_view_->data_ + (int)start,size);\n      return;\n    }\n  }" { (expression_statement "uVar6 = (int)this->size_ - (int)start;" (assignment_expression "uVar6 = (int)this->size_ - (int)start" identifier = (binary_expression "(int)this->size_ - (int)start" (cast_expression "(int)this->size_" ( (type_descriptor "int" primitive_type) ) (field_expression "this->size_" identifier -> field_identifier)) - (cast_expression "(int)start" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (size <= uVar6) {\n      memcpy(p,this->whole_file_view_->data_ + (int)start,size);\n      return;\n    }" if (parenthesized_expression "(size <= uVar6)" ( (binary_expression "size <= uVar6" identifier <= identifier) )) (compound_statement "{\n      memcpy(p,this->whole_file_view_->data_ + (int)start,size);\n      return;\n    }" { (expression_statement "memcpy(p,this->whole_file_view_->data_ + (int)start,size);" (call_expression "memcpy(p,this->whole_file_view_->data_ + (int)start,size)" identifier (argument_list "(p,this->whole_file_view_->data_ + (int)start,size)" ( identifier , (binary_expression "this->whole_file_view_->data_ + (int)start" (field_expression "this->whole_file_view_->data_" (field_expression "this->whole_file_view_" identifier -> field_identifier) -> field_identifier) + (cast_expression "(int)start" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier ))) ;) (return_statement "return;" return ;) })) }))) (expression_statement "pcVar1 = (this->name_)._M_dataplus._M_p;" (assignment_expression "pcVar1 = (this->name_)._M_dataplus._M_p" identifier = (field_expression "(this->name_)._M_dataplus._M_p" (field_expression "(this->name_)._M_dataplus" (parenthesized_expression "(this->name_)" ( (field_expression "this->name_" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ;) (expression_statement "pcVar5 = (char *)gettext("%s: file too short: read only %lld of %lld bytes at %lld");" (assignment_expression "pcVar5 = (char *)gettext("%s: file too short: read only %lld of %lld bytes at %lld")" identifier = (cast_expression "(char *)gettext("%s: file too short: read only %lld of %lld bytes at %lld")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "gettext("%s: file too short: read only %lld of %lld bytes at %lld")" identifier (argument_list "("%s: file too short: read only %lld of %lld bytes at %lld")" ( (string_literal ""%s: file too short: read only %lld of %lld bytes at %lld"" " string_content ") ))))) ;) comment (expression_statement "gold_fatal(pcVar5,pcVar1,uVar6,(int)uVar6 >> 0x1f,size,0,(int)start,start._4_4_);" (call_expression "gold_fatal(pcVar5,pcVar1,uVar6,(int)uVar6 >> 0x1f,size,0,(int)start,start._4_4_)" identifier (argument_list "(pcVar5,pcVar1,uVar6,(int)uVar6 >> 0x1f,size,0,(int)start,start._4_4_)" ( identifier , identifier , identifier , (binary_expression "(int)uVar6 >> 0x1f" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) , identifier , number_literal , (cast_expression "(int)start" ( (type_descriptor "int" primitive_type) ) identifier) , (field_expression "start._4_4_" identifier . field_identifier) ))) ;) })))
(translation_unit "void FUN_0005be40(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)\n\n{\n  undefined4 uVar1;\n  uint uVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  \n  if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }\n  uVar1 = *param_1;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    \n  FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);\n}\n\n" (function_definition "void FUN_0005be40(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)\n\n{\n  undefined4 uVar1;\n  uint uVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  \n  if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }\n  uVar1 = *param_1;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    \n  FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);\n}" primitive_type (function_declarator "FUN_0005be40(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)" identifier (parameter_list "(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "void *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  uint uVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  \n  if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }\n  uVar1 = *param_1;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    \n  FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "size_t __nbytes;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (if_statement "if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }" if (parenthesized_expression "(param_1[0x1b] == 0)" ( (binary_expression "param_1[0x1b] == 0" (subscript_expression "param_1[0x1b]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }" { (expression_statement "FUN_0005bce0(param_1);" (call_expression "FUN_0005bce0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "uVar6 = param_4;" (assignment_expression "uVar6 = param_4" identifier = identifier) ;) (expression_statement "uVar7 = param_2;" (assignment_expression "uVar7 = param_2" identifier = identifier) ;) (expression_statement "iVar8 = param_3;" (assignment_expression "iVar8 = param_3" identifier = identifier) ;) (do_statement "do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);" do (compound_statement "{\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    }" { (expression_statement "__nbytes = uVar6;" (assignment_expression "__nbytes = uVar6" identifier = identifier) ;) (expression_statement "uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));" (assignment_expression "uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7))" identifier = (call_expression "pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7))" identifier (argument_list "(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7))" ( (subscript_expression "param_1[6]" identifier [ number_literal ]) , identifier , identifier , (call_expression "CONCAT44(iVar8,uVar7)" identifier (argument_list "(iVar8,uVar7)" ( identifier , identifier ))) )))) ;) (if_statement "if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }" if (parenthesized_expression "((int)uVar2 < 0)" ( (binary_expression "(int)uVar2 < 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = gettext("%s: pread failed: %s");" (assignment_expression "uVar5 = gettext("%s: pread failed: %s")" identifier = (call_expression "gettext("%s: pread failed: %s")" identifier (argument_list "("%s: pread failed: %s")" ( (string_literal ""%s: pread failed: %s"" " string_content ") )))) ;) (expression_statement "FUN_0005aca0(uVar5,uVar1,pcVar4);" (call_expression "FUN_0005aca0(uVar5,uVar1,pcVar4)" identifier (argument_list "(uVar5,uVar1,pcVar4)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "bVar9 = CARRY4(uVar7,uVar2);" (assignment_expression "bVar9 = CARRY4(uVar7,uVar2)" identifier = (call_expression "CARRY4(uVar7,uVar2)" identifier (argument_list "(uVar7,uVar2)" ( identifier , identifier )))) ;) (expression_statement "uVar7 = uVar7 + uVar2;" (assignment_expression "uVar7 = uVar7 + uVar2" identifier = (binary_expression "uVar7 + uVar2" identifier + identifier)) ;) (expression_statement "iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;" (assignment_expression "iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9" identifier = (binary_expression "iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9" (binary_expression "iVar8 + ((int)uVar2 >> 0x1f)" identifier + (parenthesized_expression "((int)uVar2 >> 0x1f)" ( (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) + (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (expression_statement "param_5 = (void *)((int)param_5 + uVar2);" (assignment_expression "param_5 = (void *)((int)param_5 + uVar2)" identifier = (cast_expression "(void *)((int)param_5 + uVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_5 + uVar2)" ( (binary_expression "(int)param_5 + uVar2" (cast_expression "(int)param_5" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (if_statement "if (__nbytes - uVar2 == 0) {\n        return;\n      }" if (parenthesized_expression "(__nbytes - uVar2 == 0)" ( (binary_expression "__nbytes - uVar2 == 0" (binary_expression "__nbytes - uVar2" identifier - identifier) == number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "uVar6 = __nbytes - uVar2;" (assignment_expression "uVar6 = __nbytes - uVar2" identifier = (binary_expression "__nbytes - uVar2" identifier - identifier)) ;) }) while (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) ;) (expression_statement "uVar6 = param_4 - __nbytes;" (assignment_expression "uVar6 = param_4 - __nbytes" identifier = (binary_expression "param_4 - __nbytes" identifier - identifier)) ;) }) (else_clause "else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }" else (compound_statement "{\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }" { (expression_statement "uVar6 = param_1[9] - param_2;" (assignment_expression "uVar6 = param_1[9] - param_2" identifier = (binary_expression "param_1[9] - param_2" (subscript_expression "param_1[9]" identifier [ number_literal ]) - identifier)) ;) (if_statement "if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }" if (parenthesized_expression "(param_4 <= uVar6)" ( (binary_expression "param_4 <= uVar6" identifier <= identifier) )) (compound_statement "{\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }" { (expression_statement "memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);" (call_expression "memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4)" identifier (argument_list "(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4)" ( identifier , (cast_expression "(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + *(int *)(param_1[0x1b] + 0xc))" ( (binary_expression "param_2 + *(int *)(param_1[0x1b] + 0xc)" identifier + (pointer_expression "*(int *)(param_1[0x1b] + 0xc)" * (cast_expression "(int *)(param_1[0x1b] + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0x1b] + 0xc)" ( (binary_expression "param_1[0x1b] + 0xc" (subscript_expression "param_1[0x1b]" identifier [ number_literal ]) + number_literal) ))))) ))) , identifier ))) ;) (return_statement "return;" return ;) })) }))) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");" (assignment_expression "uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld")" identifier = (call_expression "gettext("%s: file too short: read only %lld of %lld bytes at %lld")" identifier (argument_list "("%s: file too short: read only %lld of %lld bytes at %lld")" ( (string_literal ""%s: file too short: read only %lld of %lld bytes at %lld"" " string_content ") )))) ;) (expression_statement "FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);" (call_expression "FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3)" identifier (argument_list "(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3)" ( identifier , identifier , identifier , (binary_expression "(int)uVar6 >> 0x1f" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) , identifier , number_literal , identifier , identifier ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (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 ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , IDENT , IDENT , (call_expression IDENT (argument_list ( IDENT , IDENT ))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < 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 * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - IDENT) == LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ))) , IDENT ))) ;) (return_statement return ;) })) }))) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) , IDENT , LIT , IDENT , IDENT ))) ;) })))
(function_definition "void FUN_0005be40(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)\n\n{\n  undefined4 uVar1;\n  uint uVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  \n  if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }\n  uVar1 = *param_1;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    \n  FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);\n}" (primitive_type "void") (function_declarator "FUN_0005be40(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)" (identifier "FUN_0005be40") (parameter_list "(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) (, ",") (parameter_declaration "void *param_5" (primitive_type "void") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  uint uVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  \n  if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }\n  uVar1 = *param_1;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    \n  FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "size_t __nbytes;" (primitive_type "size_t") (identifier "__nbytes") (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "bool bVar9;" (primitive_type "bool") (identifier "bVar9") (; ";")) (if_statement "if (param_1[0x1b] == 0) {\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }\n  else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }" (if "if") (parenthesized_expression "(param_1[0x1b] == 0)" (( "(") (binary_expression "param_1[0x1b] == 0" (subscript_expression "param_1[0x1b]" (identifier "param_1") ([ "[") (number_literal "0x1b") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0005bce0(param_1);\n    uVar6 = param_4;\n    uVar7 = param_2;\n    iVar8 = param_3;\n    do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);\n    uVar6 = param_4 - __nbytes;\n  }" ({ "{") (expression_statement "FUN_0005bce0(param_1);" (call_expression "FUN_0005bce0(param_1)" (identifier "FUN_0005bce0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "uVar6 = param_4;" (assignment_expression "uVar6 = param_4" (identifier "uVar6") (= "=") (identifier "param_4")) (; ";")) (expression_statement "uVar7 = param_2;" (assignment_expression "uVar7 = param_2" (identifier "uVar7") (= "=") (identifier "param_2")) (; ";")) (expression_statement "iVar8 = param_3;" (assignment_expression "iVar8 = param_3" (identifier "iVar8") (= "=") (identifier "param_3")) (; ";")) (do_statement "do {\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    } while (uVar2 != 0);" (do "do") (compound_statement "{\n      __nbytes = uVar6;\n      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,uVar2);\n      uVar7 = uVar7 + uVar2;\n      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;\n      param_5 = (void *)((int)param_5 + uVar2);\n      if (__nbytes - uVar2 == 0) {\n        return;\n      }\n      uVar6 = __nbytes - uVar2;\n    }" ({ "{") (expression_statement "__nbytes = uVar6;" (assignment_expression "__nbytes = uVar6" (identifier "__nbytes") (= "=") (identifier "uVar6")) (; ";")) (expression_statement "uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));" (assignment_expression "uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7))" (identifier "uVar2") (= "=") (call_expression "pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7))" (identifier "pread64") (argument_list "(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7))" (( "(") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")) (, ",") (identifier "param_5") (, ",") (identifier "__nbytes") (, ",") (call_expression "CONCAT44(iVar8,uVar7)" (identifier "CONCAT44") (argument_list "(iVar8,uVar7)" (( "(") (identifier "iVar8") (, ",") (identifier "uVar7") () ")"))) () ")")))) (; ";")) (if_statement "if ((int)uVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }" (if "if") (parenthesized_expression "((int)uVar2 < 0)" (( "(") (binary_expression "(int)uVar2 < 0" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = *param_1;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_0005aca0(uVar5,uVar1,pcVar4);\n      }" ({ "{") (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" (identifier "pcVar4") (= "=") (call_expression "strerror(*piVar3)" (identifier "strerror") (argument_list "(*piVar3)" (( "(") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) () ")")))) (; ";")) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" (identifier "uVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar5 = gettext("%s: pread failed: %s");" (assignment_expression "uVar5 = gettext("%s: pread failed: %s")" (identifier "uVar5") (= "=") (call_expression "gettext("%s: pread failed: %s")" (identifier "gettext") (argument_list "("%s: pread failed: %s")" (( "(") (string_literal ""%s: pread failed: %s"" (" """) (string_content "%s: pread failed: %s") (" """)) () ")")))) (; ";")) (expression_statement "FUN_0005aca0(uVar5,uVar1,pcVar4);" (call_expression "FUN_0005aca0(uVar5,uVar1,pcVar4)" (identifier "FUN_0005aca0") (argument_list "(uVar5,uVar1,pcVar4)" (( "(") (identifier "uVar5") (, ",") (identifier "uVar1") (, ",") (identifier "pcVar4") () ")"))) (; ";")) (} "}"))) (expression_statement "bVar9 = CARRY4(uVar7,uVar2);" (assignment_expression "bVar9 = CARRY4(uVar7,uVar2)" (identifier "bVar9") (= "=") (call_expression "CARRY4(uVar7,uVar2)" (identifier "CARRY4") (argument_list "(uVar7,uVar2)" (( "(") (identifier "uVar7") (, ",") (identifier "uVar2") () ")")))) (; ";")) (expression_statement "uVar7 = uVar7 + uVar2;" (assignment_expression "uVar7 = uVar7 + uVar2" (identifier "uVar7") (= "=") (binary_expression "uVar7 + uVar2" (identifier "uVar7") (+ "+") (identifier "uVar2"))) (; ";")) (expression_statement "iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;" (assignment_expression "iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9" (identifier "iVar8") (= "=") (binary_expression "iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9" (binary_expression "iVar8 + ((int)uVar2 >> 0x1f)" (identifier "iVar8") (+ "+") (parenthesized_expression "((int)uVar2 >> 0x1f)" (( "(") (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (>> ">>") (number_literal "0x1f")) () ")"))) (+ "+") (cast_expression "(uint)bVar9" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar9")))) (; ";")) (expression_statement "param_5 = (void *)((int)param_5 + uVar2);" (assignment_expression "param_5 = (void *)((int)param_5 + uVar2)" (identifier "param_5") (= "=") (cast_expression "(void *)((int)param_5 + uVar2)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_5 + uVar2)" (( "(") (binary_expression "(int)param_5 + uVar2" (cast_expression "(int)param_5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_5")) (+ "+") (identifier "uVar2")) () ")")))) (; ";")) (if_statement "if (__nbytes - uVar2 == 0) {\n        return;\n      }" (if "if") (parenthesized_expression "(__nbytes - uVar2 == 0)" (( "(") (binary_expression "__nbytes - uVar2 == 0" (binary_expression "__nbytes - uVar2" (identifier "__nbytes") (- "-") (identifier "uVar2")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar6 = __nbytes - uVar2;" (assignment_expression "uVar6 = __nbytes - uVar2" (identifier "uVar6") (= "=") (binary_expression "__nbytes - uVar2" (identifier "__nbytes") (- "-") (identifier "uVar2"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar2 != 0)" (( "(") (binary_expression "uVar2 != 0" (identifier "uVar2") (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "uVar6 = param_4 - __nbytes;" (assignment_expression "uVar6 = param_4 - __nbytes" (identifier "uVar6") (= "=") (binary_expression "param_4 - __nbytes" (identifier "param_4") (- "-") (identifier "__nbytes"))) (; ";")) (} "}")) (else_clause "else {\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }" (else "else") (compound_statement "{\n    uVar6 = param_1[9] - param_2;\n    if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }\n  }" ({ "{") (expression_statement "uVar6 = param_1[9] - param_2;" (assignment_expression "uVar6 = param_1[9] - param_2" (identifier "uVar6") (= "=") (binary_expression "param_1[9] - param_2" (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]")) (- "-") (identifier "param_2"))) (; ";")) (if_statement "if (param_4 <= uVar6) {\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }" (if "if") (parenthesized_expression "(param_4 <= uVar6)" (( "(") (binary_expression "param_4 <= uVar6" (identifier "param_4") (<= "<=") (identifier "uVar6")) () ")")) (compound_statement "{\n      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);\n      return;\n    }" ({ "{") (expression_statement "memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);" (call_expression "memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4)" (identifier "memcpy") (argument_list "(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4)" (( "(") (identifier "param_5") (, ",") (cast_expression "(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc))" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + *(int *)(param_1[0x1b] + 0xc))" (( "(") (binary_expression "param_2 + *(int *)(param_1[0x1b] + 0xc)" (identifier "param_2") (+ "+") (pointer_expression "*(int *)(param_1[0x1b] + 0xc)" (* "*") (cast_expression "(int *)(param_1[0x1b] + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[0x1b] + 0xc)" (( "(") (binary_expression "param_1[0x1b] + 0xc" (subscript_expression "param_1[0x1b]" (identifier "param_1") ([ "[") (number_literal "0x1b") (] "]")) (+ "+") (number_literal "0xc")) () ")"))))) () ")"))) (, ",") (identifier "param_4") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")))) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" (identifier "uVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");" (assignment_expression "uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld")" (identifier "uVar5") (= "=") (call_expression "gettext("%s: file too short: read only %lld of %lld bytes at %lld")" (identifier "gettext") (argument_list "("%s: file too short: read only %lld of %lld bytes at %lld")" (( "(") (string_literal ""%s: file too short: read only %lld of %lld bytes at %lld"" (" """) (string_content "%s: file too short: read only %lld of %lld bytes at %lld") (" """)) () ")")))) (; ";")) (expression_statement "FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);" (call_expression "FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3)" (identifier "FUN_0005aca0") (argument_list "(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3)" (( "(") (identifier "uVar5") (, ",") (identifier "uVar1") (, ",") (identifier "uVar6") (, ",") (binary_expression "(int)uVar6 >> 0x1f" (cast_expression "(int)uVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar6")) (>> ">>") (number_literal "0x1f")) (, ",") (identifier "param_4") (, ",") (number_literal "0") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* DWARF original prototype: void do_read(File_read * this, off_t start, section_size_type size,
   void * p) */

void __thiscall gold::type_1::function_1(type_1 *this,type_2 start,type_3 var_10,void *p)

{
  type_4 pcVar1;
  type_5 var_8;
  type_3 sVar2;
  ssize_t var_3;
  int *piVar4;
  char *format;
  char *pcVar5;
  type_6 var_11;
  size_t var_9;
  
  if (this->whole_file_view_ == (type_7 *)0x0) {
    var_1(this);
    sVar2 = var_10;
    var_8 = start;
    do {
      var_9 = sVar2;
      var_3 = var_2(this->descriptor_,p,var_9,var_8);
      if (var_3 < 0) {
        piVar4 = var_4();
        pcVar5 = var_5(*piVar4);
        pcVar1 = (this->name_)._M_dataplus._M_p;
        format = (char *)var_6("%s: pread failed: %s");
                    /* WARNING: Subroutine does not return */
        var_7(format,pcVar1,pcVar5);
      }
      var_8 = var_8 + var_3;
      p = (void *)((int)p + var_3);
      if (var_9 - var_3 == 0) {
        return;
      }
      sVar2 = var_9 - var_3;
    } while (var_3 != 0);
    var_11 = var_10 - var_9;
  }
  else {
    var_11 = (int)this->size_ - (int)start;
    if (var_10 <= var_11) {
      var_12(p,this->whole_file_view_->data_ + (int)start,var_10);
      return;
    }
  }
  pcVar1 = (this->name_)._M_dataplus._M_p;
  pcVar5 = (char *)var_6("%s: file too short: read only %lld of %lld bytes at %lld");
                    /* WARNING: Subroutine does not return */
  var_7(pcVar5,pcVar1,var_11,(int)var_11 >> 0x1f,var_10,0,(int)start,start._4_4_);
}


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

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

void MASKED(undefined4 *param_1,uint param_2,int param_3,uint param_4,void *param_5)

{
  undefined4 uVar1;
  uint uVar2;
  int *piVar3;
  char *pcVar4;
  undefined4 uVar5;
  uint uVar6;
  size_t __nbytes;
  uint uVar7;
  int iVar8;
  bool bVar9;
  
  if (param_1[0x1b] == 0) {
    FUN_0005bce0(param_1);
    uVar6 = param_4;
    uVar7 = param_2;
    iVar8 = param_3;
    do {
      __nbytes = uVar6;
      uVar2 = pread64(param_1[6],param_5,__nbytes,CONCAT44(iVar8,uVar7));
      if ((int)uVar2 < 0) {
        piVar3 = __errno_location();
        pcVar4 = strerror(*piVar3);
        uVar1 = *param_1;
        uVar5 = gettext("%s: pread failed: %s");
                    /* WARNING: Subroutine does not return */
        FUN_0005aca0(uVar5,uVar1,pcVar4);
      }
      bVar9 = CARRY4(uVar7,uVar2);
      uVar7 = uVar7 + uVar2;
      iVar8 = iVar8 + ((int)uVar2 >> 0x1f) + (uint)bVar9;
      param_5 = (void *)((int)param_5 + uVar2);
      if (__nbytes - uVar2 == 0) {
        return;
      }
      uVar6 = __nbytes - uVar2;
    } while (uVar2 != 0);
    uVar6 = param_4 - __nbytes;
  }
  else {
    uVar6 = param_1[9] - param_2;
    if (param_4 <= uVar6) {
      memcpy(param_5,(void *)(param_2 + *(int *)(param_1[0x1b] + 0xc)),param_4);
      return;
    }
  }
  uVar1 = *param_1;
  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");
                    /* WARNING: Subroutine does not return */
  FUN_0005aca0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_4,0,param_2,param_3);
}

