
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int sg_ll_read_long10(int sg_fd,_Bool pblock,_Bool correct,uint lba,void *resp,int xfer_len,
                     int *offsetp,_Bool noisy,int verbose)

{
  int iVar1;
  ushort uVar2;
  _Bool _Var3;
  byte bVar4;
  sg_pt_base *vp;
  int iVar5;
  uint uVar6;
  char *pcVar7;
  uint8_t *puVar8;
  uint8_t uVar9;
  byte *pbVar10;
  int in_GS_OFFSET;
  int no_ascii;
  int sense_cat;
  uint64_t ull;
  uint8_t readLong_cdb [10];
  uint8_t sense_b [64];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  readLong_cdb[9] = '\0';
  uVar9 = '\x02';
  readLong_cdb[1] = '\0';
  readLong_cdb[6] = '\0';
  readLong_cdb[0] = '>';
  if (pblock) {
    readLong_cdb[1] = '\x04';
    uVar9 = '\x06';
  }
  if (correct) {
    readLong_cdb[1] = uVar9;
  }
  uVar2 = (ushort)(lba >> 8);
  readLong_cdb._2_2_ = (ushort)(byte)(lba >> 0x18) | uVar2 & 0xff00;
  readLong_cdb._4_2_ = uVar2 & 0xff | (ushort)((lba << 0x18) >> 0x10);
  readLong_cdb[7] = (uint8_t)((uint)xfer_len >> 8);
  readLong_cdb[8] = (uint8_t)xfer_len;
  pcVar7 = "read long(10)";
  if (verbose == 0) {
    vp = construct_scsi_pt_obj();
  }
  else {
    pr2ws("    %s cdb: ","read long(10)");
    pbVar10 = readLong_cdb;
    do {
      uVar6 = (uint)*pbVar10;
      pbVar10 = pbVar10 + 1;
      pr2ws("%02x ",uVar6);
    } while (sense_b != pbVar10);
    pr2ws("\n",uVar6);
    vp = construct_scsi_pt_obj();
  }
  if (vp == (sg_pt_base *)0x0) {
    pr2ws("%s: out of memory\n","read long(10)");
    sense_cat = sg_convert_errno(0xc);
    goto LAB_00026879;
  }
  set_scsi_pt_cdb(vp,readLong_cdb,10);
  set_scsi_pt_sense(vp,sense_b,0x40);
  set_scsi_pt_data_in(vp,(uint8_t *)resp,xfer_len);
  iVar5 = do_scsi_pt(vp,sg_fd,0x3c,verbose);
  iVar5 = sg_cmds_process_resp(vp,"read long(10)",iVar5,xfer_len,sense_b,noisy,verbose,&sense_cat);
  if (iVar5 == -1) {
    iVar5 = get_scsi_pt_os_err();
    sense_cat = sg_convert_errno(iVar5);
  }
  else if (iVar5 == -2) {
    if (sense_cat == 5) {
      ull._0_4_ = 0;
      ull._4_4_ = 0;
      iVar5 = get_scsi_pt_sense_len();
      _Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);
      if (iVar5 < 8) {
LAB_00026a80:
        bVar4 = 0;
      }
      else {
        if (0x71 < (sense_b[0] & 0x7f)) {
          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);
          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;
          sense_b[2] = puVar8[3];
        }
        bVar4 = sense_b[2] >> 5 & 1;
        if ((_Var3) && (bVar4 != 0)) {
          sense_cat = 0x11;
          if (offsetp != (int *)0x0) {
            *offsetp = (int)ull;
          }
          goto LAB_0002686d;
        }
      }
      if (1 < verbose) {
        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,
              (uint)bVar4);
      }
    }
    else if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {
      sense_cat = 0;
    }
  }
  else if ((verbose < 3) || (iVar5 < 1)) {
    sense_cat = 0;
  }
  else {
    pr2ws("    %s: response","read long(10)");
    if (verbose == 3) {
      pcVar7 = ", first 256 bytes";
      if (iVar5 < 0x101) {
        pcVar7 = "";
      }
      pr2ws("%s:\n",pcVar7);
      no_ascii = -1;
      if (0x100 < iVar5) {
        iVar5 = 0x100;
      }
    }
    else {
      pr2ws(":\n",pcVar7);
      no_ascii = 0;
    }
    hex2stderr((uint8_t *)resp,iVar5,no_ascii);
    sense_cat = 0;
  }
LAB_0002686d:
  destruct_scsi_pt_obj(vp);
LAB_00026879:
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return sense_cat;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



int sg_ll_read_long10(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,
                     undefined4 *param_6,uint param_7,int param_8)

{
  ushort uVar1;
  byte bVar2;
  int iVar3;
  undefined4 uVar4;
  int iVar5;
  int iVar6;
  uint uVar7;
  uint uVar8;
  undefined1 uVar9;
  int unaff_EBX;
  byte *pbVar10;
  int in_GS_OFFSET;
  undefined4 unaff_retaddr;
  int iVar11;
  int *piVar12;
  int local_7c;
  undefined4 local_78;
  undefined4 local_74;
  byte local_6e [2];
  ushort uStack_6c;
  ushort local_6a;
  undefined1 uStack_68;
  undefined1 uStack_67;
  undefined1 uStack_66;
  undefined1 uStack_65;
  byte local_64 [2];
  byte local_62;
  int local_24;
  undefined4 uStack_14;
  
  uStack_65 = 0;
  uStack_14 = 0x266eb;
  entry();
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  uVar9 = 2;
  local_6e[1] = 0;
  uStack_68 = 0;
  local_6e[0] = 0x3e;
  if (param_1 != '\0') {
    local_6e[1] = 4;
    uVar9 = 6;
  }
  if (param_2 != '\0') {
    local_6e[1] = uVar9;
  }
  uVar1 = (ushort)((uint)param_3 >> 8);
  uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;
  local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);
  uStack_67 = (undefined1)((uint)param_5 >> 8);
  uStack_66 = (undefined1)param_5;
  iVar6 = unaff_EBX + 0x1734e;
  if (param_8 == 0) {
    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);
  }
  else {
    pr2ws(unaff_EBX + 0x16b74,iVar6);
    pbVar10 = local_6e;
    do {
      uVar7 = (uint)*pbVar10;
      pbVar10 = pbVar10 + 1;
      pr2ws(unaff_EBX + 0x17e14,uVar7);
    } while (local_64 != pbVar10);
    pr2ws(unaff_EBX + 0xafe5,uVar7);
    iVar3 = construct_scsi_pt_obj();
  }
  if (iVar3 == 0) {
    pr2ws(unaff_EBX + 0x16bc4,iVar6);
    local_7c = sg_convert_errno(0xc);
    goto LAB_00026879;
  }
  set_scsi_pt_cdb(iVar3,local_6e,10);
  set_scsi_pt_sense(iVar3,local_64,0x40);
  set_scsi_pt_data_in(iVar3,param_4,param_5);
  uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);
  piVar12 = &local_7c;
  iVar11 = param_8;
  iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);
  if (iVar5 == -1) {
    uVar4 = get_scsi_pt_os_err(iVar3);
    local_7c = sg_convert_errno(uVar4);
  }
  else if (iVar5 == -2) {
    if (local_7c == 5) {
      local_78 = 0;
      local_74 = 0;
      iVar6 = get_scsi_pt_sense_len(iVar3);
      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);
      uVar8 = uVar7 & 0xff;
      if (iVar6 < 8) {
LAB_00026a80:
        bVar2 = 0;
      }
      else {
        if (0x71 < (local_64[0] & 0x7f)) {
          uVar8 = uVar7 & 0xff;
          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);
          uVar8 = uVar8 & 0xff;
          if (iVar6 == 0) goto LAB_00026a80;
          local_62 = *(byte *)(iVar6 + 3);
        }
        bVar2 = local_62 >> 5 & 1;
        if (((char)uVar8 != '\0') && (bVar2 != 0)) {
          local_7c = 0x11;
          if (param_6 != (undefined4 *)0x0) {
            *param_6 = local_78;
          }
          goto LAB_0002686d;
        }
      }
      if (1 < param_8) {
        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);
      }
    }
    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {
      local_7c = 0;
    }
  }
  else if ((param_8 < 3) || (iVar5 < 1)) {
    local_7c = 0;
  }
  else {
    pr2ws(unaff_EBX + 0x16fcd,iVar6);
    if (param_8 == 3) {
      iVar6 = unaff_EBX + 0x16f98;
      if (iVar5 < 0x101) {
        iVar6 = unaff_EBX + 0xb2da;
      }
      pr2ws(unaff_EBX + 0xac7b,iVar6);
      uVar4 = 0xffffffff;
      if (0x100 < iVar5) {
        iVar5 = 0x100;
      }
    }
    else {
      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);
      uVar4 = 0;
    }
    hex2stderr(param_4,iVar5,uVar4);
    local_7c = 0;
  }
LAB_0002686d:
  destruct_scsi_pt_obj(iVar3);
LAB_00026879:
  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_7c;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00030280();
}


PUSH EBP
XOR EDX,EDX
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00017820
ADD EBX,0x2369d
SUB ESP,0x7c
MOV ECX,dword ptr [ESP + 0xa0]
MOV EAX,dword ptr [ESP + 0x98]
MOV dword ptr [ESP + 0x4],ECX
MOV ECX,dword ptr [ESP + 0xa8]
MOV dword ptr [ESP + 0xc],ECX
MOV ECX,dword ptr [ESP + 0xac]
MOV dword ptr [ESP + 0x8],ECX
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x6c],ECX
XOR ECX,ECX
CMP byte ptr [ESP + 0x94],0x0
MOV word ptr [ESP + 0x2a],DX
MOV EDX,0x2
MOV dword ptr [ESP + 0x22],0x0
MOV dword ptr [ESP + 0x26],0x0
MOV byte ptr [ESP + 0x22],0x3e
JZ 0x0002675c
MOV byte ptr [ESP + 0x23],0x4
MOV EDX,0x6
TEST AL,AL
JZ 0x00026764
MOV byte ptr [ESP + 0x23],DL
MOV EAX,dword ptr [ESP + 0x9c]
BSWAP EAX
MOV dword ptr [ESP + 0x24],EAX
MOVZX EAX,word ptr [ESP + 0xa4]
ROL AX,0x8
MOV word ptr [ESP + 0x29],AX
LEA EAX,[EBX + 0xffff3cb1]
MOV dword ptr [ESP],EAX
MOV EAX,dword ptr [ESP + 0xb0]
TEST EAX,EAX
JNZ 0x00026898
CALL 0x00017160
MOV ESI,EAX
TEST EAX,EAX
JZ 0x000268f8
SUB ESP,0x4
PUSH 0xa
LEA EAX,[ESP + 0x2a]
PUSH EAX
PUSH ESI
CALL 0x000177e0
ADD ESP,0xc
PUSH 0x40
LEA EBP,[ESP + 0x34]
PUSH EBP
PUSH ESI
CALL 0x00017620
ADD ESP,0xc
PUSH dword ptr [ESP + 0xa8]
PUSH dword ptr [ESP + 0xc]
PUSH ESI
CALL 0x000170d0
PUSH dword ptr [ESP + 0xc0]
PUSH 0x3c
PUSH dword ptr [ESP + 0xa8]
PUSH ESI
CALL 0x00017430
ADD ESP,0x20
LEA EDX,[ESP + 0x14]
PUSH EDX
PUSH dword ptr [ESP + 0xb4]
MOVZX EDX,byte ptr [ESP + 0x10]
PUSH EDX
PUSH EBP
PUSH dword ptr [ESP + 0xb4]
PUSH EAX
PUSH dword ptr [ESP + 0x18]
PUSH ESI
CALL 0x00017690
ADD ESP,0x20
MOV EDX,EAX
CMP EAX,-0x1
JZ 0x00026a40
CMP EDX,-0x2
JZ 0x00026850
CMP dword ptr [ESP + 0xb0],0x2
JLE 0x00026844
TEST EDX,EDX
MOV dword ptr [ESP + 0x8],EDX
JG 0x00026928
XOR EDI,EDI
JMP 0x0002686d
MOV EDI,dword ptr [ESP + 0x14]
CMP EDI,0x5
JZ 0x000269a8
JL 0x0002686d
LEA EAX,[EDI + -0x14]
CMP EAX,0x1
MOV EAX,0x0
CMOVBE EDI,EAX
SUB ESP,0xc
PUSH ESI
CALL 0x00017490
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x6c]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,EDI
JNZ 0x00026ac4
ADD ESP,0x7c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xffff34d7]
LEA ESI,[EBX + 0xffff4777]
PUSH dword ptr [ESP + 0x8]
PUSH EAX
CALL 0x00017630
LEA EDI,[ESP + 0x32]
LEA EBP,[ESP + 0x3c]
ADD ESP,0x10
LEA ESI,[ESI]
MOVZX EAX,byte ptr [EDI]
SUB ESP,0x8
ADD EDI,0x1
PUSH EAX
PUSH ESI
CALL 0x00017630
ADD ESP,0x10
CMP EBP,EDI
JNZ 0x000268c0
SUB ESP,0xc
LEA EAX,[EBX + 0xfffe7948]
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
CALL 0x00017160
MOV ESI,EAX
TEST EAX,EAX
JNZ 0x000267a9
SUB ESP,0x8
LEA EAX,[EBX + 0xffff3527]
PUSH dword ptr [ESP + 0x8]
PUSH EAX
CALL 0x00017630
MOV dword ptr [ESP],0xc
CALL 0x00017560
ADD ESP,0x10
MOV EDI,EAX
JMP 0x00026879
SUB ESP,0x8
LEA EAX,[EBX + 0xffff3930]
PUSH dword ptr [ESP + 0x8]
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
CMP dword ptr [ESP + 0xb0],0x3
JNZ 0x00026a60
CMP EDX,0x100
LEA ECX,[EBX + 0xfffe7c3d]
LEA EAX,[EBX + 0xffff38fb]
MOV dword ptr [ESP],EDX
CMOVLE EAX,ECX
SUB ESP,0x8
PUSH EAX
LEA EAX,[EBX + 0xfffe75de]
PUSH EAX
CALL 0x00017630
ADD ESP,0xc
MOV EAX,0x100
PUSH -0x1
MOV EDX,dword ptr [ESP + 0x8]
CMP EDX,0x100
CMOVG EDX,EAX
PUSH EDX
XOR EDI,EDI
PUSH dword ptr [ESP + 0x10]
CALL 0x00017700
ADD ESP,0x10
JMP 0x0002686d
MOV dword ptr [ESP + 0x18],0x0
SUB ESP,0xc
MOV dword ptr [ESP + 0x28],0x0
PUSH ESI
CALL 0x00017680
ADD ESP,0xc
MOV EDX,EAX
LEA EAX,[ESP + 0x1c]
PUSH EAX
PUSH EDX
MOV dword ptr [ESP + 0xc],EDX
PUSH EBP
CALL 0x000177c0
ADD ESP,0x10
MOV EDX,dword ptr [ESP]
MOVZX ECX,AL
CMP EDX,0x7
JLE 0x00026a80
MOVZX EAX,byte ptr [ESP + 0x2c]
AND EAX,0x7f
CMP AL,0x71
JBE 0x00026ab4
MOV byte ptr [ESP],CL
SUB ESP,0x4
PUSH 0x5
PUSH EDX
PUSH EBP
CALL 0x00017180
ADD ESP,0x10
MOVZX ECX,byte ptr [ESP]
TEST EAX,EAX
JZ 0x00026a80
MOVZX EAX,byte ptr [EAX + 0x3]
SHR AL,0x5
AND EAX,0x1
TEST CL,CL
JZ 0x00026a82
TEST AL,AL
JZ 0x00026a82
MOV ECX,dword ptr [ESP + 0xc]
MOV EDI,0x11
TEST ECX,ECX
JZ 0x0002686d
MOV EAX,dword ptr [ESP + 0x18]
MOV dword ptr [ECX],EAX
JMP 0x0002686d
SUB ESP,0xc
PUSH ESI
CALL 0x000170a0
MOV dword ptr [ESP],EAX
CALL 0x00017560
ADD ESP,0x10
MOV EDI,EAX
JMP 0x0002686d
MOV dword ptr [ESP],EDX
LEA EAX,[EBX + 0xffff4839]
SUB ESP,0xc
PUSH EAX
CALL 0x00017630
ADD ESP,0xc
PUSH 0x0
MOV EDX,dword ptr [ESP + 0x8]
JMP 0x0002698f
XOR EAX,EAX
CMP dword ptr [ESP + 0xb0],0x1
JLE 0x0002686d
SUB ESP,0xc
MOVZX EAX,AL
PUSH EAX
LEA EAX,[EBX + 0xffff3e80]
PUSH ECX
PUSH dword ptr [ESP + 0x30]
PUSH dword ptr [ESP + 0x30]
PUSH EAX
CALL 0x00017630
ADD ESP,0x20
JMP 0x0002686d
MOVZX EAX,byte ptr [ESP + 0x2e]
SHR AL,0x5
AND EAX,0x1
JMP 0x00026a1c
CALL 0x00030280
(translation_unit "int sg_ll_read_long10(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)\n\n{\n  ushort uVar1;\n  byte bVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  undefined1 uVar9;\n  int unaff_EBX;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar11;\n  int *piVar12;\n  int local_7c;\n  undefined4 local_78;\n  undefined4 local_74;\n  byte local_6e [2];\n  ushort uStack_6c;\n  ushort local_6a;\n  undefined1 uStack_68;\n  undefined1 uStack_67;\n  undefined1 uStack_66;\n  undefined1 uStack_65;\n  byte local_64 [2];\n  byte local_62;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_65 = 0;\n  uStack_14 = 0x266eb;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar9 = 2;\n  local_6e[1] = 0;\n  uStack_68 = 0;\n  local_6e[0] = 0x3e;\n  if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }\n  if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }\n  uVar1 = (ushort)((uint)param_3 >> 8);\n  uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;\n  local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);\n  uStack_67 = (undefined1)((uint)param_5 >> 8);\n  uStack_66 = (undefined1)param_5;\n  iVar6 = unaff_EBX + 0x1734e;\n  if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }\n  if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(iVar3,local_6e,10);\n  set_scsi_pt_sense(iVar3,local_64,0x40);\n  set_scsi_pt_data_in(iVar3,param_4,param_5);\n  uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);\n  piVar12 = &local_7c;\n  iVar11 = param_8;\n  iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);\n  if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);\nLAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00030280();\n}\n\n" (function_definition "int sg_ll_read_long10(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)\n\n{\n  ushort uVar1;\n  byte bVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  undefined1 uVar9;\n  int unaff_EBX;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar11;\n  int *piVar12;\n  int local_7c;\n  undefined4 local_78;\n  undefined4 local_74;\n  byte local_6e [2];\n  ushort uStack_6c;\n  ushort local_6a;\n  undefined1 uStack_68;\n  undefined1 uStack_67;\n  undefined1 uStack_66;\n  undefined1 uStack_65;\n  byte local_64 [2];\n  byte local_62;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_65 = 0;\n  uStack_14 = 0x266eb;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar9 = 2;\n  local_6e[1] = 0;\n  uStack_68 = 0;\n  local_6e[0] = 0x3e;\n  if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }\n  if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }\n  uVar1 = (ushort)((uint)param_3 >> 8);\n  uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;\n  local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);\n  uStack_67 = (undefined1)((uint)param_5 >> 8);\n  uStack_66 = (undefined1)param_5;\n  iVar6 = unaff_EBX + 0x1734e;\n  if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }\n  if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(iVar3,local_6e,10);\n  set_scsi_pt_sense(iVar3,local_64,0x40);\n  set_scsi_pt_data_in(iVar3,param_4,param_5);\n  uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);\n  piVar12 = &local_7c;\n  iVar11 = param_8;\n  iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);\n  if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);\nLAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00030280();\n}" primitive_type (function_declarator "sg_ll_read_long10(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)" identifier (parameter_list "(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)" ( (parameter_declaration "char param_1" primitive_type identifier) , (parameter_declaration "char param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "uint param_7" type_identifier identifier) , (parameter_declaration "int param_8" primitive_type identifier) ))) (compound_statement "{\n  ushort uVar1;\n  byte bVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  undefined1 uVar9;\n  int unaff_EBX;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar11;\n  int *piVar12;\n  int local_7c;\n  undefined4 local_78;\n  undefined4 local_74;\n  byte local_6e [2];\n  ushort uStack_6c;\n  ushort local_6a;\n  undefined1 uStack_68;\n  undefined1 uStack_67;\n  undefined1 uStack_66;\n  undefined1 uStack_65;\n  byte local_64 [2];\n  byte local_62;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_65 = 0;\n  uStack_14 = 0x266eb;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar9 = 2;\n  local_6e[1] = 0;\n  uStack_68 = 0;\n  local_6e[0] = 0x3e;\n  if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }\n  if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }\n  uVar1 = (ushort)((uint)param_3 >> 8);\n  uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;\n  local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);\n  uStack_67 = (undefined1)((uint)param_5 >> 8);\n  uStack_66 = (undefined1)param_5;\n  iVar6 = unaff_EBX + 0x1734e;\n  if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }\n  if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(iVar3,local_6e,10);\n  set_scsi_pt_sense(iVar3,local_64,0x40);\n  set_scsi_pt_data_in(iVar3,param_4,param_5);\n  uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);\n  piVar12 = &local_7c;\n  iVar11 = param_8;\n  iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);\n  if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);\nLAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00030280();\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "undefined1 uVar9;" type_identifier identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 unaff_retaddr;" type_identifier identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (declaration "int *piVar12;" primitive_type (pointer_declarator "*piVar12" * identifier) ;) (declaration "int local_7c;" primitive_type identifier ;) (declaration "undefined4 local_78;" type_identifier identifier ;) (declaration "undefined4 local_74;" type_identifier identifier ;) (declaration "byte local_6e [2];" type_identifier (array_declarator "local_6e [2]" identifier [ number_literal ]) ;) (declaration "ushort uStack_6c;" type_identifier identifier ;) (declaration "ushort local_6a;" type_identifier identifier ;) (declaration "undefined1 uStack_68;" type_identifier identifier ;) (declaration "undefined1 uStack_67;" type_identifier identifier ;) (declaration "undefined1 uStack_66;" type_identifier identifier ;) (declaration "undefined1 uStack_65;" type_identifier identifier ;) (declaration "byte local_64 [2];" type_identifier (array_declarator "local_64 [2]" identifier [ number_literal ]) ;) (declaration "byte local_62;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_65 = 0;" (assignment_expression "uStack_65 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x266eb;" (assignment_expression "uStack_14 = 0x266eb" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar9 = 2;" (assignment_expression "uVar9 = 2" identifier = number_literal) ;) (expression_statement "local_6e[1] = 0;" (assignment_expression "local_6e[1] = 0" (subscript_expression "local_6e[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uStack_68 = 0;" (assignment_expression "uStack_68 = 0" identifier = number_literal) ;) (expression_statement "local_6e[0] = 0x3e;" (assignment_expression "local_6e[0] = 0x3e" (subscript_expression "local_6e[0]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }" if (parenthesized_expression "(param_1 != '\0')" ( (binary_expression "param_1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }" { (expression_statement "local_6e[1] = 4;" (assignment_expression "local_6e[1] = 4" (subscript_expression "local_6e[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar9 = 6;" (assignment_expression "uVar9 = 6" identifier = number_literal) ;) })) (if_statement "if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }" if (parenthesized_expression "(param_2 != '\0')" ( (binary_expression "param_2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_6e[1] = uVar9;\n  }" { (expression_statement "local_6e[1] = uVar9;" (assignment_expression "local_6e[1] = uVar9" (subscript_expression "local_6e[1]" identifier [ number_literal ]) = identifier) ;) })) (expression_statement "uVar1 = (ushort)((uint)param_3 >> 8);" (assignment_expression "uVar1 = (ushort)((uint)param_3 >> 8)" identifier = (call_expression "(ushort)((uint)param_3 >> 8)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((uint)param_3 >> 8)" ( (binary_expression "(uint)param_3 >> 8" (cast_expression "(uint)param_3" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;" (assignment_expression "uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00" identifier = (binary_expression "(ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00" (call_expression "(ushort)(byte)((uint)param_3 >> 0x18)" (call_expression "(ushort)(byte)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "((uint)param_3 >> 0x18)" ( (binary_expression "(uint)param_3 >> 0x18" (cast_expression "(uint)param_3" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) | (binary_expression "uVar1 & 0xff00" identifier & number_literal))) ;) (expression_statement "local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);" (assignment_expression "local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10)" identifier = (binary_expression "uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10)" (binary_expression "uVar1 & 0xff" identifier & number_literal) | (call_expression "(ushort)((uint)(param_3 << 0x18) >> 0x10)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((uint)(param_3 << 0x18) >> 0x10)" ( (binary_expression "(uint)(param_3 << 0x18) >> 0x10" (call_expression "(uint)(param_3 << 0x18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_3 << 0x18)" ( (binary_expression "param_3 << 0x18" identifier << number_literal) ))) >> number_literal) ))))) ;) (expression_statement "uStack_67 = (undefined1)((uint)param_5 >> 8);" (assignment_expression "uStack_67 = (undefined1)((uint)param_5 >> 8)" identifier = (call_expression "(undefined1)((uint)param_5 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((uint)param_5 >> 8)" ( (binary_expression "(uint)param_5 >> 8" (cast_expression "(uint)param_5" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "uStack_66 = (undefined1)param_5;" (assignment_expression "uStack_66 = (undefined1)param_5" identifier = (cast_expression "(undefined1)param_5" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (expression_statement "iVar6 = unaff_EBX + 0x1734e;" (assignment_expression "iVar6 = unaff_EBX + 0x1734e" identifier = (binary_expression "unaff_EBX + 0x1734e" identifier + number_literal)) ;) (if_statement "if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }" if (parenthesized_expression "(param_8 == 0)" ( (binary_expression "param_8 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }" { (expression_statement "iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);" (assignment_expression "iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7)" identifier = (call_expression "construct_scsi_pt_obj(iVar6,param_4,param_7)" identifier (argument_list "(iVar6,param_4,param_7)" ( identifier , identifier , identifier )))) ;) }) (else_clause "else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }" else (compound_statement "{\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }" { (expression_statement "pr2ws(unaff_EBX + 0x16b74,iVar6);" (call_expression "pr2ws(unaff_EBX + 0x16b74,iVar6)" identifier (argument_list "(unaff_EBX + 0x16b74,iVar6)" ( (binary_expression "unaff_EBX + 0x16b74" identifier + number_literal) , identifier ))) ;) (expression_statement "pbVar10 = local_6e;" (assignment_expression "pbVar10 = local_6e" identifier = identifier) ;) (do_statement "do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);" do (compound_statement "{\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    }" { (expression_statement "uVar7 = (uint)*pbVar10;" (assignment_expression "uVar7 = (uint)*pbVar10" identifier = (binary_expression "(uint)*pbVar10" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar10 = pbVar10 + 1;" (assignment_expression "pbVar10 = pbVar10 + 1" identifier = (binary_expression "pbVar10 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws(unaff_EBX + 0x17e14,uVar7);" (call_expression "pr2ws(unaff_EBX + 0x17e14,uVar7)" identifier (argument_list "(unaff_EBX + 0x17e14,uVar7)" ( (binary_expression "unaff_EBX + 0x17e14" identifier + number_literal) , identifier ))) ;) }) while (parenthesized_expression "(local_64 != pbVar10)" ( (binary_expression "local_64 != pbVar10" identifier != identifier) )) ;) (expression_statement "pr2ws(unaff_EBX + 0xafe5,uVar7);" (call_expression "pr2ws(unaff_EBX + 0xafe5,uVar7)" identifier (argument_list "(unaff_EBX + 0xafe5,uVar7)" ( (binary_expression "unaff_EBX + 0xafe5" identifier + number_literal) , identifier ))) ;) (expression_statement "iVar3 = construct_scsi_pt_obj();" (assignment_expression "iVar3 = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }" { (expression_statement "pr2ws(unaff_EBX + 0x16bc4,iVar6);" (call_expression "pr2ws(unaff_EBX + 0x16bc4,iVar6)" identifier (argument_list "(unaff_EBX + 0x16bc4,iVar6)" ( (binary_expression "unaff_EBX + 0x16bc4" identifier + number_literal) , identifier ))) ;) (expression_statement "local_7c = sg_convert_errno(0xc);" (assignment_expression "local_7c = sg_convert_errno(0xc)" identifier = (call_expression "sg_convert_errno(0xc)" identifier (argument_list "(0xc)" ( number_literal )))) ;) (goto_statement "goto LAB_00026879;" goto statement_identifier ;) })) (expression_statement "set_scsi_pt_cdb(iVar3,local_6e,10);" (call_expression "set_scsi_pt_cdb(iVar3,local_6e,10)" identifier (argument_list "(iVar3,local_6e,10)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(iVar3,local_64,0x40);" (call_expression "set_scsi_pt_sense(iVar3,local_64,0x40)" identifier (argument_list "(iVar3,local_64,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_in(iVar3,param_4,param_5);" (call_expression "set_scsi_pt_data_in(iVar3,param_4,param_5)" identifier (argument_list "(iVar3,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);" (assignment_expression "uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8)" identifier = (call_expression "do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8)" identifier (argument_list "(iVar3,unaff_retaddr,0x3c,param_8)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "piVar12 = &local_7c;" (assignment_expression "piVar12 = &local_7c" identifier = (pointer_expression "&local_7c" & identifier)) ;) (expression_statement "iVar11 = param_8;" (assignment_expression "iVar11 = param_8" identifier = identifier) ;) (expression_statement "iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);" (assignment_expression "iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12)" identifier = (call_expression "sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12)" identifier (argument_list "(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12)" ( identifier , identifier , identifier , identifier , identifier , (binary_expression "param_7 & 0xff" identifier & number_literal) , identifier , identifier )))) ;) (if_statement "if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" if (parenthesized_expression "(iVar5 == -1)" ( (binary_expression "iVar5 == -1" identifier == number_literal) )) (compound_statement "{\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }" { (expression_statement "uVar4 = get_scsi_pt_os_err(iVar3);" (assignment_expression "uVar4 = get_scsi_pt_os_err(iVar3)" identifier = (call_expression "get_scsi_pt_os_err(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "local_7c = sg_convert_errno(uVar4);" (assignment_expression "local_7c = sg_convert_errno(uVar4)" identifier = (call_expression "sg_convert_errno(uVar4)" identifier (argument_list "(uVar4)" ( identifier )))) ;) }) (else_clause "else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" else (if_statement "if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" if (parenthesized_expression "(iVar5 == -2)" ( (binary_expression "iVar5 == -2" identifier == number_literal) )) (compound_statement "{\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }" { (if_statement "if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }" if (parenthesized_expression "(local_7c == 5)" ( (binary_expression "local_7c == 5" identifier == number_literal) )) (compound_statement "{\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }" { (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" identifier = number_literal) ;) (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" identifier = number_literal) ;) (expression_statement "iVar6 = get_scsi_pt_sense_len(iVar3);" (assignment_expression "iVar6 = get_scsi_pt_sense_len(iVar3)" identifier = (call_expression "get_scsi_pt_sense_len(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);" (assignment_expression "uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78)" identifier = (call_expression "sg_get_sense_info_fld(local_64,iVar6,&local_78)" identifier (argument_list "(local_64,iVar6,&local_78)" ( identifier , identifier , (pointer_expression "&local_78" & identifier) )))) ;) (expression_statement "uVar8 = uVar7 & 0xff;" (assignment_expression "uVar8 = uVar7 & 0xff" identifier = (binary_expression "uVar7 & 0xff" identifier & number_literal)) ;) (if_statement "if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }" if (parenthesized_expression "(iVar6 < 8)" ( (binary_expression "iVar6 < 8" identifier < number_literal) )) (compound_statement "{\nLAB_00026a80:\n        bVar2 = 0;\n      }" { (labeled_statement "LAB_00026a80:\n        bVar2 = 0;" statement_identifier : (expression_statement "bVar2 = 0;" (assignment_expression "bVar2 = 0" identifier = number_literal) ;)) }) (else_clause "else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }" else (compound_statement "{\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }" { (if_statement "if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }" if (parenthesized_expression "(0x71 < (local_64[0] & 0x7f))" ( (binary_expression "0x71 < (local_64[0] & 0x7f)" number_literal < (parenthesized_expression "(local_64[0] & 0x7f)" ( (binary_expression "local_64[0] & 0x7f" (subscript_expression "local_64[0]" identifier [ number_literal ]) & number_literal) ))) )) (compound_statement "{\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }" { (expression_statement "uVar8 = uVar7 & 0xff;" (assignment_expression "uVar8 = uVar7 & 0xff" identifier = (binary_expression "uVar7 & 0xff" identifier & number_literal)) ;) (expression_statement "iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);" (assignment_expression "iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5)" identifier = (call_expression "sg_scsi_sense_desc_find(local_64,iVar6,5)" identifier (argument_list "(local_64,iVar6,5)" ( identifier , identifier , number_literal )))) ;) (expression_statement "uVar8 = uVar8 & 0xff;" (assignment_expression "uVar8 = uVar8 & 0xff" identifier = (binary_expression "uVar8 & 0xff" identifier & number_literal)) ;) (if_statement "if (iVar6 == 0) goto LAB_00026a80;" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00026a80;" goto statement_identifier ;)) (expression_statement "local_62 = *(byte *)(iVar6 + 3);" (assignment_expression "local_62 = *(byte *)(iVar6 + 3)" identifier = (pointer_expression "*(byte *)(iVar6 + 3)" * (cast_expression "(byte *)(iVar6 + 3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 3)" ( (binary_expression "iVar6 + 3" identifier + number_literal) ))))) ;) })) (expression_statement "bVar2 = local_62 >> 5 & 1;" (assignment_expression "bVar2 = local_62 >> 5 & 1" identifier = (binary_expression "local_62 >> 5 & 1" (binary_expression "local_62 >> 5" identifier >> number_literal) & number_literal)) ;) (if_statement "if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }" if (parenthesized_expression "(((char)uVar8 != '\0') && (bVar2 != 0))" ( (binary_expression "((char)uVar8 != '\0') && (bVar2 != 0)" (parenthesized_expression "((char)uVar8 != '\0')" ( (binary_expression "(char)uVar8 != '\0'" (cast_expression "(char)uVar8" ( (type_descriptor "char" primitive_type) ) identifier) != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(bVar2 != 0)" ( (binary_expression "bVar2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }" { (expression_statement "local_7c = 0x11;" (assignment_expression "local_7c = 0x11" identifier = number_literal) ;) (if_statement "if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }" if (parenthesized_expression "(param_6 != (undefined4 *)0x0)" ( (binary_expression "param_6 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            *param_6 = local_78;\n          }" { (expression_statement "*param_6 = local_78;" (assignment_expression "*param_6 = local_78" (pointer_expression "*param_6" * identifier) = identifier) ;) })) (goto_statement "goto LAB_0002686d;" goto statement_identifier ;) })) }))) (if_statement "if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }" if (parenthesized_expression "(1 < param_8)" ( (binary_expression "1 < param_8" number_literal < identifier) )) (compound_statement "{\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }" { (expression_statement "pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);" (call_expression "pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2)" identifier (argument_list "(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2)" ( (binary_expression "unaff_EBX + 0x1751d" identifier + number_literal) , identifier , identifier , identifier , identifier ))) ;) })) }) (else_clause "else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }" else (if_statement "if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }" if (parenthesized_expression "((4 < local_7c) && (local_7c - 0x14U < 2))" ( (binary_expression "(4 < local_7c) && (local_7c - 0x14U < 2)" (parenthesized_expression "(4 < local_7c)" ( (binary_expression "4 < local_7c" number_literal < identifier) )) && (parenthesized_expression "(local_7c - 0x14U < 2)" ( (binary_expression "local_7c - 0x14U < 2" (binary_expression "local_7c - 0x14U" identifier - number_literal) < number_literal) ))) )) (compound_statement "{\n      local_7c = 0;\n    }" { (expression_statement "local_7c = 0;" (assignment_expression "local_7c = 0" identifier = number_literal) ;) })))) }) (else_clause "else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" else (if_statement "if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" if (parenthesized_expression "((param_8 < 3) || (iVar5 < 1))" ( (binary_expression "(param_8 < 3) || (iVar5 < 1)" (parenthesized_expression "(param_8 < 3)" ( (binary_expression "param_8 < 3" identifier < number_literal) )) || (parenthesized_expression "(iVar5 < 1)" ( (binary_expression "iVar5 < 1" identifier < number_literal) ))) )) (compound_statement "{\n    local_7c = 0;\n  }" { (expression_statement "local_7c = 0;" (assignment_expression "local_7c = 0" identifier = number_literal) ;) }) (else_clause "else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" else (compound_statement "{\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" { (expression_statement "pr2ws(unaff_EBX + 0x16fcd,iVar6);" (call_expression "pr2ws(unaff_EBX + 0x16fcd,iVar6)" identifier (argument_list "(unaff_EBX + 0x16fcd,iVar6)" ( (binary_expression "unaff_EBX + 0x16fcd" identifier + number_literal) , identifier ))) ;) (if_statement "if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }" if (parenthesized_expression "(param_8 == 3)" ( (binary_expression "param_8 == 3" identifier == number_literal) )) (compound_statement "{\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }" { (expression_statement "iVar6 = unaff_EBX + 0x16f98;" (assignment_expression "iVar6 = unaff_EBX + 0x16f98" identifier = (binary_expression "unaff_EBX + 0x16f98" identifier + number_literal)) ;) (if_statement "if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }" if (parenthesized_expression "(iVar5 < 0x101)" ( (binary_expression "iVar5 < 0x101" identifier < number_literal) )) (compound_statement "{\n        iVar6 = unaff_EBX + 0xb2da;\n      }" { (expression_statement "iVar6 = unaff_EBX + 0xb2da;" (assignment_expression "iVar6 = unaff_EBX + 0xb2da" identifier = (binary_expression "unaff_EBX + 0xb2da" identifier + number_literal)) ;) })) (expression_statement "pr2ws(unaff_EBX + 0xac7b,iVar6);" (call_expression "pr2ws(unaff_EBX + 0xac7b,iVar6)" identifier (argument_list "(unaff_EBX + 0xac7b,iVar6)" ( (binary_expression "unaff_EBX + 0xac7b" identifier + number_literal) , identifier ))) ;) (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }" if (parenthesized_expression "(0x100 < iVar5)" ( (binary_expression "0x100 < iVar5" number_literal < identifier) )) (compound_statement "{\n        iVar5 = 0x100;\n      }" { (expression_statement "iVar5 = 0x100;" (assignment_expression "iVar5 = 0x100" identifier = number_literal) ;) })) }) (else_clause "else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }" else (compound_statement "{\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }" { (expression_statement "pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);" (call_expression "pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5)" identifier (argument_list "(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5)" ( (binary_expression "unaff_EBX + 0x17ed6" identifier + number_literal) , identifier , identifier , identifier , identifier ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }))) (expression_statement "hex2stderr(param_4,iVar5,uVar4);" (call_expression "hex2stderr(param_4,iVar5,uVar4)" identifier (argument_list "(param_4,iVar5,uVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "local_7c = 0;" (assignment_expression "local_7c = 0" identifier = number_literal) ;) }))))))) (labeled_statement "LAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);" statement_identifier : (expression_statement "destruct_scsi_pt_obj(iVar3);" (call_expression "destruct_scsi_pt_obj(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;)) (labeled_statement "LAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }" statement_identifier : (if_statement "if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }" if (parenthesized_expression "(local_24 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return local_7c;\n  }" { (return_statement "return local_7c;" return identifier ;) }))) comment (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint sg_ll_read_long10(int sg_fd,_Bool pblock,_Bool correct,uint lba,void *resp,int xfer_len,\n                     int *offsetp,_Bool noisy,int verbose)\n\n{\n  int iVar1;\n  ushort uVar2;\n  _Bool _Var3;\n  byte bVar4;\n  sg_pt_base *vp;\n  int iVar5;\n  uint uVar6;\n  char *pcVar7;\n  uint8_t *puVar8;\n  uint8_t uVar9;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  int no_ascii;\n  int sense_cat;\n  uint64_t ull;\n  uint8_t readLong_cdb [10];\n  uint8_t sense_b [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  readLong_cdb[9] = '\0';\n  uVar9 = '\x02';\n  readLong_cdb[1] = '\0';\n  readLong_cdb[6] = '\0';\n  readLong_cdb[0] = '>';\n  if (pblock) {\n    readLong_cdb[1] = '\x04';\n    uVar9 = '\x06';\n  }\n  if (correct) {\n    readLong_cdb[1] = uVar9;\n  }\n  uVar2 = (ushort)(lba >> 8);\n  readLong_cdb._2_2_ = (ushort)(byte)(lba >> 0x18) | uVar2 & 0xff00;\n  readLong_cdb._4_2_ = uVar2 & 0xff | (ushort)((lba << 0x18) >> 0x10);\n  readLong_cdb[7] = (uint8_t)((uint)xfer_len >> 8);\n  readLong_cdb[8] = (uint8_t)xfer_len;\n  pcVar7 = "read long(10)";\n  if (verbose == 0) {\n    vp = construct_scsi_pt_obj();\n  }\n  else {\n    pr2ws("    %s cdb: ","read long(10)");\n    pbVar10 = readLong_cdb;\n    do {\n      uVar6 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws("%02x ",uVar6);\n    } while (sense_b != pbVar10);\n    pr2ws("\n",uVar6);\n    vp = construct_scsi_pt_obj();\n  }\n  if (vp == (sg_pt_base *)0x0) {\n    pr2ws("%s: out of memory\n","read long(10)");\n    sense_cat = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(vp,readLong_cdb,10);\n  set_scsi_pt_sense(vp,sense_b,0x40);\n  set_scsi_pt_data_in(vp,(uint8_t *)resp,xfer_len);\n  iVar5 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n  iVar5 = sg_cmds_process_resp(vp,"read long(10)",iVar5,xfer_len,sense_b,noisy,verbose,&sense_cat);\n  if (iVar5 == -1) {\n    iVar5 = get_scsi_pt_os_err();\n    sense_cat = sg_convert_errno(iVar5);\n  }\n  else if (iVar5 == -2) {\n    if (sense_cat == 5) {\n      ull._0_4_ = 0;\n      ull._4_4_ = 0;\n      iVar5 = get_scsi_pt_sense_len();\n      _Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);\n      if (iVar5 < 8) {\nLAB_00026a80:\n        bVar4 = 0;\n      }\n      else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < verbose) {\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }\n    }\n    else if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {\n      sense_cat = 0;\n    }\n  }\n  else if ((verbose < 3) || (iVar5 < 1)) {\n    sense_cat = 0;\n  }\n  else {\n    pr2ws("    %s: response","read long(10)");\n    if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }\n    hex2stderr((uint8_t *)resp,iVar5,no_ascii);\n    sense_cat = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(vp);\nLAB_00026879:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return sense_cat;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int sg_ll_read_long10(int sg_fd,_Bool pblock,_Bool correct,uint lba,void *resp,int xfer_len,\n                     int *offsetp,_Bool noisy,int verbose)\n\n{\n  int iVar1;\n  ushort uVar2;\n  _Bool _Var3;\n  byte bVar4;\n  sg_pt_base *vp;\n  int iVar5;\n  uint uVar6;\n  char *pcVar7;\n  uint8_t *puVar8;\n  uint8_t uVar9;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  int no_ascii;\n  int sense_cat;\n  uint64_t ull;\n  uint8_t readLong_cdb [10];\n  uint8_t sense_b [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  readLong_cdb[9] = '\0';\n  uVar9 = '\x02';\n  readLong_cdb[1] = '\0';\n  readLong_cdb[6] = '\0';\n  readLong_cdb[0] = '>';\n  if (pblock) {\n    readLong_cdb[1] = '\x04';\n    uVar9 = '\x06';\n  }\n  if (correct) {\n    readLong_cdb[1] = uVar9;\n  }\n  uVar2 = (ushort)(lba >> 8);\n  readLong_cdb._2_2_ = (ushort)(byte)(lba >> 0x18) | uVar2 & 0xff00;\n  readLong_cdb._4_2_ = uVar2 & 0xff | (ushort)((lba << 0x18) >> 0x10);\n  readLong_cdb[7] = (uint8_t)((uint)xfer_len >> 8);\n  readLong_cdb[8] = (uint8_t)xfer_len;\n  pcVar7 = "read long(10)";\n  if (verbose == 0) {\n    vp = construct_scsi_pt_obj();\n  }\n  else {\n    pr2ws("    %s cdb: ","read long(10)");\n    pbVar10 = readLong_cdb;\n    do {\n      uVar6 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws("%02x ",uVar6);\n    } while (sense_b != pbVar10);\n    pr2ws("\n",uVar6);\n    vp = construct_scsi_pt_obj();\n  }\n  if (vp == (sg_pt_base *)0x0) {\n    pr2ws("%s: out of memory\n","read long(10)");\n    sense_cat = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(vp,readLong_cdb,10);\n  set_scsi_pt_sense(vp,sense_b,0x40);\n  set_scsi_pt_data_in(vp,(uint8_t *)resp,xfer_len);\n  iVar5 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n  iVar5 = sg_cmds_process_resp(vp,"read long(10)",iVar5,xfer_len,sense_b,noisy,verbose,&sense_cat);\n  if (iVar5 == -1) {\n    iVar5 = get_scsi_pt_os_err();\n    sense_cat = sg_convert_errno(iVar5);\n  }\n  else if (iVar5 == -2) {\n    if (sense_cat == 5) {\n      ull._0_4_ = 0;\n      ull._4_4_ = 0;\n      iVar5 = get_scsi_pt_sense_len();\n      _Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);\n      if (iVar5 < 8) {\nLAB_00026a80:\n        bVar4 = 0;\n      }\n      else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < verbose) {\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }\n    }\n    else if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {\n      sense_cat = 0;\n    }\n  }\n  else if ((verbose < 3) || (iVar5 < 1)) {\n    sense_cat = 0;\n  }\n  else {\n    pr2ws("    %s: response","read long(10)");\n    if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }\n    hex2stderr((uint8_t *)resp,iVar5,no_ascii);\n    sense_cat = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(vp);\nLAB_00026879:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return sense_cat;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "sg_ll_read_long10(int sg_fd,_Bool pblock,_Bool correct,uint lba,void *resp,int xfer_len,\n                     int *offsetp,_Bool noisy,int verbose)" identifier (parameter_list "(int sg_fd,_Bool pblock,_Bool correct,uint lba,void *resp,int xfer_len,\n                     int *offsetp,_Bool noisy,int verbose)" ( (parameter_declaration "int sg_fd" primitive_type identifier) , (parameter_declaration "_Bool pblock" type_identifier identifier) , (parameter_declaration "_Bool correct" type_identifier identifier) , (parameter_declaration "uint lba" type_identifier identifier) , (parameter_declaration "void *resp" primitive_type (pointer_declarator "*resp" * identifier)) , (parameter_declaration "int xfer_len" primitive_type identifier) , (parameter_declaration "int *offsetp" primitive_type (pointer_declarator "*offsetp" * identifier)) , (parameter_declaration "_Bool noisy" type_identifier identifier) , (parameter_declaration "int verbose" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ushort uVar2;\n  _Bool _Var3;\n  byte bVar4;\n  sg_pt_base *vp;\n  int iVar5;\n  uint uVar6;\n  char *pcVar7;\n  uint8_t *puVar8;\n  uint8_t uVar9;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  int no_ascii;\n  int sense_cat;\n  uint64_t ull;\n  uint8_t readLong_cdb [10];\n  uint8_t sense_b [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  readLong_cdb[9] = '\0';\n  uVar9 = '\x02';\n  readLong_cdb[1] = '\0';\n  readLong_cdb[6] = '\0';\n  readLong_cdb[0] = '>';\n  if (pblock) {\n    readLong_cdb[1] = '\x04';\n    uVar9 = '\x06';\n  }\n  if (correct) {\n    readLong_cdb[1] = uVar9;\n  }\n  uVar2 = (ushort)(lba >> 8);\n  readLong_cdb._2_2_ = (ushort)(byte)(lba >> 0x18) | uVar2 & 0xff00;\n  readLong_cdb._4_2_ = uVar2 & 0xff | (ushort)((lba << 0x18) >> 0x10);\n  readLong_cdb[7] = (uint8_t)((uint)xfer_len >> 8);\n  readLong_cdb[8] = (uint8_t)xfer_len;\n  pcVar7 = "read long(10)";\n  if (verbose == 0) {\n    vp = construct_scsi_pt_obj();\n  }\n  else {\n    pr2ws("    %s cdb: ","read long(10)");\n    pbVar10 = readLong_cdb;\n    do {\n      uVar6 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws("%02x ",uVar6);\n    } while (sense_b != pbVar10);\n    pr2ws("\n",uVar6);\n    vp = construct_scsi_pt_obj();\n  }\n  if (vp == (sg_pt_base *)0x0) {\n    pr2ws("%s: out of memory\n","read long(10)");\n    sense_cat = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(vp,readLong_cdb,10);\n  set_scsi_pt_sense(vp,sense_b,0x40);\n  set_scsi_pt_data_in(vp,(uint8_t *)resp,xfer_len);\n  iVar5 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n  iVar5 = sg_cmds_process_resp(vp,"read long(10)",iVar5,xfer_len,sense_b,noisy,verbose,&sense_cat);\n  if (iVar5 == -1) {\n    iVar5 = get_scsi_pt_os_err();\n    sense_cat = sg_convert_errno(iVar5);\n  }\n  else if (iVar5 == -2) {\n    if (sense_cat == 5) {\n      ull._0_4_ = 0;\n      ull._4_4_ = 0;\n      iVar5 = get_scsi_pt_sense_len();\n      _Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);\n      if (iVar5 < 8) {\nLAB_00026a80:\n        bVar4 = 0;\n      }\n      else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < verbose) {\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }\n    }\n    else if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {\n      sense_cat = 0;\n    }\n  }\n  else if ((verbose < 3) || (iVar5 < 1)) {\n    sense_cat = 0;\n  }\n  else {\n    pr2ws("    %s: response","read long(10)");\n    if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }\n    hex2stderr((uint8_t *)resp,iVar5,no_ascii);\n    sense_cat = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(vp);\nLAB_00026879:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return sense_cat;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "_Bool _Var3;" type_identifier identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "sg_pt_base *vp;" type_identifier (pointer_declarator "*vp" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "uint8_t *puVar8;" primitive_type (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint8_t uVar9;" primitive_type identifier ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int no_ascii;" primitive_type identifier ;) (declaration "int sense_cat;" primitive_type identifier ;) (declaration "uint64_t ull;" primitive_type identifier ;) (declaration "uint8_t readLong_cdb [10];" primitive_type (array_declarator "readLong_cdb [10]" identifier [ number_literal ]) ;) (declaration "uint8_t sense_b [64];" primitive_type (array_declarator "sense_b [64]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "readLong_cdb[9] = '\0';" (assignment_expression "readLong_cdb[9] = '\0'" (subscript_expression "readLong_cdb[9]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "uVar9 = '\x02';" (assignment_expression "uVar9 = '\x02'" identifier = (char_literal "'\x02'" ' escape_sequence ')) ;) (expression_statement "readLong_cdb[1] = '\0';" (assignment_expression "readLong_cdb[1] = '\0'" (subscript_expression "readLong_cdb[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "readLong_cdb[6] = '\0';" (assignment_expression "readLong_cdb[6] = '\0'" (subscript_expression "readLong_cdb[6]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "readLong_cdb[0] = '>';" (assignment_expression "readLong_cdb[0] = '>'" (subscript_expression "readLong_cdb[0]" identifier [ number_literal ]) = (char_literal "'>'" ' character ')) ;) (if_statement "if (pblock) {\n    readLong_cdb[1] = '\x04';\n    uVar9 = '\x06';\n  }" if (parenthesized_expression "(pblock)" ( identifier )) (compound_statement "{\n    readLong_cdb[1] = '\x04';\n    uVar9 = '\x06';\n  }" { (expression_statement "readLong_cdb[1] = '\x04';" (assignment_expression "readLong_cdb[1] = '\x04'" (subscript_expression "readLong_cdb[1]" identifier [ number_literal ]) = (char_literal "'\x04'" ' escape_sequence ')) ;) (expression_statement "uVar9 = '\x06';" (assignment_expression "uVar9 = '\x06'" identifier = (char_literal "'\x06'" ' escape_sequence ')) ;) })) (if_statement "if (correct) {\n    readLong_cdb[1] = uVar9;\n  }" if (parenthesized_expression "(correct)" ( identifier )) (compound_statement "{\n    readLong_cdb[1] = uVar9;\n  }" { (expression_statement "readLong_cdb[1] = uVar9;" (assignment_expression "readLong_cdb[1] = uVar9" (subscript_expression "readLong_cdb[1]" identifier [ number_literal ]) = identifier) ;) })) (expression_statement "uVar2 = (ushort)(lba >> 8);" (assignment_expression "uVar2 = (ushort)(lba >> 8)" identifier = (call_expression "(ushort)(lba >> 8)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(lba >> 8)" ( (binary_expression "lba >> 8" identifier >> number_literal) )))) ;) (expression_statement "readLong_cdb._2_2_ = (ushort)(byte)(lba >> 0x18) | uVar2 & 0xff00;" (assignment_expression "readLong_cdb._2_2_ = (ushort)(byte)(lba >> 0x18) | uVar2 & 0xff00" (field_expression "readLong_cdb._2_2_" identifier . field_identifier) = (binary_expression "(ushort)(byte)(lba >> 0x18) | uVar2 & 0xff00" (call_expression "(ushort)(byte)(lba >> 0x18)" (call_expression "(ushort)(byte)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "(lba >> 0x18)" ( (binary_expression "lba >> 0x18" identifier >> number_literal) ))) | (binary_expression "uVar2 & 0xff00" identifier & number_literal))) ;) (expression_statement "readLong_cdb._4_2_ = uVar2 & 0xff | (ushort)((lba << 0x18) >> 0x10);" (assignment_expression "readLong_cdb._4_2_ = uVar2 & 0xff | (ushort)((lba << 0x18) >> 0x10)" (field_expression "readLong_cdb._4_2_" identifier . field_identifier) = (binary_expression "uVar2 & 0xff | (ushort)((lba << 0x18) >> 0x10)" (binary_expression "uVar2 & 0xff" identifier & number_literal) | (call_expression "(ushort)((lba << 0x18) >> 0x10)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((lba << 0x18) >> 0x10)" ( (binary_expression "(lba << 0x18) >> 0x10" (parenthesized_expression "(lba << 0x18)" ( (binary_expression "lba << 0x18" identifier << number_literal) )) >> number_literal) ))))) ;) (expression_statement "readLong_cdb[7] = (uint8_t)((uint)xfer_len >> 8);" (assignment_expression "readLong_cdb[7] = (uint8_t)((uint)xfer_len >> 8)" (subscript_expression "readLong_cdb[7]" identifier [ number_literal ]) = (cast_expression "(uint8_t)((uint)xfer_len >> 8)" ( (type_descriptor "uint8_t" primitive_type) ) (parenthesized_expression "((uint)xfer_len >> 8)" ( (binary_expression "(uint)xfer_len >> 8" (cast_expression "(uint)xfer_len" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "readLong_cdb[8] = (uint8_t)xfer_len;" (assignment_expression "readLong_cdb[8] = (uint8_t)xfer_len" (subscript_expression "readLong_cdb[8]" identifier [ number_literal ]) = (cast_expression "(uint8_t)xfer_len" ( (type_descriptor "uint8_t" primitive_type) ) identifier)) ;) (expression_statement "pcVar7 = "read long(10)";" (assignment_expression "pcVar7 = "read long(10)"" identifier = (string_literal ""read long(10)"" " string_content ")) ;) (if_statement "if (verbose == 0) {\n    vp = construct_scsi_pt_obj();\n  }\n  else {\n    pr2ws("    %s cdb: ","read long(10)");\n    pbVar10 = readLong_cdb;\n    do {\n      uVar6 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws("%02x ",uVar6);\n    } while (sense_b != pbVar10);\n    pr2ws("\n",uVar6);\n    vp = construct_scsi_pt_obj();\n  }" if (parenthesized_expression "(verbose == 0)" ( (binary_expression "verbose == 0" identifier == number_literal) )) (compound_statement "{\n    vp = construct_scsi_pt_obj();\n  }" { (expression_statement "vp = construct_scsi_pt_obj();" (assignment_expression "vp = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n    pr2ws("    %s cdb: ","read long(10)");\n    pbVar10 = readLong_cdb;\n    do {\n      uVar6 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws("%02x ",uVar6);\n    } while (sense_b != pbVar10);\n    pr2ws("\n",uVar6);\n    vp = construct_scsi_pt_obj();\n  }" else (compound_statement "{\n    pr2ws("    %s cdb: ","read long(10)");\n    pbVar10 = readLong_cdb;\n    do {\n      uVar6 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws("%02x ",uVar6);\n    } while (sense_b != pbVar10);\n    pr2ws("\n",uVar6);\n    vp = construct_scsi_pt_obj();\n  }" { (expression_statement "pr2ws("    %s cdb: ","read long(10)");" (call_expression "pr2ws("    %s cdb: ","read long(10)")" identifier (argument_list "("    %s cdb: ","read long(10)")" ( (string_literal ""    %s cdb: "" " string_content ") , (string_literal ""read long(10)"" " string_content ") ))) ;) (expression_statement "pbVar10 = readLong_cdb;" (assignment_expression "pbVar10 = readLong_cdb" identifier = identifier) ;) (do_statement "do {\n      uVar6 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws("%02x ",uVar6);\n    } while (sense_b != pbVar10);" do (compound_statement "{\n      uVar6 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws("%02x ",uVar6);\n    }" { (expression_statement "uVar6 = (uint)*pbVar10;" (assignment_expression "uVar6 = (uint)*pbVar10" identifier = (binary_expression "(uint)*pbVar10" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar10 = pbVar10 + 1;" (assignment_expression "pbVar10 = pbVar10 + 1" identifier = (binary_expression "pbVar10 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws("%02x ",uVar6);" (call_expression "pr2ws("%02x ",uVar6)" identifier (argument_list "("%02x ",uVar6)" ( (string_literal ""%02x "" " string_content ") , identifier ))) ;) }) while (parenthesized_expression "(sense_b != pbVar10)" ( (binary_expression "sense_b != pbVar10" identifier != identifier) )) ;) (expression_statement "pr2ws("\n",uVar6);" (call_expression "pr2ws("\n",uVar6)" identifier (argument_list "("\n",uVar6)" ( (string_literal ""\n"" " escape_sequence ") , identifier ))) ;) (expression_statement "vp = construct_scsi_pt_obj();" (assignment_expression "vp = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (vp == (sg_pt_base *)0x0) {\n    pr2ws("%s: out of memory\n","read long(10)");\n    sense_cat = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }" if (parenthesized_expression "(vp == (sg_pt_base *)0x0)" ( (binary_expression "vp == (sg_pt_base *)0x0" identifier == (cast_expression "(sg_pt_base *)0x0" ( (type_descriptor "sg_pt_base *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pr2ws("%s: out of memory\n","read long(10)");\n    sense_cat = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }" { (expression_statement "pr2ws("%s: out of memory\n","read long(10)");" (call_expression "pr2ws("%s: out of memory\n","read long(10)")" identifier (argument_list "("%s: out of memory\n","read long(10)")" ( (string_literal ""%s: out of memory\n"" " string_content escape_sequence ") , (string_literal ""read long(10)"" " string_content ") ))) ;) (expression_statement "sense_cat = sg_convert_errno(0xc);" (assignment_expression "sense_cat = sg_convert_errno(0xc)" identifier = (call_expression "sg_convert_errno(0xc)" identifier (argument_list "(0xc)" ( number_literal )))) ;) (goto_statement "goto LAB_00026879;" goto statement_identifier ;) })) (expression_statement "set_scsi_pt_cdb(vp,readLong_cdb,10);" (call_expression "set_scsi_pt_cdb(vp,readLong_cdb,10)" identifier (argument_list "(vp,readLong_cdb,10)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(vp,sense_b,0x40);" (call_expression "set_scsi_pt_sense(vp,sense_b,0x40)" identifier (argument_list "(vp,sense_b,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_in(vp,(uint8_t *)resp,xfer_len);" (call_expression "set_scsi_pt_data_in(vp,(uint8_t *)resp,xfer_len)" identifier (argument_list "(vp,(uint8_t *)resp,xfer_len)" ( identifier , (cast_expression "(uint8_t *)resp" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "iVar5 = do_scsi_pt(vp,sg_fd,0x3c,verbose);" (assignment_expression "iVar5 = do_scsi_pt(vp,sg_fd,0x3c,verbose)" identifier = (call_expression "do_scsi_pt(vp,sg_fd,0x3c,verbose)" identifier (argument_list "(vp,sg_fd,0x3c,verbose)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "iVar5 = sg_cmds_process_resp(vp,"read long(10)",iVar5,xfer_len,sense_b,noisy,verbose,&sense_cat);" (assignment_expression "iVar5 = sg_cmds_process_resp(vp,"read long(10)",iVar5,xfer_len,sense_b,noisy,verbose,&sense_cat)" identifier = (call_expression "sg_cmds_process_resp(vp,"read long(10)",iVar5,xfer_len,sense_b,noisy,verbose,&sense_cat)" identifier (argument_list "(vp,"read long(10)",iVar5,xfer_len,sense_b,noisy,verbose,&sense_cat)" ( identifier , (string_literal ""read long(10)"" " string_content ") , identifier , identifier , identifier , identifier , identifier , (pointer_expression "&sense_cat" & identifier) )))) ;) (if_statement "if (iVar5 == -1) {\n    iVar5 = get_scsi_pt_os_err();\n    sense_cat = sg_convert_errno(iVar5);\n  }\n  else if (iVar5 == -2) {\n    if (sense_cat == 5) {\n      ull._0_4_ = 0;\n      ull._4_4_ = 0;\n      iVar5 = get_scsi_pt_sense_len();\n      _Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);\n      if (iVar5 < 8) {\nLAB_00026a80:\n        bVar4 = 0;\n      }\n      else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < verbose) {\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }\n    }\n    else if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {\n      sense_cat = 0;\n    }\n  }\n  else if ((verbose < 3) || (iVar5 < 1)) {\n    sense_cat = 0;\n  }\n  else {\n    pr2ws("    %s: response","read long(10)");\n    if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }\n    hex2stderr((uint8_t *)resp,iVar5,no_ascii);\n    sense_cat = 0;\n  }" if (parenthesized_expression "(iVar5 == -1)" ( (binary_expression "iVar5 == -1" identifier == number_literal) )) (compound_statement "{\n    iVar5 = get_scsi_pt_os_err();\n    sense_cat = sg_convert_errno(iVar5);\n  }" { (expression_statement "iVar5 = get_scsi_pt_os_err();" (assignment_expression "iVar5 = get_scsi_pt_os_err()" identifier = (call_expression "get_scsi_pt_os_err()" identifier (argument_list "()" ( )))) ;) (expression_statement "sense_cat = sg_convert_errno(iVar5);" (assignment_expression "sense_cat = sg_convert_errno(iVar5)" identifier = (call_expression "sg_convert_errno(iVar5)" identifier (argument_list "(iVar5)" ( identifier )))) ;) }) (else_clause "else if (iVar5 == -2) {\n    if (sense_cat == 5) {\n      ull._0_4_ = 0;\n      ull._4_4_ = 0;\n      iVar5 = get_scsi_pt_sense_len();\n      _Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);\n      if (iVar5 < 8) {\nLAB_00026a80:\n        bVar4 = 0;\n      }\n      else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < verbose) {\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }\n    }\n    else if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {\n      sense_cat = 0;\n    }\n  }\n  else if ((verbose < 3) || (iVar5 < 1)) {\n    sense_cat = 0;\n  }\n  else {\n    pr2ws("    %s: response","read long(10)");\n    if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }\n    hex2stderr((uint8_t *)resp,iVar5,no_ascii);\n    sense_cat = 0;\n  }" else (if_statement "if (iVar5 == -2) {\n    if (sense_cat == 5) {\n      ull._0_4_ = 0;\n      ull._4_4_ = 0;\n      iVar5 = get_scsi_pt_sense_len();\n      _Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);\n      if (iVar5 < 8) {\nLAB_00026a80:\n        bVar4 = 0;\n      }\n      else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < verbose) {\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }\n    }\n    else if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {\n      sense_cat = 0;\n    }\n  }\n  else if ((verbose < 3) || (iVar5 < 1)) {\n    sense_cat = 0;\n  }\n  else {\n    pr2ws("    %s: response","read long(10)");\n    if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }\n    hex2stderr((uint8_t *)resp,iVar5,no_ascii);\n    sense_cat = 0;\n  }" if (parenthesized_expression "(iVar5 == -2)" ( (binary_expression "iVar5 == -2" identifier == number_literal) )) (compound_statement "{\n    if (sense_cat == 5) {\n      ull._0_4_ = 0;\n      ull._4_4_ = 0;\n      iVar5 = get_scsi_pt_sense_len();\n      _Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);\n      if (iVar5 < 8) {\nLAB_00026a80:\n        bVar4 = 0;\n      }\n      else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < verbose) {\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }\n    }\n    else if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {\n      sense_cat = 0;\n    }\n  }" { (if_statement "if (sense_cat == 5) {\n      ull._0_4_ = 0;\n      ull._4_4_ = 0;\n      iVar5 = get_scsi_pt_sense_len();\n      _Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);\n      if (iVar5 < 8) {\nLAB_00026a80:\n        bVar4 = 0;\n      }\n      else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < verbose) {\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }\n    }\n    else if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {\n      sense_cat = 0;\n    }" if (parenthesized_expression "(sense_cat == 5)" ( (binary_expression "sense_cat == 5" identifier == number_literal) )) (compound_statement "{\n      ull._0_4_ = 0;\n      ull._4_4_ = 0;\n      iVar5 = get_scsi_pt_sense_len();\n      _Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);\n      if (iVar5 < 8) {\nLAB_00026a80:\n        bVar4 = 0;\n      }\n      else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < verbose) {\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }\n    }" { (expression_statement "ull._0_4_ = 0;" (assignment_expression "ull._0_4_ = 0" (field_expression "ull._0_4_" identifier . field_identifier) = number_literal) ;) (expression_statement "ull._4_4_ = 0;" (assignment_expression "ull._4_4_ = 0" (field_expression "ull._4_4_" identifier . field_identifier) = number_literal) ;) (expression_statement "iVar5 = get_scsi_pt_sense_len();" (assignment_expression "iVar5 = get_scsi_pt_sense_len()" identifier = (call_expression "get_scsi_pt_sense_len()" identifier (argument_list "()" ( )))) ;) (expression_statement "_Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull);" (assignment_expression "_Var3 = sg_get_sense_info_fld(sense_b,iVar5,&ull)" identifier = (call_expression "sg_get_sense_info_fld(sense_b,iVar5,&ull)" identifier (argument_list "(sense_b,iVar5,&ull)" ( identifier , identifier , (pointer_expression "&ull" & identifier) )))) ;) (if_statement "if (iVar5 < 8) {\nLAB_00026a80:\n        bVar4 = 0;\n      }\n      else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }" if (parenthesized_expression "(iVar5 < 8)" ( (binary_expression "iVar5 < 8" identifier < number_literal) )) (compound_statement "{\nLAB_00026a80:\n        bVar4 = 0;\n      }" { (labeled_statement "LAB_00026a80:\n        bVar4 = 0;" statement_identifier : (expression_statement "bVar4 = 0;" (assignment_expression "bVar4 = 0" identifier = number_literal) ;)) }) (else_clause "else {\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }" else (compound_statement "{\n        if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }\n        bVar4 = sense_b[2] >> 5 & 1;\n        if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }\n      }" { (if_statement "if (0x71 < (sense_b[0] & 0x7f)) {\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }" if (parenthesized_expression "(0x71 < (sense_b[0] & 0x7f))" ( (binary_expression "0x71 < (sense_b[0] & 0x7f)" number_literal < (parenthesized_expression "(sense_b[0] & 0x7f)" ( (binary_expression "sense_b[0] & 0x7f" (subscript_expression "sense_b[0]" identifier [ number_literal ]) & number_literal) ))) )) (compound_statement "{\n          puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);\n          if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;\n          sense_b[2] = puVar8[3];\n        }" { (expression_statement "puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5);" (assignment_expression "puVar8 = sg_scsi_sense_desc_find(sense_b,iVar5,5)" identifier = (call_expression "sg_scsi_sense_desc_find(sense_b,iVar5,5)" identifier (argument_list "(sense_b,iVar5,5)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (puVar8 == (uint8_t *)0x0) goto LAB_00026a80;" if (parenthesized_expression "(puVar8 == (uint8_t *)0x0)" ( (binary_expression "puVar8 == (uint8_t *)0x0" identifier == (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00026a80;" goto statement_identifier ;)) (expression_statement "sense_b[2] = puVar8[3];" (assignment_expression "sense_b[2] = puVar8[3]" (subscript_expression "sense_b[2]" identifier [ number_literal ]) = (subscript_expression "puVar8[3]" identifier [ number_literal ])) ;) })) (expression_statement "bVar4 = sense_b[2] >> 5 & 1;" (assignment_expression "bVar4 = sense_b[2] >> 5 & 1" identifier = (binary_expression "sense_b[2] >> 5 & 1" (binary_expression "sense_b[2] >> 5" (subscript_expression "sense_b[2]" identifier [ number_literal ]) >> number_literal) & number_literal)) ;) (if_statement "if ((_Var3) && (bVar4 != 0)) {\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }" if (parenthesized_expression "((_Var3) && (bVar4 != 0))" ( (binary_expression "(_Var3) && (bVar4 != 0)" (parenthesized_expression "(_Var3)" ( identifier )) && (parenthesized_expression "(bVar4 != 0)" ( (binary_expression "bVar4 != 0" identifier != number_literal) ))) )) (compound_statement "{\n          sense_cat = 0x11;\n          if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }\n          goto LAB_0002686d;\n        }" { (expression_statement "sense_cat = 0x11;" (assignment_expression "sense_cat = 0x11" identifier = number_literal) ;) (if_statement "if (offsetp != (int *)0x0) {\n            *offsetp = (int)ull;\n          }" if (parenthesized_expression "(offsetp != (int *)0x0)" ( (binary_expression "offsetp != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            *offsetp = (int)ull;\n          }" { (expression_statement "*offsetp = (int)ull;" (assignment_expression "*offsetp = (int)ull" (pointer_expression "*offsetp" * identifier) = (cast_expression "(int)ull" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (goto_statement "goto LAB_0002686d;" goto statement_identifier ;) })) }))) (if_statement "if (1 < verbose) {\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }" if (parenthesized_expression "(1 < verbose)" ( (binary_expression "1 < verbose" number_literal < identifier) )) (compound_statement "{\n        pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);\n      }" { (expression_statement "pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4);" (call_expression "pr2ws("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4)" identifier (argument_list "("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(uint)_Var3,\n              (uint)bVar4)" ( (string_literal ""  info field: 0x%llx,  valid: %d, ili: %d\n"" " string_content escape_sequence ") , (cast_expression "(int)ull" ( (type_descriptor "int" primitive_type) ) identifier) , (field_expression "ull._4_4_" identifier . field_identifier) , (cast_expression "(uint)_Var3" ( (type_descriptor "uint" type_identifier) ) identifier) , (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) ))) ;) })) }) (else_clause "else if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {\n      sense_cat = 0;\n    }" else (if_statement "if ((4 < sense_cat) && (sense_cat - 0x14U < 2)) {\n      sense_cat = 0;\n    }" if (parenthesized_expression "((4 < sense_cat) && (sense_cat - 0x14U < 2))" ( (binary_expression "(4 < sense_cat) && (sense_cat - 0x14U < 2)" (parenthesized_expression "(4 < sense_cat)" ( (binary_expression "4 < sense_cat" number_literal < identifier) )) && (parenthesized_expression "(sense_cat - 0x14U < 2)" ( (binary_expression "sense_cat - 0x14U < 2" (binary_expression "sense_cat - 0x14U" identifier - number_literal) < number_literal) ))) )) (compound_statement "{\n      sense_cat = 0;\n    }" { (expression_statement "sense_cat = 0;" (assignment_expression "sense_cat = 0" identifier = number_literal) ;) })))) }) (else_clause "else if ((verbose < 3) || (iVar5 < 1)) {\n    sense_cat = 0;\n  }\n  else {\n    pr2ws("    %s: response","read long(10)");\n    if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }\n    hex2stderr((uint8_t *)resp,iVar5,no_ascii);\n    sense_cat = 0;\n  }" else (if_statement "if ((verbose < 3) || (iVar5 < 1)) {\n    sense_cat = 0;\n  }\n  else {\n    pr2ws("    %s: response","read long(10)");\n    if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }\n    hex2stderr((uint8_t *)resp,iVar5,no_ascii);\n    sense_cat = 0;\n  }" if (parenthesized_expression "((verbose < 3) || (iVar5 < 1))" ( (binary_expression "(verbose < 3) || (iVar5 < 1)" (parenthesized_expression "(verbose < 3)" ( (binary_expression "verbose < 3" identifier < number_literal) )) || (parenthesized_expression "(iVar5 < 1)" ( (binary_expression "iVar5 < 1" identifier < number_literal) ))) )) (compound_statement "{\n    sense_cat = 0;\n  }" { (expression_statement "sense_cat = 0;" (assignment_expression "sense_cat = 0" identifier = number_literal) ;) }) (else_clause "else {\n    pr2ws("    %s: response","read long(10)");\n    if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }\n    hex2stderr((uint8_t *)resp,iVar5,no_ascii);\n    sense_cat = 0;\n  }" else (compound_statement "{\n    pr2ws("    %s: response","read long(10)");\n    if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }\n    hex2stderr((uint8_t *)resp,iVar5,no_ascii);\n    sense_cat = 0;\n  }" { (expression_statement "pr2ws("    %s: response","read long(10)");" (call_expression "pr2ws("    %s: response","read long(10)")" identifier (argument_list "("    %s: response","read long(10)")" ( (string_literal ""    %s: response"" " string_content ") , (string_literal ""read long(10)"" " string_content ") ))) ;) (if_statement "if (verbose == 3) {\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }" if (parenthesized_expression "(verbose == 3)" ( (binary_expression "verbose == 3" identifier == number_literal) )) (compound_statement "{\n      pcVar7 = ", first 256 bytes";\n      if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }\n      pr2ws("%s:\n",pcVar7);\n      no_ascii = -1;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }" { (expression_statement "pcVar7 = ", first 256 bytes";" (assignment_expression "pcVar7 = ", first 256 bytes"" identifier = (string_literal "", first 256 bytes"" " string_content ")) ;) (if_statement "if (iVar5 < 0x101) {\n        pcVar7 = "";\n      }" if (parenthesized_expression "(iVar5 < 0x101)" ( (binary_expression "iVar5 < 0x101" identifier < number_literal) )) (compound_statement "{\n        pcVar7 = "";\n      }" { (expression_statement "pcVar7 = "";" (assignment_expression "pcVar7 = """ identifier = (string_literal """" " ")) ;) })) (expression_statement "pr2ws("%s:\n",pcVar7);" (call_expression "pr2ws("%s:\n",pcVar7)" identifier (argument_list "("%s:\n",pcVar7)" ( (string_literal ""%s:\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "no_ascii = -1;" (assignment_expression "no_ascii = -1" identifier = number_literal) ;) (if_statement "if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }" if (parenthesized_expression "(0x100 < iVar5)" ( (binary_expression "0x100 < iVar5" number_literal < identifier) )) (compound_statement "{\n        iVar5 = 0x100;\n      }" { (expression_statement "iVar5 = 0x100;" (assignment_expression "iVar5 = 0x100" identifier = number_literal) ;) })) }) (else_clause "else {\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }" else (compound_statement "{\n      pr2ws(":\n",pcVar7);\n      no_ascii = 0;\n    }" { (expression_statement "pr2ws(":\n",pcVar7);" (call_expression "pr2ws(":\n",pcVar7)" identifier (argument_list "(":\n",pcVar7)" ( (string_literal "":\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "no_ascii = 0;" (assignment_expression "no_ascii = 0" identifier = number_literal) ;) }))) (expression_statement "hex2stderr((uint8_t *)resp,iVar5,no_ascii);" (call_expression "hex2stderr((uint8_t *)resp,iVar5,no_ascii)" identifier (argument_list "((uint8_t *)resp,iVar5,no_ascii)" ( (cast_expression "(uint8_t *)resp" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier ))) ;) (expression_statement "sense_cat = 0;" (assignment_expression "sense_cat = 0" identifier = number_literal) ;) }))))))) (labeled_statement "LAB_0002686d:\n  destruct_scsi_pt_obj(vp);" statement_identifier : (expression_statement "destruct_scsi_pt_obj(vp);" (call_expression "destruct_scsi_pt_obj(vp)" identifier (argument_list "(vp)" ( identifier ))) ;)) (labeled_statement "LAB_00026879:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return sense_cat;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return sense_cat;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return sense_cat;\n  }" { (return_statement "return sense_cat;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int sg_ll_read_long10(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)\n\n{\n  ushort uVar1;\n  byte bVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  undefined1 uVar9;\n  int unaff_EBX;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar11;\n  int *piVar12;\n  int local_7c;\n  undefined4 local_78;\n  undefined4 local_74;\n  byte local_6e [2];\n  ushort uStack_6c;\n  ushort local_6a;\n  undefined1 uStack_68;\n  undefined1 uStack_67;\n  undefined1 uStack_66;\n  undefined1 uStack_65;\n  byte local_64 [2];\n  byte local_62;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_65 = 0;\n  uStack_14 = 0x266eb;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar9 = 2;\n  local_6e[1] = 0;\n  uStack_68 = 0;\n  local_6e[0] = 0x3e;\n  if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }\n  if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }\n  uVar1 = (ushort)((uint)param_3 >> 8);\n  uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;\n  local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);\n  uStack_67 = (undefined1)((uint)param_5 >> 8);\n  uStack_66 = (undefined1)param_5;\n  iVar6 = unaff_EBX + 0x1734e;\n  if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }\n  if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(iVar3,local_6e,10);\n  set_scsi_pt_sense(iVar3,local_64,0x40);\n  set_scsi_pt_data_in(iVar3,param_4,param_5);\n  uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);\n  piVar12 = &local_7c;\n  iVar11 = param_8;\n  iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);\n  if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);\nLAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }\n                    \n  FUN_00030280();\n}\n\n" (function_definition "int sg_ll_read_long10(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)\n\n{\n  ushort uVar1;\n  byte bVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  undefined1 uVar9;\n  int unaff_EBX;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar11;\n  int *piVar12;\n  int local_7c;\n  undefined4 local_78;\n  undefined4 local_74;\n  byte local_6e [2];\n  ushort uStack_6c;\n  ushort local_6a;\n  undefined1 uStack_68;\n  undefined1 uStack_67;\n  undefined1 uStack_66;\n  undefined1 uStack_65;\n  byte local_64 [2];\n  byte local_62;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_65 = 0;\n  uStack_14 = 0x266eb;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar9 = 2;\n  local_6e[1] = 0;\n  uStack_68 = 0;\n  local_6e[0] = 0x3e;\n  if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }\n  if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }\n  uVar1 = (ushort)((uint)param_3 >> 8);\n  uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;\n  local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);\n  uStack_67 = (undefined1)((uint)param_5 >> 8);\n  uStack_66 = (undefined1)param_5;\n  iVar6 = unaff_EBX + 0x1734e;\n  if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }\n  if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(iVar3,local_6e,10);\n  set_scsi_pt_sense(iVar3,local_64,0x40);\n  set_scsi_pt_data_in(iVar3,param_4,param_5);\n  uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);\n  piVar12 = &local_7c;\n  iVar11 = param_8;\n  iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);\n  if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);\nLAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }\n                    \n  FUN_00030280();\n}" primitive_type (function_declarator "sg_ll_read_long10(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)" identifier (parameter_list "(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)" ( (parameter_declaration "char param_1" primitive_type identifier) , (parameter_declaration "char param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "uint param_7" type_identifier identifier) , (parameter_declaration "int param_8" primitive_type identifier) ))) (compound_statement "{\n  ushort uVar1;\n  byte bVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  undefined1 uVar9;\n  int unaff_EBX;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar11;\n  int *piVar12;\n  int local_7c;\n  undefined4 local_78;\n  undefined4 local_74;\n  byte local_6e [2];\n  ushort uStack_6c;\n  ushort local_6a;\n  undefined1 uStack_68;\n  undefined1 uStack_67;\n  undefined1 uStack_66;\n  undefined1 uStack_65;\n  byte local_64 [2];\n  byte local_62;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_65 = 0;\n  uStack_14 = 0x266eb;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar9 = 2;\n  local_6e[1] = 0;\n  uStack_68 = 0;\n  local_6e[0] = 0x3e;\n  if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }\n  if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }\n  uVar1 = (ushort)((uint)param_3 >> 8);\n  uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;\n  local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);\n  uStack_67 = (undefined1)((uint)param_5 >> 8);\n  uStack_66 = (undefined1)param_5;\n  iVar6 = unaff_EBX + 0x1734e;\n  if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }\n  if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(iVar3,local_6e,10);\n  set_scsi_pt_sense(iVar3,local_64,0x40);\n  set_scsi_pt_data_in(iVar3,param_4,param_5);\n  uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);\n  piVar12 = &local_7c;\n  iVar11 = param_8;\n  iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);\n  if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);\nLAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }\n                    \n  FUN_00030280();\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "undefined1 uVar9;" type_identifier identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 unaff_retaddr;" type_identifier identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (declaration "int *piVar12;" primitive_type (pointer_declarator "*piVar12" * identifier) ;) (declaration "int local_7c;" primitive_type identifier ;) (declaration "undefined4 local_78;" type_identifier identifier ;) (declaration "undefined4 local_74;" type_identifier identifier ;) (declaration "byte local_6e [2];" type_identifier (array_declarator "local_6e [2]" identifier [ number_literal ]) ;) (declaration "ushort uStack_6c;" type_identifier identifier ;) (declaration "ushort local_6a;" type_identifier identifier ;) (declaration "undefined1 uStack_68;" type_identifier identifier ;) (declaration "undefined1 uStack_67;" type_identifier identifier ;) (declaration "undefined1 uStack_66;" type_identifier identifier ;) (declaration "undefined1 uStack_65;" type_identifier identifier ;) (declaration "byte local_64 [2];" type_identifier (array_declarator "local_64 [2]" identifier [ number_literal ]) ;) (declaration "byte local_62;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_65 = 0;" (assignment_expression "uStack_65 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x266eb;" (assignment_expression "uStack_14 = 0x266eb" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar9 = 2;" (assignment_expression "uVar9 = 2" identifier = number_literal) ;) (expression_statement "local_6e[1] = 0;" (assignment_expression "local_6e[1] = 0" (subscript_expression "local_6e[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uStack_68 = 0;" (assignment_expression "uStack_68 = 0" identifier = number_literal) ;) (expression_statement "local_6e[0] = 0x3e;" (assignment_expression "local_6e[0] = 0x3e" (subscript_expression "local_6e[0]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }" if (parenthesized_expression "(param_1 != '\0')" ( (binary_expression "param_1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }" { (expression_statement "local_6e[1] = 4;" (assignment_expression "local_6e[1] = 4" (subscript_expression "local_6e[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar9 = 6;" (assignment_expression "uVar9 = 6" identifier = number_literal) ;) })) (if_statement "if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }" if (parenthesized_expression "(param_2 != '\0')" ( (binary_expression "param_2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_6e[1] = uVar9;\n  }" { (expression_statement "local_6e[1] = uVar9;" (assignment_expression "local_6e[1] = uVar9" (subscript_expression "local_6e[1]" identifier [ number_literal ]) = identifier) ;) })) (expression_statement "uVar1 = (ushort)((uint)param_3 >> 8);" (assignment_expression "uVar1 = (ushort)((uint)param_3 >> 8)" identifier = (call_expression "(ushort)((uint)param_3 >> 8)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((uint)param_3 >> 8)" ( (binary_expression "(uint)param_3 >> 8" (cast_expression "(uint)param_3" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;" (assignment_expression "uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00" identifier = (binary_expression "(ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00" (call_expression "(ushort)(byte)((uint)param_3 >> 0x18)" (call_expression "(ushort)(byte)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "((uint)param_3 >> 0x18)" ( (binary_expression "(uint)param_3 >> 0x18" (cast_expression "(uint)param_3" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) | (binary_expression "uVar1 & 0xff00" identifier & number_literal))) ;) (expression_statement "local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);" (assignment_expression "local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10)" identifier = (binary_expression "uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10)" (binary_expression "uVar1 & 0xff" identifier & number_literal) | (call_expression "(ushort)((uint)(param_3 << 0x18) >> 0x10)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((uint)(param_3 << 0x18) >> 0x10)" ( (binary_expression "(uint)(param_3 << 0x18) >> 0x10" (call_expression "(uint)(param_3 << 0x18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_3 << 0x18)" ( (binary_expression "param_3 << 0x18" identifier << number_literal) ))) >> number_literal) ))))) ;) (expression_statement "uStack_67 = (undefined1)((uint)param_5 >> 8);" (assignment_expression "uStack_67 = (undefined1)((uint)param_5 >> 8)" identifier = (call_expression "(undefined1)((uint)param_5 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((uint)param_5 >> 8)" ( (binary_expression "(uint)param_5 >> 8" (cast_expression "(uint)param_5" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "uStack_66 = (undefined1)param_5;" (assignment_expression "uStack_66 = (undefined1)param_5" identifier = (cast_expression "(undefined1)param_5" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (expression_statement "iVar6 = unaff_EBX + 0x1734e;" (assignment_expression "iVar6 = unaff_EBX + 0x1734e" identifier = (binary_expression "unaff_EBX + 0x1734e" identifier + number_literal)) ;) (if_statement "if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }" if (parenthesized_expression "(param_8 == 0)" ( (binary_expression "param_8 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }" { (expression_statement "iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);" (assignment_expression "iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7)" identifier = (call_expression "construct_scsi_pt_obj(iVar6,param_4,param_7)" identifier (argument_list "(iVar6,param_4,param_7)" ( identifier , identifier , identifier )))) ;) }) (else_clause "else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }" else (compound_statement "{\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }" { (expression_statement "pr2ws(unaff_EBX + 0x16b74,iVar6);" (call_expression "pr2ws(unaff_EBX + 0x16b74,iVar6)" identifier (argument_list "(unaff_EBX + 0x16b74,iVar6)" ( (binary_expression "unaff_EBX + 0x16b74" identifier + number_literal) , identifier ))) ;) (expression_statement "pbVar10 = local_6e;" (assignment_expression "pbVar10 = local_6e" identifier = identifier) ;) (do_statement "do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);" do (compound_statement "{\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    }" { (expression_statement "uVar7 = (uint)*pbVar10;" (assignment_expression "uVar7 = (uint)*pbVar10" identifier = (binary_expression "(uint)*pbVar10" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar10 = pbVar10 + 1;" (assignment_expression "pbVar10 = pbVar10 + 1" identifier = (binary_expression "pbVar10 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws(unaff_EBX + 0x17e14,uVar7);" (call_expression "pr2ws(unaff_EBX + 0x17e14,uVar7)" identifier (argument_list "(unaff_EBX + 0x17e14,uVar7)" ( (binary_expression "unaff_EBX + 0x17e14" identifier + number_literal) , identifier ))) ;) }) while (parenthesized_expression "(local_64 != pbVar10)" ( (binary_expression "local_64 != pbVar10" identifier != identifier) )) ;) (expression_statement "pr2ws(unaff_EBX + 0xafe5,uVar7);" (call_expression "pr2ws(unaff_EBX + 0xafe5,uVar7)" identifier (argument_list "(unaff_EBX + 0xafe5,uVar7)" ( (binary_expression "unaff_EBX + 0xafe5" identifier + number_literal) , identifier ))) ;) (expression_statement "iVar3 = construct_scsi_pt_obj();" (assignment_expression "iVar3 = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }" { (expression_statement "pr2ws(unaff_EBX + 0x16bc4,iVar6);" (call_expression "pr2ws(unaff_EBX + 0x16bc4,iVar6)" identifier (argument_list "(unaff_EBX + 0x16bc4,iVar6)" ( (binary_expression "unaff_EBX + 0x16bc4" identifier + number_literal) , identifier ))) ;) (expression_statement "local_7c = sg_convert_errno(0xc);" (assignment_expression "local_7c = sg_convert_errno(0xc)" identifier = (call_expression "sg_convert_errno(0xc)" identifier (argument_list "(0xc)" ( number_literal )))) ;) (goto_statement "goto LAB_00026879;" goto statement_identifier ;) })) (expression_statement "set_scsi_pt_cdb(iVar3,local_6e,10);" (call_expression "set_scsi_pt_cdb(iVar3,local_6e,10)" identifier (argument_list "(iVar3,local_6e,10)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(iVar3,local_64,0x40);" (call_expression "set_scsi_pt_sense(iVar3,local_64,0x40)" identifier (argument_list "(iVar3,local_64,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_in(iVar3,param_4,param_5);" (call_expression "set_scsi_pt_data_in(iVar3,param_4,param_5)" identifier (argument_list "(iVar3,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);" (assignment_expression "uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8)" identifier = (call_expression "do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8)" identifier (argument_list "(iVar3,unaff_retaddr,0x3c,param_8)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "piVar12 = &local_7c;" (assignment_expression "piVar12 = &local_7c" identifier = (pointer_expression "&local_7c" & identifier)) ;) (expression_statement "iVar11 = param_8;" (assignment_expression "iVar11 = param_8" identifier = identifier) ;) (expression_statement "iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);" (assignment_expression "iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12)" identifier = (call_expression "sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12)" identifier (argument_list "(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12)" ( identifier , identifier , identifier , identifier , identifier , (binary_expression "param_7 & 0xff" identifier & number_literal) , identifier , identifier )))) ;) (if_statement "if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" if (parenthesized_expression "(iVar5 == -1)" ( (binary_expression "iVar5 == -1" identifier == number_literal) )) (compound_statement "{\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }" { (expression_statement "uVar4 = get_scsi_pt_os_err(iVar3);" (assignment_expression "uVar4 = get_scsi_pt_os_err(iVar3)" identifier = (call_expression "get_scsi_pt_os_err(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "local_7c = sg_convert_errno(uVar4);" (assignment_expression "local_7c = sg_convert_errno(uVar4)" identifier = (call_expression "sg_convert_errno(uVar4)" identifier (argument_list "(uVar4)" ( identifier )))) ;) }) (else_clause "else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" else (if_statement "if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" if (parenthesized_expression "(iVar5 == -2)" ( (binary_expression "iVar5 == -2" identifier == number_literal) )) (compound_statement "{\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }" { (if_statement "if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }" if (parenthesized_expression "(local_7c == 5)" ( (binary_expression "local_7c == 5" identifier == number_literal) )) (compound_statement "{\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }" { (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" identifier = number_literal) ;) (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" identifier = number_literal) ;) (expression_statement "iVar6 = get_scsi_pt_sense_len(iVar3);" (assignment_expression "iVar6 = get_scsi_pt_sense_len(iVar3)" identifier = (call_expression "get_scsi_pt_sense_len(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);" (assignment_expression "uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78)" identifier = (call_expression "sg_get_sense_info_fld(local_64,iVar6,&local_78)" identifier (argument_list "(local_64,iVar6,&local_78)" ( identifier , identifier , (pointer_expression "&local_78" & identifier) )))) ;) (expression_statement "uVar8 = uVar7 & 0xff;" (assignment_expression "uVar8 = uVar7 & 0xff" identifier = (binary_expression "uVar7 & 0xff" identifier & number_literal)) ;) (if_statement "if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }" if (parenthesized_expression "(iVar6 < 8)" ( (binary_expression "iVar6 < 8" identifier < number_literal) )) (compound_statement "{\nLAB_00026a80:\n        bVar2 = 0;\n      }" { (labeled_statement "LAB_00026a80:\n        bVar2 = 0;" statement_identifier : (expression_statement "bVar2 = 0;" (assignment_expression "bVar2 = 0" identifier = number_literal) ;)) }) (else_clause "else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }" else (compound_statement "{\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }" { (if_statement "if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }" if (parenthesized_expression "(0x71 < (local_64[0] & 0x7f))" ( (binary_expression "0x71 < (local_64[0] & 0x7f)" number_literal < (parenthesized_expression "(local_64[0] & 0x7f)" ( (binary_expression "local_64[0] & 0x7f" (subscript_expression "local_64[0]" identifier [ number_literal ]) & number_literal) ))) )) (compound_statement "{\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }" { (expression_statement "uVar8 = uVar7 & 0xff;" (assignment_expression "uVar8 = uVar7 & 0xff" identifier = (binary_expression "uVar7 & 0xff" identifier & number_literal)) ;) (expression_statement "iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);" (assignment_expression "iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5)" identifier = (call_expression "sg_scsi_sense_desc_find(local_64,iVar6,5)" identifier (argument_list "(local_64,iVar6,5)" ( identifier , identifier , number_literal )))) ;) (expression_statement "uVar8 = uVar8 & 0xff;" (assignment_expression "uVar8 = uVar8 & 0xff" identifier = (binary_expression "uVar8 & 0xff" identifier & number_literal)) ;) (if_statement "if (iVar6 == 0) goto LAB_00026a80;" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00026a80;" goto statement_identifier ;)) (expression_statement "local_62 = *(byte *)(iVar6 + 3);" (assignment_expression "local_62 = *(byte *)(iVar6 + 3)" identifier = (pointer_expression "*(byte *)(iVar6 + 3)" * (cast_expression "(byte *)(iVar6 + 3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 3)" ( (binary_expression "iVar6 + 3" identifier + number_literal) ))))) ;) })) (expression_statement "bVar2 = local_62 >> 5 & 1;" (assignment_expression "bVar2 = local_62 >> 5 & 1" identifier = (binary_expression "local_62 >> 5 & 1" (binary_expression "local_62 >> 5" identifier >> number_literal) & number_literal)) ;) (if_statement "if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }" if (parenthesized_expression "(((char)uVar8 != '\0') && (bVar2 != 0))" ( (binary_expression "((char)uVar8 != '\0') && (bVar2 != 0)" (parenthesized_expression "((char)uVar8 != '\0')" ( (binary_expression "(char)uVar8 != '\0'" (cast_expression "(char)uVar8" ( (type_descriptor "char" primitive_type) ) identifier) != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(bVar2 != 0)" ( (binary_expression "bVar2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }" { (expression_statement "local_7c = 0x11;" (assignment_expression "local_7c = 0x11" identifier = number_literal) ;) (if_statement "if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }" if (parenthesized_expression "(param_6 != (undefined4 *)0x0)" ( (binary_expression "param_6 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            *param_6 = local_78;\n          }" { (expression_statement "*param_6 = local_78;" (assignment_expression "*param_6 = local_78" (pointer_expression "*param_6" * identifier) = identifier) ;) })) (goto_statement "goto LAB_0002686d;" goto statement_identifier ;) })) }))) (if_statement "if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }" if (parenthesized_expression "(1 < param_8)" ( (binary_expression "1 < param_8" number_literal < identifier) )) (compound_statement "{\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }" { (expression_statement "pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);" (call_expression "pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2)" identifier (argument_list "(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2)" ( (binary_expression "unaff_EBX + 0x1751d" identifier + number_literal) , identifier , identifier , identifier , identifier ))) ;) })) }) (else_clause "else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }" else (if_statement "if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }" if (parenthesized_expression "((4 < local_7c) && (local_7c - 0x14U < 2))" ( (binary_expression "(4 < local_7c) && (local_7c - 0x14U < 2)" (parenthesized_expression "(4 < local_7c)" ( (binary_expression "4 < local_7c" number_literal < identifier) )) && (parenthesized_expression "(local_7c - 0x14U < 2)" ( (binary_expression "local_7c - 0x14U < 2" (binary_expression "local_7c - 0x14U" identifier - number_literal) < number_literal) ))) )) (compound_statement "{\n      local_7c = 0;\n    }" { (expression_statement "local_7c = 0;" (assignment_expression "local_7c = 0" identifier = number_literal) ;) })))) }) (else_clause "else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" else (if_statement "if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" if (parenthesized_expression "((param_8 < 3) || (iVar5 < 1))" ( (binary_expression "(param_8 < 3) || (iVar5 < 1)" (parenthesized_expression "(param_8 < 3)" ( (binary_expression "param_8 < 3" identifier < number_literal) )) || (parenthesized_expression "(iVar5 < 1)" ( (binary_expression "iVar5 < 1" identifier < number_literal) ))) )) (compound_statement "{\n    local_7c = 0;\n  }" { (expression_statement "local_7c = 0;" (assignment_expression "local_7c = 0" identifier = number_literal) ;) }) (else_clause "else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" else (compound_statement "{\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" { (expression_statement "pr2ws(unaff_EBX + 0x16fcd,iVar6);" (call_expression "pr2ws(unaff_EBX + 0x16fcd,iVar6)" identifier (argument_list "(unaff_EBX + 0x16fcd,iVar6)" ( (binary_expression "unaff_EBX + 0x16fcd" identifier + number_literal) , identifier ))) ;) (if_statement "if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }" if (parenthesized_expression "(param_8 == 3)" ( (binary_expression "param_8 == 3" identifier == number_literal) )) (compound_statement "{\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }" { (expression_statement "iVar6 = unaff_EBX + 0x16f98;" (assignment_expression "iVar6 = unaff_EBX + 0x16f98" identifier = (binary_expression "unaff_EBX + 0x16f98" identifier + number_literal)) ;) (if_statement "if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }" if (parenthesized_expression "(iVar5 < 0x101)" ( (binary_expression "iVar5 < 0x101" identifier < number_literal) )) (compound_statement "{\n        iVar6 = unaff_EBX + 0xb2da;\n      }" { (expression_statement "iVar6 = unaff_EBX + 0xb2da;" (assignment_expression "iVar6 = unaff_EBX + 0xb2da" identifier = (binary_expression "unaff_EBX + 0xb2da" identifier + number_literal)) ;) })) (expression_statement "pr2ws(unaff_EBX + 0xac7b,iVar6);" (call_expression "pr2ws(unaff_EBX + 0xac7b,iVar6)" identifier (argument_list "(unaff_EBX + 0xac7b,iVar6)" ( (binary_expression "unaff_EBX + 0xac7b" identifier + number_literal) , identifier ))) ;) (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }" if (parenthesized_expression "(0x100 < iVar5)" ( (binary_expression "0x100 < iVar5" number_literal < identifier) )) (compound_statement "{\n        iVar5 = 0x100;\n      }" { (expression_statement "iVar5 = 0x100;" (assignment_expression "iVar5 = 0x100" identifier = number_literal) ;) })) }) (else_clause "else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }" else (compound_statement "{\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }" { (expression_statement "pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);" (call_expression "pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5)" identifier (argument_list "(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5)" ( (binary_expression "unaff_EBX + 0x17ed6" identifier + number_literal) , identifier , identifier , identifier , identifier ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }))) (expression_statement "hex2stderr(param_4,iVar5,uVar4);" (call_expression "hex2stderr(param_4,iVar5,uVar4)" identifier (argument_list "(param_4,iVar5,uVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "local_7c = 0;" (assignment_expression "local_7c = 0" identifier = number_literal) ;) }))))))) (labeled_statement "LAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);" statement_identifier : (expression_statement "destruct_scsi_pt_obj(iVar3);" (call_expression "destruct_scsi_pt_obj(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;)) (labeled_statement "LAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }" statement_identifier : (if_statement "if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }" if (parenthesized_expression "(local_24 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return local_7c;\n  }" { (return_statement "return local_7c;" return identifier ;) }))) (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE 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 ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) | (binary_expression IDENT & LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT & LIT) | (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT << LIT) ))) >> LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , (binary_expression IDENT & LIT) , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) & LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT >> LIT) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (goto_statement goto statement_identifier ;) })) }))) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT , IDENT , IDENT ))) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })))) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (binary_expression IDENT < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))))))) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int sg_ll_read_long10(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)\n\n{\n  ushort uVar1;\n  byte bVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  undefined1 uVar9;\n  int unaff_EBX;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar11;\n  int *piVar12;\n  int local_7c;\n  undefined4 local_78;\n  undefined4 local_74;\n  byte local_6e [2];\n  ushort uStack_6c;\n  ushort local_6a;\n  undefined1 uStack_68;\n  undefined1 uStack_67;\n  undefined1 uStack_66;\n  undefined1 uStack_65;\n  byte local_64 [2];\n  byte local_62;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_65 = 0;\n  uStack_14 = 0x266eb;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar9 = 2;\n  local_6e[1] = 0;\n  uStack_68 = 0;\n  local_6e[0] = 0x3e;\n  if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }\n  if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }\n  uVar1 = (ushort)((uint)param_3 >> 8);\n  uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;\n  local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);\n  uStack_67 = (undefined1)((uint)param_5 >> 8);\n  uStack_66 = (undefined1)param_5;\n  iVar6 = unaff_EBX + 0x1734e;\n  if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }\n  if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(iVar3,local_6e,10);\n  set_scsi_pt_sense(iVar3,local_64,0x40);\n  set_scsi_pt_data_in(iVar3,param_4,param_5);\n  uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);\n  piVar12 = &local_7c;\n  iVar11 = param_8;\n  iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);\n  if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);\nLAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }\n                    \n  FUN_00030280();\n}" (primitive_type "int") (function_declarator "sg_ll_read_long10(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)" (identifier "sg_ll_read_long10") (parameter_list "(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,\n                     undefined4 *param_6,uint param_7,int param_8)" (( "(") (parameter_declaration "char param_1" (primitive_type "char") (identifier "param_1")) (, ",") (parameter_declaration "char param_2" (primitive_type "char") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "undefined4 *param_6" (type_identifier "undefined4") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) (, ",") (parameter_declaration "uint param_7" (type_identifier "uint") (identifier "param_7")) (, ",") (parameter_declaration "int param_8" (primitive_type "int") (identifier "param_8")) () ")"))) (compound_statement "{\n  ushort uVar1;\n  byte bVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  undefined1 uVar9;\n  int unaff_EBX;\n  byte *pbVar10;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar11;\n  int *piVar12;\n  int local_7c;\n  undefined4 local_78;\n  undefined4 local_74;\n  byte local_6e [2];\n  ushort uStack_6c;\n  ushort local_6a;\n  undefined1 uStack_68;\n  undefined1 uStack_67;\n  undefined1 uStack_66;\n  undefined1 uStack_65;\n  byte local_64 [2];\n  byte local_62;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_65 = 0;\n  uStack_14 = 0x266eb;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar9 = 2;\n  local_6e[1] = 0;\n  uStack_68 = 0;\n  local_6e[0] = 0x3e;\n  if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }\n  if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }\n  uVar1 = (ushort)((uint)param_3 >> 8);\n  uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;\n  local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);\n  uStack_67 = (undefined1)((uint)param_5 >> 8);\n  uStack_66 = (undefined1)param_5;\n  iVar6 = unaff_EBX + 0x1734e;\n  if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }\n  if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }\n  set_scsi_pt_cdb(iVar3,local_6e,10);\n  set_scsi_pt_sense(iVar3,local_64,0x40);\n  set_scsi_pt_data_in(iVar3,param_4,param_5);\n  uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);\n  piVar12 = &local_7c;\n  iVar11 = param_8;\n  iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);\n  if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }\nLAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);\nLAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }\n                    \n  FUN_00030280();\n}" ({ "{") (declaration "ushort uVar1;" (type_identifier "ushort") (identifier "uVar1") (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (declaration "undefined1 uVar9;" (type_identifier "undefined1") (identifier "uVar9") (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "byte *pbVar10;" (type_identifier "byte") (pointer_declarator "*pbVar10" (* "*") (identifier "pbVar10")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 unaff_retaddr;" (type_identifier "undefined4") (identifier "unaff_retaddr") (; ";")) (declaration "int iVar11;" (primitive_type "int") (identifier "iVar11") (; ";")) (declaration "int *piVar12;" (primitive_type "int") (pointer_declarator "*piVar12" (* "*") (identifier "piVar12")) (; ";")) (declaration "int local_7c;" (primitive_type "int") (identifier "local_7c") (; ";")) (declaration "undefined4 local_78;" (type_identifier "undefined4") (identifier "local_78") (; ";")) (declaration "undefined4 local_74;" (type_identifier "undefined4") (identifier "local_74") (; ";")) (declaration "byte local_6e [2];" (type_identifier "byte") (array_declarator "local_6e [2]" (identifier "local_6e") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "ushort uStack_6c;" (type_identifier "ushort") (identifier "uStack_6c") (; ";")) (declaration "ushort local_6a;" (type_identifier "ushort") (identifier "local_6a") (; ";")) (declaration "undefined1 uStack_68;" (type_identifier "undefined1") (identifier "uStack_68") (; ";")) (declaration "undefined1 uStack_67;" (type_identifier "undefined1") (identifier "uStack_67") (; ";")) (declaration "undefined1 uStack_66;" (type_identifier "undefined1") (identifier "uStack_66") (; ";")) (declaration "undefined1 uStack_65;" (type_identifier "undefined1") (identifier "uStack_65") (; ";")) (declaration "byte local_64 [2];" (type_identifier "byte") (array_declarator "local_64 [2]" (identifier "local_64") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "byte local_62;" (type_identifier "byte") (identifier "local_62") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_65 = 0;" (assignment_expression "uStack_65 = 0" (identifier "uStack_65") (= "=") (number_literal "0")) (; ";")) (expression_statement "uStack_14 = 0x266eb;" (assignment_expression "uStack_14 = 0x266eb" (identifier "uStack_14") (= "=") (number_literal "0x266eb")) (; ";")) (expression_statement "entry();" (call_expression "entry()" (identifier "entry") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar9 = 2;" (assignment_expression "uVar9 = 2" (identifier "uVar9") (= "=") (number_literal "2")) (; ";")) (expression_statement "local_6e[1] = 0;" (assignment_expression "local_6e[1] = 0" (subscript_expression "local_6e[1]" (identifier "local_6e") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uStack_68 = 0;" (assignment_expression "uStack_68 = 0" (identifier "uStack_68") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_6e[0] = 0x3e;" (assignment_expression "local_6e[0] = 0x3e" (subscript_expression "local_6e[0]" (identifier "local_6e") ([ "[") (number_literal "0") (] "]")) (= "=") (number_literal "0x3e")) (; ";")) (if_statement "if (param_1 != '\0') {\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }" (if "if") (parenthesized_expression "(param_1 != '\0')" (( "(") (binary_expression "param_1 != '\0'" (identifier "param_1") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    local_6e[1] = 4;\n    uVar9 = 6;\n  }" ({ "{") (expression_statement "local_6e[1] = 4;" (assignment_expression "local_6e[1] = 4" (subscript_expression "local_6e[1]" (identifier "local_6e") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "4")) (; ";")) (expression_statement "uVar9 = 6;" (assignment_expression "uVar9 = 6" (identifier "uVar9") (= "=") (number_literal "6")) (; ";")) (} "}"))) (if_statement "if (param_2 != '\0') {\n    local_6e[1] = uVar9;\n  }" (if "if") (parenthesized_expression "(param_2 != '\0')" (( "(") (binary_expression "param_2 != '\0'" (identifier "param_2") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    local_6e[1] = uVar9;\n  }" ({ "{") (expression_statement "local_6e[1] = uVar9;" (assignment_expression "local_6e[1] = uVar9" (subscript_expression "local_6e[1]" (identifier "local_6e") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar9")) (; ";")) (} "}"))) (expression_statement "uVar1 = (ushort)((uint)param_3 >> 8);" (assignment_expression "uVar1 = (ushort)((uint)param_3 >> 8)" (identifier "uVar1") (= "=") (call_expression "(ushort)((uint)param_3 >> 8)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (argument_list "((uint)param_3 >> 8)" (( "(") (binary_expression "(uint)param_3 >> 8" (cast_expression "(uint)param_3" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_3")) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;" (assignment_expression "uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00" (identifier "uStack_6c") (= "=") (binary_expression "(ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00" (call_expression "(ushort)(byte)((uint)param_3 >> 0x18)" (call_expression "(ushort)(byte)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (argument_list "(byte)" (( "(") (identifier "byte") () ")"))) (argument_list "((uint)param_3 >> 0x18)" (( "(") (binary_expression "(uint)param_3 >> 0x18" (cast_expression "(uint)param_3" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_3")) (>> ">>") (number_literal "0x18")) () ")"))) (| "|") (binary_expression "uVar1 & 0xff00" (identifier "uVar1") (& "&") (number_literal "0xff00")))) (; ";")) (expression_statement "local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);" (assignment_expression "local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10)" (identifier "local_6a") (= "=") (binary_expression "uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10)" (binary_expression "uVar1 & 0xff" (identifier "uVar1") (& "&") (number_literal "0xff")) (| "|") (call_expression "(ushort)((uint)(param_3 << 0x18) >> 0x10)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (argument_list "((uint)(param_3 << 0x18) >> 0x10)" (( "(") (binary_expression "(uint)(param_3 << 0x18) >> 0x10" (call_expression "(uint)(param_3 << 0x18)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_3 << 0x18)" (( "(") (binary_expression "param_3 << 0x18" (identifier "param_3") (<< "<<") (number_literal "0x18")) () ")"))) (>> ">>") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uStack_67 = (undefined1)((uint)param_5 >> 8);" (assignment_expression "uStack_67 = (undefined1)((uint)param_5 >> 8)" (identifier "uStack_67") (= "=") (call_expression "(undefined1)((uint)param_5 >> 8)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "((uint)param_5 >> 8)" (( "(") (binary_expression "(uint)param_5 >> 8" (cast_expression "(uint)param_5" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_5")) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "uStack_66 = (undefined1)param_5;" (assignment_expression "uStack_66 = (undefined1)param_5" (identifier "uStack_66") (= "=") (cast_expression "(undefined1)param_5" (( "(") (type_descriptor "undefined1" (type_identifier "undefined1")) () ")") (identifier "param_5"))) (; ";")) (expression_statement "iVar6 = unaff_EBX + 0x1734e;" (assignment_expression "iVar6 = unaff_EBX + 0x1734e" (identifier "iVar6") (= "=") (binary_expression "unaff_EBX + 0x1734e" (identifier "unaff_EBX") (+ "+") (number_literal "0x1734e"))) (; ";")) (if_statement "if (param_8 == 0) {\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }" (if "if") (parenthesized_expression "(param_8 == 0)" (( "(") (binary_expression "param_8 == 0" (identifier "param_8") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);\n  }" ({ "{") (expression_statement "iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);" (assignment_expression "iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7)" (identifier "iVar3") (= "=") (call_expression "construct_scsi_pt_obj(iVar6,param_4,param_7)" (identifier "construct_scsi_pt_obj") (argument_list "(iVar6,param_4,param_7)" (( "(") (identifier "iVar6") (, ",") (identifier "param_4") (, ",") (identifier "param_7") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }" (else "else") (compound_statement "{\n    pr2ws(unaff_EBX + 0x16b74,iVar6);\n    pbVar10 = local_6e;\n    do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);\n    pr2ws(unaff_EBX + 0xafe5,uVar7);\n    iVar3 = construct_scsi_pt_obj();\n  }" ({ "{") (expression_statement "pr2ws(unaff_EBX + 0x16b74,iVar6);" (call_expression "pr2ws(unaff_EBX + 0x16b74,iVar6)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x16b74,iVar6)" (( "(") (binary_expression "unaff_EBX + 0x16b74" (identifier "unaff_EBX") (+ "+") (number_literal "0x16b74")) (, ",") (identifier "iVar6") () ")"))) (; ";")) (expression_statement "pbVar10 = local_6e;" (assignment_expression "pbVar10 = local_6e" (identifier "pbVar10") (= "=") (identifier "local_6e")) (; ";")) (do_statement "do {\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    } while (local_64 != pbVar10);" (do "do") (compound_statement "{\n      uVar7 = (uint)*pbVar10;\n      pbVar10 = pbVar10 + 1;\n      pr2ws(unaff_EBX + 0x17e14,uVar7);\n    }" ({ "{") (expression_statement "uVar7 = (uint)*pbVar10;" (assignment_expression "uVar7 = (uint)*pbVar10" (identifier "uVar7") (= "=") (binary_expression "(uint)*pbVar10" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar10"))) (; ";")) (expression_statement "pbVar10 = pbVar10 + 1;" (assignment_expression "pbVar10 = pbVar10 + 1" (identifier "pbVar10") (= "=") (binary_expression "pbVar10 + 1" (identifier "pbVar10") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pr2ws(unaff_EBX + 0x17e14,uVar7);" (call_expression "pr2ws(unaff_EBX + 0x17e14,uVar7)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x17e14,uVar7)" (( "(") (binary_expression "unaff_EBX + 0x17e14" (identifier "unaff_EBX") (+ "+") (number_literal "0x17e14")) (, ",") (identifier "uVar7") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(local_64 != pbVar10)" (( "(") (binary_expression "local_64 != pbVar10" (identifier "local_64") (!= "!=") (identifier "pbVar10")) () ")")) (; ";")) (expression_statement "pr2ws(unaff_EBX + 0xafe5,uVar7);" (call_expression "pr2ws(unaff_EBX + 0xafe5,uVar7)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0xafe5,uVar7)" (( "(") (binary_expression "unaff_EBX + 0xafe5" (identifier "unaff_EBX") (+ "+") (number_literal "0xafe5")) (, ",") (identifier "uVar7") () ")"))) (; ";")) (expression_statement "iVar3 = construct_scsi_pt_obj();" (assignment_expression "iVar3 = construct_scsi_pt_obj()" (identifier "iVar3") (= "=") (call_expression "construct_scsi_pt_obj()" (identifier "construct_scsi_pt_obj") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")))) (if_statement "if (iVar3 == 0) {\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    pr2ws(unaff_EBX + 0x16bc4,iVar6);\n    local_7c = sg_convert_errno(0xc);\n    goto LAB_00026879;\n  }" ({ "{") (expression_statement "pr2ws(unaff_EBX + 0x16bc4,iVar6);" (call_expression "pr2ws(unaff_EBX + 0x16bc4,iVar6)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x16bc4,iVar6)" (( "(") (binary_expression "unaff_EBX + 0x16bc4" (identifier "unaff_EBX") (+ "+") (number_literal "0x16bc4")) (, ",") (identifier "iVar6") () ")"))) (; ";")) (expression_statement "local_7c = sg_convert_errno(0xc);" (assignment_expression "local_7c = sg_convert_errno(0xc)" (identifier "local_7c") (= "=") (call_expression "sg_convert_errno(0xc)" (identifier "sg_convert_errno") (argument_list "(0xc)" (( "(") (number_literal "0xc") () ")")))) (; ";")) (goto_statement "goto LAB_00026879;" (goto "goto") (statement_identifier "LAB_00026879") (; ";")) (} "}"))) (expression_statement "set_scsi_pt_cdb(iVar3,local_6e,10);" (call_expression "set_scsi_pt_cdb(iVar3,local_6e,10)" (identifier "set_scsi_pt_cdb") (argument_list "(iVar3,local_6e,10)" (( "(") (identifier "iVar3") (, ",") (identifier "local_6e") (, ",") (number_literal "10") () ")"))) (; ";")) (expression_statement "set_scsi_pt_sense(iVar3,local_64,0x40);" (call_expression "set_scsi_pt_sense(iVar3,local_64,0x40)" (identifier "set_scsi_pt_sense") (argument_list "(iVar3,local_64,0x40)" (( "(") (identifier "iVar3") (, ",") (identifier "local_64") (, ",") (number_literal "0x40") () ")"))) (; ";")) (expression_statement "set_scsi_pt_data_in(iVar3,param_4,param_5);" (call_expression "set_scsi_pt_data_in(iVar3,param_4,param_5)" (identifier "set_scsi_pt_data_in") (argument_list "(iVar3,param_4,param_5)" (( "(") (identifier "iVar3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")"))) (; ";")) (expression_statement "uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);" (assignment_expression "uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8)" (identifier "uVar4") (= "=") (call_expression "do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8)" (identifier "do_scsi_pt") (argument_list "(iVar3,unaff_retaddr,0x3c,param_8)" (( "(") (identifier "iVar3") (, ",") (identifier "unaff_retaddr") (, ",") (number_literal "0x3c") (, ",") (identifier "param_8") () ")")))) (; ";")) (expression_statement "piVar12 = &local_7c;" (assignment_expression "piVar12 = &local_7c" (identifier "piVar12") (= "=") (pointer_expression "&local_7c" (& "&") (identifier "local_7c"))) (; ";")) (expression_statement "iVar11 = param_8;" (assignment_expression "iVar11 = param_8" (identifier "iVar11") (= "=") (identifier "param_8")) (; ";")) (expression_statement "iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);" (assignment_expression "iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12)" (identifier "iVar5") (= "=") (call_expression "sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12)" (identifier "sg_cmds_process_resp") (argument_list "(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12)" (( "(") (identifier "iVar3") (, ",") (identifier "iVar6") (, ",") (identifier "uVar4") (, ",") (identifier "param_5") (, ",") (identifier "local_64") (, ",") (binary_expression "param_7 & 0xff" (identifier "param_7") (& "&") (number_literal "0xff")) (, ",") (identifier "param_8") (, ",") (identifier "piVar12") () ")")))) (; ";")) (if_statement "if (iVar5 == -1) {\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }\n  else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" (if "if") (parenthesized_expression "(iVar5 == -1)" (( "(") (binary_expression "iVar5 == -1" (identifier "iVar5") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    uVar4 = get_scsi_pt_os_err(iVar3);\n    local_7c = sg_convert_errno(uVar4);\n  }" ({ "{") (expression_statement "uVar4 = get_scsi_pt_os_err(iVar3);" (assignment_expression "uVar4 = get_scsi_pt_os_err(iVar3)" (identifier "uVar4") (= "=") (call_expression "get_scsi_pt_os_err(iVar3)" (identifier "get_scsi_pt_os_err") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "local_7c = sg_convert_errno(uVar4);" (assignment_expression "local_7c = sg_convert_errno(uVar4)" (identifier "local_7c") (= "=") (call_expression "sg_convert_errno(uVar4)" (identifier "sg_convert_errno") (argument_list "(uVar4)" (( "(") (identifier "uVar4") () ")")))) (; ";")) (} "}")) (else_clause "else if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" (else "else") (if_statement "if (iVar5 == -2) {\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }\n  else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" (if "if") (parenthesized_expression "(iVar5 == -2)" (( "(") (binary_expression "iVar5 == -2" (identifier "iVar5") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n    if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }\n  }" ({ "{") (if_statement "if (local_7c == 5) {\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }\n    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }" (if "if") (parenthesized_expression "(local_7c == 5)" (( "(") (binary_expression "local_7c == 5" (identifier "local_7c") (== "==") (number_literal "5")) () ")")) (compound_statement "{\n      local_78 = 0;\n      local_74 = 0;\n      iVar6 = get_scsi_pt_sense_len(iVar3);\n      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);\n      uVar8 = uVar7 & 0xff;\n      if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }\n      if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }\n    }" ({ "{") (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" (identifier "local_78") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" (identifier "local_74") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar6 = get_scsi_pt_sense_len(iVar3);" (assignment_expression "iVar6 = get_scsi_pt_sense_len(iVar3)" (identifier "iVar6") (= "=") (call_expression "get_scsi_pt_sense_len(iVar3)" (identifier "get_scsi_pt_sense_len") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);" (assignment_expression "uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78)" (identifier "uVar7") (= "=") (call_expression "sg_get_sense_info_fld(local_64,iVar6,&local_78)" (identifier "sg_get_sense_info_fld") (argument_list "(local_64,iVar6,&local_78)" (( "(") (identifier "local_64") (, ",") (identifier "iVar6") (, ",") (pointer_expression "&local_78" (& "&") (identifier "local_78")) () ")")))) (; ";")) (expression_statement "uVar8 = uVar7 & 0xff;" (assignment_expression "uVar8 = uVar7 & 0xff" (identifier "uVar8") (= "=") (binary_expression "uVar7 & 0xff" (identifier "uVar7") (& "&") (number_literal "0xff"))) (; ";")) (if_statement "if (iVar6 < 8) {\nLAB_00026a80:\n        bVar2 = 0;\n      }\n      else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }" (if "if") (parenthesized_expression "(iVar6 < 8)" (( "(") (binary_expression "iVar6 < 8" (identifier "iVar6") (< "<") (number_literal "8")) () ")")) (compound_statement "{\nLAB_00026a80:\n        bVar2 = 0;\n      }" ({ "{") (labeled_statement "LAB_00026a80:\n        bVar2 = 0;" (statement_identifier "LAB_00026a80") (: ":") (expression_statement "bVar2 = 0;" (assignment_expression "bVar2 = 0" (identifier "bVar2") (= "=") (number_literal "0")) (; ";"))) (} "}")) (else_clause "else {\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }" (else "else") (compound_statement "{\n        if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }\n        bVar2 = local_62 >> 5 & 1;\n        if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }\n      }" ({ "{") (if_statement "if (0x71 < (local_64[0] & 0x7f)) {\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }" (if "if") (parenthesized_expression "(0x71 < (local_64[0] & 0x7f))" (( "(") (binary_expression "0x71 < (local_64[0] & 0x7f)" (number_literal "0x71") (< "<") (parenthesized_expression "(local_64[0] & 0x7f)" (( "(") (binary_expression "local_64[0] & 0x7f" (subscript_expression "local_64[0]" (identifier "local_64") ([ "[") (number_literal "0") (] "]")) (& "&") (number_literal "0x7f")) () ")"))) () ")")) (compound_statement "{\n          uVar8 = uVar7 & 0xff;\n          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);\n          uVar8 = uVar8 & 0xff;\n          if (iVar6 == 0) goto LAB_00026a80;\n          local_62 = *(byte *)(iVar6 + 3);\n        }" ({ "{") (expression_statement "uVar8 = uVar7 & 0xff;" (assignment_expression "uVar8 = uVar7 & 0xff" (identifier "uVar8") (= "=") (binary_expression "uVar7 & 0xff" (identifier "uVar7") (& "&") (number_literal "0xff"))) (; ";")) (expression_statement "iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);" (assignment_expression "iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5)" (identifier "iVar6") (= "=") (call_expression "sg_scsi_sense_desc_find(local_64,iVar6,5)" (identifier "sg_scsi_sense_desc_find") (argument_list "(local_64,iVar6,5)" (( "(") (identifier "local_64") (, ",") (identifier "iVar6") (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "uVar8 = uVar8 & 0xff;" (assignment_expression "uVar8 = uVar8 & 0xff" (identifier "uVar8") (= "=") (binary_expression "uVar8 & 0xff" (identifier "uVar8") (& "&") (number_literal "0xff"))) (; ";")) (if_statement "if (iVar6 == 0) goto LAB_00026a80;" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00026a80;" (goto "goto") (statement_identifier "LAB_00026a80") (; ";"))) (expression_statement "local_62 = *(byte *)(iVar6 + 3);" (assignment_expression "local_62 = *(byte *)(iVar6 + 3)" (identifier "local_62") (= "=") (pointer_expression "*(byte *)(iVar6 + 3)" (* "*") (cast_expression "(byte *)(iVar6 + 3)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 3)" (( "(") (binary_expression "iVar6 + 3" (identifier "iVar6") (+ "+") (number_literal "3")) () ")"))))) (; ";")) (} "}"))) (expression_statement "bVar2 = local_62 >> 5 & 1;" (assignment_expression "bVar2 = local_62 >> 5 & 1" (identifier "bVar2") (= "=") (binary_expression "local_62 >> 5 & 1" (binary_expression "local_62 >> 5" (identifier "local_62") (>> ">>") (number_literal "5")) (& "&") (number_literal "1"))) (; ";")) (if_statement "if (((char)uVar8 != '\0') && (bVar2 != 0)) {\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }" (if "if") (parenthesized_expression "(((char)uVar8 != '\0') && (bVar2 != 0))" (( "(") (binary_expression "((char)uVar8 != '\0') && (bVar2 != 0)" (parenthesized_expression "((char)uVar8 != '\0')" (( "(") (binary_expression "(char)uVar8 != '\0'" (cast_expression "(char)uVar8" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar8")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(bVar2 != 0)" (( "(") (binary_expression "bVar2 != 0" (identifier "bVar2") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n          local_7c = 0x11;\n          if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }\n          goto LAB_0002686d;\n        }" ({ "{") (expression_statement "local_7c = 0x11;" (assignment_expression "local_7c = 0x11" (identifier "local_7c") (= "=") (number_literal "0x11")) (; ";")) (if_statement "if (param_6 != (undefined4 *)0x0) {\n            *param_6 = local_78;\n          }" (if "if") (parenthesized_expression "(param_6 != (undefined4 *)0x0)" (( "(") (binary_expression "param_6 != (undefined4 *)0x0" (identifier "param_6") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n            *param_6 = local_78;\n          }" ({ "{") (expression_statement "*param_6 = local_78;" (assignment_expression "*param_6 = local_78" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (identifier "local_78")) (; ";")) (} "}"))) (goto_statement "goto LAB_0002686d;" (goto "goto") (statement_identifier "LAB_0002686d") (; ";")) (} "}"))) (} "}")))) (if_statement "if (1 < param_8) {\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }" (if "if") (parenthesized_expression "(1 < param_8)" (( "(") (binary_expression "1 < param_8" (number_literal "1") (< "<") (identifier "param_8")) () ")")) (compound_statement "{\n        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);\n      }" ({ "{") (expression_statement "pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);" (call_expression "pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2)" (( "(") (binary_expression "unaff_EBX + 0x1751d" (identifier "unaff_EBX") (+ "+") (number_literal "0x1751d")) (, ",") (identifier "local_78") (, ",") (identifier "local_74") (, ",") (identifier "uVar8") (, ",") (identifier "bVar2") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }" (else "else") (if_statement "if ((4 < local_7c) && (local_7c - 0x14U < 2)) {\n      local_7c = 0;\n    }" (if "if") (parenthesized_expression "((4 < local_7c) && (local_7c - 0x14U < 2))" (( "(") (binary_expression "(4 < local_7c) && (local_7c - 0x14U < 2)" (parenthesized_expression "(4 < local_7c)" (( "(") (binary_expression "4 < local_7c" (number_literal "4") (< "<") (identifier "local_7c")) () ")")) (&& "&&") (parenthesized_expression "(local_7c - 0x14U < 2)" (( "(") (binary_expression "local_7c - 0x14U < 2" (binary_expression "local_7c - 0x14U" (identifier "local_7c") (- "-") (number_literal "0x14U")) (< "<") (number_literal "2")) () ")"))) () ")")) (compound_statement "{\n      local_7c = 0;\n    }" ({ "{") (expression_statement "local_7c = 0;" (assignment_expression "local_7c = 0" (identifier "local_7c") (= "=") (number_literal "0")) (; ";")) (} "}"))))) (} "}")) (else_clause "else if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" (else "else") (if_statement "if ((param_8 < 3) || (iVar5 < 1)) {\n    local_7c = 0;\n  }\n  else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" (if "if") (parenthesized_expression "((param_8 < 3) || (iVar5 < 1))" (( "(") (binary_expression "(param_8 < 3) || (iVar5 < 1)" (parenthesized_expression "(param_8 < 3)" (( "(") (binary_expression "param_8 < 3" (identifier "param_8") (< "<") (number_literal "3")) () ")")) (|| "||") (parenthesized_expression "(iVar5 < 1)" (( "(") (binary_expression "iVar5 < 1" (identifier "iVar5") (< "<") (number_literal "1")) () ")"))) () ")")) (compound_statement "{\n    local_7c = 0;\n  }" ({ "{") (expression_statement "local_7c = 0;" (assignment_expression "local_7c = 0" (identifier "local_7c") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" (else "else") (compound_statement "{\n    pr2ws(unaff_EBX + 0x16fcd,iVar6);\n    if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }\n    hex2stderr(param_4,iVar5,uVar4);\n    local_7c = 0;\n  }" ({ "{") (expression_statement "pr2ws(unaff_EBX + 0x16fcd,iVar6);" (call_expression "pr2ws(unaff_EBX + 0x16fcd,iVar6)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x16fcd,iVar6)" (( "(") (binary_expression "unaff_EBX + 0x16fcd" (identifier "unaff_EBX") (+ "+") (number_literal "0x16fcd")) (, ",") (identifier "iVar6") () ")"))) (; ";")) (if_statement "if (param_8 == 3) {\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }\n    else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }" (if "if") (parenthesized_expression "(param_8 == 3)" (( "(") (binary_expression "param_8 == 3" (identifier "param_8") (== "==") (number_literal "3")) () ")")) (compound_statement "{\n      iVar6 = unaff_EBX + 0x16f98;\n      if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }\n      pr2ws(unaff_EBX + 0xac7b,iVar6);\n      uVar4 = 0xffffffff;\n      if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }\n    }" ({ "{") (expression_statement "iVar6 = unaff_EBX + 0x16f98;" (assignment_expression "iVar6 = unaff_EBX + 0x16f98" (identifier "iVar6") (= "=") (binary_expression "unaff_EBX + 0x16f98" (identifier "unaff_EBX") (+ "+") (number_literal "0x16f98"))) (; ";")) (if_statement "if (iVar5 < 0x101) {\n        iVar6 = unaff_EBX + 0xb2da;\n      }" (if "if") (parenthesized_expression "(iVar5 < 0x101)" (( "(") (binary_expression "iVar5 < 0x101" (identifier "iVar5") (< "<") (number_literal "0x101")) () ")")) (compound_statement "{\n        iVar6 = unaff_EBX + 0xb2da;\n      }" ({ "{") (expression_statement "iVar6 = unaff_EBX + 0xb2da;" (assignment_expression "iVar6 = unaff_EBX + 0xb2da" (identifier "iVar6") (= "=") (binary_expression "unaff_EBX + 0xb2da" (identifier "unaff_EBX") (+ "+") (number_literal "0xb2da"))) (; ";")) (} "}"))) (expression_statement "pr2ws(unaff_EBX + 0xac7b,iVar6);" (call_expression "pr2ws(unaff_EBX + 0xac7b,iVar6)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0xac7b,iVar6)" (( "(") (binary_expression "unaff_EBX + 0xac7b" (identifier "unaff_EBX") (+ "+") (number_literal "0xac7b")) (, ",") (identifier "iVar6") () ")"))) (; ";")) (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" (identifier "uVar4") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (0x100 < iVar5) {\n        iVar5 = 0x100;\n      }" (if "if") (parenthesized_expression "(0x100 < iVar5)" (( "(") (binary_expression "0x100 < iVar5" (number_literal "0x100") (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n        iVar5 = 0x100;\n      }" ({ "{") (expression_statement "iVar5 = 0x100;" (assignment_expression "iVar5 = 0x100" (identifier "iVar5") (= "=") (number_literal "0x100")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }" (else "else") (compound_statement "{\n      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);\n      uVar4 = 0;\n    }" ({ "{") (expression_statement "pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);" (call_expression "pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5)" (( "(") (binary_expression "unaff_EBX + 0x17ed6" (identifier "unaff_EBX") (+ "+") (number_literal "0x17ed6")) (, ",") (identifier "iVar6") (, ",") (identifier "iVar11") (, ",") (identifier "piVar12") (, ",") (identifier "iVar5") () ")"))) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")))) (expression_statement "hex2stderr(param_4,iVar5,uVar4);" (call_expression "hex2stderr(param_4,iVar5,uVar4)" (identifier "hex2stderr") (argument_list "(param_4,iVar5,uVar4)" (( "(") (identifier "param_4") (, ",") (identifier "iVar5") (, ",") (identifier "uVar4") () ")"))) (; ";")) (expression_statement "local_7c = 0;" (assignment_expression "local_7c = 0" (identifier "local_7c") (= "=") (number_literal "0")) (; ";")) (} "}")))))))) (labeled_statement "LAB_0002686d:\n  destruct_scsi_pt_obj(iVar3);" (statement_identifier "LAB_0002686d") (: ":") (expression_statement "destruct_scsi_pt_obj(iVar3);" (call_expression "destruct_scsi_pt_obj(iVar3)" (identifier "destruct_scsi_pt_obj") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";"))) (labeled_statement "LAB_00026879:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }" (statement_identifier "LAB_00026879") (: ":") (if_statement "if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_7c;\n  }" (if "if") (parenthesized_expression "(local_24 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_24 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return local_7c;\n  }" ({ "{") (return_statement "return local_7c;" (return "return") (identifier "local_7c") (; ";")) (} "}")))) (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" (identifier "FUN_00030280") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(int sg_fd,type_1 pblock,type_1 correct,type_2 var_2,void *resp,int xfer_len,
                     int *var_24,type_1 noisy,int var_4)

{
  int var_27;
  type_3 var_3;
  type_1 _Var3;
  type_4 var_23;
  type_5 *var_9;
  int var_16;
  type_2 uVar6;
  char *pcVar7;
  uint8_t *var_22;
  uint8_t uVar9;
  type_4 *var_7;
  int var_1;
  int no_ascii;
  int var_18;
  uint64_t ull;
  uint8_t readLong_cdb [10];
  uint8_t var_8 [64];
  
  var_27 = *(int *)(var_1 + 0x14);
  readLong_cdb[9] = '\0';
  uVar9 = '\x02';
  readLong_cdb[1] = '\0';
  readLong_cdb[6] = '\0';
  readLong_cdb[0] = '>';
  if (pblock) {
    readLong_cdb[1] = '\x04';
    uVar9 = '\x06';
  }
  if (correct) {
    readLong_cdb[1] = uVar9;
  }
  var_3 = (type_3)(var_2 >> 8);
  readLong_cdb._2_2_ = (type_3)(type_4)(var_2 >> 0x18) | var_3 & 0xff00;
  readLong_cdb._4_2_ = var_3 & 0xff | (type_3)((var_2 << 0x18) >> 0x10);
  readLong_cdb[7] = (uint8_t)((type_2)xfer_len >> 8);
  readLong_cdb[8] = (uint8_t)xfer_len;
  pcVar7 = "read long(10)";
  if (var_4 == 0) {
    var_9 = var_5();
  }
  else {
    var_6("    %s cdb: ","read long(10)");
    var_7 = readLong_cdb;
    do {
      uVar6 = (type_2)*var_7;
      var_7 = var_7 + 1;
      var_6("%02x ",uVar6);
    } while (var_8 != var_7);
    var_6("\n",uVar6);
    var_9 = var_5();
  }
  if (var_9 == (type_5 *)0x0) {
    var_6("%s: out of memory\n","read long(10)");
    var_18 = var_10(0xc);
    goto LAB_00026879;
  }
  var_11(var_9,readLong_cdb,10);
  var_12(var_9,var_8,0x40);
  var_13(var_9,(uint8_t *)resp,xfer_len);
  var_16 = var_14(var_9,sg_fd,0x3c,var_4);
  var_16 = var_15(var_9,"read long(10)",var_16,xfer_len,var_8,noisy,var_4,&var_18);
  if (var_16 == -1) {
    var_16 = var_17();
    var_18 = var_10(var_16);
  }
  else if (var_16 == -2) {
    if (var_18 == 5) {
      ull._0_4_ = 0;
      ull._4_4_ = 0;
      var_16 = var_19();
      _Var3 = var_20(var_8,var_16,&ull);
      if (var_16 < 8) {
LAB_00026a80:
        var_23 = 0;
      }
      else {
        if (0x71 < (var_8[0] & 0x7f)) {
          var_22 = var_21(var_8,var_16,5);
          if (var_22 == (uint8_t *)0x0) goto LAB_00026a80;
          var_8[2] = var_22[3];
        }
        var_23 = var_8[2] >> 5 & 1;
        if ((_Var3) && (var_23 != 0)) {
          var_18 = 0x11;
          if (var_24 != (int *)0x0) {
            *var_24 = (int)ull;
          }
          goto LAB_0002686d;
        }
      }
      if (1 < var_4) {
        var_6("  info field: 0x%llx,  valid: %d, ili: %d\n",(int)ull,ull._4_4_,(type_2)_Var3,
              (type_2)var_23);
      }
    }
    else if ((4 < var_18) && (var_18 - 0x14U < 2)) {
      var_18 = 0;
    }
  }
  else if ((var_4 < 3) || (var_16 < 1)) {
    var_18 = 0;
  }
  else {
    var_6("    %s: response","read long(10)");
    if (var_4 == 3) {
      pcVar7 = ", first 256 bytes";
      if (var_16 < 0x101) {
        pcVar7 = "";
      }
      var_6("%s:\n",pcVar7);
      no_ascii = -1;
      if (0x100 < var_16) {
        var_16 = 0x100;
      }
    }
    else {
      var_6(":\n",pcVar7);
      no_ascii = 0;
    }
    var_25((uint8_t *)resp,var_16,no_ascii);
    var_18 = 0;
  }
LAB_0002686d:
  var_26(var_9);
LAB_00026879:
  if (var_27 == *(int *)(var_1 + 0x14)) {
    return var_18;
  }
                    /* WARNING: Subroutine does not return */
  var_28();
}


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

int MASKED(char param_1,char param_2,int param_3,undefined4 param_4,undefined4 param_5,
                     undefined4 *param_6,uint param_7,int param_8)

{
  ushort uVar1;
  byte bVar2;
  int iVar3;
  undefined4 uVar4;
  int iVar5;
  int iVar6;
  uint uVar7;
  uint uVar8;
  undefined1 uVar9;
  int unaff_EBX;
  byte *pbVar10;
  int in_GS_OFFSET;
  undefined4 unaff_retaddr;
  int iVar11;
  int *piVar12;
  int local_7c;
  undefined4 local_78;
  undefined4 local_74;
  byte local_6e [2];
  ushort uStack_6c;
  ushort local_6a;
  undefined1 uStack_68;
  undefined1 uStack_67;
  undefined1 uStack_66;
  undefined1 uStack_65;
  byte local_64 [2];
  byte local_62;
  int local_24;
  undefined4 uStack_14;
  
  uStack_65 = 0;
  uStack_14 = 0x266eb;
  entry();
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  uVar9 = 2;
  local_6e[1] = 0;
  uStack_68 = 0;
  local_6e[0] = 0x3e;
  if (param_1 != '\0') {
    local_6e[1] = 4;
    uVar9 = 6;
  }
  if (param_2 != '\0') {
    local_6e[1] = uVar9;
  }
  uVar1 = (ushort)((uint)param_3 >> 8);
  uStack_6c = (ushort)(byte)((uint)param_3 >> 0x18) | uVar1 & 0xff00;
  local_6a = uVar1 & 0xff | (ushort)((uint)(param_3 << 0x18) >> 0x10);
  uStack_67 = (undefined1)((uint)param_5 >> 8);
  uStack_66 = (undefined1)param_5;
  iVar6 = unaff_EBX + 0x1734e;
  if (param_8 == 0) {
    iVar3 = construct_scsi_pt_obj(iVar6,param_4,param_7);
  }
  else {
    pr2ws(unaff_EBX + 0x16b74,iVar6);
    pbVar10 = local_6e;
    do {
      uVar7 = (uint)*pbVar10;
      pbVar10 = pbVar10 + 1;
      pr2ws(unaff_EBX + 0x17e14,uVar7);
    } while (local_64 != pbVar10);
    pr2ws(unaff_EBX + 0xafe5,uVar7);
    iVar3 = construct_scsi_pt_obj();
  }
  if (iVar3 == 0) {
    pr2ws(unaff_EBX + 0x16bc4,iVar6);
    local_7c = sg_convert_errno(0xc);
    goto LAB_00026879;
  }
  set_scsi_pt_cdb(iVar3,local_6e,10);
  set_scsi_pt_sense(iVar3,local_64,0x40);
  set_scsi_pt_data_in(iVar3,param_4,param_5);
  uVar4 = do_scsi_pt(iVar3,unaff_retaddr,0x3c,param_8);
  piVar12 = &local_7c;
  iVar11 = param_8;
  iVar5 = sg_cmds_process_resp(iVar3,iVar6,uVar4,param_5,local_64,param_7 & 0xff,param_8,piVar12);
  if (iVar5 == -1) {
    uVar4 = get_scsi_pt_os_err(iVar3);
    local_7c = sg_convert_errno(uVar4);
  }
  else if (iVar5 == -2) {
    if (local_7c == 5) {
      local_78 = 0;
      local_74 = 0;
      iVar6 = get_scsi_pt_sense_len(iVar3);
      uVar7 = sg_get_sense_info_fld(local_64,iVar6,&local_78);
      uVar8 = uVar7 & 0xff;
      if (iVar6 < 8) {
LAB_00026a80:
        bVar2 = 0;
      }
      else {
        if (0x71 < (local_64[0] & 0x7f)) {
          uVar8 = uVar7 & 0xff;
          iVar6 = sg_scsi_sense_desc_find(local_64,iVar6,5);
          uVar8 = uVar8 & 0xff;
          if (iVar6 == 0) goto LAB_00026a80;
          local_62 = *(byte *)(iVar6 + 3);
        }
        bVar2 = local_62 >> 5 & 1;
        if (((char)uVar8 != '\0') && (bVar2 != 0)) {
          local_7c = 0x11;
          if (param_6 != (undefined4 *)0x0) {
            *param_6 = local_78;
          }
          goto LAB_0002686d;
        }
      }
      if (1 < param_8) {
        pr2ws(unaff_EBX + 0x1751d,local_78,local_74,uVar8,bVar2);
      }
    }
    else if ((4 < local_7c) && (local_7c - 0x14U < 2)) {
      local_7c = 0;
    }
  }
  else if ((param_8 < 3) || (iVar5 < 1)) {
    local_7c = 0;
  }
  else {
    pr2ws(unaff_EBX + 0x16fcd,iVar6);
    if (param_8 == 3) {
      iVar6 = unaff_EBX + 0x16f98;
      if (iVar5 < 0x101) {
        iVar6 = unaff_EBX + 0xb2da;
      }
      pr2ws(unaff_EBX + 0xac7b,iVar6);
      uVar4 = 0xffffffff;
      if (0x100 < iVar5) {
        iVar5 = 0x100;
      }
    }
    else {
      pr2ws(unaff_EBX + 0x17ed6,iVar6,iVar11,piVar12,iVar5);
      uVar4 = 0;
    }
    hex2stderr(param_4,iVar5,uVar4);
    local_7c = 0;
  }
LAB_0002686d:
  destruct_scsi_pt_obj(iVar3);
LAB_00026879:
  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_7c;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00030280();
}

