
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* DWARF original prototype: bool is_locked(File_read * this) */

bool __thiscall gold::File_read::is_locked(File_read *this)

{
  bool bVar1;
  Task_token *in_stack_fffffff4;
  
  if ((this->token_).is_blocker_ != false) {
                    /* WARNING: Subroutine does not return */
    Task_token::is_writable(in_stack_fffffff4,(Task_token *)0x753a6);
  }
  if ((this->token_).writer_ == (Task *)0x0) {
    bVar1 = false;
    if (this->released_ == false) {
                    /* WARNING: Subroutine does not return */
      do_gold_unreachable("../../gold/fileread.cc",0x13f,"is_locked");
    }
  }
  else {
    bVar1 = true;
  }
  return bVar1;
}



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

void * FUN_000753a0(uint param_1,void *param_2)

{
  undefined4 uVar1;
  void *pvVar2;
  int *piVar3;
  char *pcVar4;
  undefined4 uVar5;
  uint uVar6;
  uint unaff_EBX;
  size_t __nbytes;
  uint uVar7;
  int iVar8;
  bool bVar9;
  int unaff_retaddr;
  
  pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);
  if (*(byte *)(param_1 + 0x2c) == 0) {
    if (*(int *)(param_1 + 0x34) == 0) {
      if (*(char *)(param_1 + 0x68) == '\0') {
                    /* WARNING: Subroutine does not return */
        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);
      }
    }
    else {
      pvVar2 = (void *)0x1;
    }
    return pvVar2;
  }
  FUN_00074ec0();
  if (iRam00075412 == 0) {
    FUN_000752a0(0x753a6);
    uVar6 = param_1;
    uVar7 = unaff_EBX;
    iVar8 = unaff_retaddr;
    do {
      __nbytes = uVar6;
      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));
      if ((int)pvVar2 < 0) {
        piVar3 = __errno_location();
        pcVar4 = strerror(*piVar3);
        uVar1 = uRam000753a6;
        uVar5 = gettext("%s: pread failed: %s");
                    /* WARNING: Subroutine does not return */
        FUN_00073dc0(uVar5,uVar1,pcVar4);
      }
      bVar9 = CARRY4(uVar7,(uint)pvVar2);
      uVar7 = uVar7 + (int)pvVar2;
      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;
      param_2 = (void *)((int)param_2 + (int)pvVar2);
      if (__nbytes - (int)pvVar2 == 0) {
        return pvVar2;
      }
      uVar6 = __nbytes - (int)pvVar2;
    } while (pvVar2 != (void *)0x0);
    uVar6 = param_1 - __nbytes;
  }
  else {
    uVar6 = iRam000753ca - unaff_EBX;
    if (param_1 <= uVar6) {
      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);
      return pvVar2;
    }
  }
  uVar1 = uRam000753a6;
  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");
                    /* WARNING: Subroutine does not return */
  FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);
}


PUSH EBX
CALL 0x00036f20
ADD EBX,0x339c5a
SUB ESP,0x8
MOV EDX,dword ptr [ESP + 0x10]
MOVZX EAX,byte ptr [EDX + 0x2c]
TEST AL,AL
JNZ 0x000753ef
MOV ECX,dword ptr [EDX + 0x34]
TEST ECX,ECX
JZ 0x000753d0
MOV EAX,0x1
ADD ESP,0x8
POP EBX
RET
CMP byte ptr [EDX + 0x68],0x0
JNZ 0x000753c7
PUSH EAX
LEA EAX,[EBX + 0xffef3a4c]
PUSH EAX
LEA EAX,[EBX + 0xffef3758]
PUSH 0x13f
PUSH EAX
CALL 0x0007d010
CALL 0x00074ec0
LEA ESI,[ESI]
LEA ESI,[ESI]
NOP
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nvoid * FUN_000753a0(uint param_1,void *param_2)\n\n{\n  undefined4 uVar1;\n  void *pvVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  uint unaff_EBX;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  int unaff_retaddr;\n  \n  pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);\n  if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    /* WARNING: Subroutine does not return */\n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }\n  FUN_00074ec0();\n  if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }\n  uVar1 = uRam000753a6;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    /* WARNING: Subroutine does not return */\n  FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);\n}\n\n" comment comment (function_definition "void * FUN_000753a0(uint param_1,void *param_2)\n\n{\n  undefined4 uVar1;\n  void *pvVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  uint unaff_EBX;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  int unaff_retaddr;\n  \n  pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);\n  if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    /* WARNING: Subroutine does not return */\n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }\n  FUN_00074ec0();\n  if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }\n  uVar1 = uRam000753a6;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    /* WARNING: Subroutine does not return */\n  FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);\n}" primitive_type (pointer_declarator "* FUN_000753a0(uint param_1,void *param_2)" * (function_declarator "FUN_000753a0(uint param_1,void *param_2)" identifier (parameter_list "(uint param_1,void *param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  undefined4 uVar1;\n  void *pvVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  uint unaff_EBX;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  int unaff_retaddr;\n  \n  pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);\n  if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    /* WARNING: Subroutine does not return */\n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }\n  FUN_00074ec0();\n  if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }\n  uVar1 = uRam000753a6;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    /* WARNING: Subroutine does not return */\n  FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * 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 "uint unaff_EBX;" 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 ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (expression_statement "pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);" (assignment_expression "pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c)" identifier = (binary_expression "(void *)(uint)*(byte *)(param_1 + 0x2c)" (cast_expression "(void *)(uint)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(byte *)(param_1 + 0x2c)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) ))))) ;) (if_statement "if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    /* WARNING: Subroutine does not return */\n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }" if (parenthesized_expression "(*(byte *)(param_1 + 0x2c) == 0)" ( (binary_expression "*(byte *)(param_1 + 0x2c) == 0" (pointer_expression "*(byte *)(param_1 + 0x2c)" * (cast_expression "(byte *)(param_1 + 0x2c)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    /* WARNING: Subroutine does not return */\n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }" { (if_statement "if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    /* WARNING: Subroutine does not return */\n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x34) == 0)" ( (binary_expression "*(int *)(param_1 + 0x34) == 0" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    /* WARNING: Subroutine does not return */\n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }" { (if_statement "if (*(char *)(param_1 + 0x68) == '\0') {\n                    /* WARNING: Subroutine does not return */\n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }" if (parenthesized_expression "(*(char *)(param_1 + 0x68) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x68) == '\0'" (pointer_expression "*(char *)(param_1 + 0x68)" * (cast_expression "(char *)(param_1 + 0x68)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x68)" ( (binary_expression "param_1 + 0x68" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }" { comment (expression_statement "FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);" (call_expression "FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2)" identifier (argument_list "("../../gold/fileread.cc",0x13f,"is_locked",pvVar2)" ( (string_literal ""../../gold/fileread.cc"" " string_content ") , number_literal , (string_literal ""is_locked"" " string_content ") , identifier ))) ;) })) }) (else_clause "else {\n      pvVar2 = (void *)0x1;\n    }" else (compound_statement "{\n      pvVar2 = (void *)0x1;\n    }" { (expression_statement "pvVar2 = (void *)0x1;" (assignment_expression "pvVar2 = (void *)0x1" identifier = (cast_expression "(void *)0x1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) (return_statement "return pvVar2;" return identifier ;) })) (expression_statement "FUN_00074ec0();" (call_expression "FUN_00074ec0()" identifier (argument_list "()" ( ))) ;) (if_statement "if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }" if (parenthesized_expression "(iRam00075412 == 0)" ( (binary_expression "iRam00075412 == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }" { (expression_statement "FUN_000752a0(0x753a6);" (call_expression "FUN_000752a0(0x753a6)" identifier (argument_list "(0x753a6)" ( number_literal ))) ;) (expression_statement "uVar6 = param_1;" (assignment_expression "uVar6 = param_1" identifier = identifier) ;) (expression_statement "uVar7 = unaff_EBX;" (assignment_expression "uVar7 = unaff_EBX" identifier = identifier) ;) (expression_statement "iVar8 = unaff_retaddr;" (assignment_expression "iVar8 = unaff_retaddr" identifier = identifier) ;) (do_statement "do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);" do (compound_statement "{\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    }" { (expression_statement "__nbytes = uVar6;" (assignment_expression "__nbytes = uVar6" identifier = identifier) ;) (expression_statement "pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));" (assignment_expression "pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" identifier = (cast_expression "(void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" identifier (argument_list "(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" ( identifier , identifier , identifier , (call_expression "CONCAT44(iVar8,uVar7)" identifier (argument_list "(iVar8,uVar7)" ( identifier , identifier ))) ))))) ;) (if_statement "if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }" if (parenthesized_expression "((int)pvVar2 < 0)" ( (binary_expression "(int)pvVar2 < 0" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    /* WARNING: Subroutine does not return */\n        FUN_00073dc0(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 = uRam000753a6;" (assignment_expression "uVar1 = uRam000753a6" identifier = 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_00073dc0(uVar5,uVar1,pcVar4);" (call_expression "FUN_00073dc0(uVar5,uVar1,pcVar4)" identifier (argument_list "(uVar5,uVar1,pcVar4)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "bVar9 = CARRY4(uVar7,(uint)pvVar2);" (assignment_expression "bVar9 = CARRY4(uVar7,(uint)pvVar2)" identifier = (call_expression "CARRY4(uVar7,(uint)pvVar2)" identifier (argument_list "(uVar7,(uint)pvVar2)" ( identifier , (cast_expression "(uint)pvVar2" ( (type_descriptor "uint" type_identifier) ) identifier) )))) ;) (expression_statement "uVar7 = uVar7 + (int)pvVar2;" (assignment_expression "uVar7 = uVar7 + (int)pvVar2" identifier = (binary_expression "uVar7 + (int)pvVar2" identifier + (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;" (assignment_expression "iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9" identifier = (binary_expression "iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9" (binary_expression "iVar8 + ((int)pvVar2 >> 0x1f)" identifier + (parenthesized_expression "((int)pvVar2 >> 0x1f)" ( (binary_expression "(int)pvVar2 >> 0x1f" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) + (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (expression_statement "param_2 = (void *)((int)param_2 + (int)pvVar2);" (assignment_expression "param_2 = (void *)((int)param_2 + (int)pvVar2)" identifier = (cast_expression "(void *)((int)param_2 + (int)pvVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + (int)pvVar2)" ( (binary_expression "(int)param_2 + (int)pvVar2" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (if_statement "if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }" if (parenthesized_expression "(__nbytes - (int)pvVar2 == 0)" ( (binary_expression "__nbytes - (int)pvVar2 == 0" (binary_expression "__nbytes - (int)pvVar2" identifier - (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier)) == number_literal) )) (compound_statement "{\n        return pvVar2;\n      }" { (return_statement "return pvVar2;" return identifier ;) })) (expression_statement "uVar6 = __nbytes - (int)pvVar2;" (assignment_expression "uVar6 = __nbytes - (int)pvVar2" identifier = (binary_expression "__nbytes - (int)pvVar2" identifier - (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) while (parenthesized_expression "(pvVar2 != (void *)0x0)" ( (binary_expression "pvVar2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "uVar6 = param_1 - __nbytes;" (assignment_expression "uVar6 = param_1 - __nbytes" identifier = (binary_expression "param_1 - __nbytes" identifier - identifier)) ;) }) (else_clause "else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }" else (compound_statement "{\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }" { (expression_statement "uVar6 = iRam000753ca - unaff_EBX;" (assignment_expression "uVar6 = iRam000753ca - unaff_EBX" identifier = (binary_expression "iRam000753ca - unaff_EBX" identifier - identifier)) ;) (if_statement "if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }" if (parenthesized_expression "(param_1 <= uVar6)" ( (binary_expression "param_1 <= uVar6" identifier <= identifier) )) (compound_statement "{\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }" { (expression_statement "pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);" (assignment_expression "pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1)" identifier = (call_expression "memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1)" identifier (argument_list "(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1)" ( identifier , (cast_expression "(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBX + *(int *)(iRam00075412 + 0xc))" ( (binary_expression "unaff_EBX + *(int *)(iRam00075412 + 0xc)" identifier + (pointer_expression "*(int *)(iRam00075412 + 0xc)" * (cast_expression "(int *)(iRam00075412 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iRam00075412 + 0xc)" ( (binary_expression "iRam00075412 + 0xc" identifier + number_literal) ))))) ))) , identifier )))) ;) (return_statement "return pvVar2;" return identifier ;) })) }))) (expression_statement "uVar1 = uRam000753a6;" (assignment_expression "uVar1 = uRam000753a6" identifier = 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_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);" (call_expression "FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr)" identifier (argument_list "(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr)" ( 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.bx replaced with injection: get_pc_thunk_bx */\n/* DWARF original prototype: bool is_locked(File_read * this) */\n\nbool __thiscall gold::File_read::is_locked(File_read *this)\n\n{\n  bool bVar1;\n  Task_token *in_stack_fffffff4;\n  \n  if ((this->token_).is_blocker_ != false) {\n                    /* WARNING: Subroutine does not return */\n    Task_token::is_writable(in_stack_fffffff4,(Task_token *)0x753a6);\n  }\n  if ((this->token_).writer_ == (Task *)0x0) {\n    bVar1 = false;\n    if (this->released_ == false) {\n                    /* WARNING: Subroutine does not return */\n      do_gold_unreachable("../../gold/fileread.cc",0x13f,"is_locked");\n    }\n  }\n  else {\n    bVar1 = true;\n  }\n  return bVar1;\n}\n\n" comment comment (function_definition "bool __thiscall gold::File_read::is_locked(File_read *this)\n\n{\n  bool bVar1;\n  Task_token *in_stack_fffffff4;\n  \n  if ((this->token_).is_blocker_ != false) {\n                    /* WARNING: Subroutine does not return */\n    Task_token::is_writable(in_stack_fffffff4,(Task_token *)0x753a6);\n  }\n  if ((this->token_).writer_ == (Task *)0x0) {\n    bVar1 = false;\n    if (this->released_ == false) {\n                    /* WARNING: Subroutine does not return */\n      do_gold_unreachable("../../gold/fileread.cc",0x13f,"is_locked");\n    }\n  }\n  else {\n    bVar1 = true;\n  }\n  return bVar1;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "gold::File_read::" identifier : : identifier : :) (function_declarator "is_locked(File_read *this)" identifier (parameter_list "(File_read *this)" ( (parameter_declaration "File_read *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  bool bVar1;\n  Task_token *in_stack_fffffff4;\n  \n  if ((this->token_).is_blocker_ != false) {\n                    /* WARNING: Subroutine does not return */\n    Task_token::is_writable(in_stack_fffffff4,(Task_token *)0x753a6);\n  }\n  if ((this->token_).writer_ == (Task *)0x0) {\n    bVar1 = false;\n    if (this->released_ == false) {\n                    /* WARNING: Subroutine does not return */\n      do_gold_unreachable("../../gold/fileread.cc",0x13f,"is_locked");\n    }\n  }\n  else {\n    bVar1 = true;\n  }\n  return bVar1;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "Task_token *in_stack_fffffff4;" type_identifier (pointer_declarator "*in_stack_fffffff4" * identifier) ;) (if_statement "if ((this->token_).is_blocker_ != false) {\n                    /* WARNING: Subroutine does not return */\n    Task_token::is_writable(in_stack_fffffff4,(Task_token *)0x753a6);\n  }" if (parenthesized_expression "((this->token_).is_blocker_ != false)" ( (binary_expression "(this->token_).is_blocker_ != false" (field_expression "(this->token_).is_blocker_" (parenthesized_expression "(this->token_)" ( (field_expression "this->token_" identifier -> field_identifier) )) . field_identifier) != false) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    Task_token::is_writable(in_stack_fffffff4,(Task_token *)0x753a6);\n  }" { comment (labeled_statement "Task_token::is_writable(in_stack_fffffff4,(Task_token *)0x753a6);" statement_identifier : (ERROR ":" :) (expression_statement "is_writable(in_stack_fffffff4,(Task_token *)0x753a6);" (call_expression "is_writable(in_stack_fffffff4,(Task_token *)0x753a6)" identifier (argument_list "(in_stack_fffffff4,(Task_token *)0x753a6)" ( identifier , (cast_expression "(Task_token *)0x753a6" ( (type_descriptor "Task_token *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;)) })) (if_statement "if ((this->token_).writer_ == (Task *)0x0) {\n    bVar1 = false;\n    if (this->released_ == false) {\n                    /* WARNING: Subroutine does not return */\n      do_gold_unreachable("../../gold/fileread.cc",0x13f,"is_locked");\n    }\n  }\n  else {\n    bVar1 = true;\n  }" if (parenthesized_expression "((this->token_).writer_ == (Task *)0x0)" ( (binary_expression "(this->token_).writer_ == (Task *)0x0" (field_expression "(this->token_).writer_" (parenthesized_expression "(this->token_)" ( (field_expression "this->token_" identifier -> field_identifier) )) . field_identifier) == (cast_expression "(Task *)0x0" ( (type_descriptor "Task *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    bVar1 = false;\n    if (this->released_ == false) {\n                    /* WARNING: Subroutine does not return */\n      do_gold_unreachable("../../gold/fileread.cc",0x13f,"is_locked");\n    }\n  }" { (expression_statement "bVar1 = false;" (assignment_expression "bVar1 = false" identifier = false) ;) (if_statement "if (this->released_ == false) {\n                    /* WARNING: Subroutine does not return */\n      do_gold_unreachable("../../gold/fileread.cc",0x13f,"is_locked");\n    }" if (parenthesized_expression "(this->released_ == false)" ( (binary_expression "this->released_ == false" (field_expression "this->released_" identifier -> field_identifier) == false) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      do_gold_unreachable("../../gold/fileread.cc",0x13f,"is_locked");\n    }" { comment (expression_statement "do_gold_unreachable("../../gold/fileread.cc",0x13f,"is_locked");" (call_expression "do_gold_unreachable("../../gold/fileread.cc",0x13f,"is_locked")" identifier (argument_list "("../../gold/fileread.cc",0x13f,"is_locked")" ( (string_literal ""../../gold/fileread.cc"" " string_content ") , number_literal , (string_literal ""is_locked"" " string_content ") ))) ;) })) }) (else_clause "else {\n    bVar1 = true;\n  }" else (compound_statement "{\n    bVar1 = true;\n  }" { (expression_statement "bVar1 = true;" (assignment_expression "bVar1 = true" identifier = true) ;) }))) (return_statement "return bVar1;" return identifier ;) })))
(translation_unit "void * FUN_000753a0(uint param_1,void *param_2)\n\n{\n  undefined4 uVar1;\n  void *pvVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  uint unaff_EBX;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  int unaff_retaddr;\n  \n  pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);\n  if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }\n  FUN_00074ec0();\n  if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }\n  uVar1 = uRam000753a6;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    \n  FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);\n}\n\n" (function_definition "void * FUN_000753a0(uint param_1,void *param_2)\n\n{\n  undefined4 uVar1;\n  void *pvVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  uint unaff_EBX;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  int unaff_retaddr;\n  \n  pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);\n  if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }\n  FUN_00074ec0();\n  if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }\n  uVar1 = uRam000753a6;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    \n  FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);\n}" primitive_type (pointer_declarator "* FUN_000753a0(uint param_1,void *param_2)" * (function_declarator "FUN_000753a0(uint param_1,void *param_2)" identifier (parameter_list "(uint param_1,void *param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  undefined4 uVar1;\n  void *pvVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  uint unaff_EBX;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  int unaff_retaddr;\n  \n  pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);\n  if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }\n  FUN_00074ec0();\n  if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }\n  uVar1 = uRam000753a6;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    \n  FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * 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 "uint unaff_EBX;" 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 ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (expression_statement "pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);" (assignment_expression "pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c)" identifier = (binary_expression "(void *)(uint)*(byte *)(param_1 + 0x2c)" (cast_expression "(void *)(uint)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(byte *)(param_1 + 0x2c)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) ))))) ;) (if_statement "if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }" if (parenthesized_expression "(*(byte *)(param_1 + 0x2c) == 0)" ( (binary_expression "*(byte *)(param_1 + 0x2c) == 0" (pointer_expression "*(byte *)(param_1 + 0x2c)" * (cast_expression "(byte *)(param_1 + 0x2c)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }" { (if_statement "if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x34) == 0)" ( (binary_expression "*(int *)(param_1 + 0x34) == 0" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }" { (if_statement "if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }" if (parenthesized_expression "(*(char *)(param_1 + 0x68) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x68) == '\0'" (pointer_expression "*(char *)(param_1 + 0x68)" * (cast_expression "(char *)(param_1 + 0x68)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x68)" ( (binary_expression "param_1 + 0x68" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }" { (expression_statement "FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);" (call_expression "FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2)" identifier (argument_list "("../../gold/fileread.cc",0x13f,"is_locked",pvVar2)" ( (string_literal ""../../gold/fileread.cc"" " string_content ") , number_literal , (string_literal ""is_locked"" " string_content ") , identifier ))) ;) })) }) (else_clause "else {\n      pvVar2 = (void *)0x1;\n    }" else (compound_statement "{\n      pvVar2 = (void *)0x1;\n    }" { (expression_statement "pvVar2 = (void *)0x1;" (assignment_expression "pvVar2 = (void *)0x1" identifier = (cast_expression "(void *)0x1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) (return_statement "return pvVar2;" return identifier ;) })) (expression_statement "FUN_00074ec0();" (call_expression "FUN_00074ec0()" identifier (argument_list "()" ( ))) ;) (if_statement "if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }" if (parenthesized_expression "(iRam00075412 == 0)" ( (binary_expression "iRam00075412 == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }" { (expression_statement "FUN_000752a0(0x753a6);" (call_expression "FUN_000752a0(0x753a6)" identifier (argument_list "(0x753a6)" ( number_literal ))) ;) (expression_statement "uVar6 = param_1;" (assignment_expression "uVar6 = param_1" identifier = identifier) ;) (expression_statement "uVar7 = unaff_EBX;" (assignment_expression "uVar7 = unaff_EBX" identifier = identifier) ;) (expression_statement "iVar8 = unaff_retaddr;" (assignment_expression "iVar8 = unaff_retaddr" identifier = identifier) ;) (do_statement "do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);" do (compound_statement "{\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    }" { (expression_statement "__nbytes = uVar6;" (assignment_expression "__nbytes = uVar6" identifier = identifier) ;) (expression_statement "pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));" (assignment_expression "pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" identifier = (cast_expression "(void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" identifier (argument_list "(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" ( identifier , identifier , identifier , (call_expression "CONCAT44(iVar8,uVar7)" identifier (argument_list "(iVar8,uVar7)" ( identifier , identifier ))) ))))) ;) (if_statement "if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }" if (parenthesized_expression "((int)pvVar2 < 0)" ( (binary_expression "(int)pvVar2 < 0" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(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 = uRam000753a6;" (assignment_expression "uVar1 = uRam000753a6" identifier = 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_00073dc0(uVar5,uVar1,pcVar4);" (call_expression "FUN_00073dc0(uVar5,uVar1,pcVar4)" identifier (argument_list "(uVar5,uVar1,pcVar4)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "bVar9 = CARRY4(uVar7,(uint)pvVar2);" (assignment_expression "bVar9 = CARRY4(uVar7,(uint)pvVar2)" identifier = (call_expression "CARRY4(uVar7,(uint)pvVar2)" identifier (argument_list "(uVar7,(uint)pvVar2)" ( identifier , (cast_expression "(uint)pvVar2" ( (type_descriptor "uint" type_identifier) ) identifier) )))) ;) (expression_statement "uVar7 = uVar7 + (int)pvVar2;" (assignment_expression "uVar7 = uVar7 + (int)pvVar2" identifier = (binary_expression "uVar7 + (int)pvVar2" identifier + (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;" (assignment_expression "iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9" identifier = (binary_expression "iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9" (binary_expression "iVar8 + ((int)pvVar2 >> 0x1f)" identifier + (parenthesized_expression "((int)pvVar2 >> 0x1f)" ( (binary_expression "(int)pvVar2 >> 0x1f" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) + (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (expression_statement "param_2 = (void *)((int)param_2 + (int)pvVar2);" (assignment_expression "param_2 = (void *)((int)param_2 + (int)pvVar2)" identifier = (cast_expression "(void *)((int)param_2 + (int)pvVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + (int)pvVar2)" ( (binary_expression "(int)param_2 + (int)pvVar2" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (if_statement "if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }" if (parenthesized_expression "(__nbytes - (int)pvVar2 == 0)" ( (binary_expression "__nbytes - (int)pvVar2 == 0" (binary_expression "__nbytes - (int)pvVar2" identifier - (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier)) == number_literal) )) (compound_statement "{\n        return pvVar2;\n      }" { (return_statement "return pvVar2;" return identifier ;) })) (expression_statement "uVar6 = __nbytes - (int)pvVar2;" (assignment_expression "uVar6 = __nbytes - (int)pvVar2" identifier = (binary_expression "__nbytes - (int)pvVar2" identifier - (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) while (parenthesized_expression "(pvVar2 != (void *)0x0)" ( (binary_expression "pvVar2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "uVar6 = param_1 - __nbytes;" (assignment_expression "uVar6 = param_1 - __nbytes" identifier = (binary_expression "param_1 - __nbytes" identifier - identifier)) ;) }) (else_clause "else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }" else (compound_statement "{\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }" { (expression_statement "uVar6 = iRam000753ca - unaff_EBX;" (assignment_expression "uVar6 = iRam000753ca - unaff_EBX" identifier = (binary_expression "iRam000753ca - unaff_EBX" identifier - identifier)) ;) (if_statement "if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }" if (parenthesized_expression "(param_1 <= uVar6)" ( (binary_expression "param_1 <= uVar6" identifier <= identifier) )) (compound_statement "{\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }" { (expression_statement "pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);" (assignment_expression "pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1)" identifier = (call_expression "memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1)" identifier (argument_list "(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1)" ( identifier , (cast_expression "(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBX + *(int *)(iRam00075412 + 0xc))" ( (binary_expression "unaff_EBX + *(int *)(iRam00075412 + 0xc)" identifier + (pointer_expression "*(int *)(iRam00075412 + 0xc)" * (cast_expression "(int *)(iRam00075412 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iRam00075412 + 0xc)" ( (binary_expression "iRam00075412 + 0xc" identifier + number_literal) ))))) ))) , identifier )))) ;) (return_statement "return pvVar2;" return identifier ;) })) }))) (expression_statement "uVar1 = uRam000753a6;" (assignment_expression "uVar1 = uRam000753a6" identifier = 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_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);" (call_expression "FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr)" identifier (argument_list "(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr)" ( 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 (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( IDENT ))) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , LIT , (string_literal " string_content ") , IDENT ))) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }))) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , 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 = 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 , (cast_expression ( (type_descriptor TYPE) ) IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) 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) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (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 IDENT + LIT) ))))) ))) , IDENT )))) ;) (return_statement return IDENT ;) })) }))) (expression_statement (assignment_expression IDENT = 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_000753a0(uint param_1,void *param_2)\n\n{\n  undefined4 uVar1;\n  void *pvVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  uint unaff_EBX;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  int unaff_retaddr;\n  \n  pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);\n  if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }\n  FUN_00074ec0();\n  if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }\n  uVar1 = uRam000753a6;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    \n  FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);\n}" (primitive_type "void") (pointer_declarator "* FUN_000753a0(uint param_1,void *param_2)" (* "*") (function_declarator "FUN_000753a0(uint param_1,void *param_2)" (identifier "FUN_000753a0") (parameter_list "(uint param_1,void *param_2)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "void *param_2" (primitive_type "void") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  undefined4 uVar1;\n  void *pvVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  uint uVar6;\n  uint unaff_EBX;\n  size_t __nbytes;\n  uint uVar7;\n  int iVar8;\n  bool bVar9;\n  int unaff_retaddr;\n  \n  pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);\n  if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }\n  FUN_00074ec0();\n  if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }\n  uVar1 = uRam000753a6;\n  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");\n                    \n  FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "void *pvVar2;" (primitive_type "void") (pointer_declarator "*pvVar2" (* "*") (identifier "pvVar2")) (; ";")) (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 "uint unaff_EBX;" (type_identifier "uint") (identifier "unaff_EBX") (; ";")) (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") (; ";")) (declaration "int unaff_retaddr;" (primitive_type "int") (identifier "unaff_retaddr") (; ";")) (expression_statement "pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);" (assignment_expression "pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c)" (identifier "pvVar2") (= "=") (binary_expression "(void *)(uint)*(byte *)(param_1 + 0x2c)" (cast_expression "(void *)(uint)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")"))) (* "*") (cast_expression "(byte *)(param_1 + 0x2c)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (if_statement "if (*(byte *)(param_1 + 0x2c) == 0) {\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }" (if "if") (parenthesized_expression "(*(byte *)(param_1 + 0x2c) == 0)" (( "(") (binary_expression "*(byte *)(param_1 + 0x2c) == 0" (pointer_expression "*(byte *)(param_1 + 0x2c)" (* "*") (cast_expression "(byte *)(param_1 + 0x2c)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }\n    return pvVar2;\n  }" ({ "{") (if_statement "if (*(int *)(param_1 + 0x34) == 0) {\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }\n    else {\n      pvVar2 = (void *)0x1;\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x34) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) == 0" (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }\n    }" ({ "{") (if_statement "if (*(char *)(param_1 + 0x68) == '\0') {\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x68) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x68) == '\0'" (pointer_expression "*(char *)(param_1 + 0x68)" (* "*") (cast_expression "(char *)(param_1 + 0x68)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x68)" (( "(") (binary_expression "param_1 + 0x68" (identifier "param_1") (+ "+") (number_literal "0x68")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n                    \n        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);\n      }" ({ "{") (expression_statement "FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);" (call_expression "FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2)" (identifier "FUN_0007d010") (argument_list "("../../gold/fileread.cc",0x13f,"is_locked",pvVar2)" (( "(") (string_literal ""../../gold/fileread.cc"" (" """) (string_content "../../gold/fileread.cc") (" """)) (, ",") (number_literal "0x13f") (, ",") (string_literal ""is_locked"" (" """) (string_content "is_locked") (" """)) (, ",") (identifier "pvVar2") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      pvVar2 = (void *)0x1;\n    }" (else "else") (compound_statement "{\n      pvVar2 = (void *)0x1;\n    }" ({ "{") (expression_statement "pvVar2 = (void *)0x1;" (assignment_expression "pvVar2 = (void *)0x1" (identifier "pvVar2") (= "=") (cast_expression "(void *)0x1" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x1"))) (; ";")) (} "}")))) (return_statement "return pvVar2;" (return "return") (identifier "pvVar2") (; ";")) (} "}"))) (expression_statement "FUN_00074ec0();" (call_expression "FUN_00074ec0()" (identifier "FUN_00074ec0") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (iRam00075412 == 0) {\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }\n  else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }" (if "if") (parenthesized_expression "(iRam00075412 == 0)" (( "(") (binary_expression "iRam00075412 == 0" (identifier "iRam00075412") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_000752a0(0x753a6);\n    uVar6 = param_1;\n    uVar7 = unaff_EBX;\n    iVar8 = unaff_retaddr;\n    do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);\n    uVar6 = param_1 - __nbytes;\n  }" ({ "{") (expression_statement "FUN_000752a0(0x753a6);" (call_expression "FUN_000752a0(0x753a6)" (identifier "FUN_000752a0") (argument_list "(0x753a6)" (( "(") (number_literal "0x753a6") () ")"))) (; ";")) (expression_statement "uVar6 = param_1;" (assignment_expression "uVar6 = param_1" (identifier "uVar6") (= "=") (identifier "param_1")) (; ";")) (expression_statement "uVar7 = unaff_EBX;" (assignment_expression "uVar7 = unaff_EBX" (identifier "uVar7") (= "=") (identifier "unaff_EBX")) (; ";")) (expression_statement "iVar8 = unaff_retaddr;" (assignment_expression "iVar8 = unaff_retaddr" (identifier "iVar8") (= "=") (identifier "unaff_retaddr")) (; ";")) (do_statement "do {\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    } while (pvVar2 != (void *)0x0);" (do "do") (compound_statement "{\n      __nbytes = uVar6;\n      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));\n      if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }\n      bVar9 = CARRY4(uVar7,(uint)pvVar2);\n      uVar7 = uVar7 + (int)pvVar2;\n      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;\n      param_2 = (void *)((int)param_2 + (int)pvVar2);\n      if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }\n      uVar6 = __nbytes - (int)pvVar2;\n    }" ({ "{") (expression_statement "__nbytes = uVar6;" (assignment_expression "__nbytes = uVar6" (identifier "__nbytes") (= "=") (identifier "uVar6")) (; ";")) (expression_statement "pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));" (assignment_expression "pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" (identifier "pvVar2") (= "=") (cast_expression "(void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" (identifier "pread64") (argument_list "(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7))" (( "(") (identifier "iRam000753be") (, ",") (identifier "param_2") (, ",") (identifier "__nbytes") (, ",") (call_expression "CONCAT44(iVar8,uVar7)" (identifier "CONCAT44") (argument_list "(iVar8,uVar7)" (( "(") (identifier "iVar8") (, ",") (identifier "uVar7") () ")"))) () ")"))))) (; ";")) (if_statement "if ((int)pvVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(uVar5,uVar1,pcVar4);\n      }" (if "if") (parenthesized_expression "((int)pvVar2 < 0)" (( "(") (binary_expression "(int)pvVar2 < 0" (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        uVar1 = uRam000753a6;\n        uVar5 = gettext("%s: pread failed: %s");\n                    \n        FUN_00073dc0(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 = uRam000753a6;" (assignment_expression "uVar1 = uRam000753a6" (identifier "uVar1") (= "=") (identifier "uRam000753a6")) (; ";")) (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_00073dc0(uVar5,uVar1,pcVar4);" (call_expression "FUN_00073dc0(uVar5,uVar1,pcVar4)" (identifier "FUN_00073dc0") (argument_list "(uVar5,uVar1,pcVar4)" (( "(") (identifier "uVar5") (, ",") (identifier "uVar1") (, ",") (identifier "pcVar4") () ")"))) (; ";")) (} "}"))) (expression_statement "bVar9 = CARRY4(uVar7,(uint)pvVar2);" (assignment_expression "bVar9 = CARRY4(uVar7,(uint)pvVar2)" (identifier "bVar9") (= "=") (call_expression "CARRY4(uVar7,(uint)pvVar2)" (identifier "CARRY4") (argument_list "(uVar7,(uint)pvVar2)" (( "(") (identifier "uVar7") (, ",") (cast_expression "(uint)pvVar2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "pvVar2")) () ")")))) (; ";")) (expression_statement "uVar7 = uVar7 + (int)pvVar2;" (assignment_expression "uVar7 = uVar7 + (int)pvVar2" (identifier "uVar7") (= "=") (binary_expression "uVar7 + (int)pvVar2" (identifier "uVar7") (+ "+") (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")))) (; ";")) (expression_statement "iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;" (assignment_expression "iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9" (identifier "iVar8") (= "=") (binary_expression "iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9" (binary_expression "iVar8 + ((int)pvVar2 >> 0x1f)" (identifier "iVar8") (+ "+") (parenthesized_expression "((int)pvVar2 >> 0x1f)" (( "(") (binary_expression "(int)pvVar2 >> 0x1f" (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")) (>> ">>") (number_literal "0x1f")) () ")"))) (+ "+") (cast_expression "(uint)bVar9" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar9")))) (; ";")) (expression_statement "param_2 = (void *)((int)param_2 + (int)pvVar2);" (assignment_expression "param_2 = (void *)((int)param_2 + (int)pvVar2)" (identifier "param_2") (= "=") (cast_expression "(void *)((int)param_2 + (int)pvVar2)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_2 + (int)pvVar2)" (( "(") (binary_expression "(int)param_2 + (int)pvVar2" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (+ "+") (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2"))) () ")")))) (; ";")) (if_statement "if (__nbytes - (int)pvVar2 == 0) {\n        return pvVar2;\n      }" (if "if") (parenthesized_expression "(__nbytes - (int)pvVar2 == 0)" (( "(") (binary_expression "__nbytes - (int)pvVar2 == 0" (binary_expression "__nbytes - (int)pvVar2" (identifier "__nbytes") (- "-") (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2"))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return pvVar2;\n      }" ({ "{") (return_statement "return pvVar2;" (return "return") (identifier "pvVar2") (; ";")) (} "}"))) (expression_statement "uVar6 = __nbytes - (int)pvVar2;" (assignment_expression "uVar6 = __nbytes - (int)pvVar2" (identifier "uVar6") (= "=") (binary_expression "__nbytes - (int)pvVar2" (identifier "__nbytes") (- "-") (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pvVar2 != (void *)0x0)" (( "(") (binary_expression "pvVar2 != (void *)0x0" (identifier "pvVar2") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (expression_statement "uVar6 = param_1 - __nbytes;" (assignment_expression "uVar6 = param_1 - __nbytes" (identifier "uVar6") (= "=") (binary_expression "param_1 - __nbytes" (identifier "param_1") (- "-") (identifier "__nbytes"))) (; ";")) (} "}")) (else_clause "else {\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }" (else "else") (compound_statement "{\n    uVar6 = iRam000753ca - unaff_EBX;\n    if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }\n  }" ({ "{") (expression_statement "uVar6 = iRam000753ca - unaff_EBX;" (assignment_expression "uVar6 = iRam000753ca - unaff_EBX" (identifier "uVar6") (= "=") (binary_expression "iRam000753ca - unaff_EBX" (identifier "iRam000753ca") (- "-") (identifier "unaff_EBX"))) (; ";")) (if_statement "if (param_1 <= uVar6) {\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }" (if "if") (parenthesized_expression "(param_1 <= uVar6)" (( "(") (binary_expression "param_1 <= uVar6" (identifier "param_1") (<= "<=") (identifier "uVar6")) () ")")) (compound_statement "{\n      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);\n      return pvVar2;\n    }" ({ "{") (expression_statement "pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);" (assignment_expression "pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1)" (identifier "pvVar2") (= "=") (call_expression "memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1)" (identifier "memcpy") (argument_list "(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1)" (( "(") (identifier "param_2") (, ",") (cast_expression "(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc))" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EBX + *(int *)(iRam00075412 + 0xc))" (( "(") (binary_expression "unaff_EBX + *(int *)(iRam00075412 + 0xc)" (identifier "unaff_EBX") (+ "+") (pointer_expression "*(int *)(iRam00075412 + 0xc)" (* "*") (cast_expression "(int *)(iRam00075412 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iRam00075412 + 0xc)" (( "(") (binary_expression "iRam00075412 + 0xc" (identifier "iRam00075412") (+ "+") (number_literal "0xc")) () ")"))))) () ")"))) (, ",") (identifier "param_1") () ")")))) (; ";")) (return_statement "return pvVar2;" (return "return") (identifier "pvVar2") (; ";")) (} "}"))) (} "}")))) (expression_statement "uVar1 = uRam000753a6;" (assignment_expression "uVar1 = uRam000753a6" (identifier "uVar1") (= "=") (identifier "uRam000753a6")) (; ";")) (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_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);" (call_expression "FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr)" (identifier "FUN_00073dc0") (argument_list "(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr)" (( "(") (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_1") (, ",") (number_literal "0") (, ",") (identifier "unaff_EBX") (, ",") (identifier "unaff_retaddr") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* DWARF original prototype: bool is_locked(File_read * this) */

bool __thiscall gold::type_1::function_1(type_1 *this)

{
  bool bVar1;
  type_2 *in_stack_fffffff4;
  
  if ((this->token_).is_blocker_ != false) {
                    /* WARNING: Subroutine does not return */
    Task_token::var_1(in_stack_fffffff4,(type_2 *)0x753a6);
  }
  if ((this->token_).writer_ == (type_3 *)0x0) {
    bVar1 = false;
    if (this->released_ == false) {
                    /* WARNING: Subroutine does not return */
      var_2("../../gold/fileread.cc",0x13f,"is_locked");
    }
  }
  else {
    bVar1 = true;
  }
  return bVar1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (identifier))) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_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: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (number_literal) (string_literal (string_content)) (identifier))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))))) (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (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: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (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: (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) (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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: (identifier) right: (number_literal)))))))) (identifier))))) (return_statement (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (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.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

void * MASKED(uint param_1,void *param_2)

{
  undefined4 uVar1;
  void *pvVar2;
  int *piVar3;
  char *pcVar4;
  undefined4 uVar5;
  uint uVar6;
  uint unaff_EBX;
  size_t __nbytes;
  uint uVar7;
  int iVar8;
  bool bVar9;
  int unaff_retaddr;
  
  pvVar2 = (void *)(uint)*(byte *)(param_1 + 0x2c);
  if (*(byte *)(param_1 + 0x2c) == 0) {
    if (*(int *)(param_1 + 0x34) == 0) {
      if (*(char *)(param_1 + 0x68) == '\0') {
                    /* WARNING: Subroutine does not return */
        FUN_0007d010("../../gold/fileread.cc",0x13f,"is_locked",pvVar2);
      }
    }
    else {
      pvVar2 = (void *)0x1;
    }
    return pvVar2;
  }
  FUN_00074ec0();
  if (iRam00075412 == 0) {
    FUN_000752a0(0x753a6);
    uVar6 = param_1;
    uVar7 = unaff_EBX;
    iVar8 = unaff_retaddr;
    do {
      __nbytes = uVar6;
      pvVar2 = (void *)pread64(iRam000753be,param_2,__nbytes,CONCAT44(iVar8,uVar7));
      if ((int)pvVar2 < 0) {
        piVar3 = __errno_location();
        pcVar4 = strerror(*piVar3);
        uVar1 = uRam000753a6;
        uVar5 = gettext("%s: pread failed: %s");
                    /* WARNING: Subroutine does not return */
        FUN_00073dc0(uVar5,uVar1,pcVar4);
      }
      bVar9 = CARRY4(uVar7,(uint)pvVar2);
      uVar7 = uVar7 + (int)pvVar2;
      iVar8 = iVar8 + ((int)pvVar2 >> 0x1f) + (uint)bVar9;
      param_2 = (void *)((int)param_2 + (int)pvVar2);
      if (__nbytes - (int)pvVar2 == 0) {
        return pvVar2;
      }
      uVar6 = __nbytes - (int)pvVar2;
    } while (pvVar2 != (void *)0x0);
    uVar6 = param_1 - __nbytes;
  }
  else {
    uVar6 = iRam000753ca - unaff_EBX;
    if (param_1 <= uVar6) {
      pvVar2 = memcpy(param_2,(void *)(unaff_EBX + *(int *)(iRam00075412 + 0xc)),param_1);
      return pvVar2;
    }
  }
  uVar1 = uRam000753a6;
  uVar5 = gettext("%s: file too short: read only %lld of %lld bytes at %lld");
                    /* WARNING: Subroutine does not return */
  FUN_00073dc0(uVar5,uVar1,uVar6,(int)uVar6 >> 0x1f,param_1,0,unaff_EBX,unaff_retaddr);
}

