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

int sg_ll_get_performance
              (int sg_fd,int data_type,uint starting_lba,int max_num_desc,int ttype,void *resp,
              int mx_resp_len,_Bool noisy,int verbose)

{
  int iVar1;
  ushort uVar2;
  sg_pt_base *vp;
  int iVar3;
  uint uVar4;
  char *pcVar5;
  byte *pbVar6;
  uint uVar7;
  int in_GS_OFFSET;
  int sense_cat;
  uint8_t gpCmdBlk [12];
  uint8_t sense_b [64];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  gpCmdBlk[1] = '\0';
  gpCmdBlk[2] = '\0';
  gpCmdBlk[3] = '\0';
  gpCmdBlk[4] = '\0';
  gpCmdBlk[5] = '\0';
  gpCmdBlk[6] = '\0';
  gpCmdBlk[7] = '\0';
  gpCmdBlk[8] = '\0';
  gpCmdBlk[9] = '\0';
  gpCmdBlk[10] = '\0';
  gpCmdBlk[0xb] = '\0';
  gpCmdBlk[0] = 0xac;
  if ((uint)data_type < 0x20) {
    gpCmdBlk[1] = (uint8_t)data_type;
    uVar2 = (ushort)(starting_lba >> 8);
    gpCmdBlk._2_2_ = (ushort)(byte)(starting_lba >> 0x18) | uVar2 & 0xff00;
    gpCmdBlk._4_2_ = uVar2 & 0xff | (ushort)((starting_lba << 0x18) >> 0x10);
    if ((uint)max_num_desc < 0x10000) {
      uVar2 = (ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8;
      gpCmdBlk[10] = '\0';
      gpCmdBlk[0xb] = '\0';
      gpCmdBlk[8] = (char)uVar2;
      gpCmdBlk[9] = (char)(uVar2 >> 8);
      if ((uint)ttype < 0x100) {
        pcVar5 = "get performance";
        gpCmdBlk[10] = (uint8_t)ttype;
        gpCmdBlk[8] = (char)uVar2;
        gpCmdBlk[9] = (char)(uVar2 >> 8);
        gpCmdBlk[0xb] = '\0';
        if (verbose == 0) {
          vp = construct_scsi_pt_obj();
        }
        else {
          pr2ws("    %s cdb: ","get performance");
          pbVar6 = gpCmdBlk;
          do {
            uVar4 = (uint)*pbVar6;
            pbVar6 = pbVar6 + 1;
            pr2ws("%02x ",uVar4);
          } while (pbVar6 != sense_b);
          pr2ws("\n",uVar4);
          vp = construct_scsi_pt_obj();
        }
        if (vp == (sg_pt_base *)0x0) {
          iVar3 = -1;
          pr2ws("%s: out of memory\n","get performance");
        }
        else {
          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);
          set_scsi_pt_sense(vp,sense_b,0x40);
          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);
          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);
          uVar4 = sg_cmds_process_resp
                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat
                            );
          if (uVar4 == 0xffffffff) {
            iVar3 = get_scsi_pt_os_err();
            iVar3 = sg_convert_errno(iVar3);
          }
          else if (uVar4 == 0xfffffffe) {
            if ((uint)sense_cat < 0x16) {
              uVar4 = 1 << ((byte)sense_cat & 0x1f);
              iVar3 = sense_cat;
              if ((uVar4 & 0xa60) == 0) {
                iVar3 = -(uint)((uVar4 & 0x300000) == 0);
              }
            }
            else {
              iVar3 = -1;
            }
          }
          else if ((verbose < 3) || ((int)uVar4 < 4)) {
            iVar3 = 0;
          }
          else {
                    /* WARNING: Load size is inaccurate */
            uVar7 = *resp;
            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;
            if ((int)uVar7 < 0) {
              uVar7 = 0;
            }
            if ((int)uVar4 <= (int)uVar7) {
              uVar7 = uVar4;
            }
            pr2ws("    %s: response","get performance");
            if (verbose == 3) {
              pcVar5 = ", first 256 bytes";
              if ((int)uVar7 < 0x101) {
                pcVar5 = "";
              }
              pr2ws("%s:\n",pcVar5);
              if (0x100 < (int)uVar7) {
                uVar7 = 0x100;
              }
              hex2stderr((uint8_t *)resp,uVar7,-1);
              iVar3 = 0;
            }
            else {
              pr2ws(":\n",pcVar5);
              hex2stderr((uint8_t *)resp,uVar7,0);
              iVar3 = 0;
            }
          }
          destruct_scsi_pt_obj(vp);
        }
      }
      else {
        iVar3 = -1;
        pr2ws("Bad type: 0x%x\n",ttype);
      }
    }
    else {
      iVar3 = -1;
      pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc);
    }
  }
  else {
    iVar3 = -1;
    pr2ws("Bad data_type value: %d\n",data_type);
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return iVar3;
}



uint sg_ll_get_performance
               (uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,
               undefined1 param_7,int param_8)

{
  ushort uVar1;
  int iVar2;
  undefined4 uVar3;
  uint uVar4;
  char *pcVar5;
  int unaff_EBX;
  byte *pbVar6;
  uint uVar7;
  int in_GS_OFFSET;
  undefined4 unaff_retaddr;
  int iVar8;
  uint local_74;
  byte local_70 [2];
  ushort uStack_6e;
  ushort local_6c;
  undefined2 uStack_6a;
  undefined4 local_68;
  byte local_64 [64];
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x29b19;
  entry();
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  local_70[1] = 0;
  uStack_6e = 0;
  local_6c = 0;
  uStack_6a = 0;
  local_68 = 0;
  local_70[0] = 0xac;
  if (param_1 < 0x20) {
    local_70[1] = (byte)param_1;
    uVar1 = (ushort)((uint)param_2 >> 8);
    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;
    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);
    if (param_3 < 0x10000) {
      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;
      local_68 = (uint)uVar1;
      if (param_4 < 0x100) {
        iVar8 = unaff_EBX + 0x133ad;
        local_68 = (uint)CONCAT12((char)param_4,uVar1);
        if (param_8 == 0) {
          iVar2 = construct_scsi_pt_obj();
        }
        else {
          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);
          pbVar6 = local_70;
          do {
            uVar4 = (uint)*pbVar6;
            pbVar6 = pbVar6 + 1;
            pr2ws(unaff_EBX + 0x13a0a,uVar4);
          } while (pbVar6 != local_64);
          pr2ws(unaff_EBX + 0x6bc7,uVar4);
          iVar2 = construct_scsi_pt_obj();
        }
        if (iVar2 == 0) {
          uVar4 = 0xffffffff;
          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);
        }
        else {
          set_scsi_pt_cdb(iVar2,local_70,0xc);
          set_scsi_pt_sense(iVar2,local_64,0x40);
          set_scsi_pt_data_in(iVar2,param_5,param_6);
          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);
          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)
          ;
          if (uVar4 == 0xffffffff) {
            uVar3 = get_scsi_pt_os_err(iVar2);
            uVar4 = sg_convert_errno(uVar3);
          }
          else if (uVar4 == 0xfffffffe) {
            if (local_74 < 0x16) {
              uVar7 = 1 << ((byte)local_74 & 0x1f);
              uVar4 = local_74;
              if ((uVar7 & 0xa60) == 0) {
                uVar4 = -(uint)((uVar7 & 0x300000) == 0);
              }
            }
            else {
              uVar4 = 0xffffffff;
            }
          }
          else if ((param_8 < 3) || ((int)uVar4 < 4)) {
            uVar4 = 0;
          }
          else {
            uVar7 = *param_5;
            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;
            if ((int)uVar7 < 0) {
              uVar7 = 0;
            }
            if ((int)uVar4 <= (int)uVar7) {
              uVar7 = uVar4;
            }
            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);
            if (param_8 == 3) {
              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;
              if ((int)uVar7 < 0x101) {
                pcVar5 = (char *)(unaff_EBX + 0x6ebc);
              }
              pr2ws(unaff_EBX + 0x685d,pcVar5);
              if (0x100 < (int)uVar7) {
                uVar7 = 0x100;
              }
              hex2stderr(param_5,uVar7,0xffffffff);
              uVar4 = 0;
            }
            else {
              pr2ws(unaff_EBX + 0x13acc,iVar8);
              hex2stderr(param_5,uVar7,0);
              uVar4 = 0;
            }
          }
          destruct_scsi_pt_obj(iVar2);
        }
      }
      else {
        uVar4 = 0xffffffff;
        pr2ws(unaff_EBX + 0x1339d,param_4);
      }
    }
    else {
      uVar4 = 0xffffffff;
      pr2ws(unaff_EBX + 0x13385,param_3);
    }
  }
  else {
    uVar4 = 0xffffffff;
    pr2ws(unaff_EBX + 0x1336c,param_1);
  }
  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0002f100();
  }
  return uVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00017820
ADD EBX,0x1f26f
SUB ESP,0x7c
MOV ESI,dword ptr [ESP + 0xa4]
MOV EDI,dword ptr [ESP + 0xac]
MOV ECX,dword ptr [ESP + 0x94]
MOV EAX,dword ptr [ESP + 0x9c]
MOV dword ptr [ESP + 0x8],ESI
MOV EDX,dword ptr [ESP + 0xa0]
MOV dword ptr [ESP + 0xc],EDI
MOV ESI,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x6c],ESI
XOR ESI,ESI
MOV dword ptr [ESP + 0x20],0x0
MOV dword ptr [ESP + 0x24],0x0
MOV dword ptr [ESP + 0x28],0x0
MOV byte ptr [ESP + 0x20],0xac
CMP ECX,0x1f
JA 0x00029e4b
MOV byte ptr [ESP + 0x21],CL
MOV ECX,dword ptr [ESP + 0x98]
BSWAP ECX
MOV dword ptr [ESP + 0x22],ECX
CMP EAX,0xffff
JA 0x00029e85
ROL AX,0x8
MOV word ptr [ESP + 0x28],AX
CMP EDX,0xff
JA 0x00029e68
LEA EAX,[EBX + 0xffff413e]
MOV byte ptr [ESP + 0x2a],DL
MOV dword ptr [ESP + 0x4],EAX
MOV EAX,dword ptr [ESP + 0xb0]
TEST EAX,EAX
JNZ 0x00029d30
CALL 0x00017160
MOV ESI,EAX
TEST EAX,EAX
JZ 0x00029d91
SUB ESP,0x4
PUSH 0xc
LEA EAX,[ESP + 0x28]
PUSH EAX
PUSH ESI
CALL 0x000177e0
ADD ESP,0xc
PUSH 0x40
LEA EDI,[ESP + 0x34]
PUSH EDI
PUSH ESI
CALL 0x00017620
ADD ESP,0xc
PUSH dword ptr [ESP + 0xac]
PUSH dword ptr [ESP + 0x10]
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 + 0x1c]
PUSH EDX
PUSH dword ptr [ESP + 0xb4]
MOVZX EDX,byte ptr [ESP + 0x14]
PUSH EDX
PUSH EDI
PUSH dword ptr [ESP + 0xb8]
PUSH EAX
PUSH dword ptr [ESP + 0x1c]
PUSH ESI
CALL 0x00017690
ADD ESP,0x20
CMP EAX,-0x1
JZ 0x00029e30
CMP EAX,-0x2
JZ 0x00029db8
CMP dword ptr [ESP + 0xb0],0x2
JLE 0x00029d00
CMP EAX,0x3
JLE 0x00029d00
MOV EBP,dword ptr [ESP + 0x8]
MOV EDX,0x0
MOV EDI,dword ptr [EBP]
BSWAP EDI
TEST EDI,EDI
CMOVS EDI,EDX
CMP EAX,EDI
CMOVLE EDI,EAX
SUB ESP,0x8
LEA EAX,[EBX + 0xffff3930]
PUSH dword ptr [ESP + 0xc]
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
CMP dword ptr [ESP + 0xb0],0x3
JNZ 0x00029e00
CMP EDI,0x100
LEA EDX,[EBX + 0xfffe7c4d]
LEA EAX,[EBX + 0xffff38fb]
CMOVLE EAX,EDX
SUB ESP,0x8
PUSH EAX
LEA EAX,[EBX + 0xfffe75ee]
PUSH EAX
CALL 0x00017630
ADD ESP,0xc
MOV EAX,0x100
CMP EDI,0x100
CMOVG EDI,EAX
PUSH -0x1
PUSH EDI
XOR EDI,EDI
PUSH EBP
CALL 0x00017700
ADD ESP,0x10
JMP 0x00029d02
XOR EDI,EDI
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 0x00029ea2
ADD ESP,0x7c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xffff34d7]
LEA ESI,[EBX + 0xffff479b]
PUSH dword ptr [ESP + 0xc]
PUSH EAX
CALL 0x00017630
LEA EBP,[ESP + 0x30]
LEA EDI,[ESP + 0x3c]
ADD ESP,0x10
LEA ESI,[ESI]
MOVZX EAX,byte ptr [EBP]
SUB ESP,0x8
ADD EBP,0x1
PUSH EAX
PUSH ESI
CALL 0x00017630
ADD ESP,0x10
CMP EBP,EDI
JNZ 0x00029d58
SUB ESP,0xc
LEA EAX,[EBX + 0xfffe7958]
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
CALL 0x00017160
MOV ESI,EAX
TEST EAX,EAX
JNZ 0x00029bdd
SUB ESP,0x8
LEA EAX,[EBX + 0xffff3527]
MOV EDI,0xffffffff
PUSH dword ptr [ESP + 0xc]
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
JMP 0x00029d0e
MOV EDI,dword ptr [ESP + 0x1c]
CMP EDI,0x15
JA 0x00029df0
MOV EAX,0x1
MOV ECX,EDI
SHL EAX,CL
TEST EAX,0xa60
JNZ 0x00029d02
TEST EAX,0x300000
SETZ AL
MOVZX EAX,AL
NEG EAX
MOV EDI,EAX
JMP 0x00029d02
MOV EDI,0xffffffff
JMP 0x00029d02
SUB ESP,0xc
LEA EAX,[EBX + 0xffff485d]
PUSH EAX
CALL 0x00017630
ADD ESP,0xc
PUSH 0x0
PUSH EDI
XOR EDI,EDI
PUSH dword ptr [ESP + 0x14]
CALL 0x00017700
ADD ESP,0x10
JMP 0x00029d02
SUB ESP,0xc
PUSH ESI
CALL 0x000170a0
MOV dword ptr [ESP],EAX
CALL 0x00017560
ADD ESP,0x10
MOV EDI,EAX
JMP 0x00029d02
SUB ESP,0x8
LEA EAX,[EBX + 0xffff40fd]
MOV EDI,0xffffffff
PUSH ECX
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
JMP 0x00029d0e
SUB ESP,0x8
LEA EAX,[EBX + 0xffff412e]
MOV EDI,0xffffffff
PUSH EDX
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
JMP 0x00029d0e
SUB ESP,0x8
MOV EDI,0xffffffff
PUSH EAX
LEA EAX,[EBX + 0xffff4116]
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
JMP 0x00029d0e
CALL 0x0002f100
(translation_unit "uint sg_ll_get_performance\n               (uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)\n\n{\n  ushort uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  char *pcVar5;\n  int unaff_EBX;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar8;\n  uint local_74;\n  byte local_70 [2];\n  ushort uStack_6e;\n  ushort local_6c;\n  undefined2 uStack_6a;\n  undefined4 local_68;\n  byte local_64 [64];\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x29b19;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  local_70[1] = 0;\n  uStack_6e = 0;\n  local_6c = 0;\n  uStack_6a = 0;\n  local_68 = 0;\n  local_70[0] = 0xac;\n  if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002f100();\n  }\n  return uVar4;\n}\n\n" (function_definition "uint sg_ll_get_performance\n               (uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)\n\n{\n  ushort uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  char *pcVar5;\n  int unaff_EBX;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar8;\n  uint local_74;\n  byte local_70 [2];\n  ushort uStack_6e;\n  ushort local_6c;\n  undefined2 uStack_6a;\n  undefined4 local_68;\n  byte local_64 [64];\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x29b19;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  local_70[1] = 0;\n  uStack_6e = 0;\n  local_6c = 0;\n  uStack_6a = 0;\n  local_68 = 0;\n  local_70[0] = 0xac;\n  if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002f100();\n  }\n  return uVar4;\n}" type_identifier (function_declarator "sg_ll_get_performance\n               (uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)" identifier (parameter_list "(uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "uint *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "undefined4 param_6" type_identifier identifier) , (parameter_declaration "undefined1 param_7" type_identifier identifier) , (parameter_declaration "int param_8" primitive_type identifier) ))) (compound_statement "{\n  ushort uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  char *pcVar5;\n  int unaff_EBX;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar8;\n  uint local_74;\n  byte local_70 [2];\n  ushort uStack_6e;\n  ushort local_6c;\n  undefined2 uStack_6a;\n  undefined4 local_68;\n  byte local_64 [64];\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x29b19;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  local_70[1] = 0;\n  uStack_6e = 0;\n  local_6c = 0;\n  uStack_6a = 0;\n  local_68 = 0;\n  local_70[0] = 0xac;\n  if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002f100();\n  }\n  return uVar4;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 unaff_retaddr;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "uint local_74;" type_identifier identifier ;) (declaration "byte local_70 [2];" type_identifier (array_declarator "local_70 [2]" identifier [ number_literal ]) ;) (declaration "ushort uStack_6e;" type_identifier identifier ;) (declaration "ushort local_6c;" type_identifier identifier ;) (declaration "undefined2 uStack_6a;" type_identifier identifier ;) (declaration "undefined4 local_68;" type_identifier identifier ;) (declaration "byte local_64 [64];" type_identifier (array_declarator "local_64 [64]" identifier [ number_literal ]) ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x29b19;" (assignment_expression "uStack_14 = 0x29b19" 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 "local_70[1] = 0;" (assignment_expression "local_70[1] = 0" (subscript_expression "local_70[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uStack_6e = 0;" (assignment_expression "uStack_6e = 0" identifier = number_literal) ;) (expression_statement "local_6c = 0;" (assignment_expression "local_6c = 0" identifier = number_literal) ;) (expression_statement "uStack_6a = 0;" (assignment_expression "uStack_6a = 0" identifier = number_literal) ;) (expression_statement "local_68 = 0;" (assignment_expression "local_68 = 0" identifier = number_literal) ;) (expression_statement "local_70[0] = 0xac;" (assignment_expression "local_70[0] = 0xac" (subscript_expression "local_70[0]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }" if (parenthesized_expression "(param_1 < 0x20)" ( (binary_expression "param_1 < 0x20" identifier < number_literal) )) (compound_statement "{\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }" { (expression_statement "local_70[1] = (byte)param_1;" (assignment_expression "local_70[1] = (byte)param_1" (subscript_expression "local_70[1]" identifier [ number_literal ]) = (cast_expression "(byte)param_1" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "uVar1 = (ushort)((uint)param_2 >> 8);" (assignment_expression "uVar1 = (ushort)((uint)param_2 >> 8)" identifier = (call_expression "(ushort)((uint)param_2 >> 8)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((uint)param_2 >> 8)" ( (binary_expression "(uint)param_2 >> 8" (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;" (assignment_expression "uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00" identifier = (binary_expression "(ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00" (call_expression "(ushort)(byte)((uint)param_2 >> 0x18)" (call_expression "(ushort)(byte)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "((uint)param_2 >> 0x18)" ( (binary_expression "(uint)param_2 >> 0x18" (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) | (binary_expression "uVar1 & 0xff00" identifier & number_literal))) ;) (expression_statement "local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);" (assignment_expression "local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10)" identifier = (binary_expression "uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10)" (binary_expression "uVar1 & 0xff" identifier & number_literal) | (call_expression "(ushort)((uint)(param_2 << 0x18) >> 0x10)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((uint)(param_2 << 0x18) >> 0x10)" ( (binary_expression "(uint)(param_2 << 0x18) >> 0x10" (call_expression "(uint)(param_2 << 0x18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_2 << 0x18)" ( (binary_expression "param_2 << 0x18" identifier << number_literal) ))) >> number_literal) ))))) ;) (if_statement "if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }" if (parenthesized_expression "(param_3 < 0x10000)" ( (binary_expression "param_3 < 0x10000" identifier < number_literal) )) (compound_statement "{\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }" { (expression_statement "uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;" (assignment_expression "uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8" identifier = (binary_expression "(ushort)param_3 << 8 | (ushort)param_3 >> 8" (binary_expression "(ushort)param_3 << 8" (cast_expression "(ushort)param_3" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)param_3 >> 8" (cast_expression "(ushort)param_3" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal))) ;) (expression_statement "local_68 = (uint)uVar1;" (assignment_expression "local_68 = (uint)uVar1" identifier = (cast_expression "(uint)uVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }" if (parenthesized_expression "(param_4 < 0x100)" ( (binary_expression "param_4 < 0x100" identifier < number_literal) )) (compound_statement "{\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }" { (expression_statement "iVar8 = unaff_EBX + 0x133ad;" (assignment_expression "iVar8 = unaff_EBX + 0x133ad" identifier = (binary_expression "unaff_EBX + 0x133ad" identifier + number_literal)) ;) (expression_statement "local_68 = (uint)CONCAT12((char)param_4,uVar1);" (assignment_expression "local_68 = (uint)CONCAT12((char)param_4,uVar1)" identifier = (cast_expression "(uint)CONCAT12((char)param_4,uVar1)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT12((char)param_4,uVar1)" identifier (argument_list "((char)param_4,uVar1)" ( (cast_expression "(char)param_4" ( (type_descriptor "char" primitive_type) ) identifier) , identifier ))))) ;) (if_statement "if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }" if (parenthesized_expression "(param_8 == 0)" ( (binary_expression "param_8 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar2 = construct_scsi_pt_obj();\n        }" { (expression_statement "iVar2 = construct_scsi_pt_obj();" (assignment_expression "iVar2 = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }" else (compound_statement "{\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }" { (expression_statement "pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);" (call_expression "pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8)" identifier (argument_list "("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8)" ( (binary_expression ""sg_ll_sync_cache_10" + unaff_EBX + 0xe" (binary_expression ""sg_ll_sync_cache_10" + unaff_EBX" (string_literal ""sg_ll_sync_cache_10"" " string_content ") + identifier) + number_literal) , identifier ))) ;) (expression_statement "pbVar6 = local_70;" (assignment_expression "pbVar6 = local_70" identifier = identifier) ;) (do_statement "do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);" do (compound_statement "{\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          }" { (expression_statement "uVar4 = (uint)*pbVar6;" (assignment_expression "uVar4 = (uint)*pbVar6" identifier = (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws(unaff_EBX + 0x13a0a,uVar4);" (call_expression "pr2ws(unaff_EBX + 0x13a0a,uVar4)" identifier (argument_list "(unaff_EBX + 0x13a0a,uVar4)" ( (binary_expression "unaff_EBX + 0x13a0a" identifier + number_literal) , identifier ))) ;) }) while (parenthesized_expression "(pbVar6 != local_64)" ( (binary_expression "pbVar6 != local_64" identifier != identifier) )) ;) (expression_statement "pr2ws(unaff_EBX + 0x6bc7,uVar4);" (call_expression "pr2ws(unaff_EBX + 0x6bc7,uVar4)" identifier (argument_list "(unaff_EBX + 0x6bc7,uVar4)" ( (binary_expression "unaff_EBX + 0x6bc7" identifier + number_literal) , identifier ))) ;) (expression_statement "iVar2 = construct_scsi_pt_obj();" (assignment_expression "iVar2 = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);" (call_expression "pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8)" identifier (argument_list "("sg_ll_mode_sense10" + unaff_EBX,iVar8)" ( (binary_expression ""sg_ll_mode_sense10" + unaff_EBX" (string_literal ""sg_ll_mode_sense10"" " string_content ") + identifier) , identifier ))) ;) }) (else_clause "else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }" else (compound_statement "{\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }" { (expression_statement "set_scsi_pt_cdb(iVar2,local_70,0xc);" (call_expression "set_scsi_pt_cdb(iVar2,local_70,0xc)" identifier (argument_list "(iVar2,local_70,0xc)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(iVar2,local_64,0x40);" (call_expression "set_scsi_pt_sense(iVar2,local_64,0x40)" identifier (argument_list "(iVar2,local_64,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_in(iVar2,param_5,param_6);" (call_expression "set_scsi_pt_data_in(iVar2,param_5,param_6)" identifier (argument_list "(iVar2,param_5,param_6)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);" (assignment_expression "uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8)" identifier = (call_expression "do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8)" identifier (argument_list "(iVar2,unaff_retaddr,0x3c,param_8)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;" (assignment_expression "uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)" identifier = (call_expression "sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)" identifier (argument_list "(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , (pointer_expression "&local_74" & identifier) )))) ;) (if_statement "if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" if (parenthesized_expression "(uVar4 == 0xffffffff)" ( (binary_expression "uVar4 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }" { (expression_statement "uVar3 = get_scsi_pt_os_err(iVar2);" (assignment_expression "uVar3 = get_scsi_pt_os_err(iVar2)" identifier = (call_expression "get_scsi_pt_os_err(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "uVar4 = sg_convert_errno(uVar3);" (assignment_expression "uVar4 = sg_convert_errno(uVar3)" identifier = (call_expression "sg_convert_errno(uVar3)" identifier (argument_list "(uVar3)" ( identifier )))) ;) }) (else_clause "else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" else (if_statement "if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" if (parenthesized_expression "(uVar4 == 0xfffffffe)" ( (binary_expression "uVar4 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }" { (if_statement "if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }" if (parenthesized_expression "(local_74 < 0x16)" ( (binary_expression "local_74 < 0x16" identifier < number_literal) )) (compound_statement "{\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }" { (expression_statement "uVar7 = 1 << ((byte)local_74 & 0x1f);" (assignment_expression "uVar7 = 1 << ((byte)local_74 & 0x1f)" identifier = (binary_expression "1 << ((byte)local_74 & 0x1f)" number_literal << (parenthesized_expression "((byte)local_74 & 0x1f)" ( (binary_expression "(byte)local_74 & 0x1f" (cast_expression "(byte)local_74" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (expression_statement "uVar4 = local_74;" (assignment_expression "uVar4 = local_74" identifier = identifier) ;) (if_statement "if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }" if (parenthesized_expression "((uVar7 & 0xa60) == 0)" ( (binary_expression "(uVar7 & 0xa60) == 0" (parenthesized_expression "(uVar7 & 0xa60)" ( (binary_expression "uVar7 & 0xa60" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }" { (expression_statement "uVar4 = -(uint)((uVar7 & 0x300000) == 0);" (assignment_expression "uVar4 = -(uint)((uVar7 & 0x300000) == 0)" identifier = (unary_expression "-(uint)((uVar7 & 0x300000) == 0)" - (call_expression "(uint)((uVar7 & 0x300000) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((uVar7 & 0x300000) == 0)" ( (binary_expression "(uVar7 & 0x300000) == 0" (parenthesized_expression "(uVar7 & 0x300000)" ( (binary_expression "uVar7 & 0x300000" identifier & number_literal) )) == number_literal) ))))) ;) })) }) (else_clause "else {\n              uVar4 = 0xffffffff;\n            }" else (compound_statement "{\n              uVar4 = 0xffffffff;\n            }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) }))) }) (else_clause "else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" else (if_statement "if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" if (parenthesized_expression "((param_8 < 3) || ((int)uVar4 < 4))" ( (binary_expression "(param_8 < 3) || ((int)uVar4 < 4)" (parenthesized_expression "(param_8 < 3)" ( (binary_expression "param_8 < 3" identifier < number_literal) )) || (parenthesized_expression "((int)uVar4 < 4)" ( (binary_expression "(int)uVar4 < 4" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) ))) )) (compound_statement "{\n            uVar4 = 0;\n          }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" else (compound_statement "{\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" { (expression_statement "uVar7 = *param_5;" (assignment_expression "uVar7 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) (expression_statement "uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;" (assignment_expression "uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18" identifier = (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18" (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8" (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8" (binary_expression "uVar7 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar7 & 0xff0000) >> 8" (parenthesized_expression "(uVar7 & 0xff0000)" ( (binary_expression "uVar7 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar7 & 0xff00) << 8" (parenthesized_expression "(uVar7 & 0xff00)" ( (binary_expression "uVar7 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar7 << 0x18" identifier << number_literal))) ;) (if_statement "if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }" if (parenthesized_expression "((int)uVar7 < 0)" ( (binary_expression "(int)uVar7 < 0" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n              uVar7 = 0;\n            }" { (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) })) (if_statement "if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }" if (parenthesized_expression "((int)uVar4 <= (int)uVar7)" ( (binary_expression "(int)uVar4 <= (int)uVar7" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n              uVar7 = uVar4;\n            }" { (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" identifier = identifier) ;) })) (expression_statement "pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);" (call_expression "pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8)" identifier (argument_list "("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8)" ( (binary_expression ""sg_ll_receive_copy_results" + unaff_EBX + 3" (binary_expression ""sg_ll_receive_copy_results" + unaff_EBX" (string_literal ""sg_ll_receive_copy_results"" " string_content ") + identifier) + number_literal) , identifier ))) ;) (if_statement "if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }" if (parenthesized_expression "(param_8 == 3)" ( (binary_expression "param_8 == 3" identifier == number_literal) )) (compound_statement "{\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }" { (expression_statement "pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;" (assignment_expression "pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1" identifier = (binary_expression ""sg_ll_unmap_v2" + unaff_EBX + 1" (binary_expression ""sg_ll_unmap_v2" + unaff_EBX" (string_literal ""sg_ll_unmap_v2"" " string_content ") + identifier) + number_literal)) ;) (if_statement "if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }" if (parenthesized_expression "((int)uVar7 < 0x101)" ( (binary_expression "(int)uVar7 < 0x101" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }" { (expression_statement "pcVar5 = (char *)(unaff_EBX + 0x6ebc);" (assignment_expression "pcVar5 = (char *)(unaff_EBX + 0x6ebc)" identifier = (cast_expression "(char *)(unaff_EBX + 0x6ebc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBX + 0x6ebc)" ( (binary_expression "unaff_EBX + 0x6ebc" identifier + number_literal) )))) ;) })) (expression_statement "pr2ws(unaff_EBX + 0x685d,pcVar5);" (call_expression "pr2ws(unaff_EBX + 0x685d,pcVar5)" identifier (argument_list "(unaff_EBX + 0x685d,pcVar5)" ( (binary_expression "unaff_EBX + 0x685d" identifier + number_literal) , identifier ))) ;) (if_statement "if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }" if (parenthesized_expression "(0x100 < (int)uVar7)" ( (binary_expression "0x100 < (int)uVar7" number_literal < (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n                uVar7 = 0x100;\n              }" { (expression_statement "uVar7 = 0x100;" (assignment_expression "uVar7 = 0x100" identifier = number_literal) ;) })) (expression_statement "hex2stderr(param_5,uVar7,0xffffffff);" (call_expression "hex2stderr(param_5,uVar7,0xffffffff)" identifier (argument_list "(param_5,uVar7,0xffffffff)" ( identifier , identifier , number_literal ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }" else (compound_statement "{\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }" { (expression_statement "pr2ws(unaff_EBX + 0x13acc,iVar8);" (call_expression "pr2ws(unaff_EBX + 0x13acc,iVar8)" identifier (argument_list "(unaff_EBX + 0x13acc,iVar8)" ( (binary_expression "unaff_EBX + 0x13acc" identifier + number_literal) , identifier ))) ;) (expression_statement "hex2stderr(param_5,uVar7,0);" (call_expression "hex2stderr(param_5,uVar7,0)" identifier (argument_list "(param_5,uVar7,0)" ( identifier , identifier , number_literal ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }))) }))))))) (expression_statement "destruct_scsi_pt_obj(iVar2);" (call_expression "destruct_scsi_pt_obj(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) }))) }) (else_clause "else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }" else (compound_statement "{\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws(unaff_EBX + 0x1339d,param_4);" (call_expression "pr2ws(unaff_EBX + 0x1339d,param_4)" identifier (argument_list "(unaff_EBX + 0x1339d,param_4)" ( (binary_expression "unaff_EBX + 0x1339d" identifier + number_literal) , identifier ))) ;) }))) }) (else_clause "else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }" else (compound_statement "{\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws(unaff_EBX + 0x13385,param_3);" (call_expression "pr2ws(unaff_EBX + 0x13385,param_3)" identifier (argument_list "(unaff_EBX + 0x13385,param_3)" ( (binary_expression "unaff_EBX + 0x13385" identifier + number_literal) , identifier ))) ;) }))) }) (else_clause "else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }" else (compound_statement "{\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws(unaff_EBX + 0x1336c,param_1);" (call_expression "pr2ws(unaff_EBX + 0x1336c,param_1)" identifier (argument_list "(unaff_EBX + 0x1336c,param_1)" ( (binary_expression "unaff_EBX + 0x1336c" identifier + number_literal) , identifier ))) ;) }))) (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002f100();\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                    /* WARNING: Subroutine does not return */\n    FUN_0002f100();\n  }" { comment (expression_statement "FUN_0002f100();" (call_expression "FUN_0002f100()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(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_get_performance\n              (int sg_fd,int data_type,uint starting_lba,int max_num_desc,int ttype,void *resp,\n              int mx_resp_len,_Bool noisy,int verbose)\n\n{\n  int iVar1;\n  ushort uVar2;\n  sg_pt_base *vp;\n  int iVar3;\n  uint uVar4;\n  char *pcVar5;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  int sense_cat;\n  uint8_t gpCmdBlk [12];\n  uint8_t sense_b [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  gpCmdBlk[1] = '\0';\n  gpCmdBlk[2] = '\0';\n  gpCmdBlk[3] = '\0';\n  gpCmdBlk[4] = '\0';\n  gpCmdBlk[5] = '\0';\n  gpCmdBlk[6] = '\0';\n  gpCmdBlk[7] = '\0';\n  gpCmdBlk[8] = '\0';\n  gpCmdBlk[9] = '\0';\n  gpCmdBlk[10] = '\0';\n  gpCmdBlk[0xb] = '\0';\n  gpCmdBlk[0] = 0xac;\n  if ((uint)data_type < 0x20) {\n    gpCmdBlk[1] = (uint8_t)data_type;\n    uVar2 = (ushort)(starting_lba >> 8);\n    gpCmdBlk._2_2_ = (ushort)(byte)(starting_lba >> 0x18) | uVar2 & 0xff00;\n    gpCmdBlk._4_2_ = uVar2 & 0xff | (ushort)((starting_lba << 0x18) >> 0x10);\n    if ((uint)max_num_desc < 0x10000) {\n      uVar2 = (ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8;\n      gpCmdBlk[10] = '\0';\n      gpCmdBlk[0xb] = '\0';\n      gpCmdBlk[8] = (char)uVar2;\n      gpCmdBlk[9] = (char)(uVar2 >> 8);\n      if ((uint)ttype < 0x100) {\n        pcVar5 = "get performance";\n        gpCmdBlk[10] = (uint8_t)ttype;\n        gpCmdBlk[8] = (char)uVar2;\n        gpCmdBlk[9] = (char)(uVar2 >> 8);\n        gpCmdBlk[0xb] = '\0';\n        if (verbose == 0) {\n          vp = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }\n        if (vp == (sg_pt_base *)0x0) {\n          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }\n        else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }\n      }\n      else {\n        iVar3 = -1;\n        pr2ws("Bad type: 0x%x\n",ttype);\n      }\n    }\n    else {\n      iVar3 = -1;\n      pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc);\n    }\n  }\n  else {\n    iVar3 = -1;\n    pr2ws("Bad data_type value: %d\n",data_type);\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar3;\n}\n\n" comment comment (function_definition "int sg_ll_get_performance\n              (int sg_fd,int data_type,uint starting_lba,int max_num_desc,int ttype,void *resp,\n              int mx_resp_len,_Bool noisy,int verbose)\n\n{\n  int iVar1;\n  ushort uVar2;\n  sg_pt_base *vp;\n  int iVar3;\n  uint uVar4;\n  char *pcVar5;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  int sense_cat;\n  uint8_t gpCmdBlk [12];\n  uint8_t sense_b [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  gpCmdBlk[1] = '\0';\n  gpCmdBlk[2] = '\0';\n  gpCmdBlk[3] = '\0';\n  gpCmdBlk[4] = '\0';\n  gpCmdBlk[5] = '\0';\n  gpCmdBlk[6] = '\0';\n  gpCmdBlk[7] = '\0';\n  gpCmdBlk[8] = '\0';\n  gpCmdBlk[9] = '\0';\n  gpCmdBlk[10] = '\0';\n  gpCmdBlk[0xb] = '\0';\n  gpCmdBlk[0] = 0xac;\n  if ((uint)data_type < 0x20) {\n    gpCmdBlk[1] = (uint8_t)data_type;\n    uVar2 = (ushort)(starting_lba >> 8);\n    gpCmdBlk._2_2_ = (ushort)(byte)(starting_lba >> 0x18) | uVar2 & 0xff00;\n    gpCmdBlk._4_2_ = uVar2 & 0xff | (ushort)((starting_lba << 0x18) >> 0x10);\n    if ((uint)max_num_desc < 0x10000) {\n      uVar2 = (ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8;\n      gpCmdBlk[10] = '\0';\n      gpCmdBlk[0xb] = '\0';\n      gpCmdBlk[8] = (char)uVar2;\n      gpCmdBlk[9] = (char)(uVar2 >> 8);\n      if ((uint)ttype < 0x100) {\n        pcVar5 = "get performance";\n        gpCmdBlk[10] = (uint8_t)ttype;\n        gpCmdBlk[8] = (char)uVar2;\n        gpCmdBlk[9] = (char)(uVar2 >> 8);\n        gpCmdBlk[0xb] = '\0';\n        if (verbose == 0) {\n          vp = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }\n        if (vp == (sg_pt_base *)0x0) {\n          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }\n        else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }\n      }\n      else {\n        iVar3 = -1;\n        pr2ws("Bad type: 0x%x\n",ttype);\n      }\n    }\n    else {\n      iVar3 = -1;\n      pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc);\n    }\n  }\n  else {\n    iVar3 = -1;\n    pr2ws("Bad data_type value: %d\n",data_type);\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar3;\n}" primitive_type (function_declarator "sg_ll_get_performance\n              (int sg_fd,int data_type,uint starting_lba,int max_num_desc,int ttype,void *resp,\n              int mx_resp_len,_Bool noisy,int verbose)" identifier (parameter_list "(int sg_fd,int data_type,uint starting_lba,int max_num_desc,int ttype,void *resp,\n              int mx_resp_len,_Bool noisy,int verbose)" ( (parameter_declaration "int sg_fd" primitive_type identifier) , (parameter_declaration "int data_type" primitive_type identifier) , (parameter_declaration "uint starting_lba" type_identifier identifier) , (parameter_declaration "int max_num_desc" primitive_type identifier) , (parameter_declaration "int ttype" primitive_type identifier) , (parameter_declaration "void *resp" primitive_type (pointer_declarator "*resp" * identifier)) , (parameter_declaration "int mx_resp_len" primitive_type identifier) , (parameter_declaration "_Bool noisy" type_identifier identifier) , (parameter_declaration "int verbose" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ushort uVar2;\n  sg_pt_base *vp;\n  int iVar3;\n  uint uVar4;\n  char *pcVar5;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  int sense_cat;\n  uint8_t gpCmdBlk [12];\n  uint8_t sense_b [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  gpCmdBlk[1] = '\0';\n  gpCmdBlk[2] = '\0';\n  gpCmdBlk[3] = '\0';\n  gpCmdBlk[4] = '\0';\n  gpCmdBlk[5] = '\0';\n  gpCmdBlk[6] = '\0';\n  gpCmdBlk[7] = '\0';\n  gpCmdBlk[8] = '\0';\n  gpCmdBlk[9] = '\0';\n  gpCmdBlk[10] = '\0';\n  gpCmdBlk[0xb] = '\0';\n  gpCmdBlk[0] = 0xac;\n  if ((uint)data_type < 0x20) {\n    gpCmdBlk[1] = (uint8_t)data_type;\n    uVar2 = (ushort)(starting_lba >> 8);\n    gpCmdBlk._2_2_ = (ushort)(byte)(starting_lba >> 0x18) | uVar2 & 0xff00;\n    gpCmdBlk._4_2_ = uVar2 & 0xff | (ushort)((starting_lba << 0x18) >> 0x10);\n    if ((uint)max_num_desc < 0x10000) {\n      uVar2 = (ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8;\n      gpCmdBlk[10] = '\0';\n      gpCmdBlk[0xb] = '\0';\n      gpCmdBlk[8] = (char)uVar2;\n      gpCmdBlk[9] = (char)(uVar2 >> 8);\n      if ((uint)ttype < 0x100) {\n        pcVar5 = "get performance";\n        gpCmdBlk[10] = (uint8_t)ttype;\n        gpCmdBlk[8] = (char)uVar2;\n        gpCmdBlk[9] = (char)(uVar2 >> 8);\n        gpCmdBlk[0xb] = '\0';\n        if (verbose == 0) {\n          vp = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }\n        if (vp == (sg_pt_base *)0x0) {\n          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }\n        else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }\n      }\n      else {\n        iVar3 = -1;\n        pr2ws("Bad type: 0x%x\n",ttype);\n      }\n    }\n    else {\n      iVar3 = -1;\n      pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc);\n    }\n  }\n  else {\n    iVar3 = -1;\n    pr2ws("Bad data_type value: %d\n",data_type);\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "sg_pt_base *vp;" type_identifier (pointer_declarator "*vp" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int sense_cat;" primitive_type identifier ;) (declaration "uint8_t gpCmdBlk [12];" primitive_type (array_declarator "gpCmdBlk [12]" 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 "gpCmdBlk[1] = '\0';" (assignment_expression "gpCmdBlk[1] = '\0'" (subscript_expression "gpCmdBlk[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[2] = '\0';" (assignment_expression "gpCmdBlk[2] = '\0'" (subscript_expression "gpCmdBlk[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[3] = '\0';" (assignment_expression "gpCmdBlk[3] = '\0'" (subscript_expression "gpCmdBlk[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[4] = '\0';" (assignment_expression "gpCmdBlk[4] = '\0'" (subscript_expression "gpCmdBlk[4]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[5] = '\0';" (assignment_expression "gpCmdBlk[5] = '\0'" (subscript_expression "gpCmdBlk[5]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[6] = '\0';" (assignment_expression "gpCmdBlk[6] = '\0'" (subscript_expression "gpCmdBlk[6]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[7] = '\0';" (assignment_expression "gpCmdBlk[7] = '\0'" (subscript_expression "gpCmdBlk[7]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[8] = '\0';" (assignment_expression "gpCmdBlk[8] = '\0'" (subscript_expression "gpCmdBlk[8]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[9] = '\0';" (assignment_expression "gpCmdBlk[9] = '\0'" (subscript_expression "gpCmdBlk[9]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[10] = '\0';" (assignment_expression "gpCmdBlk[10] = '\0'" (subscript_expression "gpCmdBlk[10]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[0xb] = '\0';" (assignment_expression "gpCmdBlk[0xb] = '\0'" (subscript_expression "gpCmdBlk[0xb]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[0] = 0xac;" (assignment_expression "gpCmdBlk[0] = 0xac" (subscript_expression "gpCmdBlk[0]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if ((uint)data_type < 0x20) {\n    gpCmdBlk[1] = (uint8_t)data_type;\n    uVar2 = (ushort)(starting_lba >> 8);\n    gpCmdBlk._2_2_ = (ushort)(byte)(starting_lba >> 0x18) | uVar2 & 0xff00;\n    gpCmdBlk._4_2_ = uVar2 & 0xff | (ushort)((starting_lba << 0x18) >> 0x10);\n    if ((uint)max_num_desc < 0x10000) {\n      uVar2 = (ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8;\n      gpCmdBlk[10] = '\0';\n      gpCmdBlk[0xb] = '\0';\n      gpCmdBlk[8] = (char)uVar2;\n      gpCmdBlk[9] = (char)(uVar2 >> 8);\n      if ((uint)ttype < 0x100) {\n        pcVar5 = "get performance";\n        gpCmdBlk[10] = (uint8_t)ttype;\n        gpCmdBlk[8] = (char)uVar2;\n        gpCmdBlk[9] = (char)(uVar2 >> 8);\n        gpCmdBlk[0xb] = '\0';\n        if (verbose == 0) {\n          vp = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }\n        if (vp == (sg_pt_base *)0x0) {\n          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }\n        else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }\n      }\n      else {\n        iVar3 = -1;\n        pr2ws("Bad type: 0x%x\n",ttype);\n      }\n    }\n    else {\n      iVar3 = -1;\n      pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc);\n    }\n  }\n  else {\n    iVar3 = -1;\n    pr2ws("Bad data_type value: %d\n",data_type);\n  }" if (parenthesized_expression "((uint)data_type < 0x20)" ( (binary_expression "(uint)data_type < 0x20" (cast_expression "(uint)data_type" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) )) (compound_statement "{\n    gpCmdBlk[1] = (uint8_t)data_type;\n    uVar2 = (ushort)(starting_lba >> 8);\n    gpCmdBlk._2_2_ = (ushort)(byte)(starting_lba >> 0x18) | uVar2 & 0xff00;\n    gpCmdBlk._4_2_ = uVar2 & 0xff | (ushort)((starting_lba << 0x18) >> 0x10);\n    if ((uint)max_num_desc < 0x10000) {\n      uVar2 = (ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8;\n      gpCmdBlk[10] = '\0';\n      gpCmdBlk[0xb] = '\0';\n      gpCmdBlk[8] = (char)uVar2;\n      gpCmdBlk[9] = (char)(uVar2 >> 8);\n      if ((uint)ttype < 0x100) {\n        pcVar5 = "get performance";\n        gpCmdBlk[10] = (uint8_t)ttype;\n        gpCmdBlk[8] = (char)uVar2;\n        gpCmdBlk[9] = (char)(uVar2 >> 8);\n        gpCmdBlk[0xb] = '\0';\n        if (verbose == 0) {\n          vp = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }\n        if (vp == (sg_pt_base *)0x0) {\n          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }\n        else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }\n      }\n      else {\n        iVar3 = -1;\n        pr2ws("Bad type: 0x%x\n",ttype);\n      }\n    }\n    else {\n      iVar3 = -1;\n      pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc);\n    }\n  }" { (expression_statement "gpCmdBlk[1] = (uint8_t)data_type;" (assignment_expression "gpCmdBlk[1] = (uint8_t)data_type" (subscript_expression "gpCmdBlk[1]" identifier [ number_literal ]) = (cast_expression "(uint8_t)data_type" ( (type_descriptor "uint8_t" primitive_type) ) identifier)) ;) (expression_statement "uVar2 = (ushort)(starting_lba >> 8);" (assignment_expression "uVar2 = (ushort)(starting_lba >> 8)" identifier = (call_expression "(ushort)(starting_lba >> 8)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(starting_lba >> 8)" ( (binary_expression "starting_lba >> 8" identifier >> number_literal) )))) ;) (expression_statement "gpCmdBlk._2_2_ = (ushort)(byte)(starting_lba >> 0x18) | uVar2 & 0xff00;" (assignment_expression "gpCmdBlk._2_2_ = (ushort)(byte)(starting_lba >> 0x18) | uVar2 & 0xff00" (field_expression "gpCmdBlk._2_2_" identifier . field_identifier) = (binary_expression "(ushort)(byte)(starting_lba >> 0x18) | uVar2 & 0xff00" (call_expression "(ushort)(byte)(starting_lba >> 0x18)" (call_expression "(ushort)(byte)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "(starting_lba >> 0x18)" ( (binary_expression "starting_lba >> 0x18" identifier >> number_literal) ))) | (binary_expression "uVar2 & 0xff00" identifier & number_literal))) ;) (expression_statement "gpCmdBlk._4_2_ = uVar2 & 0xff | (ushort)((starting_lba << 0x18) >> 0x10);" (assignment_expression "gpCmdBlk._4_2_ = uVar2 & 0xff | (ushort)((starting_lba << 0x18) >> 0x10)" (field_expression "gpCmdBlk._4_2_" identifier . field_identifier) = (binary_expression "uVar2 & 0xff | (ushort)((starting_lba << 0x18) >> 0x10)" (binary_expression "uVar2 & 0xff" identifier & number_literal) | (call_expression "(ushort)((starting_lba << 0x18) >> 0x10)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((starting_lba << 0x18) >> 0x10)" ( (binary_expression "(starting_lba << 0x18) >> 0x10" (parenthesized_expression "(starting_lba << 0x18)" ( (binary_expression "starting_lba << 0x18" identifier << number_literal) )) >> number_literal) ))))) ;) (if_statement "if ((uint)max_num_desc < 0x10000) {\n      uVar2 = (ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8;\n      gpCmdBlk[10] = '\0';\n      gpCmdBlk[0xb] = '\0';\n      gpCmdBlk[8] = (char)uVar2;\n      gpCmdBlk[9] = (char)(uVar2 >> 8);\n      if ((uint)ttype < 0x100) {\n        pcVar5 = "get performance";\n        gpCmdBlk[10] = (uint8_t)ttype;\n        gpCmdBlk[8] = (char)uVar2;\n        gpCmdBlk[9] = (char)(uVar2 >> 8);\n        gpCmdBlk[0xb] = '\0';\n        if (verbose == 0) {\n          vp = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }\n        if (vp == (sg_pt_base *)0x0) {\n          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }\n        else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }\n      }\n      else {\n        iVar3 = -1;\n        pr2ws("Bad type: 0x%x\n",ttype);\n      }\n    }\n    else {\n      iVar3 = -1;\n      pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc);\n    }" if (parenthesized_expression "((uint)max_num_desc < 0x10000)" ( (binary_expression "(uint)max_num_desc < 0x10000" (cast_expression "(uint)max_num_desc" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) )) (compound_statement "{\n      uVar2 = (ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8;\n      gpCmdBlk[10] = '\0';\n      gpCmdBlk[0xb] = '\0';\n      gpCmdBlk[8] = (char)uVar2;\n      gpCmdBlk[9] = (char)(uVar2 >> 8);\n      if ((uint)ttype < 0x100) {\n        pcVar5 = "get performance";\n        gpCmdBlk[10] = (uint8_t)ttype;\n        gpCmdBlk[8] = (char)uVar2;\n        gpCmdBlk[9] = (char)(uVar2 >> 8);\n        gpCmdBlk[0xb] = '\0';\n        if (verbose == 0) {\n          vp = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }\n        if (vp == (sg_pt_base *)0x0) {\n          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }\n        else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }\n      }\n      else {\n        iVar3 = -1;\n        pr2ws("Bad type: 0x%x\n",ttype);\n      }\n    }" { (expression_statement "uVar2 = (ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8;" (assignment_expression "uVar2 = (ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8" identifier = (binary_expression "(ushort)max_num_desc << 8 | (ushort)max_num_desc >> 8" (binary_expression "(ushort)max_num_desc << 8" (cast_expression "(ushort)max_num_desc" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)max_num_desc >> 8" (cast_expression "(ushort)max_num_desc" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal))) ;) (expression_statement "gpCmdBlk[10] = '\0';" (assignment_expression "gpCmdBlk[10] = '\0'" (subscript_expression "gpCmdBlk[10]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[0xb] = '\0';" (assignment_expression "gpCmdBlk[0xb] = '\0'" (subscript_expression "gpCmdBlk[0xb]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "gpCmdBlk[8] = (char)uVar2;" (assignment_expression "gpCmdBlk[8] = (char)uVar2" (subscript_expression "gpCmdBlk[8]" identifier [ number_literal ]) = (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "gpCmdBlk[9] = (char)(uVar2 >> 8);" (assignment_expression "gpCmdBlk[9] = (char)(uVar2 >> 8)" (subscript_expression "gpCmdBlk[9]" identifier [ number_literal ]) = (cast_expression "(char)(uVar2 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 8)" ( (binary_expression "uVar2 >> 8" identifier >> number_literal) )))) ;) (if_statement "if ((uint)ttype < 0x100) {\n        pcVar5 = "get performance";\n        gpCmdBlk[10] = (uint8_t)ttype;\n        gpCmdBlk[8] = (char)uVar2;\n        gpCmdBlk[9] = (char)(uVar2 >> 8);\n        gpCmdBlk[0xb] = '\0';\n        if (verbose == 0) {\n          vp = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }\n        if (vp == (sg_pt_base *)0x0) {\n          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }\n        else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }\n      }\n      else {\n        iVar3 = -1;\n        pr2ws("Bad type: 0x%x\n",ttype);\n      }" if (parenthesized_expression "((uint)ttype < 0x100)" ( (binary_expression "(uint)ttype < 0x100" (cast_expression "(uint)ttype" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) )) (compound_statement "{\n        pcVar5 = "get performance";\n        gpCmdBlk[10] = (uint8_t)ttype;\n        gpCmdBlk[8] = (char)uVar2;\n        gpCmdBlk[9] = (char)(uVar2 >> 8);\n        gpCmdBlk[0xb] = '\0';\n        if (verbose == 0) {\n          vp = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }\n        if (vp == (sg_pt_base *)0x0) {\n          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }\n        else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }\n      }" { (expression_statement "pcVar5 = "get performance";" (assignment_expression "pcVar5 = "get performance"" identifier = (string_literal ""get performance"" " string_content ")) ;) (expression_statement "gpCmdBlk[10] = (uint8_t)ttype;" (assignment_expression "gpCmdBlk[10] = (uint8_t)ttype" (subscript_expression "gpCmdBlk[10]" identifier [ number_literal ]) = (cast_expression "(uint8_t)ttype" ( (type_descriptor "uint8_t" primitive_type) ) identifier)) ;) (expression_statement "gpCmdBlk[8] = (char)uVar2;" (assignment_expression "gpCmdBlk[8] = (char)uVar2" (subscript_expression "gpCmdBlk[8]" identifier [ number_literal ]) = (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "gpCmdBlk[9] = (char)(uVar2 >> 8);" (assignment_expression "gpCmdBlk[9] = (char)(uVar2 >> 8)" (subscript_expression "gpCmdBlk[9]" identifier [ number_literal ]) = (cast_expression "(char)(uVar2 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 8)" ( (binary_expression "uVar2 >> 8" identifier >> number_literal) )))) ;) (expression_statement "gpCmdBlk[0xb] = '\0';" (assignment_expression "gpCmdBlk[0xb] = '\0'" (subscript_expression "gpCmdBlk[0xb]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (verbose == 0) {\n          vp = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\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: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }" else (compound_statement "{\n          pr2ws("    %s cdb: ","get performance");\n          pbVar6 = gpCmdBlk;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);\n          pr2ws("\n",uVar4);\n          vp = construct_scsi_pt_obj();\n        }" { (expression_statement "pr2ws("    %s cdb: ","get performance");" (call_expression "pr2ws("    %s cdb: ","get performance")" identifier (argument_list "("    %s cdb: ","get performance")" ( (string_literal ""    %s cdb: "" " string_content ") , (string_literal ""get performance"" " string_content ") ))) ;) (expression_statement "pbVar6 = gpCmdBlk;" (assignment_expression "pbVar6 = gpCmdBlk" identifier = identifier) ;) (do_statement "do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          } while (pbVar6 != sense_b);" do (compound_statement "{\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws("%02x ",uVar4);\n          }" { (expression_statement "uVar4 = (uint)*pbVar6;" (assignment_expression "uVar4 = (uint)*pbVar6" identifier = (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws("%02x ",uVar4);" (call_expression "pr2ws("%02x ",uVar4)" identifier (argument_list "("%02x ",uVar4)" ( (string_literal ""%02x "" " string_content ") , identifier ))) ;) }) while (parenthesized_expression "(pbVar6 != sense_b)" ( (binary_expression "pbVar6 != sense_b" identifier != identifier) )) ;) (expression_statement "pr2ws("\n",uVar4);" (call_expression "pr2ws("\n",uVar4)" identifier (argument_list "("\n",uVar4)" ( (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          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }\n        else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\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          iVar3 = -1;\n          pr2ws("%s: out of memory\n","get performance");\n        }" { (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (expression_statement "pr2ws("%s: out of memory\n","get performance");" (call_expression "pr2ws("%s: out of memory\n","get performance")" identifier (argument_list "("%s: out of memory\n","get performance")" ( (string_literal ""%s: out of memory\n"" " string_content escape_sequence ") , (string_literal ""get performance"" " string_content ") ))) ;) }) (else_clause "else {\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }" else (compound_statement "{\n          set_scsi_pt_cdb(vp,gpCmdBlk,0xc);\n          set_scsi_pt_sense(vp,sense_b,0x40);\n          set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len);\n          iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n          uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );\n          if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(vp);\n        }" { (expression_statement "set_scsi_pt_cdb(vp,gpCmdBlk,0xc);" (call_expression "set_scsi_pt_cdb(vp,gpCmdBlk,0xc)" identifier (argument_list "(vp,gpCmdBlk,0xc)" ( 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,mx_resp_len);" (call_expression "set_scsi_pt_data_in(vp,(uint8_t *)resp,mx_resp_len)" identifier (argument_list "(vp,(uint8_t *)resp,mx_resp_len)" ( identifier , (cast_expression "(uint8_t *)resp" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "iVar3 = do_scsi_pt(vp,sg_fd,0x3c,verbose);" (assignment_expression "iVar3 = 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 "uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            );" (assignment_expression "uVar4 = sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            )" identifier = (call_expression "sg_cmds_process_resp\n                            (vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            )" identifier (argument_list "(vp,"get performance",iVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat\n                            )" ( identifier , (string_literal ""get performance"" " string_content ") , identifier , identifier , identifier , identifier , identifier , (pointer_expression "&sense_cat" & identifier) )))) ;) (if_statement "if (uVar4 == 0xffffffff) {\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }" if (parenthesized_expression "(uVar4 == 0xffffffff)" ( (binary_expression "uVar4 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n            iVar3 = get_scsi_pt_os_err();\n            iVar3 = sg_convert_errno(iVar3);\n          }" { (expression_statement "iVar3 = get_scsi_pt_os_err();" (assignment_expression "iVar3 = get_scsi_pt_os_err()" identifier = (call_expression "get_scsi_pt_os_err()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = sg_convert_errno(iVar3);" (assignment_expression "iVar3 = sg_convert_errno(iVar3)" identifier = (call_expression "sg_convert_errno(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) }) (else_clause "else if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }" else (if_statement "if (uVar4 == 0xfffffffe) {\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }\n          else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }" if (parenthesized_expression "(uVar4 == 0xfffffffe)" ( (binary_expression "uVar4 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n            if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }\n          }" { (if_statement "if ((uint)sense_cat < 0x16) {\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }\n            else {\n              iVar3 = -1;\n            }" if (parenthesized_expression "((uint)sense_cat < 0x16)" ( (binary_expression "(uint)sense_cat < 0x16" (cast_expression "(uint)sense_cat" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) )) (compound_statement "{\n              uVar4 = 1 << ((byte)sense_cat & 0x1f);\n              iVar3 = sense_cat;\n              if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }\n            }" { (expression_statement "uVar4 = 1 << ((byte)sense_cat & 0x1f);" (assignment_expression "uVar4 = 1 << ((byte)sense_cat & 0x1f)" identifier = (binary_expression "1 << ((byte)sense_cat & 0x1f)" number_literal << (parenthesized_expression "((byte)sense_cat & 0x1f)" ( (binary_expression "(byte)sense_cat & 0x1f" (cast_expression "(byte)sense_cat" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (expression_statement "iVar3 = sense_cat;" (assignment_expression "iVar3 = sense_cat" identifier = identifier) ;) (if_statement "if ((uVar4 & 0xa60) == 0) {\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }" if (parenthesized_expression "((uVar4 & 0xa60) == 0)" ( (binary_expression "(uVar4 & 0xa60) == 0" (parenthesized_expression "(uVar4 & 0xa60)" ( (binary_expression "uVar4 & 0xa60" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n                iVar3 = -(uint)((uVar4 & 0x300000) == 0);\n              }" { (expression_statement "iVar3 = -(uint)((uVar4 & 0x300000) == 0);" (assignment_expression "iVar3 = -(uint)((uVar4 & 0x300000) == 0)" identifier = (unary_expression "-(uint)((uVar4 & 0x300000) == 0)" - (call_expression "(uint)((uVar4 & 0x300000) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((uVar4 & 0x300000) == 0)" ( (binary_expression "(uVar4 & 0x300000) == 0" (parenthesized_expression "(uVar4 & 0x300000)" ( (binary_expression "uVar4 & 0x300000" identifier & number_literal) )) == number_literal) ))))) ;) })) }) (else_clause "else {\n              iVar3 = -1;\n            }" else (compound_statement "{\n              iVar3 = -1;\n            }" { (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) }))) }) (else_clause "else if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }" else (if_statement "if ((verbose < 3) || ((int)uVar4 < 4)) {\n            iVar3 = 0;\n          }\n          else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }" if (parenthesized_expression "((verbose < 3) || ((int)uVar4 < 4))" ( (binary_expression "(verbose < 3) || ((int)uVar4 < 4)" (parenthesized_expression "(verbose < 3)" ( (binary_expression "verbose < 3" identifier < number_literal) )) || (parenthesized_expression "((int)uVar4 < 4)" ( (binary_expression "(int)uVar4 < 4" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) ))) )) (compound_statement "{\n            iVar3 = 0;\n          }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }" else (compound_statement "{\n                    /* WARNING: Load size is inaccurate */\n            uVar7 = *resp;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("    %s: response","get performance");\n            if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }\n          }" { comment (expression_statement "uVar7 = *resp;" (assignment_expression "uVar7 = *resp" identifier = (pointer_expression "*resp" * identifier)) ;) (expression_statement "uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;" (assignment_expression "uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18" identifier = (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18" (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8" (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8" (binary_expression "uVar7 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar7 & 0xff0000) >> 8" (parenthesized_expression "(uVar7 & 0xff0000)" ( (binary_expression "uVar7 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar7 & 0xff00) << 8" (parenthesized_expression "(uVar7 & 0xff00)" ( (binary_expression "uVar7 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar7 << 0x18" identifier << number_literal))) ;) (if_statement "if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }" if (parenthesized_expression "((int)uVar7 < 0)" ( (binary_expression "(int)uVar7 < 0" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n              uVar7 = 0;\n            }" { (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) })) (if_statement "if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }" if (parenthesized_expression "((int)uVar4 <= (int)uVar7)" ( (binary_expression "(int)uVar4 <= (int)uVar7" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n              uVar7 = uVar4;\n            }" { (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" identifier = identifier) ;) })) (expression_statement "pr2ws("    %s: response","get performance");" (call_expression "pr2ws("    %s: response","get performance")" identifier (argument_list "("    %s: response","get performance")" ( (string_literal ""    %s: response"" " string_content ") , (string_literal ""get performance"" " string_content ") ))) ;) (if_statement "if (verbose == 3) {\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }\n            else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }" if (parenthesized_expression "(verbose == 3)" ( (binary_expression "verbose == 3" identifier == number_literal) )) (compound_statement "{\n              pcVar5 = ", first 256 bytes";\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }\n              pr2ws("%s:\n",pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr((uint8_t *)resp,uVar7,-1);\n              iVar3 = 0;\n            }" { (expression_statement "pcVar5 = ", first 256 bytes";" (assignment_expression "pcVar5 = ", first 256 bytes"" identifier = (string_literal "", first 256 bytes"" " string_content ")) ;) (if_statement "if ((int)uVar7 < 0x101) {\n                pcVar5 = "";\n              }" if (parenthesized_expression "((int)uVar7 < 0x101)" ( (binary_expression "(int)uVar7 < 0x101" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n                pcVar5 = "";\n              }" { (expression_statement "pcVar5 = "";" (assignment_expression "pcVar5 = """ identifier = (string_literal """" " ")) ;) })) (expression_statement "pr2ws("%s:\n",pcVar5);" (call_expression "pr2ws("%s:\n",pcVar5)" identifier (argument_list "("%s:\n",pcVar5)" ( (string_literal ""%s:\n"" " string_content escape_sequence ") , identifier ))) ;) (if_statement "if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }" if (parenthesized_expression "(0x100 < (int)uVar7)" ( (binary_expression "0x100 < (int)uVar7" number_literal < (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n                uVar7 = 0x100;\n              }" { (expression_statement "uVar7 = 0x100;" (assignment_expression "uVar7 = 0x100" identifier = number_literal) ;) })) (expression_statement "hex2stderr((uint8_t *)resp,uVar7,-1);" (call_expression "hex2stderr((uint8_t *)resp,uVar7,-1)" identifier (argument_list "((uint8_t *)resp,uVar7,-1)" ( (cast_expression "(uint8_t *)resp" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , number_literal ))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }" else (compound_statement "{\n              pr2ws(":\n",pcVar5);\n              hex2stderr((uint8_t *)resp,uVar7,0);\n              iVar3 = 0;\n            }" { (expression_statement "pr2ws(":\n",pcVar5);" (call_expression "pr2ws(":\n",pcVar5)" identifier (argument_list "(":\n",pcVar5)" ( (string_literal "":\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "hex2stderr((uint8_t *)resp,uVar7,0);" (call_expression "hex2stderr((uint8_t *)resp,uVar7,0)" identifier (argument_list "((uint8_t *)resp,uVar7,0)" ( (cast_expression "(uint8_t *)resp" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , number_literal ))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }))) }))))))) (expression_statement "destruct_scsi_pt_obj(vp);" (call_expression "destruct_scsi_pt_obj(vp)" identifier (argument_list "(vp)" ( identifier ))) ;) }))) }) (else_clause "else {\n        iVar3 = -1;\n        pr2ws("Bad type: 0x%x\n",ttype);\n      }" else (compound_statement "{\n        iVar3 = -1;\n        pr2ws("Bad type: 0x%x\n",ttype);\n      }" { (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (expression_statement "pr2ws("Bad type: 0x%x\n",ttype);" (call_expression "pr2ws("Bad type: 0x%x\n",ttype)" identifier (argument_list "("Bad type: 0x%x\n",ttype)" ( (string_literal ""Bad type: 0x%x\n"" " string_content escape_sequence ") , identifier ))) ;) }))) }) (else_clause "else {\n      iVar3 = -1;\n      pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc);\n    }" else (compound_statement "{\n      iVar3 = -1;\n      pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc);\n    }" { (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (expression_statement "pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc);" (call_expression "pr2ws("Bad max_num_desc: 0x%x\n",max_num_desc)" identifier (argument_list "("Bad max_num_desc: 0x%x\n",max_num_desc)" ( (string_literal ""Bad max_num_desc: 0x%x\n"" " string_content escape_sequence ") , identifier ))) ;) }))) }) (else_clause "else {\n    iVar3 = -1;\n    pr2ws("Bad data_type value: %d\n",data_type);\n  }" else (compound_statement "{\n    iVar3 = -1;\n    pr2ws("Bad data_type value: %d\n",data_type);\n  }" { (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (expression_statement "pr2ws("Bad data_type value: %d\n",data_type);" (call_expression "pr2ws("Bad data_type value: %d\n",data_type)" identifier (argument_list "("Bad data_type value: %d\n",data_type)" ( (string_literal ""Bad data_type value: %d\n"" " string_content escape_sequence ") , identifier ))) ;) }))) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "uint sg_ll_get_performance\n               (uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)\n\n{\n  ushort uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  char *pcVar5;\n  int unaff_EBX;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar8;\n  uint local_74;\n  byte local_70 [2];\n  ushort uStack_6e;\n  ushort local_6c;\n  undefined2 uStack_6a;\n  undefined4 local_68;\n  byte local_64 [64];\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x29b19;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  local_70[1] = 0;\n  uStack_6e = 0;\n  local_6c = 0;\n  uStack_6a = 0;\n  local_68 = 0;\n  local_70[0] = 0xac;\n  if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002f100();\n  }\n  return uVar4;\n}\n\n" (function_definition "uint sg_ll_get_performance\n               (uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)\n\n{\n  ushort uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  char *pcVar5;\n  int unaff_EBX;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar8;\n  uint local_74;\n  byte local_70 [2];\n  ushort uStack_6e;\n  ushort local_6c;\n  undefined2 uStack_6a;\n  undefined4 local_68;\n  byte local_64 [64];\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x29b19;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  local_70[1] = 0;\n  uStack_6e = 0;\n  local_6c = 0;\n  uStack_6a = 0;\n  local_68 = 0;\n  local_70[0] = 0xac;\n  if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002f100();\n  }\n  return uVar4;\n}" type_identifier (function_declarator "sg_ll_get_performance\n               (uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)" identifier (parameter_list "(uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "uint *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "undefined4 param_6" type_identifier identifier) , (parameter_declaration "undefined1 param_7" type_identifier identifier) , (parameter_declaration "int param_8" primitive_type identifier) ))) (compound_statement "{\n  ushort uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  char *pcVar5;\n  int unaff_EBX;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar8;\n  uint local_74;\n  byte local_70 [2];\n  ushort uStack_6e;\n  ushort local_6c;\n  undefined2 uStack_6a;\n  undefined4 local_68;\n  byte local_64 [64];\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x29b19;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  local_70[1] = 0;\n  uStack_6e = 0;\n  local_6c = 0;\n  uStack_6a = 0;\n  local_68 = 0;\n  local_70[0] = 0xac;\n  if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002f100();\n  }\n  return uVar4;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 unaff_retaddr;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "uint local_74;" type_identifier identifier ;) (declaration "byte local_70 [2];" type_identifier (array_declarator "local_70 [2]" identifier [ number_literal ]) ;) (declaration "ushort uStack_6e;" type_identifier identifier ;) (declaration "ushort local_6c;" type_identifier identifier ;) (declaration "undefined2 uStack_6a;" type_identifier identifier ;) (declaration "undefined4 local_68;" type_identifier identifier ;) (declaration "byte local_64 [64];" type_identifier (array_declarator "local_64 [64]" identifier [ number_literal ]) ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x29b19;" (assignment_expression "uStack_14 = 0x29b19" 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 "local_70[1] = 0;" (assignment_expression "local_70[1] = 0" (subscript_expression "local_70[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uStack_6e = 0;" (assignment_expression "uStack_6e = 0" identifier = number_literal) ;) (expression_statement "local_6c = 0;" (assignment_expression "local_6c = 0" identifier = number_literal) ;) (expression_statement "uStack_6a = 0;" (assignment_expression "uStack_6a = 0" identifier = number_literal) ;) (expression_statement "local_68 = 0;" (assignment_expression "local_68 = 0" identifier = number_literal) ;) (expression_statement "local_70[0] = 0xac;" (assignment_expression "local_70[0] = 0xac" (subscript_expression "local_70[0]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }" if (parenthesized_expression "(param_1 < 0x20)" ( (binary_expression "param_1 < 0x20" identifier < number_literal) )) (compound_statement "{\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }" { (expression_statement "local_70[1] = (byte)param_1;" (assignment_expression "local_70[1] = (byte)param_1" (subscript_expression "local_70[1]" identifier [ number_literal ]) = (cast_expression "(byte)param_1" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "uVar1 = (ushort)((uint)param_2 >> 8);" (assignment_expression "uVar1 = (ushort)((uint)param_2 >> 8)" identifier = (call_expression "(ushort)((uint)param_2 >> 8)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((uint)param_2 >> 8)" ( (binary_expression "(uint)param_2 >> 8" (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;" (assignment_expression "uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00" identifier = (binary_expression "(ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00" (call_expression "(ushort)(byte)((uint)param_2 >> 0x18)" (call_expression "(ushort)(byte)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "((uint)param_2 >> 0x18)" ( (binary_expression "(uint)param_2 >> 0x18" (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) | (binary_expression "uVar1 & 0xff00" identifier & number_literal))) ;) (expression_statement "local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);" (assignment_expression "local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10)" identifier = (binary_expression "uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10)" (binary_expression "uVar1 & 0xff" identifier & number_literal) | (call_expression "(ushort)((uint)(param_2 << 0x18) >> 0x10)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((uint)(param_2 << 0x18) >> 0x10)" ( (binary_expression "(uint)(param_2 << 0x18) >> 0x10" (call_expression "(uint)(param_2 << 0x18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_2 << 0x18)" ( (binary_expression "param_2 << 0x18" identifier << number_literal) ))) >> number_literal) ))))) ;) (if_statement "if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }" if (parenthesized_expression "(param_3 < 0x10000)" ( (binary_expression "param_3 < 0x10000" identifier < number_literal) )) (compound_statement "{\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }" { (expression_statement "uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;" (assignment_expression "uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8" identifier = (binary_expression "(ushort)param_3 << 8 | (ushort)param_3 >> 8" (binary_expression "(ushort)param_3 << 8" (cast_expression "(ushort)param_3" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)param_3 >> 8" (cast_expression "(ushort)param_3" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal))) ;) (expression_statement "local_68 = (uint)uVar1;" (assignment_expression "local_68 = (uint)uVar1" identifier = (cast_expression "(uint)uVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }" if (parenthesized_expression "(param_4 < 0x100)" ( (binary_expression "param_4 < 0x100" identifier < number_literal) )) (compound_statement "{\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }" { (expression_statement "iVar8 = unaff_EBX + 0x133ad;" (assignment_expression "iVar8 = unaff_EBX + 0x133ad" identifier = (binary_expression "unaff_EBX + 0x133ad" identifier + number_literal)) ;) (expression_statement "local_68 = (uint)CONCAT12((char)param_4,uVar1);" (assignment_expression "local_68 = (uint)CONCAT12((char)param_4,uVar1)" identifier = (cast_expression "(uint)CONCAT12((char)param_4,uVar1)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT12((char)param_4,uVar1)" identifier (argument_list "((char)param_4,uVar1)" ( (cast_expression "(char)param_4" ( (type_descriptor "char" primitive_type) ) identifier) , identifier ))))) ;) (if_statement "if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }" if (parenthesized_expression "(param_8 == 0)" ( (binary_expression "param_8 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar2 = construct_scsi_pt_obj();\n        }" { (expression_statement "iVar2 = construct_scsi_pt_obj();" (assignment_expression "iVar2 = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }" else (compound_statement "{\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }" { (expression_statement "pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);" (call_expression "pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8)" identifier (argument_list "("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8)" ( (binary_expression ""sg_ll_sync_cache_10" + unaff_EBX + 0xe" (binary_expression ""sg_ll_sync_cache_10" + unaff_EBX" (string_literal ""sg_ll_sync_cache_10"" " string_content ") + identifier) + number_literal) , identifier ))) ;) (expression_statement "pbVar6 = local_70;" (assignment_expression "pbVar6 = local_70" identifier = identifier) ;) (do_statement "do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);" do (compound_statement "{\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          }" { (expression_statement "uVar4 = (uint)*pbVar6;" (assignment_expression "uVar4 = (uint)*pbVar6" identifier = (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws(unaff_EBX + 0x13a0a,uVar4);" (call_expression "pr2ws(unaff_EBX + 0x13a0a,uVar4)" identifier (argument_list "(unaff_EBX + 0x13a0a,uVar4)" ( (binary_expression "unaff_EBX + 0x13a0a" identifier + number_literal) , identifier ))) ;) }) while (parenthesized_expression "(pbVar6 != local_64)" ( (binary_expression "pbVar6 != local_64" identifier != identifier) )) ;) (expression_statement "pr2ws(unaff_EBX + 0x6bc7,uVar4);" (call_expression "pr2ws(unaff_EBX + 0x6bc7,uVar4)" identifier (argument_list "(unaff_EBX + 0x6bc7,uVar4)" ( (binary_expression "unaff_EBX + 0x6bc7" identifier + number_literal) , identifier ))) ;) (expression_statement "iVar2 = construct_scsi_pt_obj();" (assignment_expression "iVar2 = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);" (call_expression "pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8)" identifier (argument_list "("sg_ll_mode_sense10" + unaff_EBX,iVar8)" ( (binary_expression ""sg_ll_mode_sense10" + unaff_EBX" (string_literal ""sg_ll_mode_sense10"" " string_content ") + identifier) , identifier ))) ;) }) (else_clause "else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }" else (compound_statement "{\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }" { (expression_statement "set_scsi_pt_cdb(iVar2,local_70,0xc);" (call_expression "set_scsi_pt_cdb(iVar2,local_70,0xc)" identifier (argument_list "(iVar2,local_70,0xc)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(iVar2,local_64,0x40);" (call_expression "set_scsi_pt_sense(iVar2,local_64,0x40)" identifier (argument_list "(iVar2,local_64,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_in(iVar2,param_5,param_6);" (call_expression "set_scsi_pt_data_in(iVar2,param_5,param_6)" identifier (argument_list "(iVar2,param_5,param_6)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);" (assignment_expression "uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8)" identifier = (call_expression "do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8)" identifier (argument_list "(iVar2,unaff_retaddr,0x3c,param_8)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;" (assignment_expression "uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)" identifier = (call_expression "sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)" identifier (argument_list "(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , (pointer_expression "&local_74" & identifier) )))) ;) (if_statement "if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" if (parenthesized_expression "(uVar4 == 0xffffffff)" ( (binary_expression "uVar4 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }" { (expression_statement "uVar3 = get_scsi_pt_os_err(iVar2);" (assignment_expression "uVar3 = get_scsi_pt_os_err(iVar2)" identifier = (call_expression "get_scsi_pt_os_err(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "uVar4 = sg_convert_errno(uVar3);" (assignment_expression "uVar4 = sg_convert_errno(uVar3)" identifier = (call_expression "sg_convert_errno(uVar3)" identifier (argument_list "(uVar3)" ( identifier )))) ;) }) (else_clause "else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" else (if_statement "if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" if (parenthesized_expression "(uVar4 == 0xfffffffe)" ( (binary_expression "uVar4 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }" { (if_statement "if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }" if (parenthesized_expression "(local_74 < 0x16)" ( (binary_expression "local_74 < 0x16" identifier < number_literal) )) (compound_statement "{\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }" { (expression_statement "uVar7 = 1 << ((byte)local_74 & 0x1f);" (assignment_expression "uVar7 = 1 << ((byte)local_74 & 0x1f)" identifier = (binary_expression "1 << ((byte)local_74 & 0x1f)" number_literal << (parenthesized_expression "((byte)local_74 & 0x1f)" ( (binary_expression "(byte)local_74 & 0x1f" (cast_expression "(byte)local_74" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (expression_statement "uVar4 = local_74;" (assignment_expression "uVar4 = local_74" identifier = identifier) ;) (if_statement "if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }" if (parenthesized_expression "((uVar7 & 0xa60) == 0)" ( (binary_expression "(uVar7 & 0xa60) == 0" (parenthesized_expression "(uVar7 & 0xa60)" ( (binary_expression "uVar7 & 0xa60" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }" { (expression_statement "uVar4 = -(uint)((uVar7 & 0x300000) == 0);" (assignment_expression "uVar4 = -(uint)((uVar7 & 0x300000) == 0)" identifier = (unary_expression "-(uint)((uVar7 & 0x300000) == 0)" - (call_expression "(uint)((uVar7 & 0x300000) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((uVar7 & 0x300000) == 0)" ( (binary_expression "(uVar7 & 0x300000) == 0" (parenthesized_expression "(uVar7 & 0x300000)" ( (binary_expression "uVar7 & 0x300000" identifier & number_literal) )) == number_literal) ))))) ;) })) }) (else_clause "else {\n              uVar4 = 0xffffffff;\n            }" else (compound_statement "{\n              uVar4 = 0xffffffff;\n            }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) }))) }) (else_clause "else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" else (if_statement "if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" if (parenthesized_expression "((param_8 < 3) || ((int)uVar4 < 4))" ( (binary_expression "(param_8 < 3) || ((int)uVar4 < 4)" (parenthesized_expression "(param_8 < 3)" ( (binary_expression "param_8 < 3" identifier < number_literal) )) || (parenthesized_expression "((int)uVar4 < 4)" ( (binary_expression "(int)uVar4 < 4" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) ))) )) (compound_statement "{\n            uVar4 = 0;\n          }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" else (compound_statement "{\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" { (expression_statement "uVar7 = *param_5;" (assignment_expression "uVar7 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) (expression_statement "uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;" (assignment_expression "uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18" identifier = (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18" (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8" (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8" (binary_expression "uVar7 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar7 & 0xff0000) >> 8" (parenthesized_expression "(uVar7 & 0xff0000)" ( (binary_expression "uVar7 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar7 & 0xff00) << 8" (parenthesized_expression "(uVar7 & 0xff00)" ( (binary_expression "uVar7 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar7 << 0x18" identifier << number_literal))) ;) (if_statement "if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }" if (parenthesized_expression "((int)uVar7 < 0)" ( (binary_expression "(int)uVar7 < 0" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n              uVar7 = 0;\n            }" { (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) })) (if_statement "if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }" if (parenthesized_expression "((int)uVar4 <= (int)uVar7)" ( (binary_expression "(int)uVar4 <= (int)uVar7" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n              uVar7 = uVar4;\n            }" { (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" identifier = identifier) ;) })) (expression_statement "pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);" (call_expression "pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8)" identifier (argument_list "("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8)" ( (binary_expression ""sg_ll_receive_copy_results" + unaff_EBX + 3" (binary_expression ""sg_ll_receive_copy_results" + unaff_EBX" (string_literal ""sg_ll_receive_copy_results"" " string_content ") + identifier) + number_literal) , identifier ))) ;) (if_statement "if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }" if (parenthesized_expression "(param_8 == 3)" ( (binary_expression "param_8 == 3" identifier == number_literal) )) (compound_statement "{\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }" { (expression_statement "pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;" (assignment_expression "pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1" identifier = (binary_expression ""sg_ll_unmap_v2" + unaff_EBX + 1" (binary_expression ""sg_ll_unmap_v2" + unaff_EBX" (string_literal ""sg_ll_unmap_v2"" " string_content ") + identifier) + number_literal)) ;) (if_statement "if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }" if (parenthesized_expression "((int)uVar7 < 0x101)" ( (binary_expression "(int)uVar7 < 0x101" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }" { (expression_statement "pcVar5 = (char *)(unaff_EBX + 0x6ebc);" (assignment_expression "pcVar5 = (char *)(unaff_EBX + 0x6ebc)" identifier = (cast_expression "(char *)(unaff_EBX + 0x6ebc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBX + 0x6ebc)" ( (binary_expression "unaff_EBX + 0x6ebc" identifier + number_literal) )))) ;) })) (expression_statement "pr2ws(unaff_EBX + 0x685d,pcVar5);" (call_expression "pr2ws(unaff_EBX + 0x685d,pcVar5)" identifier (argument_list "(unaff_EBX + 0x685d,pcVar5)" ( (binary_expression "unaff_EBX + 0x685d" identifier + number_literal) , identifier ))) ;) (if_statement "if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }" if (parenthesized_expression "(0x100 < (int)uVar7)" ( (binary_expression "0x100 < (int)uVar7" number_literal < (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n                uVar7 = 0x100;\n              }" { (expression_statement "uVar7 = 0x100;" (assignment_expression "uVar7 = 0x100" identifier = number_literal) ;) })) (expression_statement "hex2stderr(param_5,uVar7,0xffffffff);" (call_expression "hex2stderr(param_5,uVar7,0xffffffff)" identifier (argument_list "(param_5,uVar7,0xffffffff)" ( identifier , identifier , number_literal ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }" else (compound_statement "{\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }" { (expression_statement "pr2ws(unaff_EBX + 0x13acc,iVar8);" (call_expression "pr2ws(unaff_EBX + 0x13acc,iVar8)" identifier (argument_list "(unaff_EBX + 0x13acc,iVar8)" ( (binary_expression "unaff_EBX + 0x13acc" identifier + number_literal) , identifier ))) ;) (expression_statement "hex2stderr(param_5,uVar7,0);" (call_expression "hex2stderr(param_5,uVar7,0)" identifier (argument_list "(param_5,uVar7,0)" ( identifier , identifier , number_literal ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }))) }))))))) (expression_statement "destruct_scsi_pt_obj(iVar2);" (call_expression "destruct_scsi_pt_obj(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) }))) }) (else_clause "else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }" else (compound_statement "{\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws(unaff_EBX + 0x1339d,param_4);" (call_expression "pr2ws(unaff_EBX + 0x1339d,param_4)" identifier (argument_list "(unaff_EBX + 0x1339d,param_4)" ( (binary_expression "unaff_EBX + 0x1339d" identifier + number_literal) , identifier ))) ;) }))) }) (else_clause "else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }" else (compound_statement "{\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws(unaff_EBX + 0x13385,param_3);" (call_expression "pr2ws(unaff_EBX + 0x13385,param_3)" identifier (argument_list "(unaff_EBX + 0x13385,param_3)" ( (binary_expression "unaff_EBX + 0x13385" identifier + number_literal) , identifier ))) ;) }))) }) (else_clause "else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }" else (compound_statement "{\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws(unaff_EBX + 0x1336c,param_1);" (call_expression "pr2ws(unaff_EBX + 0x1336c,param_1)" identifier (argument_list "(unaff_EBX + 0x1336c,param_1)" ( (binary_expression "unaff_EBX + 0x1336c" identifier + number_literal) , identifier ))) ;) }))) (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002f100();\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                    \n    FUN_0002f100();\n  }" { (expression_statement "FUN_0002f100();" (call_expression "FUN_0002f100()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(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 (pointer_declarator * IDENT)) , (parameter_declaration TYPE 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 (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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 (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) 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) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) << LIT) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) IDENT) , IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression (binary_expression (string_literal " string_content ") + 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 (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (string_literal " string_content ") + IDENT) , IDENT ))) ;) }) (else_clause else (compound_statement { (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 = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , (pointer_expression & 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 = (binary_expression LIT << (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))))) ;) })) }) (else_clause else (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 (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (binary_expression (string_literal " string_content ") + IDENT) + LIT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (string_literal " string_content ") + IDENT) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) }))))))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) }))) (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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint sg_ll_get_performance\n               (uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)\n\n{\n  ushort uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  char *pcVar5;\n  int unaff_EBX;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar8;\n  uint local_74;\n  byte local_70 [2];\n  ushort uStack_6e;\n  ushort local_6c;\n  undefined2 uStack_6a;\n  undefined4 local_68;\n  byte local_64 [64];\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x29b19;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  local_70[1] = 0;\n  uStack_6e = 0;\n  local_6c = 0;\n  uStack_6a = 0;\n  local_68 = 0;\n  local_70[0] = 0xac;\n  if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002f100();\n  }\n  return uVar4;\n}" (type_identifier "uint") (function_declarator "sg_ll_get_performance\n               (uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)" (identifier "sg_ll_get_performance") (parameter_list "(uint param_1,int param_2,uint param_3,uint param_4,uint *param_5,undefined4 param_6,\n               undefined1 param_7,int param_8)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) (, ",") (parameter_declaration "uint *param_5" (type_identifier "uint") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "undefined4 param_6" (type_identifier "undefined4") (identifier "param_6")) (, ",") (parameter_declaration "undefined1 param_7" (type_identifier "undefined1") (identifier "param_7")) (, ",") (parameter_declaration "int param_8" (primitive_type "int") (identifier "param_8")) () ")"))) (compound_statement "{\n  ushort uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  char *pcVar5;\n  int unaff_EBX;\n  byte *pbVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  int iVar8;\n  uint local_74;\n  byte local_70 [2];\n  ushort uStack_6e;\n  ushort local_6c;\n  undefined2 uStack_6a;\n  undefined4 local_68;\n  byte local_64 [64];\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x29b19;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  local_70[1] = 0;\n  uStack_6e = 0;\n  local_6c = 0;\n  uStack_6a = 0;\n  local_68 = 0;\n  local_70[0] = 0xac;\n  if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002f100();\n  }\n  return uVar4;\n}" ({ "{") (declaration "ushort uVar1;" (type_identifier "ushort") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 unaff_retaddr;" (type_identifier "undefined4") (identifier "unaff_retaddr") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "uint local_74;" (type_identifier "uint") (identifier "local_74") (; ";")) (declaration "byte local_70 [2];" (type_identifier "byte") (array_declarator "local_70 [2]" (identifier "local_70") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "ushort uStack_6e;" (type_identifier "ushort") (identifier "uStack_6e") (; ";")) (declaration "ushort local_6c;" (type_identifier "ushort") (identifier "local_6c") (; ";")) (declaration "undefined2 uStack_6a;" (type_identifier "undefined2") (identifier "uStack_6a") (; ";")) (declaration "undefined4 local_68;" (type_identifier "undefined4") (identifier "local_68") (; ";")) (declaration "byte local_64 [64];" (type_identifier "byte") (array_declarator "local_64 [64]" (identifier "local_64") ([ "[") (number_literal "64") (] "]")) (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x29b19;" (assignment_expression "uStack_14 = 0x29b19" (identifier "uStack_14") (= "=") (number_literal "0x29b19")) (; ";")) (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 "local_70[1] = 0;" (assignment_expression "local_70[1] = 0" (subscript_expression "local_70[1]" (identifier "local_70") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uStack_6e = 0;" (assignment_expression "uStack_6e = 0" (identifier "uStack_6e") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_6c = 0;" (assignment_expression "local_6c = 0" (identifier "local_6c") (= "=") (number_literal "0")) (; ";")) (expression_statement "uStack_6a = 0;" (assignment_expression "uStack_6a = 0" (identifier "uStack_6a") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_68 = 0;" (assignment_expression "local_68 = 0" (identifier "local_68") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_70[0] = 0xac;" (assignment_expression "local_70[0] = 0xac" (subscript_expression "local_70[0]" (identifier "local_70") ([ "[") (number_literal "0") (] "]")) (= "=") (number_literal "0xac")) (; ";")) (if_statement "if (param_1 < 0x20) {\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }\n  else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }" (if "if") (parenthesized_expression "(param_1 < 0x20)" (( "(") (binary_expression "param_1 < 0x20" (identifier "param_1") (< "<") (number_literal "0x20")) () ")")) (compound_statement "{\n    local_70[1] = (byte)param_1;\n    uVar1 = (ushort)((uint)param_2 >> 8);\n    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;\n    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);\n    if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }\n  }" ({ "{") (expression_statement "local_70[1] = (byte)param_1;" (assignment_expression "local_70[1] = (byte)param_1" (subscript_expression "local_70[1]" (identifier "local_70") ([ "[") (number_literal "1") (] "]")) (= "=") (cast_expression "(byte)param_1" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_1"))) (; ";")) (expression_statement "uVar1 = (ushort)((uint)param_2 >> 8);" (assignment_expression "uVar1 = (ushort)((uint)param_2 >> 8)" (identifier "uVar1") (= "=") (call_expression "(ushort)((uint)param_2 >> 8)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (argument_list "((uint)param_2 >> 8)" (( "(") (binary_expression "(uint)param_2 >> 8" (cast_expression "(uint)param_2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_2")) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;" (assignment_expression "uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00" (identifier "uStack_6e") (= "=") (binary_expression "(ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00" (call_expression "(ushort)(byte)((uint)param_2 >> 0x18)" (call_expression "(ushort)(byte)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (argument_list "(byte)" (( "(") (identifier "byte") () ")"))) (argument_list "((uint)param_2 >> 0x18)" (( "(") (binary_expression "(uint)param_2 >> 0x18" (cast_expression "(uint)param_2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_2")) (>> ">>") (number_literal "0x18")) () ")"))) (| "|") (binary_expression "uVar1 & 0xff00" (identifier "uVar1") (& "&") (number_literal "0xff00")))) (; ";")) (expression_statement "local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);" (assignment_expression "local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10)" (identifier "local_6c") (= "=") (binary_expression "uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10)" (binary_expression "uVar1 & 0xff" (identifier "uVar1") (& "&") (number_literal "0xff")) (| "|") (call_expression "(ushort)((uint)(param_2 << 0x18) >> 0x10)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (argument_list "((uint)(param_2 << 0x18) >> 0x10)" (( "(") (binary_expression "(uint)(param_2 << 0x18) >> 0x10" (call_expression "(uint)(param_2 << 0x18)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_2 << 0x18)" (( "(") (binary_expression "param_2 << 0x18" (identifier "param_2") (<< "<<") (number_literal "0x18")) () ")"))) (>> ">>") (number_literal "0x10")) () ")"))))) (; ";")) (if_statement "if (param_3 < 0x10000) {\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }\n    else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }" (if "if") (parenthesized_expression "(param_3 < 0x10000)" (( "(") (binary_expression "param_3 < 0x10000" (identifier "param_3") (< "<") (number_literal "0x10000")) () ")")) (compound_statement "{\n      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;\n      local_68 = (uint)uVar1;\n      if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }\n    }" ({ "{") (expression_statement "uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;" (assignment_expression "uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8" (identifier "uVar1") (= "=") (binary_expression "(ushort)param_3 << 8 | (ushort)param_3 >> 8" (binary_expression "(ushort)param_3 << 8" (cast_expression "(ushort)param_3" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "param_3")) (<< "<<") (number_literal "8")) (| "|") (binary_expression "(ushort)param_3 >> 8" (cast_expression "(ushort)param_3" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "param_3")) (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "local_68 = (uint)uVar1;" (assignment_expression "local_68 = (uint)uVar1" (identifier "local_68") (= "=") (cast_expression "(uint)uVar1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar1"))) (; ";")) (if_statement "if (param_4 < 0x100) {\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }\n      else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }" (if "if") (parenthesized_expression "(param_4 < 0x100)" (( "(") (binary_expression "param_4 < 0x100" (identifier "param_4") (< "<") (number_literal "0x100")) () ")")) (compound_statement "{\n        iVar8 = unaff_EBX + 0x133ad;\n        local_68 = (uint)CONCAT12((char)param_4,uVar1);\n        if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }\n        if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }\n      }" ({ "{") (expression_statement "iVar8 = unaff_EBX + 0x133ad;" (assignment_expression "iVar8 = unaff_EBX + 0x133ad" (identifier "iVar8") (= "=") (binary_expression "unaff_EBX + 0x133ad" (identifier "unaff_EBX") (+ "+") (number_literal "0x133ad"))) (; ";")) (expression_statement "local_68 = (uint)CONCAT12((char)param_4,uVar1);" (assignment_expression "local_68 = (uint)CONCAT12((char)param_4,uVar1)" (identifier "local_68") (= "=") (cast_expression "(uint)CONCAT12((char)param_4,uVar1)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CONCAT12((char)param_4,uVar1)" (identifier "CONCAT12") (argument_list "((char)param_4,uVar1)" (( "(") (cast_expression "(char)param_4" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_4")) (, ",") (identifier "uVar1") () ")"))))) (; ";")) (if_statement "if (param_8 == 0) {\n          iVar2 = construct_scsi_pt_obj();\n        }\n        else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = 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          iVar2 = construct_scsi_pt_obj();\n        }" ({ "{") (expression_statement "iVar2 = construct_scsi_pt_obj();" (assignment_expression "iVar2 = construct_scsi_pt_obj()" (identifier "iVar2") (= "=") (call_expression "construct_scsi_pt_obj()" (identifier "construct_scsi_pt_obj") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")) (else_clause "else {\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }" (else "else") (compound_statement "{\n          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);\n          pbVar6 = local_70;\n          do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);\n          pr2ws(unaff_EBX + 0x6bc7,uVar4);\n          iVar2 = construct_scsi_pt_obj();\n        }" ({ "{") (expression_statement "pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);" (call_expression "pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8)" (identifier "pr2ws") (argument_list "("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8)" (( "(") (binary_expression ""sg_ll_sync_cache_10" + unaff_EBX + 0xe" (binary_expression ""sg_ll_sync_cache_10" + unaff_EBX" (string_literal ""sg_ll_sync_cache_10"" (" """) (string_content "sg_ll_sync_cache_10") (" """)) (+ "+") (identifier "unaff_EBX")) (+ "+") (number_literal "0xe")) (, ",") (identifier "iVar8") () ")"))) (; ";")) (expression_statement "pbVar6 = local_70;" (assignment_expression "pbVar6 = local_70" (identifier "pbVar6") (= "=") (identifier "local_70")) (; ";")) (do_statement "do {\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          } while (pbVar6 != local_64);" (do "do") (compound_statement "{\n            uVar4 = (uint)*pbVar6;\n            pbVar6 = pbVar6 + 1;\n            pr2ws(unaff_EBX + 0x13a0a,uVar4);\n          }" ({ "{") (expression_statement "uVar4 = (uint)*pbVar6;" (assignment_expression "uVar4 = (uint)*pbVar6" (identifier "uVar4") (= "=") (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar6"))) (; ";")) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + 1" (identifier "pbVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pr2ws(unaff_EBX + 0x13a0a,uVar4);" (call_expression "pr2ws(unaff_EBX + 0x13a0a,uVar4)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x13a0a,uVar4)" (( "(") (binary_expression "unaff_EBX + 0x13a0a" (identifier "unaff_EBX") (+ "+") (number_literal "0x13a0a")) (, ",") (identifier "uVar4") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar6 != local_64)" (( "(") (binary_expression "pbVar6 != local_64" (identifier "pbVar6") (!= "!=") (identifier "local_64")) () ")")) (; ";")) (expression_statement "pr2ws(unaff_EBX + 0x6bc7,uVar4);" (call_expression "pr2ws(unaff_EBX + 0x6bc7,uVar4)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x6bc7,uVar4)" (( "(") (binary_expression "unaff_EBX + 0x6bc7" (identifier "unaff_EBX") (+ "+") (number_literal "0x6bc7")) (, ",") (identifier "uVar4") () ")"))) (; ";")) (expression_statement "iVar2 = construct_scsi_pt_obj();" (assignment_expression "iVar2 = construct_scsi_pt_obj()" (identifier "iVar2") (= "=") (call_expression "construct_scsi_pt_obj()" (identifier "construct_scsi_pt_obj") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")))) (if_statement "if (iVar2 == 0) {\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }\n        else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          uVar4 = 0xffffffff;\n          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);\n        }" ({ "{") (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" (identifier "uVar4") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);" (call_expression "pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8)" (identifier "pr2ws") (argument_list "("sg_ll_mode_sense10" + unaff_EBX,iVar8)" (( "(") (binary_expression ""sg_ll_mode_sense10" + unaff_EBX" (string_literal ""sg_ll_mode_sense10"" (" """) (string_content "sg_ll_mode_sense10") (" """)) (+ "+") (identifier "unaff_EBX")) (, ",") (identifier "iVar8") () ")"))) (; ";")) (} "}")) (else_clause "else {\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }" (else "else") (compound_statement "{\n          set_scsi_pt_cdb(iVar2,local_70,0xc);\n          set_scsi_pt_sense(iVar2,local_64,0x40);\n          set_scsi_pt_data_in(iVar2,param_5,param_6);\n          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);\n          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;\n          if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }\n          destruct_scsi_pt_obj(iVar2);\n        }" ({ "{") (expression_statement "set_scsi_pt_cdb(iVar2,local_70,0xc);" (call_expression "set_scsi_pt_cdb(iVar2,local_70,0xc)" (identifier "set_scsi_pt_cdb") (argument_list "(iVar2,local_70,0xc)" (( "(") (identifier "iVar2") (, ",") (identifier "local_70") (, ",") (number_literal "0xc") () ")"))) (; ";")) (expression_statement "set_scsi_pt_sense(iVar2,local_64,0x40);" (call_expression "set_scsi_pt_sense(iVar2,local_64,0x40)" (identifier "set_scsi_pt_sense") (argument_list "(iVar2,local_64,0x40)" (( "(") (identifier "iVar2") (, ",") (identifier "local_64") (, ",") (number_literal "0x40") () ")"))) (; ";")) (expression_statement "set_scsi_pt_data_in(iVar2,param_5,param_6);" (call_expression "set_scsi_pt_data_in(iVar2,param_5,param_6)" (identifier "set_scsi_pt_data_in") (argument_list "(iVar2,param_5,param_6)" (( "(") (identifier "iVar2") (, ",") (identifier "param_5") (, ",") (identifier "param_6") () ")"))) (; ";")) (expression_statement "uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);" (assignment_expression "uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8)" (identifier "uVar3") (= "=") (call_expression "do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8)" (identifier "do_scsi_pt") (argument_list "(iVar2,unaff_retaddr,0x3c,param_8)" (( "(") (identifier "iVar2") (, ",") (identifier "unaff_retaddr") (, ",") (number_literal "0x3c") (, ",") (identifier "param_8") () ")")))) (; ";")) (expression_statement "uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)\n          ;" (assignment_expression "uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)" (identifier "uVar4") (= "=") (call_expression "sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)" (identifier "sg_cmds_process_resp") (argument_list "(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)" (( "(") (identifier "iVar2") (, ",") (identifier "iVar8") (, ",") (identifier "uVar3") (, ",") (identifier "param_6") (, ",") (identifier "local_64") (, ",") (identifier "param_7") (, ",") (identifier "param_8") (, ",") (pointer_expression "&local_74" (& "&") (identifier "local_74")) () ")")))) (; ";")) (if_statement "if (uVar4 == 0xffffffff) {\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }\n          else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" (if "if") (parenthesized_expression "(uVar4 == 0xffffffff)" (( "(") (binary_expression "uVar4 == 0xffffffff" (identifier "uVar4") (== "==") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n            uVar3 = get_scsi_pt_os_err(iVar2);\n            uVar4 = sg_convert_errno(uVar3);\n          }" ({ "{") (expression_statement "uVar3 = get_scsi_pt_os_err(iVar2);" (assignment_expression "uVar3 = get_scsi_pt_os_err(iVar2)" (identifier "uVar3") (= "=") (call_expression "get_scsi_pt_os_err(iVar2)" (identifier "get_scsi_pt_os_err") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "uVar4 = sg_convert_errno(uVar3);" (assignment_expression "uVar4 = sg_convert_errno(uVar3)" (identifier "uVar4") (= "=") (call_expression "sg_convert_errno(uVar3)" (identifier "sg_convert_errno") (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")")))) (; ";")) (} "}")) (else_clause "else if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" (else "else") (if_statement "if (uVar4 == 0xfffffffe) {\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }\n          else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" (if "if") (parenthesized_expression "(uVar4 == 0xfffffffe)" (( "(") (binary_expression "uVar4 == 0xfffffffe" (identifier "uVar4") (== "==") (number_literal "0xfffffffe")) () ")")) (compound_statement "{\n            if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }\n          }" ({ "{") (if_statement "if (local_74 < 0x16) {\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }\n            else {\n              uVar4 = 0xffffffff;\n            }" (if "if") (parenthesized_expression "(local_74 < 0x16)" (( "(") (binary_expression "local_74 < 0x16" (identifier "local_74") (< "<") (number_literal "0x16")) () ")")) (compound_statement "{\n              uVar7 = 1 << ((byte)local_74 & 0x1f);\n              uVar4 = local_74;\n              if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }\n            }" ({ "{") (expression_statement "uVar7 = 1 << ((byte)local_74 & 0x1f);" (assignment_expression "uVar7 = 1 << ((byte)local_74 & 0x1f)" (identifier "uVar7") (= "=") (binary_expression "1 << ((byte)local_74 & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "((byte)local_74 & 0x1f)" (( "(") (binary_expression "(byte)local_74 & 0x1f" (cast_expression "(byte)local_74" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "local_74")) (& "&") (number_literal "0x1f")) () ")")))) (; ";")) (expression_statement "uVar4 = local_74;" (assignment_expression "uVar4 = local_74" (identifier "uVar4") (= "=") (identifier "local_74")) (; ";")) (if_statement "if ((uVar7 & 0xa60) == 0) {\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }" (if "if") (parenthesized_expression "((uVar7 & 0xa60) == 0)" (( "(") (binary_expression "(uVar7 & 0xa60) == 0" (parenthesized_expression "(uVar7 & 0xa60)" (( "(") (binary_expression "uVar7 & 0xa60" (identifier "uVar7") (& "&") (number_literal "0xa60")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                uVar4 = -(uint)((uVar7 & 0x300000) == 0);\n              }" ({ "{") (expression_statement "uVar4 = -(uint)((uVar7 & 0x300000) == 0);" (assignment_expression "uVar4 = -(uint)((uVar7 & 0x300000) == 0)" (identifier "uVar4") (= "=") (unary_expression "-(uint)((uVar7 & 0x300000) == 0)" (- "-") (call_expression "(uint)((uVar7 & 0x300000) == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((uVar7 & 0x300000) == 0)" (( "(") (binary_expression "(uVar7 & 0x300000) == 0" (parenthesized_expression "(uVar7 & 0x300000)" (( "(") (binary_expression "uVar7 & 0x300000" (identifier "uVar7") (& "&") (number_literal "0x300000")) () ")")) (== "==") (number_literal "0")) () ")"))))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n              uVar4 = 0xffffffff;\n            }" (else "else") (compound_statement "{\n              uVar4 = 0xffffffff;\n            }" ({ "{") (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" (identifier "uVar4") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")))) (} "}")) (else_clause "else if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" (else "else") (if_statement "if ((param_8 < 3) || ((int)uVar4 < 4)) {\n            uVar4 = 0;\n          }\n          else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" (if "if") (parenthesized_expression "((param_8 < 3) || ((int)uVar4 < 4))" (( "(") (binary_expression "(param_8 < 3) || ((int)uVar4 < 4)" (parenthesized_expression "(param_8 < 3)" (( "(") (binary_expression "param_8 < 3" (identifier "param_8") (< "<") (number_literal "3")) () ")")) (|| "||") (parenthesized_expression "((int)uVar4 < 4)" (( "(") (binary_expression "(int)uVar4 < 4" (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4")) (< "<") (number_literal "4")) () ")"))) () ")")) (compound_statement "{\n            uVar4 = 0;\n          }" ({ "{") (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" (else "else") (compound_statement "{\n            uVar7 = *param_5;\n            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;\n            if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }\n            if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }\n            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);\n            if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }\n          }" ({ "{") (expression_statement "uVar7 = *param_5;" (assignment_expression "uVar7 = *param_5" (identifier "uVar7") (= "=") (pointer_expression "*param_5" (* "*") (identifier "param_5"))) (; ";")) (expression_statement "uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;" (assignment_expression "uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18" (identifier "uVar7") (= "=") (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18" (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8" (binary_expression "uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8" (binary_expression "uVar7 >> 0x18" (identifier "uVar7") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(uVar7 & 0xff0000) >> 8" (parenthesized_expression "(uVar7 & 0xff0000)" (( "(") (binary_expression "uVar7 & 0xff0000" (identifier "uVar7") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar7 & 0xff00) << 8" (parenthesized_expression "(uVar7 & 0xff00)" (( "(") (binary_expression "uVar7 & 0xff00" (identifier "uVar7") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "uVar7 << 0x18" (identifier "uVar7") (<< "<<") (number_literal "0x18")))) (; ";")) (if_statement "if ((int)uVar7 < 0) {\n              uVar7 = 0;\n            }" (if "if") (parenthesized_expression "((int)uVar7 < 0)" (( "(") (binary_expression "(int)uVar7 < 0" (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n              uVar7 = 0;\n            }" ({ "{") (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" (identifier "uVar7") (= "=") (number_literal "0")) (; ";")) (} "}"))) (if_statement "if ((int)uVar4 <= (int)uVar7) {\n              uVar7 = uVar4;\n            }" (if "if") (parenthesized_expression "((int)uVar4 <= (int)uVar7)" (( "(") (binary_expression "(int)uVar4 <= (int)uVar7" (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4")) (<= "<=") (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7"))) () ")")) (compound_statement "{\n              uVar7 = uVar4;\n            }" ({ "{") (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" (identifier "uVar7") (= "=") (identifier "uVar4")) (; ";")) (} "}"))) (expression_statement "pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);" (call_expression "pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8)" (identifier "pr2ws") (argument_list "("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8)" (( "(") (binary_expression ""sg_ll_receive_copy_results" + unaff_EBX + 3" (binary_expression ""sg_ll_receive_copy_results" + unaff_EBX" (string_literal ""sg_ll_receive_copy_results"" (" """) (string_content "sg_ll_receive_copy_results") (" """)) (+ "+") (identifier "unaff_EBX")) (+ "+") (number_literal "3")) (, ",") (identifier "iVar8") () ")"))) (; ";")) (if_statement "if (param_8 == 3) {\n              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }\n            else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\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              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;\n              if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }\n              pr2ws(unaff_EBX + 0x685d,pcVar5);\n              if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }\n              hex2stderr(param_5,uVar7,0xffffffff);\n              uVar4 = 0;\n            }" ({ "{") (expression_statement "pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;" (assignment_expression "pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1" (identifier "pcVar5") (= "=") (binary_expression ""sg_ll_unmap_v2" + unaff_EBX + 1" (binary_expression ""sg_ll_unmap_v2" + unaff_EBX" (string_literal ""sg_ll_unmap_v2"" (" """) (string_content "sg_ll_unmap_v2") (" """)) (+ "+") (identifier "unaff_EBX")) (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((int)uVar7 < 0x101) {\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }" (if "if") (parenthesized_expression "((int)uVar7 < 0x101)" (( "(") (binary_expression "(int)uVar7 < 0x101" (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7")) (< "<") (number_literal "0x101")) () ")")) (compound_statement "{\n                pcVar5 = (char *)(unaff_EBX + 0x6ebc);\n              }" ({ "{") (expression_statement "pcVar5 = (char *)(unaff_EBX + 0x6ebc);" (assignment_expression "pcVar5 = (char *)(unaff_EBX + 0x6ebc)" (identifier "pcVar5") (= "=") (cast_expression "(char *)(unaff_EBX + 0x6ebc)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EBX + 0x6ebc)" (( "(") (binary_expression "unaff_EBX + 0x6ebc" (identifier "unaff_EBX") (+ "+") (number_literal "0x6ebc")) () ")")))) (; ";")) (} "}"))) (expression_statement "pr2ws(unaff_EBX + 0x685d,pcVar5);" (call_expression "pr2ws(unaff_EBX + 0x685d,pcVar5)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x685d,pcVar5)" (( "(") (binary_expression "unaff_EBX + 0x685d" (identifier "unaff_EBX") (+ "+") (number_literal "0x685d")) (, ",") (identifier "pcVar5") () ")"))) (; ";")) (if_statement "if (0x100 < (int)uVar7) {\n                uVar7 = 0x100;\n              }" (if "if") (parenthesized_expression "(0x100 < (int)uVar7)" (( "(") (binary_expression "0x100 < (int)uVar7" (number_literal "0x100") (< "<") (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7"))) () ")")) (compound_statement "{\n                uVar7 = 0x100;\n              }" ({ "{") (expression_statement "uVar7 = 0x100;" (assignment_expression "uVar7 = 0x100" (identifier "uVar7") (= "=") (number_literal "0x100")) (; ";")) (} "}"))) (expression_statement "hex2stderr(param_5,uVar7,0xffffffff);" (call_expression "hex2stderr(param_5,uVar7,0xffffffff)" (identifier "hex2stderr") (argument_list "(param_5,uVar7,0xffffffff)" (( "(") (identifier "param_5") (, ",") (identifier "uVar7") (, ",") (number_literal "0xffffffff") () ")"))) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }" (else "else") (compound_statement "{\n              pr2ws(unaff_EBX + 0x13acc,iVar8);\n              hex2stderr(param_5,uVar7,0);\n              uVar4 = 0;\n            }" ({ "{") (expression_statement "pr2ws(unaff_EBX + 0x13acc,iVar8);" (call_expression "pr2ws(unaff_EBX + 0x13acc,iVar8)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x13acc,iVar8)" (( "(") (binary_expression "unaff_EBX + 0x13acc" (identifier "unaff_EBX") (+ "+") (number_literal "0x13acc")) (, ",") (identifier "iVar8") () ")"))) (; ";")) (expression_statement "hex2stderr(param_5,uVar7,0);" (call_expression "hex2stderr(param_5,uVar7,0)" (identifier "hex2stderr") (argument_list "(param_5,uVar7,0)" (( "(") (identifier "param_5") (, ",") (identifier "uVar7") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}")))))))) (expression_statement "destruct_scsi_pt_obj(iVar2);" (call_expression "destruct_scsi_pt_obj(iVar2)" (identifier "destruct_scsi_pt_obj") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }" (else "else") (compound_statement "{\n        uVar4 = 0xffffffff;\n        pr2ws(unaff_EBX + 0x1339d,param_4);\n      }" ({ "{") (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" (identifier "uVar4") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "pr2ws(unaff_EBX + 0x1339d,param_4);" (call_expression "pr2ws(unaff_EBX + 0x1339d,param_4)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x1339d,param_4)" (( "(") (binary_expression "unaff_EBX + 0x1339d" (identifier "unaff_EBX") (+ "+") (number_literal "0x1339d")) (, ",") (identifier "param_4") () ")"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }" (else "else") (compound_statement "{\n      uVar4 = 0xffffffff;\n      pr2ws(unaff_EBX + 0x13385,param_3);\n    }" ({ "{") (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" (identifier "uVar4") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "pr2ws(unaff_EBX + 0x13385,param_3);" (call_expression "pr2ws(unaff_EBX + 0x13385,param_3)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x13385,param_3)" (( "(") (binary_expression "unaff_EBX + 0x13385" (identifier "unaff_EBX") (+ "+") (number_literal "0x13385")) (, ",") (identifier "param_3") () ")"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }" (else "else") (compound_statement "{\n    uVar4 = 0xffffffff;\n    pr2ws(unaff_EBX + 0x1336c,param_1);\n  }" ({ "{") (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" (identifier "uVar4") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "pr2ws(unaff_EBX + 0x1336c,param_1);" (call_expression "pr2ws(unaff_EBX + 0x1336c,param_1)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x1336c,param_1)" (( "(") (binary_expression "unaff_EBX + 0x1336c" (identifier "unaff_EBX") (+ "+") (number_literal "0x1336c")) (, ",") (identifier "param_1") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002f100();\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                    \n    FUN_0002f100();\n  }" ({ "{") (expression_statement "FUN_0002f100();" (call_expression "FUN_0002f100()" (identifier "FUN_0002f100") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

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

int function_1
              (int sg_fd,int data_type,type_1 var_2,int max_num_desc,int ttype,void *resp,
              int mx_resp_len,type_2 noisy,int var_4)

{
  int var_21;
  type_3 var_3;
  type_4 *var_9;
  int iVar3;
  type_1 var_15;
  char *pcVar5;
  type_5 *var_7;
  type_1 var_18;
  int var_1;
  int sense_cat;
  uint8_t gpCmdBlk [12];
  uint8_t var_8 [64];
  
  var_21 = *(int *)(var_1 + 0x14);
  gpCmdBlk[1] = '\0';
  gpCmdBlk[2] = '\0';
  gpCmdBlk[3] = '\0';
  gpCmdBlk[4] = '\0';
  gpCmdBlk[5] = '\0';
  gpCmdBlk[6] = '\0';
  gpCmdBlk[7] = '\0';
  gpCmdBlk[8] = '\0';
  gpCmdBlk[9] = '\0';
  gpCmdBlk[10] = '\0';
  gpCmdBlk[0xb] = '\0';
  gpCmdBlk[0] = 0xac;
  if ((type_1)data_type < 0x20) {
    gpCmdBlk[1] = (uint8_t)data_type;
    var_3 = (type_3)(var_2 >> 8);
    gpCmdBlk._2_2_ = (type_3)(type_5)(var_2 >> 0x18) | var_3 & 0xff00;
    gpCmdBlk._4_2_ = var_3 & 0xff | (type_3)((var_2 << 0x18) >> 0x10);
    if ((type_1)max_num_desc < 0x10000) {
      var_3 = (type_3)max_num_desc << 8 | (type_3)max_num_desc >> 8;
      gpCmdBlk[10] = '\0';
      gpCmdBlk[0xb] = '\0';
      gpCmdBlk[8] = (char)var_3;
      gpCmdBlk[9] = (char)(var_3 >> 8);
      if ((type_1)ttype < 0x100) {
        pcVar5 = "get performance";
        gpCmdBlk[10] = (uint8_t)ttype;
        gpCmdBlk[8] = (char)var_3;
        gpCmdBlk[9] = (char)(var_3 >> 8);
        gpCmdBlk[0xb] = '\0';
        if (var_4 == 0) {
          var_9 = var_5();
        }
        else {
          var_6("    %s cdb: ","get performance");
          var_7 = gpCmdBlk;
          do {
            var_15 = (type_1)*var_7;
            var_7 = var_7 + 1;
            var_6("%02x ",var_15);
          } while (var_7 != var_8);
          var_6("\n",var_15);
          var_9 = var_5();
        }
        if (var_9 == (type_4 *)0x0) {
          iVar3 = -1;
          var_6("%s: out of memory\n","get performance");
        }
        else {
          var_10(var_9,gpCmdBlk,0xc);
          var_11(var_9,var_8,0x40);
          var_12(var_9,(uint8_t *)resp,mx_resp_len);
          iVar3 = var_13(var_9,sg_fd,0x3c,var_4);
          var_15 = var_14
                            (var_9,"get performance",iVar3,mx_resp_len,var_8,noisy,var_4,&sense_cat
                            );
          if (var_15 == 0xffffffff) {
            iVar3 = var_16();
            iVar3 = var_17(iVar3);
          }
          else if (var_15 == 0xfffffffe) {
            if ((type_1)sense_cat < 0x16) {
              var_15 = 1 << ((type_5)sense_cat & 0x1f);
              iVar3 = sense_cat;
              if ((var_15 & 0xa60) == 0) {
                iVar3 = -(type_1)((var_15 & 0x300000) == 0);
              }
            }
            else {
              iVar3 = -1;
            }
          }
          else if ((var_4 < 3) || ((int)var_15 < 4)) {
            iVar3 = 0;
          }
          else {
                    /* WARNING: Load size is inaccurate */
            var_18 = *resp;
            var_18 = var_18 >> 0x18 | (var_18 & 0xff0000) >> 8 | (var_18 & 0xff00) << 8 | var_18 << 0x18;
            if ((int)var_18 < 0) {
              var_18 = 0;
            }
            if ((int)var_15 <= (int)var_18) {
              var_18 = var_15;
            }
            var_6("    %s: response","get performance");
            if (var_4 == 3) {
              pcVar5 = ", first 256 bytes";
              if ((int)var_18 < 0x101) {
                pcVar5 = "";
              }
              var_6("%s:\n",pcVar5);
              if (0x100 < (int)var_18) {
                var_18 = 0x100;
              }
              var_19((uint8_t *)resp,var_18,-1);
              iVar3 = 0;
            }
            else {
              var_6(":\n",pcVar5);
              var_19((uint8_t *)resp,var_18,0);
              iVar3 = 0;
            }
          }
          var_20(var_9);
        }
      }
      else {
        iVar3 = -1;
        var_6("Bad type: 0x%x\n",ttype);
      }
    }
    else {
      iVar3 = -1;
      var_6("Bad max_num_desc: 0x%x\n",max_num_desc);
    }
  }
  else {
    iVar3 = -1;
    var_6("Bad data_type value: %d\n",data_type);
  }
  if (var_21 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_22();
  }
  return iVar3;
}


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

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

{
  ushort uVar1;
  int iVar2;
  undefined4 uVar3;
  uint uVar4;
  char *pcVar5;
  int unaff_EBX;
  byte *pbVar6;
  uint uVar7;
  int in_GS_OFFSET;
  undefined4 unaff_retaddr;
  int iVar8;
  uint local_74;
  byte local_70 [2];
  ushort uStack_6e;
  ushort local_6c;
  undefined2 uStack_6a;
  undefined4 local_68;
  byte local_64 [64];
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x29b19;
  entry();
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  local_70[1] = 0;
  uStack_6e = 0;
  local_6c = 0;
  uStack_6a = 0;
  local_68 = 0;
  local_70[0] = 0xac;
  if (param_1 < 0x20) {
    local_70[1] = (byte)param_1;
    uVar1 = (ushort)((uint)param_2 >> 8);
    uStack_6e = (ushort)(byte)((uint)param_2 >> 0x18) | uVar1 & 0xff00;
    local_6c = uVar1 & 0xff | (ushort)((uint)(param_2 << 0x18) >> 0x10);
    if (param_3 < 0x10000) {
      uVar1 = (ushort)param_3 << 8 | (ushort)param_3 >> 8;
      local_68 = (uint)uVar1;
      if (param_4 < 0x100) {
        iVar8 = unaff_EBX + 0x133ad;
        local_68 = (uint)CONCAT12((char)param_4,uVar1);
        if (param_8 == 0) {
          iVar2 = construct_scsi_pt_obj();
        }
        else {
          pr2ws("sg_ll_sync_cache_10" + unaff_EBX + 0xe,iVar8);
          pbVar6 = local_70;
          do {
            uVar4 = (uint)*pbVar6;
            pbVar6 = pbVar6 + 1;
            pr2ws(unaff_EBX + 0x13a0a,uVar4);
          } while (pbVar6 != local_64);
          pr2ws(unaff_EBX + 0x6bc7,uVar4);
          iVar2 = construct_scsi_pt_obj();
        }
        if (iVar2 == 0) {
          uVar4 = 0xffffffff;
          pr2ws("sg_ll_mode_sense10" + unaff_EBX,iVar8);
        }
        else {
          set_scsi_pt_cdb(iVar2,local_70,0xc);
          set_scsi_pt_sense(iVar2,local_64,0x40);
          set_scsi_pt_data_in(iVar2,param_5,param_6);
          uVar3 = do_scsi_pt(iVar2,unaff_retaddr,0x3c,param_8);
          uVar4 = sg_cmds_process_resp(iVar2,iVar8,uVar3,param_6,local_64,param_7,param_8,&local_74)
          ;
          if (uVar4 == 0xffffffff) {
            uVar3 = get_scsi_pt_os_err(iVar2);
            uVar4 = sg_convert_errno(uVar3);
          }
          else if (uVar4 == 0xfffffffe) {
            if (local_74 < 0x16) {
              uVar7 = 1 << ((byte)local_74 & 0x1f);
              uVar4 = local_74;
              if ((uVar7 & 0xa60) == 0) {
                uVar4 = -(uint)((uVar7 & 0x300000) == 0);
              }
            }
            else {
              uVar4 = 0xffffffff;
            }
          }
          else if ((param_8 < 3) || ((int)uVar4 < 4)) {
            uVar4 = 0;
          }
          else {
            uVar7 = *param_5;
            uVar7 = uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18;
            if ((int)uVar7 < 0) {
              uVar7 = 0;
            }
            if ((int)uVar4 <= (int)uVar7) {
              uVar7 = uVar4;
            }
            pr2ws("sg_ll_receive_copy_results" + unaff_EBX + 3,iVar8);
            if (param_8 == 3) {
              pcVar5 = "sg_ll_unmap_v2" + unaff_EBX + 1;
              if ((int)uVar7 < 0x101) {
                pcVar5 = (char *)(unaff_EBX + 0x6ebc);
              }
              pr2ws(unaff_EBX + 0x685d,pcVar5);
              if (0x100 < (int)uVar7) {
                uVar7 = 0x100;
              }
              hex2stderr(param_5,uVar7,0xffffffff);
              uVar4 = 0;
            }
            else {
              pr2ws(unaff_EBX + 0x13acc,iVar8);
              hex2stderr(param_5,uVar7,0);
              uVar4 = 0;
            }
          }
          destruct_scsi_pt_obj(iVar2);
        }
      }
      else {
        uVar4 = 0xffffffff;
        pr2ws(unaff_EBX + 0x1339d,param_4);
      }
    }
    else {
      uVar4 = 0xffffffff;
      pr2ws(unaff_EBX + 0x13385,param_3);
    }
  }
  else {
    uVar4 = 0xffffffff;
    pr2ws(unaff_EBX + 0x1336c,param_1);
  }
  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0002f100();
  }
  return uVar4;
}

