
int sg_ll_log_sense_v2(int sg_fd,_Bool ppc,_Bool sp,int pc,int pg_code,int subpg_code,int paramp,
                      uint8_t *resp,int mx_resp_len,int timeout_secs,int *residp,_Bool noisy,
                      int verbose)

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  byte bVar6;
  int iVar7;
  undefined3 in_register_00000014;
  undefined *puVar8;
  uint8_t *puVar9;
  uint8_t *puVar10;
  undefined *puVar11;
  int sense_cat;
  uint8_t logs_cdb [10];
  uint8_t auStack_6e [2];
  uint8_t sense_b [64];
  
  puVar1 = PTR___stack_chk_guard_00054a4c;
  puVar11 = PTR_s_tatus_00054840;
  iVar7 = *(int *)PTR___stack_chk_guard_00054a4c;
  logs_cdb[0] = 'M';
  logs_cdb[1] = '\0';
  logs_cdb[2] = '\0';
  logs_cdb[3] = '\0';
  logs_cdb[4] = '\0';
  logs_cdb[5] = '\0';
  logs_cdb[6] = '\0';
  logs_cdb[7] = '\0';
  logs_cdb[8] = '\0';
  logs_cdb[9] = '\0';
  if (mx_resp_len < 0x10000) {
    sense_cat = CONCAT22((short)mx_resp_len,sense_cat._2_2_);
    bVar6 = 2;
    if (CONCAT31(in_register_00000014,ppc) == 0) {
      bVar6 = 0;
    }
    logs_cdb._4_4_ = ZEXT34(CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8)));
    logs_cdb._1_3_ = (uint3)(bVar6 | sp) << 0x10;
    logs_cdb[0] = 'M';
    logs_cdb._8_2_ = (ushort)(byte)mx_resp_len << 8;
    logs_cdb[2] = (byte)(pc << 6) | (byte)pg_code & 0x3f;
    logs_cdb[3] = (uint8_t)subpg_code;
    if (verbose != 0) {
      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);
      puVar8 = PTR_LAB_0005483c + 0x1f1c;
      puVar9 = logs_cdb;
      do {
        puVar10 = puVar9 + 1;
        (*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);
        puVar9 = puVar10;
      } while (puVar10 != auStack_6e);
      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);
    }
    if (timeout_secs < 1) {
      timeout_secs = 0x3c;
      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
    }
    else {
      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
    }
    if (iVar2 != 0) {
      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,logs_cdb,10);
      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,sense_b,0x40);
      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,resp,mx_resp_len);
      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose);
      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)
                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)
      ;
      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);
      if (residp != (int *)0x0) {
        *residp = iVar5;
      }
      if (iVar4 == -1) {
        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);
        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);
      }
      else if (iVar4 == -2) {
        iVar4 = sense_cat;
        if (sense_cat - 0x14U < 2) {
          iVar4 = 0;
        }
      }
      else if ((mx_resp_len < 4) || (3 < iVar4)) {
        iVar4 = 0;
      }
      else {
        resp[2] = '\0';
        resp[3] = '\0';
        iVar4 = 0;
      }
      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);
      if (0 < iVar5) {
        if (mx_resp_len < iVar5) {
          (*(code *)PTR_pr2ws_000548ec)
                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);
          if (iVar4 == 0) {
            iVar4 = 0x61;
          }
        }
        else {
          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);
        }
      }
      goto LAB_00023404;
    }
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar11 + -0x14a8);
  }
  else {
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);
  }
  if (residp == (int *)0x0) {
    iVar4 = -1;
  }
  else {
    *residp = 0;
    iVar4 = -1;
  }
LAB_00023404:
  if (iVar7 == *(int *)puVar1) {
    return iVar4;
  }
  puVar11 = PTR___stack_chk_fail_00054a1c;
  (*(code *)PTR___stack_chk_fail_00054a1c)();
  iVar7 = (**(code **)(puVar11 + 0x3138c))();
  return iVar7;
}



int sg_ll_log_sense_v2(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,
                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,
                      int *param_11,undefined1 param_12,int param_13)

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  byte bVar6;
  undefined *puVar7;
  undefined4 *puVar8;
  undefined4 *puVar9;
  undefined *puVar10;
  int local_7c;
  undefined4 local_78;
  uint local_74;
  short local_70;
  undefined4 uStack_6e;
  int local_2c;
  
  puVar1 = PTR___stack_chk_guard_00054a4c;
  puVar10 = PTR_s_tatus_00054840;
  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;
  local_78 = 0x4d000000;
  local_74 = 0;
  local_70 = 0;
  if (param_9 < 0x10000) {
    local_7c = CONCAT22((short)param_9,local_7c._2_2_);
    bVar6 = 2;
    if (param_2 == 0) {
      bVar6 = 0;
    }
    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));
    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);
    local_70 = (ushort)(byte)param_9 << 8;
    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);
    if (param_13 != 0) {
      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);
      puVar7 = PTR_LAB_0005483c + 0x1f1c;
      puVar8 = &local_78;
      do {
        puVar9 = (undefined4 *)((int)puVar8 + 1);
        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);
        puVar8 = puVar9;
      } while (puVar9 != &uStack_6e);
      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);
    }
    if (param_10 < 1) {
      param_10 = 0x3c;
      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
    }
    else {
      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
    }
    if (iVar2 != 0) {
      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);
      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);
      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);
      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);
      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)
                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13
                         ,&local_7c);
      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);
      if (param_11 != (int *)0x0) {
        *param_11 = iVar5;
      }
      if (iVar4 == -1) {
        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);
        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);
      }
      else if (iVar4 == -2) {
        iVar4 = local_7c;
        if (local_7c - 0x14U < 2) {
          iVar4 = 0;
        }
      }
      else if ((param_9 < 4) || (3 < iVar4)) {
        iVar4 = 0;
      }
      else {
        *(undefined1 *)(param_8 + 2) = 0;
        *(undefined1 *)(param_8 + 3) = 0;
        iVar4 = 0;
      }
      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);
      if (0 < iVar5) {
        if (param_9 < iVar5) {
          (*(code *)PTR_pr2ws_000548ec)
                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);
          if (iVar4 == 0) {
            iVar4 = 0x61;
          }
        }
        else {
          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);
        }
      }
      goto LAB_00023404;
    }
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);
  }
  else {
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);
  }
  if (param_11 == (int *)0x0) {
    iVar4 = -1;
  }
  else {
    *param_11 = 0;
    iVar4 = -1;
  }
LAB_00023404:
  if (local_2c == *(int *)puVar1) {
    return iVar4;
  }
  puVar10 = PTR___stack_chk_fail_00054a1c;
  (*(code *)PTR___stack_chk_fail_00054a1c)();
  iVar2 = (**(code **)(puVar10 + 0x3138c))();
  return iVar2;
}


lui gp,0x4
addiu gp,gp,-0x69e4
addu gp,gp,t9
addiu sp,sp,-0xb0
lui v1,0x1
sw s2,0x90(sp)
sw s8,0xa8(sp)
or s8,a0,zero
lw s2,-0x7dc4(gp)
lw v0,0xc8(sp)
sw s0,0x88(sp)
sw gp,0x20(sp)
lw a0,0x0(s2)
lw s0,0xd0(sp)
sw s5,0x9c(sp)
sw a0,0x84(sp)
lui a0,0x4d00
slt v1,s0,v1
sw s4,0x98(sp)
sw ra,0xac(sp)
sw s7,0xa4(sp)
sw s6,0xa0(sp)
sw s3,0x94(sp)
sw s1,0x8c(sp)
sw a0,0x38(sp)
sw zero,0x3c(sp)
sh zero,0x40(sp)
lw s5,0xcc(sp)
beq v1,zero,0x000234dc
_lw s4,0xd8(sp)
lw v1,0xc4(sp)
sll a3,a3,0x6
sb v0,0x3e(sp)
ext v0,v0,0x8,0x8
ext a0,s0,0x8,0x8
sh s0,0x34(sp)
sb v1,0x3b(sp)
li v1,0x2
sb v0,0x3d(sp)
addiu v0,sp,0x38
movz v1,zero,a1
sw v0,0x2c(sp)
sb a0,0x3f(sp)
or a1,v1,zero
lw v1,0xc0(sp)
lw v0,0xe0(sp)
or a1,a1,a2
lw s6,-0x7fd0(gp)
andi v1,v1,0x3f
sb a1,0x39(sp)
or a3,a3,v1
sb s0,0x40(sp)
bne v0,zero,0x00023480
_sb a3,0x3a(sp)
lw v0,0xd4(sp)
blez v0,0x00023444
_lw t9,-0x7dbc(gp)
jalr t9
_nop
lw gp,0x20(sp)
beq v0,zero,0x0002345c
_or s1,v0,zero
lw t9,-0x7fb0(gp)
li a2,0xa
lw a1,0x2c(sp)
or a0,v0,zero
jalr t9
_addiu s3,sp,0x44
li a2,0x40
lw gp,0x20(sp)
or a1,s3,zero
lw t9,-0x7f1c(gp)
jalr t9
_or a0,s1,zero
or a2,s0,zero
lw gp,0x20(sp)
or a1,s5,zero
lw t9,-0x7d90(gp)
jalr t9
_or a0,s1,zero
or a1,s8,zero
lw gp,0x20(sp)
or a0,s1,zero
lw a3,0xe0(sp)
lw t9,-0x7e8c(gp)
jalr t9
_lw a2,0xd4(sp)
addiu v1,sp,0x34
lw gp,0x20(sp)
or a2,v0,zero
lbu v0,0xdf(sp)
addiu a1,s6,-0x14a8
sw v1,0x1c(sp)
or a0,s1,zero
sw s3,0x10(sp)
or a3,s0,zero
sw v0,0x14(sp)
lw v1,0xe0(sp)
lw t9,-0x7f40(gp)
jalr t9
_sw v1,0x18(sp)
or a0,s1,zero
lw gp,0x20(sp)
lw t9,-0x7ed4(gp)
jalr t9
_or s3,v0,zero
lw gp,0x20(sp)
beq s4,zero,0x000233ac
_or s7,v0,zero
sw s7,0x0(s4)
li v0,-0x1
beq s3,v0,0x00023514
_li v0,-0x2
beq s3,v0,0x0002353c
_slti v0,s0,0x4
beq v0,zero,0x00023500
_slti s3,s3,0x4
or s3,zero,zero
lw t9,-0x7ea4(gp)
jalr t9
_or a0,s1,zero
blez s7,0x00023404
_lw gp,0x20(sp)
slt v0,s0,s7
bne v0,zero,0x00023550
_lw t9,-0x7ea8(gp)
subu a0,s0,s7
or a1,zero,zero
addu a0,s5,a0
jalr t9
_or a2,s7,zero
lw gp,0x20(sp)
lw a0,0x84(sp)
or v0,s3,zero
lw v1,0x0(s2)
bne a0,v1,0x0002357c
_lw ra,0xac(sp)
lw s8,0xa8(sp)
lw s7,0xa4(sp)
lw s6,0xa0(sp)
lw s5,0x9c(sp)
lw s4,0x98(sp)
lw s3,0x94(sp)
lw s2,0x90(sp)
lw s1,0x8c(sp)
lw s0,0x88(sp)
jr ra
_addiu sp,sp,0xb0
li v0,0x3c
jalr t9
_sw v0,0xd4(sp)
lw gp,0x20(sp)
bne v0,zero,0x000232ec
_or s1,v0,zero
lw a0,-0x7fd0(gp)
addiu a1,s6,-0x14a8
lw t9,-0x7f24(gp)
jalr t9
_addiu a0,a0,-0x1974
bne s4,zero,0x000234f4
_lw gp,0x20(sp)
b 0x00023404
_li s3,-0x1
lw a0,-0x7fd0(gp)
addiu a1,s6,-0x14a8
lw t9,-0x7f24(gp)
addiu s3,sp,0x42
jalr t9
_addiu a0,a0,-0x1a50
lw gp,0x20(sp)
lw s7,0x2c(sp)
lw s1,-0x7fd4(gp)
addiu s1,s1,0x1f1c
lw t9,-0x7f24(gp)
addiu s7,s7,0x1
lbu a1,-0x1(s7)
jalr t9
_or a0,s1,zero
bne s7,s3,0x000234a8
_lw gp,0x20(sp)
lw a0,-0x7fd0(gp)
lw t9,-0x7f24(gp)
jalr t9
_addiu a0,a0,-0x990
b 0x000232cc
_lw gp,0x20(sp)
lw a0,-0x7fd0(gp)
lw t9,-0x7f24(gp)
jalr t9
_addiu a0,a0,-0x16fc
beq s4,zero,0x00023478
_lw gp,0x20(sp)
sw zero,0x0(s4)
b 0x00023404
_li s3,-0x1
beq s3,zero,0x000233c8
_or s3,zero,zero
sb zero,0x2(s5)
b 0x000233cc
_sb zero,0x3(s5)
lw t9,-0x7d74(gp)
jalr t9
_or a0,s1,zero
lw gp,0x20(sp)
lw t9,-0x7ee8(gp)
jalr t9
_or a0,v0,zero
lw gp,0x20(sp)
b 0x000233cc
_or s3,v0,zero
lw s3,0x34(sp)
addiu v0,s3,-0x14
sltiu v0,v0,0x2
b 0x000233cc
_movn s3,zero,v0
lw a0,-0x7fd0(gp)
addiu a1,s6,-0x14a8
lw t9,-0x7f24(gp)
or a3,s0,zero
or a2,s7,zero
jalr t9
_addiu a0,a0,-0x16c0
bne s3,zero,0x00023404
_lw gp,0x20(sp)
b 0x00023404
_li s3,0x61
lw t9,-0x7df4(gp)
jalr t9
_nop
(translation_unit "int sg_ll_log_sense_v2(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  undefined *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  int local_7c;\n  undefined4 local_78;\n  uint local_74;\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_78 = 0x4d000000;\n  local_74 = 0;\n  local_70 = 0;\n  if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x3138c))();\n  return iVar2;\n}\n\n" (function_definition "int sg_ll_log_sense_v2(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  undefined *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  int local_7c;\n  undefined4 local_78;\n  uint local_74;\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_78 = 0x4d000000;\n  local_74 = 0;\n  local_70 = 0;\n  if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x3138c))();\n  return iVar2;\n}" primitive_type (function_declarator "sg_ll_log_sense_v2(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)" identifier (parameter_list "(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "byte param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "byte param_5" type_identifier identifier) , (parameter_declaration "undefined1 param_6" type_identifier identifier) , (parameter_declaration "undefined2 param_7" type_identifier identifier) , (parameter_declaration "int param_8" primitive_type identifier) , (parameter_declaration "int param_9" primitive_type identifier) , (parameter_declaration "int param_10" primitive_type identifier) , (parameter_declaration "int *param_11" primitive_type (pointer_declarator "*param_11" * identifier)) , (parameter_declaration "undefined1 param_12" type_identifier identifier) , (parameter_declaration "int param_13" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  undefined *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  int local_7c;\n  undefined4 local_78;\n  uint local_74;\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_78 = 0x4d000000;\n  local_74 = 0;\n  local_70 = 0;\n  if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x3138c))();\n  return iVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte bVar6;" type_identifier identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "undefined4 *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "int local_7c;" primitive_type identifier ;) (declaration "undefined4 local_78;" type_identifier identifier ;) (declaration "uint local_74;" type_identifier identifier ;) (declaration "short local_70;" (sized_type_specifier "short" short) identifier ;) (declaration "undefined4 uStack_6e;" type_identifier identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_00054a4c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00054a4c" identifier = identifier) ;) (expression_statement "puVar10 = PTR_s_tatus_00054840;" (assignment_expression "puVar10 = PTR_s_tatus_00054840" identifier = identifier) ;) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_00054a4c;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_00054a4c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00054a4c" * (cast_expression "(int *)PTR___stack_chk_guard_00054a4c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "local_78 = 0x4d000000;" (assignment_expression "local_78 = 0x4d000000" identifier = number_literal) ;) (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" identifier = number_literal) ;) (expression_statement "local_70 = 0;" (assignment_expression "local_70 = 0" identifier = number_literal) ;) (if_statement "if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" if (parenthesized_expression "(param_9 < 0x10000)" ( (binary_expression "param_9 < 0x10000" identifier < number_literal) )) (compound_statement "{\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }" { (expression_statement "local_7c = CONCAT22((short)param_9,local_7c._2_2_);" (assignment_expression "local_7c = CONCAT22((short)param_9,local_7c._2_2_)" identifier = (call_expression "CONCAT22((short)param_9,local_7c._2_2_)" identifier (argument_list "((short)param_9,local_7c._2_2_)" ( (cast_expression "(short)param_9" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) , (field_expression "local_7c._2_2_" identifier . field_identifier) )))) ;) (expression_statement "bVar6 = 2;" (assignment_expression "bVar6 = 2" identifier = number_literal) ;) (if_statement "if (param_2 == 0) {\n      bVar6 = 0;\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      bVar6 = 0;\n    }" { (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) })) (expression_statement "local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));" (assignment_expression "local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8))" identifier = (cast_expression "(uint)CONCAT21(param_7,(char)((uint)param_9 >> 8))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT21(param_7,(char)((uint)param_9 >> 8))" identifier (argument_list "(param_7,(char)((uint)param_9 >> 8))" ( identifier , (cast_expression "(char)((uint)param_9 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)param_9 >> 8)" ( (binary_expression "(uint)param_9 >> 8" (cast_expression "(uint)param_9" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) ))))) ;) (expression_statement "local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);" (assignment_expression "local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10)" identifier = (call_expression "CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10)" identifier (argument_list "(0x4d,(uint3)(bVar6 | param_3) << 0x10)" ( number_literal , (binary_expression "(uint3)(bVar6 | param_3) << 0x10" (call_expression "(uint3)(bVar6 | param_3)" (parenthesized_expression "(uint3)" ( identifier )) (argument_list "(bVar6 | param_3)" ( (binary_expression "bVar6 | param_3" identifier | identifier) ))) << number_literal) )))) ;) (expression_statement "local_70 = (ushort)(byte)param_9 << 8;" (assignment_expression "local_70 = (ushort)(byte)param_9 << 8" identifier = (binary_expression "(ushort)(byte)param_9 << 8" (cast_expression "(ushort)(byte)param_9" ( (type_descriptor "ushort" type_identifier) ) (cast_expression "(byte)param_9" ( (type_descriptor "byte" type_identifier) ) identifier)) << number_literal)) ;) (expression_statement "local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);" (assignment_expression "local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6)" (field_expression "local_78._2_2_" identifier . field_identifier) = (call_expression "CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6)" identifier (argument_list "((byte)(param_4 << 6) | param_5 & 0x3f,param_6)" ( (binary_expression "(byte)(param_4 << 6) | param_5 & 0x3f" (call_expression "(byte)(param_4 << 6)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(param_4 << 6)" ( (binary_expression "param_4 << 6" identifier << number_literal) ))) | (binary_expression "param_5 & 0x3f" identifier & number_literal)) , identifier )))) ;) (if_statement "if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }" if (parenthesized_expression "(param_13 != 0)" ( (binary_expression "param_13 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1a50" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x14a8" identifier + number_literal) ))) ;) (expression_statement "puVar7 = PTR_LAB_0005483c + 0x1f1c;" (assignment_expression "puVar7 = PTR_LAB_0005483c + 0x1f1c" identifier = (binary_expression "PTR_LAB_0005483c + 0x1f1c" identifier + number_literal)) ;) (expression_statement "puVar8 = &local_78;" (assignment_expression "puVar8 = &local_78" identifier = (pointer_expression "&local_78" & identifier)) ;) (do_statement "do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);" do (compound_statement "{\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      }" { (expression_statement "puVar9 = (undefined4 *)((int)puVar8 + 1);" (assignment_expression "puVar9 = (undefined4 *)((int)puVar8 + 1)" identifier = (cast_expression "(undefined4 *)((int)puVar8 + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar8 + 1)" ( (binary_expression "(int)puVar8 + 1" (cast_expression "(int)puVar8" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar7,*(undefined1 *)puVar8)" ( identifier , (pointer_expression "*(undefined1 *)puVar8" * (cast_expression "(undefined1 *)puVar8" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ))) ;) (expression_statement "puVar8 = puVar9;" (assignment_expression "puVar8 = puVar9" identifier = identifier) ;) }) while (parenthesized_expression "(puVar9 != &uStack_6e)" ( (binary_expression "puVar9 != &uStack_6e" identifier != (pointer_expression "&uStack_6e" & identifier)) )) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x990)" ( (binary_expression "PTR_s_tatus_00054840 + -0x990" identifier + number_literal) ))) ;) })) (if_statement "if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" if (parenthesized_expression "(param_10 < 1)" ( (binary_expression "param_10 < 1" identifier < number_literal) )) (compound_statement "{\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" { (expression_statement "param_10 = 0x3c;" (assignment_expression "param_10 = 0x3c" identifier = number_literal) ;) (expression_statement "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)()" identifier = (call_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)()" (parenthesized_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)" ( (pointer_expression "*(code *)PTR_construct_scsi_pt_obj_00054a54" * (cast_expression "(code *)PTR_construct_scsi_pt_obj_00054a54" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) }) (else_clause "else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" else (compound_statement "{\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" { (expression_statement "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)()" identifier = (call_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)()" (parenthesized_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)" ( (pointer_expression "*(code *)PTR_construct_scsi_pt_obj_00054a54" * (cast_expression "(code *)PTR_construct_scsi_pt_obj_00054a54" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }" { (expression_statement "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_cdb_00054860" * (cast_expression "(code *)PTR_set_scsi_pt_cdb_00054860" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,&local_78,10)" ( identifier , (pointer_expression "&local_78" & identifier) , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_sense_000548f4" * (cast_expression "(code *)PTR_set_scsi_pt_sense_000548f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,(int)&uStack_6e + 2,0x40)" ( identifier , (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&uStack_6e" & identifier)) + number_literal) , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);" (call_expression "(*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_data_in_00054a80)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_data_in_00054a80" * (cast_expression "(code *)PTR_set_scsi_pt_data_in_00054a80" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_8,param_9)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);" (assignment_expression "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13)" identifier = (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13)" (parenthesized_expression "(*(code *)PTR_do_scsi_pt_00054984)" ( (pointer_expression "*(code *)PTR_do_scsi_pt_00054984" * (cast_expression "(code *)PTR_do_scsi_pt_00054984" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_1,param_10,param_13)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);" (assignment_expression "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c)" identifier = (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c)" (parenthesized_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)" ( (pointer_expression "*(code *)PTR_sg_cmds_process_resp_000548d0" * (cast_expression "(code *)PTR_sg_cmds_process_resp_000548d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c)" ( identifier , (binary_expression "puVar10 + -0x14a8" identifier + number_literal) , identifier , identifier , (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&uStack_6e" & identifier)) + number_literal) , identifier , identifier , (pointer_expression "&local_7c" & identifier) )))) ;) (expression_statement "iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);" (assignment_expression "iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2)" identifier = (call_expression "(*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2)" (parenthesized_expression "(*(code *)PTR_get_scsi_pt_resid_0005493c)" ( (pointer_expression "*(code *)PTR_get_scsi_pt_resid_0005493c" * (cast_expression "(code *)PTR_get_scsi_pt_resid_0005493c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }" if (parenthesized_expression "(param_11 != (int *)0x0)" ( (binary_expression "param_11 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *param_11 = iVar5;\n      }" { (expression_statement "*param_11 = iVar5;" (assignment_expression "*param_11 = iVar5" (pointer_expression "*param_11" * identifier) = identifier) ;) })) (if_statement "if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }" { (expression_statement "uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);" (assignment_expression "uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2)" identifier = (call_expression "(*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2)" (parenthesized_expression "(*(code *)PTR_get_scsi_pt_os_err_00054a9c)" ( (pointer_expression "*(code *)PTR_get_scsi_pt_os_err_00054a9c" * (cast_expression "(code *)PTR_get_scsi_pt_os_err_00054a9c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);" (assignment_expression "iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3)" identifier = (call_expression "(*(code *)PTR_sg_convert_errno_00054928)(uVar3)" (parenthesized_expression "(*(code *)PTR_sg_convert_errno_00054928)" ( (pointer_expression "*(code *)PTR_sg_convert_errno_00054928" * (cast_expression "(code *)PTR_sg_convert_errno_00054928" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3)" ( identifier )))) ;) }) (else_clause "else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" else (if_statement "if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" if (parenthesized_expression "(iVar4 == -2)" ( (binary_expression "iVar4 == -2" identifier == number_literal) )) (compound_statement "{\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }" { (expression_statement "iVar4 = local_7c;" (assignment_expression "iVar4 = local_7c" identifier = identifier) ;) (if_statement "if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }" if (parenthesized_expression "(local_7c - 0x14U < 2)" ( (binary_expression "local_7c - 0x14U < 2" (binary_expression "local_7c - 0x14U" identifier - number_literal) < number_literal) )) (compound_statement "{\n          iVar4 = 0;\n        }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) })) }) (else_clause "else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" else (if_statement "if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" if (parenthesized_expression "((param_9 < 4) || (3 < iVar4))" ( (binary_expression "(param_9 < 4) || (3 < iVar4)" (parenthesized_expression "(param_9 < 4)" ( (binary_expression "param_9 < 4" identifier < number_literal) )) || (parenthesized_expression "(3 < iVar4)" ( (binary_expression "3 < iVar4" number_literal < identifier) ))) )) (compound_statement "{\n        iVar4 = 0;\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" else (compound_statement "{\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" { (expression_statement "*(undefined1 *)(param_8 + 2) = 0;" (assignment_expression "*(undefined1 *)(param_8 + 2) = 0" (pointer_expression "*(undefined1 *)(param_8 + 2)" * (cast_expression "(undefined1 *)(param_8 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_8 + 2)" ( (binary_expression "param_8 + 2" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(param_8 + 3) = 0;" (assignment_expression "*(undefined1 *)(param_8 + 3) = 0" (pointer_expression "*(undefined1 *)(param_8 + 3)" * (cast_expression "(undefined1 *)(param_8 + 3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_8 + 3)" ( (binary_expression "param_8 + 3" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }))))))) (expression_statement "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);" (call_expression "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2)" (parenthesized_expression "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)" ( (pointer_expression "*(code *)PTR_destruct_scsi_pt_obj_0005496c" * (cast_expression "(code *)PTR_destruct_scsi_pt_obj_0005496c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }" if (parenthesized_expression "(0 < iVar5)" ( (binary_expression "0 < iVar5" number_literal < identifier) )) (compound_statement "{\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }" { (if_statement "if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }" if (parenthesized_expression "(param_9 < iVar5)" ( (binary_expression "param_9 < iVar5" identifier < identifier) )) (compound_statement "{\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9)" ( (binary_expression "PTR_s_tatus_00054840 + -0x16c0" identifier + number_literal) , (binary_expression "puVar10 + -0x14a8" identifier + number_literal) , identifier , identifier ))) ;) (if_statement "if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n            iVar4 = 0x61;\n          }" { (expression_statement "iVar4 = 0x61;" (assignment_expression "iVar4 = 0x61" identifier = number_literal) ;) })) }) (else_clause "else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }" else (compound_statement "{\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }" { (expression_statement "(*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);" (call_expression "(*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5)" (parenthesized_expression "(*(code *)PTR_memset_00054968)" ( (pointer_expression "*(code *)PTR_memset_00054968" * (cast_expression "(code *)PTR_memset_00054968" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_8 + (param_9 - iVar5),0,iVar5)" ( (binary_expression "param_8 + (param_9 - iVar5)" identifier + (parenthesized_expression "(param_9 - iVar5)" ( (binary_expression "param_9 - iVar5" identifier - identifier) ))) , number_literal , identifier ))) ;) }))) })) (goto_statement "goto LAB_00023404;" goto statement_identifier ;) })) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1974" identifier + number_literal) , (binary_expression "puVar10 + -0x14a8" identifier + number_literal) ))) ;) }) (else_clause "else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" else (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x16fc)" ( (binary_expression "PTR_s_tatus_00054840 + -0x16fc" identifier + number_literal) ))) ;) }))) (if_statement "if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }" if (parenthesized_expression "(param_11 == (int *)0x0)" ( (binary_expression "param_11 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = -1;\n  }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }" else (compound_statement "{\n    *param_11 = 0;\n    iVar4 = -1;\n  }" { (expression_statement "*param_11 = 0;" (assignment_expression "*param_11 = 0" (pointer_expression "*param_11" * identifier) = number_literal) ;) (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) }))) (labeled_statement "LAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }" statement_identifier : (if_statement "if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }" if (parenthesized_expression "(local_2c == *(int *)puVar1)" ( (binary_expression "local_2c == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) }))) (expression_statement "puVar10 = PTR___stack_chk_fail_00054a1c;" (assignment_expression "puVar10 = PTR___stack_chk_fail_00054a1c" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00054a1c)();" (call_expression "(*(code *)PTR___stack_chk_fail_00054a1c)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00054a1c)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00054a1c" * (cast_expression "(code *)PTR___stack_chk_fail_00054a1c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar2 = (**(code **)(puVar10 + 0x3138c))();" (assignment_expression "iVar2 = (**(code **)(puVar10 + 0x3138c))()" identifier = (call_expression "(**(code **)(puVar10 + 0x3138c))()" (parenthesized_expression "(**(code **)(puVar10 + 0x3138c))" ( (pointer_expression "**(code **)(puVar10 + 0x3138c)" * (pointer_expression "*(code **)(puVar10 + 0x3138c)" * (cast_expression "(code **)(puVar10 + 0x3138c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x3138c)" ( (binary_expression "puVar10 + 0x3138c" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int sg_ll_log_sense_v2(int sg_fd,_Bool ppc,_Bool sp,int pc,int pg_code,int subpg_code,int paramp,\n                      uint8_t *resp,int mx_resp_len,int timeout_secs,int *residp,_Bool noisy,\n                      int verbose)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  int iVar7;\n  undefined3 in_register_00000014;\n  undefined *puVar8;\n  uint8_t *puVar9;\n  uint8_t *puVar10;\n  undefined *puVar11;\n  int sense_cat;\n  uint8_t logs_cdb [10];\n  uint8_t auStack_6e [2];\n  uint8_t sense_b [64];\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar11 = PTR_s_tatus_00054840;\n  iVar7 = *(int *)PTR___stack_chk_guard_00054a4c;\n  logs_cdb[0] = 'M';\n  logs_cdb[1] = '\0';\n  logs_cdb[2] = '\0';\n  logs_cdb[3] = '\0';\n  logs_cdb[4] = '\0';\n  logs_cdb[5] = '\0';\n  logs_cdb[6] = '\0';\n  logs_cdb[7] = '\0';\n  logs_cdb[8] = '\0';\n  logs_cdb[9] = '\0';\n  if (mx_resp_len < 0x10000) {\n    sense_cat = CONCAT22((short)mx_resp_len,sense_cat._2_2_);\n    bVar6 = 2;\n    if (CONCAT31(in_register_00000014,ppc) == 0) {\n      bVar6 = 0;\n    }\n    logs_cdb._4_4_ = ZEXT34(CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8)));\n    logs_cdb._1_3_ = (uint3)(bVar6 | sp) << 0x10;\n    logs_cdb[0] = 'M';\n    logs_cdb._8_2_ = (ushort)(byte)mx_resp_len << 8;\n    logs_cdb[2] = (byte)(pc << 6) | (byte)pg_code & 0x3f;\n    logs_cdb[3] = (uint8_t)subpg_code;\n    if (verbose != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar8 = PTR_LAB_0005483c + 0x1f1c;\n      puVar9 = logs_cdb;\n      do {\n        puVar10 = puVar9 + 1;\n        (*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);\n        puVar9 = puVar10;\n      } while (puVar10 != auStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (timeout_secs < 1) {\n      timeout_secs = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,logs_cdb,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,sense_b,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,resp,mx_resp_len);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)\n      ;\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (residp != (int *)0x0) {\n        *residp = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (mx_resp_len < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar11 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (residp == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *residp = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (iVar7 == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar11 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar7 = (**(code **)(puVar11 + 0x3138c))();\n  return iVar7;\n}\n\n" (function_definition "int sg_ll_log_sense_v2(int sg_fd,_Bool ppc,_Bool sp,int pc,int pg_code,int subpg_code,int paramp,\n                      uint8_t *resp,int mx_resp_len,int timeout_secs,int *residp,_Bool noisy,\n                      int verbose)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  int iVar7;\n  undefined3 in_register_00000014;\n  undefined *puVar8;\n  uint8_t *puVar9;\n  uint8_t *puVar10;\n  undefined *puVar11;\n  int sense_cat;\n  uint8_t logs_cdb [10];\n  uint8_t auStack_6e [2];\n  uint8_t sense_b [64];\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar11 = PTR_s_tatus_00054840;\n  iVar7 = *(int *)PTR___stack_chk_guard_00054a4c;\n  logs_cdb[0] = 'M';\n  logs_cdb[1] = '\0';\n  logs_cdb[2] = '\0';\n  logs_cdb[3] = '\0';\n  logs_cdb[4] = '\0';\n  logs_cdb[5] = '\0';\n  logs_cdb[6] = '\0';\n  logs_cdb[7] = '\0';\n  logs_cdb[8] = '\0';\n  logs_cdb[9] = '\0';\n  if (mx_resp_len < 0x10000) {\n    sense_cat = CONCAT22((short)mx_resp_len,sense_cat._2_2_);\n    bVar6 = 2;\n    if (CONCAT31(in_register_00000014,ppc) == 0) {\n      bVar6 = 0;\n    }\n    logs_cdb._4_4_ = ZEXT34(CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8)));\n    logs_cdb._1_3_ = (uint3)(bVar6 | sp) << 0x10;\n    logs_cdb[0] = 'M';\n    logs_cdb._8_2_ = (ushort)(byte)mx_resp_len << 8;\n    logs_cdb[2] = (byte)(pc << 6) | (byte)pg_code & 0x3f;\n    logs_cdb[3] = (uint8_t)subpg_code;\n    if (verbose != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar8 = PTR_LAB_0005483c + 0x1f1c;\n      puVar9 = logs_cdb;\n      do {\n        puVar10 = puVar9 + 1;\n        (*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);\n        puVar9 = puVar10;\n      } while (puVar10 != auStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (timeout_secs < 1) {\n      timeout_secs = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,logs_cdb,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,sense_b,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,resp,mx_resp_len);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)\n      ;\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (residp != (int *)0x0) {\n        *residp = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (mx_resp_len < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar11 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (residp == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *residp = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (iVar7 == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar11 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar7 = (**(code **)(puVar11 + 0x3138c))();\n  return iVar7;\n}" primitive_type (function_declarator "sg_ll_log_sense_v2(int sg_fd,_Bool ppc,_Bool sp,int pc,int pg_code,int subpg_code,int paramp,\n                      uint8_t *resp,int mx_resp_len,int timeout_secs,int *residp,_Bool noisy,\n                      int verbose)" identifier (parameter_list "(int sg_fd,_Bool ppc,_Bool sp,int pc,int pg_code,int subpg_code,int paramp,\n                      uint8_t *resp,int mx_resp_len,int timeout_secs,int *residp,_Bool noisy,\n                      int verbose)" ( (parameter_declaration "int sg_fd" primitive_type identifier) , (parameter_declaration "_Bool ppc" type_identifier identifier) , (parameter_declaration "_Bool sp" type_identifier identifier) , (parameter_declaration "int pc" primitive_type identifier) , (parameter_declaration "int pg_code" primitive_type identifier) , (parameter_declaration "int subpg_code" primitive_type identifier) , (parameter_declaration "int paramp" primitive_type identifier) , (parameter_declaration "uint8_t *resp" primitive_type (pointer_declarator "*resp" * identifier)) , (parameter_declaration "int mx_resp_len" primitive_type identifier) , (parameter_declaration "int timeout_secs" primitive_type identifier) , (parameter_declaration "int *residp" primitive_type (pointer_declarator "*residp" * identifier)) , (parameter_declaration "_Bool noisy" type_identifier identifier) , (parameter_declaration "int verbose" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  int iVar7;\n  undefined3 in_register_00000014;\n  undefined *puVar8;\n  uint8_t *puVar9;\n  uint8_t *puVar10;\n  undefined *puVar11;\n  int sense_cat;\n  uint8_t logs_cdb [10];\n  uint8_t auStack_6e [2];\n  uint8_t sense_b [64];\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar11 = PTR_s_tatus_00054840;\n  iVar7 = *(int *)PTR___stack_chk_guard_00054a4c;\n  logs_cdb[0] = 'M';\n  logs_cdb[1] = '\0';\n  logs_cdb[2] = '\0';\n  logs_cdb[3] = '\0';\n  logs_cdb[4] = '\0';\n  logs_cdb[5] = '\0';\n  logs_cdb[6] = '\0';\n  logs_cdb[7] = '\0';\n  logs_cdb[8] = '\0';\n  logs_cdb[9] = '\0';\n  if (mx_resp_len < 0x10000) {\n    sense_cat = CONCAT22((short)mx_resp_len,sense_cat._2_2_);\n    bVar6 = 2;\n    if (CONCAT31(in_register_00000014,ppc) == 0) {\n      bVar6 = 0;\n    }\n    logs_cdb._4_4_ = ZEXT34(CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8)));\n    logs_cdb._1_3_ = (uint3)(bVar6 | sp) << 0x10;\n    logs_cdb[0] = 'M';\n    logs_cdb._8_2_ = (ushort)(byte)mx_resp_len << 8;\n    logs_cdb[2] = (byte)(pc << 6) | (byte)pg_code & 0x3f;\n    logs_cdb[3] = (uint8_t)subpg_code;\n    if (verbose != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar8 = PTR_LAB_0005483c + 0x1f1c;\n      puVar9 = logs_cdb;\n      do {\n        puVar10 = puVar9 + 1;\n        (*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);\n        puVar9 = puVar10;\n      } while (puVar10 != auStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (timeout_secs < 1) {\n      timeout_secs = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,logs_cdb,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,sense_b,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,resp,mx_resp_len);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)\n      ;\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (residp != (int *)0x0) {\n        *residp = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (mx_resp_len < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar11 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (residp == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *residp = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (iVar7 == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar11 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar7 = (**(code **)(puVar11 + 0x3138c))();\n  return iVar7;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte bVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined3 in_register_00000014;" type_identifier identifier ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint8_t *puVar9;" primitive_type (pointer_declarator "*puVar9" * identifier) ;) (declaration "uint8_t *puVar10;" primitive_type (pointer_declarator "*puVar10" * identifier) ;) (declaration "undefined *puVar11;" type_identifier (pointer_declarator "*puVar11" * identifier) ;) (declaration "int sense_cat;" primitive_type identifier ;) (declaration "uint8_t logs_cdb [10];" primitive_type (array_declarator "logs_cdb [10]" identifier [ number_literal ]) ;) (declaration "uint8_t auStack_6e [2];" primitive_type (array_declarator "auStack_6e [2]" identifier [ number_literal ]) ;) (declaration "uint8_t sense_b [64];" primitive_type (array_declarator "sense_b [64]" identifier [ number_literal ]) ;) (expression_statement "puVar1 = PTR___stack_chk_guard_00054a4c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00054a4c" identifier = identifier) ;) (expression_statement "puVar11 = PTR_s_tatus_00054840;" (assignment_expression "puVar11 = PTR_s_tatus_00054840" identifier = identifier) ;) (expression_statement "iVar7 = *(int *)PTR___stack_chk_guard_00054a4c;" (assignment_expression "iVar7 = *(int *)PTR___stack_chk_guard_00054a4c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00054a4c" * (cast_expression "(int *)PTR___stack_chk_guard_00054a4c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "logs_cdb[0] = 'M';" (assignment_expression "logs_cdb[0] = 'M'" (subscript_expression "logs_cdb[0]" identifier [ number_literal ]) = (char_literal "'M'" ' character ')) ;) (expression_statement "logs_cdb[1] = '\0';" (assignment_expression "logs_cdb[1] = '\0'" (subscript_expression "logs_cdb[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "logs_cdb[2] = '\0';" (assignment_expression "logs_cdb[2] = '\0'" (subscript_expression "logs_cdb[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "logs_cdb[3] = '\0';" (assignment_expression "logs_cdb[3] = '\0'" (subscript_expression "logs_cdb[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "logs_cdb[4] = '\0';" (assignment_expression "logs_cdb[4] = '\0'" (subscript_expression "logs_cdb[4]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "logs_cdb[5] = '\0';" (assignment_expression "logs_cdb[5] = '\0'" (subscript_expression "logs_cdb[5]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "logs_cdb[6] = '\0';" (assignment_expression "logs_cdb[6] = '\0'" (subscript_expression "logs_cdb[6]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "logs_cdb[7] = '\0';" (assignment_expression "logs_cdb[7] = '\0'" (subscript_expression "logs_cdb[7]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "logs_cdb[8] = '\0';" (assignment_expression "logs_cdb[8] = '\0'" (subscript_expression "logs_cdb[8]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "logs_cdb[9] = '\0';" (assignment_expression "logs_cdb[9] = '\0'" (subscript_expression "logs_cdb[9]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (mx_resp_len < 0x10000) {\n    sense_cat = CONCAT22((short)mx_resp_len,sense_cat._2_2_);\n    bVar6 = 2;\n    if (CONCAT31(in_register_00000014,ppc) == 0) {\n      bVar6 = 0;\n    }\n    logs_cdb._4_4_ = ZEXT34(CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8)));\n    logs_cdb._1_3_ = (uint3)(bVar6 | sp) << 0x10;\n    logs_cdb[0] = 'M';\n    logs_cdb._8_2_ = (ushort)(byte)mx_resp_len << 8;\n    logs_cdb[2] = (byte)(pc << 6) | (byte)pg_code & 0x3f;\n    logs_cdb[3] = (uint8_t)subpg_code;\n    if (verbose != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar8 = PTR_LAB_0005483c + 0x1f1c;\n      puVar9 = logs_cdb;\n      do {\n        puVar10 = puVar9 + 1;\n        (*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);\n        puVar9 = puVar10;\n      } while (puVar10 != auStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (timeout_secs < 1) {\n      timeout_secs = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,logs_cdb,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,sense_b,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,resp,mx_resp_len);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)\n      ;\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (residp != (int *)0x0) {\n        *residp = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (mx_resp_len < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar11 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" if (parenthesized_expression "(mx_resp_len < 0x10000)" ( (binary_expression "mx_resp_len < 0x10000" identifier < number_literal) )) (compound_statement "{\n    sense_cat = CONCAT22((short)mx_resp_len,sense_cat._2_2_);\n    bVar6 = 2;\n    if (CONCAT31(in_register_00000014,ppc) == 0) {\n      bVar6 = 0;\n    }\n    logs_cdb._4_4_ = ZEXT34(CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8)));\n    logs_cdb._1_3_ = (uint3)(bVar6 | sp) << 0x10;\n    logs_cdb[0] = 'M';\n    logs_cdb._8_2_ = (ushort)(byte)mx_resp_len << 8;\n    logs_cdb[2] = (byte)(pc << 6) | (byte)pg_code & 0x3f;\n    logs_cdb[3] = (uint8_t)subpg_code;\n    if (verbose != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar8 = PTR_LAB_0005483c + 0x1f1c;\n      puVar9 = logs_cdb;\n      do {\n        puVar10 = puVar9 + 1;\n        (*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);\n        puVar9 = puVar10;\n      } while (puVar10 != auStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (timeout_secs < 1) {\n      timeout_secs = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,logs_cdb,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,sense_b,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,resp,mx_resp_len);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)\n      ;\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (residp != (int *)0x0) {\n        *residp = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (mx_resp_len < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar11 + -0x14a8);\n  }" { (expression_statement "sense_cat = CONCAT22((short)mx_resp_len,sense_cat._2_2_);" (assignment_expression "sense_cat = CONCAT22((short)mx_resp_len,sense_cat._2_2_)" identifier = (call_expression "CONCAT22((short)mx_resp_len,sense_cat._2_2_)" identifier (argument_list "((short)mx_resp_len,sense_cat._2_2_)" ( (cast_expression "(short)mx_resp_len" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) , (field_expression "sense_cat._2_2_" identifier . field_identifier) )))) ;) (expression_statement "bVar6 = 2;" (assignment_expression "bVar6 = 2" identifier = number_literal) ;) (if_statement "if (CONCAT31(in_register_00000014,ppc) == 0) {\n      bVar6 = 0;\n    }" if (parenthesized_expression "(CONCAT31(in_register_00000014,ppc) == 0)" ( (binary_expression "CONCAT31(in_register_00000014,ppc) == 0" (call_expression "CONCAT31(in_register_00000014,ppc)" identifier (argument_list "(in_register_00000014,ppc)" ( identifier , identifier ))) == number_literal) )) (compound_statement "{\n      bVar6 = 0;\n    }" { (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) })) (expression_statement "logs_cdb._4_4_ = ZEXT34(CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8)));" (assignment_expression "logs_cdb._4_4_ = ZEXT34(CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8)))" (field_expression "logs_cdb._4_4_" identifier . field_identifier) = (call_expression "ZEXT34(CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8)))" identifier (argument_list "(CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8)))" ( (call_expression "CONCAT21((short)paramp,(char)((uint)mx_resp_len >> 8))" identifier (argument_list "((short)paramp,(char)((uint)mx_resp_len >> 8))" ( (cast_expression "(short)paramp" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) , (cast_expression "(char)((uint)mx_resp_len >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)mx_resp_len >> 8)" ( (binary_expression "(uint)mx_resp_len >> 8" (cast_expression "(uint)mx_resp_len" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) ))) )))) ;) (expression_statement "logs_cdb._1_3_ = (uint3)(bVar6 | sp) << 0x10;" (assignment_expression "logs_cdb._1_3_ = (uint3)(bVar6 | sp) << 0x10" (field_expression "logs_cdb._1_3_" identifier . field_identifier) = (binary_expression "(uint3)(bVar6 | sp) << 0x10" (call_expression "(uint3)(bVar6 | sp)" (parenthesized_expression "(uint3)" ( identifier )) (argument_list "(bVar6 | sp)" ( (binary_expression "bVar6 | sp" identifier | identifier) ))) << number_literal)) ;) (expression_statement "logs_cdb[0] = 'M';" (assignment_expression "logs_cdb[0] = 'M'" (subscript_expression "logs_cdb[0]" identifier [ number_literal ]) = (char_literal "'M'" ' character ')) ;) (expression_statement "logs_cdb._8_2_ = (ushort)(byte)mx_resp_len << 8;" (assignment_expression "logs_cdb._8_2_ = (ushort)(byte)mx_resp_len << 8" (field_expression "logs_cdb._8_2_" identifier . field_identifier) = (binary_expression "(ushort)(byte)mx_resp_len << 8" (cast_expression "(ushort)(byte)mx_resp_len" ( (type_descriptor "ushort" type_identifier) ) (cast_expression "(byte)mx_resp_len" ( (type_descriptor "byte" type_identifier) ) identifier)) << number_literal)) ;) (expression_statement "logs_cdb[2] = (byte)(pc << 6) | (byte)pg_code & 0x3f;" (assignment_expression "logs_cdb[2] = (byte)(pc << 6) | (byte)pg_code & 0x3f" (subscript_expression "logs_cdb[2]" identifier [ number_literal ]) = (binary_expression "(byte)(pc << 6) | (byte)pg_code & 0x3f" (call_expression "(byte)(pc << 6)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(pc << 6)" ( (binary_expression "pc << 6" identifier << number_literal) ))) | (binary_expression "(byte)pg_code & 0x3f" (cast_expression "(byte)pg_code" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal))) ;) (expression_statement "logs_cdb[3] = (uint8_t)subpg_code;" (assignment_expression "logs_cdb[3] = (uint8_t)subpg_code" (subscript_expression "logs_cdb[3]" identifier [ number_literal ]) = (cast_expression "(uint8_t)subpg_code" ( (type_descriptor "uint8_t" primitive_type) ) identifier)) ;) (if_statement "if (verbose != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar8 = PTR_LAB_0005483c + 0x1f1c;\n      puVar9 = logs_cdb;\n      do {\n        puVar10 = puVar9 + 1;\n        (*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);\n        puVar9 = puVar10;\n      } while (puVar10 != auStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }" if (parenthesized_expression "(verbose != 0)" ( (binary_expression "verbose != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar8 = PTR_LAB_0005483c + 0x1f1c;\n      puVar9 = logs_cdb;\n      do {\n        puVar10 = puVar9 + 1;\n        (*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);\n        puVar9 = puVar10;\n      } while (puVar10 != auStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1a50" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x14a8" identifier + number_literal) ))) ;) (expression_statement "puVar8 = PTR_LAB_0005483c + 0x1f1c;" (assignment_expression "puVar8 = PTR_LAB_0005483c + 0x1f1c" identifier = (binary_expression "PTR_LAB_0005483c + 0x1f1c" identifier + number_literal)) ;) (expression_statement "puVar9 = logs_cdb;" (assignment_expression "puVar9 = logs_cdb" identifier = identifier) ;) (do_statement "do {\n        puVar10 = puVar9 + 1;\n        (*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);\n        puVar9 = puVar10;\n      } while (puVar10 != auStack_6e);" do (compound_statement "{\n        puVar10 = puVar9 + 1;\n        (*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);\n        puVar9 = puVar10;\n      }" { (expression_statement "puVar10 = puVar9 + 1;" (assignment_expression "puVar10 = puVar9 + 1" identifier = (binary_expression "puVar9 + 1" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar8,*puVar9)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar8,*puVar9)" ( identifier , (pointer_expression "*puVar9" * identifier) ))) ;) (expression_statement "puVar9 = puVar10;" (assignment_expression "puVar9 = puVar10" identifier = identifier) ;) }) while (parenthesized_expression "(puVar10 != auStack_6e)" ( (binary_expression "puVar10 != auStack_6e" identifier != identifier) )) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x990)" ( (binary_expression "PTR_s_tatus_00054840 + -0x990" identifier + number_literal) ))) ;) })) (if_statement "if (timeout_secs < 1) {\n      timeout_secs = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" if (parenthesized_expression "(timeout_secs < 1)" ( (binary_expression "timeout_secs < 1" identifier < number_literal) )) (compound_statement "{\n      timeout_secs = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" { (expression_statement "timeout_secs = 0x3c;" (assignment_expression "timeout_secs = 0x3c" identifier = number_literal) ;) (expression_statement "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)()" identifier = (call_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)()" (parenthesized_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)" ( (pointer_expression "*(code *)PTR_construct_scsi_pt_obj_00054a54" * (cast_expression "(code *)PTR_construct_scsi_pt_obj_00054a54" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) }) (else_clause "else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" else (compound_statement "{\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" { (expression_statement "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)()" identifier = (call_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)()" (parenthesized_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)" ( (pointer_expression "*(code *)PTR_construct_scsi_pt_obj_00054a54" * (cast_expression "(code *)PTR_construct_scsi_pt_obj_00054a54" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,logs_cdb,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,sense_b,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,resp,mx_resp_len);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)\n      ;\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (residp != (int *)0x0) {\n        *residp = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (mx_resp_len < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,logs_cdb,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,sense_b,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,resp,mx_resp_len);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)\n      ;\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (residp != (int *)0x0) {\n        *residp = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (mx_resp_len < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }" { (expression_statement "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,logs_cdb,10);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,logs_cdb,10)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_cdb_00054860" * (cast_expression "(code *)PTR_set_scsi_pt_cdb_00054860" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,logs_cdb,10)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,sense_b,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,sense_b,0x40)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_sense_000548f4" * (cast_expression "(code *)PTR_set_scsi_pt_sense_000548f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,sense_b,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,resp,mx_resp_len);" (call_expression "(*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,resp,mx_resp_len)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_data_in_00054a80)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_data_in_00054a80" * (cast_expression "(code *)PTR_set_scsi_pt_data_in_00054a80" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,resp,mx_resp_len)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose);" (assignment_expression "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose)" identifier = (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar2,sg_fd,timeout_secs,verbose)" (parenthesized_expression "(*(code *)PTR_do_scsi_pt_00054984)" ( (pointer_expression "*(code *)PTR_do_scsi_pt_00054984" * (cast_expression "(code *)PTR_do_scsi_pt_00054984" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,sg_fd,timeout_secs,verbose)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)\n      ;" (assignment_expression "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)" identifier = (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)" (parenthesized_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)" ( (pointer_expression "*(code *)PTR_sg_cmds_process_resp_000548d0" * (cast_expression "(code *)PTR_sg_cmds_process_resp_000548d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,puVar11 + -0x14a8,uVar3,mx_resp_len,sense_b,noisy,verbose,&sense_cat)" ( identifier , (binary_expression "puVar11 + -0x14a8" identifier + number_literal) , identifier , identifier , identifier , identifier , identifier , (pointer_expression "&sense_cat" & identifier) )))) ;) (expression_statement "iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);" (assignment_expression "iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2)" identifier = (call_expression "(*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2)" (parenthesized_expression "(*(code *)PTR_get_scsi_pt_resid_0005493c)" ( (pointer_expression "*(code *)PTR_get_scsi_pt_resid_0005493c" * (cast_expression "(code *)PTR_get_scsi_pt_resid_0005493c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (residp != (int *)0x0) {\n        *residp = iVar5;\n      }" if (parenthesized_expression "(residp != (int *)0x0)" ( (binary_expression "residp != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *residp = iVar5;\n      }" { (expression_statement "*residp = iVar5;" (assignment_expression "*residp = iVar5" (pointer_expression "*residp" * identifier) = identifier) ;) })) (if_statement "if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }" { (expression_statement "uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);" (assignment_expression "uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2)" identifier = (call_expression "(*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2)" (parenthesized_expression "(*(code *)PTR_get_scsi_pt_os_err_00054a9c)" ( (pointer_expression "*(code *)PTR_get_scsi_pt_os_err_00054a9c" * (cast_expression "(code *)PTR_get_scsi_pt_os_err_00054a9c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);" (assignment_expression "iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3)" identifier = (call_expression "(*(code *)PTR_sg_convert_errno_00054928)(uVar3)" (parenthesized_expression "(*(code *)PTR_sg_convert_errno_00054928)" ( (pointer_expression "*(code *)PTR_sg_convert_errno_00054928" * (cast_expression "(code *)PTR_sg_convert_errno_00054928" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3)" ( identifier )))) ;) }) (else_clause "else if (iVar4 == -2) {\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }" else (if_statement "if (iVar4 == -2) {\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }" if (parenthesized_expression "(iVar4 == -2)" ( (binary_expression "iVar4 == -2" identifier == number_literal) )) (compound_statement "{\n        iVar4 = sense_cat;\n        if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }" { (expression_statement "iVar4 = sense_cat;" (assignment_expression "iVar4 = sense_cat" identifier = identifier) ;) (if_statement "if (sense_cat - 0x14U < 2) {\n          iVar4 = 0;\n        }" if (parenthesized_expression "(sense_cat - 0x14U < 2)" ( (binary_expression "sense_cat - 0x14U < 2" (binary_expression "sense_cat - 0x14U" identifier - number_literal) < number_literal) )) (compound_statement "{\n          iVar4 = 0;\n        }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) })) }) (else_clause "else if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }" else (if_statement "if ((mx_resp_len < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }" if (parenthesized_expression "((mx_resp_len < 4) || (3 < iVar4))" ( (binary_expression "(mx_resp_len < 4) || (3 < iVar4)" (parenthesized_expression "(mx_resp_len < 4)" ( (binary_expression "mx_resp_len < 4" identifier < number_literal) )) || (parenthesized_expression "(3 < iVar4)" ( (binary_expression "3 < iVar4" number_literal < identifier) ))) )) (compound_statement "{\n        iVar4 = 0;\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }" else (compound_statement "{\n        resp[2] = '\0';\n        resp[3] = '\0';\n        iVar4 = 0;\n      }" { (expression_statement "resp[2] = '\0';" (assignment_expression "resp[2] = '\0'" (subscript_expression "resp[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "resp[3] = '\0';" (assignment_expression "resp[3] = '\0'" (subscript_expression "resp[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }))))))) (expression_statement "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);" (call_expression "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2)" (parenthesized_expression "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)" ( (pointer_expression "*(code *)PTR_destruct_scsi_pt_obj_0005496c" * (cast_expression "(code *)PTR_destruct_scsi_pt_obj_0005496c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (0 < iVar5) {\n        if (mx_resp_len < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }\n      }" if (parenthesized_expression "(0 < iVar5)" ( (binary_expression "0 < iVar5" number_literal < identifier) )) (compound_statement "{\n        if (mx_resp_len < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }\n      }" { (if_statement "if (mx_resp_len < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }" if (parenthesized_expression "(mx_resp_len < iVar5)" ( (binary_expression "mx_resp_len < iVar5" identifier < identifier) )) (compound_statement "{\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x16c0,puVar11 + -0x14a8,iVar5,mx_resp_len)" ( (binary_expression "PTR_s_tatus_00054840 + -0x16c0" identifier + number_literal) , (binary_expression "puVar11 + -0x14a8" identifier + number_literal) , identifier , identifier ))) ;) (if_statement "if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n            iVar4 = 0x61;\n          }" { (expression_statement "iVar4 = 0x61;" (assignment_expression "iVar4 = 0x61" identifier = number_literal) ;) })) }) (else_clause "else {\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }" else (compound_statement "{\n          (*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);\n        }" { (expression_statement "(*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5);" (call_expression "(*(code *)PTR_memset_00054968)(resp + (mx_resp_len - iVar5),0,iVar5)" (parenthesized_expression "(*(code *)PTR_memset_00054968)" ( (pointer_expression "*(code *)PTR_memset_00054968" * (cast_expression "(code *)PTR_memset_00054968" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(resp + (mx_resp_len - iVar5),0,iVar5)" ( (binary_expression "resp + (mx_resp_len - iVar5)" identifier + (parenthesized_expression "(mx_resp_len - iVar5)" ( (binary_expression "mx_resp_len - iVar5" identifier - identifier) ))) , number_literal , identifier ))) ;) }))) })) (goto_statement "goto LAB_00023404;" goto statement_identifier ;) })) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar11 + -0x14a8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar11 + -0x14a8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x1974,puVar11 + -0x14a8)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1974" identifier + number_literal) , (binary_expression "puVar11 + -0x14a8" identifier + number_literal) ))) ;) }) (else_clause "else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" else (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x16fc)" ( (binary_expression "PTR_s_tatus_00054840 + -0x16fc" identifier + number_literal) ))) ;) }))) (if_statement "if (residp == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *residp = 0;\n    iVar4 = -1;\n  }" if (parenthesized_expression "(residp == (int *)0x0)" ( (binary_expression "residp == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = -1;\n  }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    *residp = 0;\n    iVar4 = -1;\n  }" else (compound_statement "{\n    *residp = 0;\n    iVar4 = -1;\n  }" { (expression_statement "*residp = 0;" (assignment_expression "*residp = 0" (pointer_expression "*residp" * identifier) = number_literal) ;) (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) }))) (labeled_statement "LAB_00023404:\n  if (iVar7 == *(int *)puVar1) {\n    return iVar4;\n  }" statement_identifier : (if_statement "if (iVar7 == *(int *)puVar1) {\n    return iVar4;\n  }" if (parenthesized_expression "(iVar7 == *(int *)puVar1)" ( (binary_expression "iVar7 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) }))) (expression_statement "puVar11 = PTR___stack_chk_fail_00054a1c;" (assignment_expression "puVar11 = PTR___stack_chk_fail_00054a1c" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00054a1c)();" (call_expression "(*(code *)PTR___stack_chk_fail_00054a1c)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00054a1c)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00054a1c" * (cast_expression "(code *)PTR___stack_chk_fail_00054a1c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar7 = (**(code **)(puVar11 + 0x3138c))();" (assignment_expression "iVar7 = (**(code **)(puVar11 + 0x3138c))()" identifier = (call_expression "(**(code **)(puVar11 + 0x3138c))()" (parenthesized_expression "(**(code **)(puVar11 + 0x3138c))" ( (pointer_expression "**(code **)(puVar11 + 0x3138c)" * (pointer_expression "*(code **)(puVar11 + 0x3138c)" * (cast_expression "(code **)(puVar11 + 0x3138c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar11 + 0x3138c)" ( (binary_expression "puVar11 + 0x3138c" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar7;" return identifier ;) })))
(translation_unit "int sg_ll_log_sense_v2(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  undefined *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  int local_7c;\n  undefined4 local_78;\n  uint local_74;\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_78 = 0x4d000000;\n  local_74 = 0;\n  local_70 = 0;\n  if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x3138c))();\n  return iVar2;\n}\n\n" (function_definition "int sg_ll_log_sense_v2(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  undefined *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  int local_7c;\n  undefined4 local_78;\n  uint local_74;\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_78 = 0x4d000000;\n  local_74 = 0;\n  local_70 = 0;\n  if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x3138c))();\n  return iVar2;\n}" primitive_type (function_declarator "sg_ll_log_sense_v2(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)" identifier (parameter_list "(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "byte param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "byte param_5" type_identifier identifier) , (parameter_declaration "undefined1 param_6" type_identifier identifier) , (parameter_declaration "undefined2 param_7" type_identifier identifier) , (parameter_declaration "int param_8" primitive_type identifier) , (parameter_declaration "int param_9" primitive_type identifier) , (parameter_declaration "int param_10" primitive_type identifier) , (parameter_declaration "int *param_11" primitive_type (pointer_declarator "*param_11" * identifier)) , (parameter_declaration "undefined1 param_12" type_identifier identifier) , (parameter_declaration "int param_13" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  undefined *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  int local_7c;\n  undefined4 local_78;\n  uint local_74;\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_78 = 0x4d000000;\n  local_74 = 0;\n  local_70 = 0;\n  if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x3138c))();\n  return iVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte bVar6;" type_identifier identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "undefined4 *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "int local_7c;" primitive_type identifier ;) (declaration "undefined4 local_78;" type_identifier identifier ;) (declaration "uint local_74;" type_identifier identifier ;) (declaration "short local_70;" (sized_type_specifier "short" short) identifier ;) (declaration "undefined4 uStack_6e;" type_identifier identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_00054a4c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00054a4c" identifier = identifier) ;) (expression_statement "puVar10 = PTR_s_tatus_00054840;" (assignment_expression "puVar10 = PTR_s_tatus_00054840" identifier = identifier) ;) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_00054a4c;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_00054a4c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00054a4c" * (cast_expression "(int *)PTR___stack_chk_guard_00054a4c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "local_78 = 0x4d000000;" (assignment_expression "local_78 = 0x4d000000" identifier = number_literal) ;) (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" identifier = number_literal) ;) (expression_statement "local_70 = 0;" (assignment_expression "local_70 = 0" identifier = number_literal) ;) (if_statement "if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" if (parenthesized_expression "(param_9 < 0x10000)" ( (binary_expression "param_9 < 0x10000" identifier < number_literal) )) (compound_statement "{\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }" { (expression_statement "local_7c = CONCAT22((short)param_9,local_7c._2_2_);" (assignment_expression "local_7c = CONCAT22((short)param_9,local_7c._2_2_)" identifier = (call_expression "CONCAT22((short)param_9,local_7c._2_2_)" identifier (argument_list "((short)param_9,local_7c._2_2_)" ( (cast_expression "(short)param_9" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) , (field_expression "local_7c._2_2_" identifier . field_identifier) )))) ;) (expression_statement "bVar6 = 2;" (assignment_expression "bVar6 = 2" identifier = number_literal) ;) (if_statement "if (param_2 == 0) {\n      bVar6 = 0;\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      bVar6 = 0;\n    }" { (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) })) (expression_statement "local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));" (assignment_expression "local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8))" identifier = (cast_expression "(uint)CONCAT21(param_7,(char)((uint)param_9 >> 8))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT21(param_7,(char)((uint)param_9 >> 8))" identifier (argument_list "(param_7,(char)((uint)param_9 >> 8))" ( identifier , (cast_expression "(char)((uint)param_9 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)param_9 >> 8)" ( (binary_expression "(uint)param_9 >> 8" (cast_expression "(uint)param_9" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) ))))) ;) (expression_statement "local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);" (assignment_expression "local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10)" identifier = (call_expression "CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10)" identifier (argument_list "(0x4d,(uint3)(bVar6 | param_3) << 0x10)" ( number_literal , (binary_expression "(uint3)(bVar6 | param_3) << 0x10" (call_expression "(uint3)(bVar6 | param_3)" (parenthesized_expression "(uint3)" ( identifier )) (argument_list "(bVar6 | param_3)" ( (binary_expression "bVar6 | param_3" identifier | identifier) ))) << number_literal) )))) ;) (expression_statement "local_70 = (ushort)(byte)param_9 << 8;" (assignment_expression "local_70 = (ushort)(byte)param_9 << 8" identifier = (binary_expression "(ushort)(byte)param_9 << 8" (cast_expression "(ushort)(byte)param_9" ( (type_descriptor "ushort" type_identifier) ) (cast_expression "(byte)param_9" ( (type_descriptor "byte" type_identifier) ) identifier)) << number_literal)) ;) (expression_statement "local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);" (assignment_expression "local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6)" (field_expression "local_78._2_2_" identifier . field_identifier) = (call_expression "CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6)" identifier (argument_list "((byte)(param_4 << 6) | param_5 & 0x3f,param_6)" ( (binary_expression "(byte)(param_4 << 6) | param_5 & 0x3f" (call_expression "(byte)(param_4 << 6)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(param_4 << 6)" ( (binary_expression "param_4 << 6" identifier << number_literal) ))) | (binary_expression "param_5 & 0x3f" identifier & number_literal)) , identifier )))) ;) (if_statement "if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }" if (parenthesized_expression "(param_13 != 0)" ( (binary_expression "param_13 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1a50" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x14a8" identifier + number_literal) ))) ;) (expression_statement "puVar7 = PTR_LAB_0005483c + 0x1f1c;" (assignment_expression "puVar7 = PTR_LAB_0005483c + 0x1f1c" identifier = (binary_expression "PTR_LAB_0005483c + 0x1f1c" identifier + number_literal)) ;) (expression_statement "puVar8 = &local_78;" (assignment_expression "puVar8 = &local_78" identifier = (pointer_expression "&local_78" & identifier)) ;) (do_statement "do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);" do (compound_statement "{\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      }" { (expression_statement "puVar9 = (undefined4 *)((int)puVar8 + 1);" (assignment_expression "puVar9 = (undefined4 *)((int)puVar8 + 1)" identifier = (cast_expression "(undefined4 *)((int)puVar8 + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar8 + 1)" ( (binary_expression "(int)puVar8 + 1" (cast_expression "(int)puVar8" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar7,*(undefined1 *)puVar8)" ( identifier , (pointer_expression "*(undefined1 *)puVar8" * (cast_expression "(undefined1 *)puVar8" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ))) ;) (expression_statement "puVar8 = puVar9;" (assignment_expression "puVar8 = puVar9" identifier = identifier) ;) }) while (parenthesized_expression "(puVar9 != &uStack_6e)" ( (binary_expression "puVar9 != &uStack_6e" identifier != (pointer_expression "&uStack_6e" & identifier)) )) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x990)" ( (binary_expression "PTR_s_tatus_00054840 + -0x990" identifier + number_literal) ))) ;) })) (if_statement "if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" if (parenthesized_expression "(param_10 < 1)" ( (binary_expression "param_10 < 1" identifier < number_literal) )) (compound_statement "{\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" { (expression_statement "param_10 = 0x3c;" (assignment_expression "param_10 = 0x3c" identifier = number_literal) ;) (expression_statement "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)()" identifier = (call_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)()" (parenthesized_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)" ( (pointer_expression "*(code *)PTR_construct_scsi_pt_obj_00054a54" * (cast_expression "(code *)PTR_construct_scsi_pt_obj_00054a54" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) }) (else_clause "else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" else (compound_statement "{\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" { (expression_statement "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)()" identifier = (call_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)()" (parenthesized_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)" ( (pointer_expression "*(code *)PTR_construct_scsi_pt_obj_00054a54" * (cast_expression "(code *)PTR_construct_scsi_pt_obj_00054a54" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }" { (expression_statement "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_cdb_00054860" * (cast_expression "(code *)PTR_set_scsi_pt_cdb_00054860" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,&local_78,10)" ( identifier , (pointer_expression "&local_78" & identifier) , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_sense_000548f4" * (cast_expression "(code *)PTR_set_scsi_pt_sense_000548f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,(int)&uStack_6e + 2,0x40)" ( identifier , (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&uStack_6e" & identifier)) + number_literal) , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);" (call_expression "(*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_data_in_00054a80)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_data_in_00054a80" * (cast_expression "(code *)PTR_set_scsi_pt_data_in_00054a80" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_8,param_9)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);" (assignment_expression "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13)" identifier = (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13)" (parenthesized_expression "(*(code *)PTR_do_scsi_pt_00054984)" ( (pointer_expression "*(code *)PTR_do_scsi_pt_00054984" * (cast_expression "(code *)PTR_do_scsi_pt_00054984" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_1,param_10,param_13)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);" (assignment_expression "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c)" identifier = (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c)" (parenthesized_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)" ( (pointer_expression "*(code *)PTR_sg_cmds_process_resp_000548d0" * (cast_expression "(code *)PTR_sg_cmds_process_resp_000548d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c)" ( identifier , (binary_expression "puVar10 + -0x14a8" identifier + number_literal) , identifier , identifier , (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&uStack_6e" & identifier)) + number_literal) , identifier , identifier , (pointer_expression "&local_7c" & identifier) )))) ;) (expression_statement "iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);" (assignment_expression "iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2)" identifier = (call_expression "(*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2)" (parenthesized_expression "(*(code *)PTR_get_scsi_pt_resid_0005493c)" ( (pointer_expression "*(code *)PTR_get_scsi_pt_resid_0005493c" * (cast_expression "(code *)PTR_get_scsi_pt_resid_0005493c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }" if (parenthesized_expression "(param_11 != (int *)0x0)" ( (binary_expression "param_11 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *param_11 = iVar5;\n      }" { (expression_statement "*param_11 = iVar5;" (assignment_expression "*param_11 = iVar5" (pointer_expression "*param_11" * identifier) = identifier) ;) })) (if_statement "if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }" { (expression_statement "uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);" (assignment_expression "uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2)" identifier = (call_expression "(*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2)" (parenthesized_expression "(*(code *)PTR_get_scsi_pt_os_err_00054a9c)" ( (pointer_expression "*(code *)PTR_get_scsi_pt_os_err_00054a9c" * (cast_expression "(code *)PTR_get_scsi_pt_os_err_00054a9c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);" (assignment_expression "iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3)" identifier = (call_expression "(*(code *)PTR_sg_convert_errno_00054928)(uVar3)" (parenthesized_expression "(*(code *)PTR_sg_convert_errno_00054928)" ( (pointer_expression "*(code *)PTR_sg_convert_errno_00054928" * (cast_expression "(code *)PTR_sg_convert_errno_00054928" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3)" ( identifier )))) ;) }) (else_clause "else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" else (if_statement "if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" if (parenthesized_expression "(iVar4 == -2)" ( (binary_expression "iVar4 == -2" identifier == number_literal) )) (compound_statement "{\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }" { (expression_statement "iVar4 = local_7c;" (assignment_expression "iVar4 = local_7c" identifier = identifier) ;) (if_statement "if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }" if (parenthesized_expression "(local_7c - 0x14U < 2)" ( (binary_expression "local_7c - 0x14U < 2" (binary_expression "local_7c - 0x14U" identifier - number_literal) < number_literal) )) (compound_statement "{\n          iVar4 = 0;\n        }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) })) }) (else_clause "else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" else (if_statement "if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" if (parenthesized_expression "((param_9 < 4) || (3 < iVar4))" ( (binary_expression "(param_9 < 4) || (3 < iVar4)" (parenthesized_expression "(param_9 < 4)" ( (binary_expression "param_9 < 4" identifier < number_literal) )) || (parenthesized_expression "(3 < iVar4)" ( (binary_expression "3 < iVar4" number_literal < identifier) ))) )) (compound_statement "{\n        iVar4 = 0;\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" else (compound_statement "{\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" { (expression_statement "*(undefined1 *)(param_8 + 2) = 0;" (assignment_expression "*(undefined1 *)(param_8 + 2) = 0" (pointer_expression "*(undefined1 *)(param_8 + 2)" * (cast_expression "(undefined1 *)(param_8 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_8 + 2)" ( (binary_expression "param_8 + 2" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(param_8 + 3) = 0;" (assignment_expression "*(undefined1 *)(param_8 + 3) = 0" (pointer_expression "*(undefined1 *)(param_8 + 3)" * (cast_expression "(undefined1 *)(param_8 + 3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_8 + 3)" ( (binary_expression "param_8 + 3" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }))))))) (expression_statement "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);" (call_expression "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2)" (parenthesized_expression "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)" ( (pointer_expression "*(code *)PTR_destruct_scsi_pt_obj_0005496c" * (cast_expression "(code *)PTR_destruct_scsi_pt_obj_0005496c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }" if (parenthesized_expression "(0 < iVar5)" ( (binary_expression "0 < iVar5" number_literal < identifier) )) (compound_statement "{\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }" { (if_statement "if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }" if (parenthesized_expression "(param_9 < iVar5)" ( (binary_expression "param_9 < iVar5" identifier < identifier) )) (compound_statement "{\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9)" ( (binary_expression "PTR_s_tatus_00054840 + -0x16c0" identifier + number_literal) , (binary_expression "puVar10 + -0x14a8" identifier + number_literal) , identifier , identifier ))) ;) (if_statement "if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n            iVar4 = 0x61;\n          }" { (expression_statement "iVar4 = 0x61;" (assignment_expression "iVar4 = 0x61" identifier = number_literal) ;) })) }) (else_clause "else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }" else (compound_statement "{\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }" { (expression_statement "(*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);" (call_expression "(*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5)" (parenthesized_expression "(*(code *)PTR_memset_00054968)" ( (pointer_expression "*(code *)PTR_memset_00054968" * (cast_expression "(code *)PTR_memset_00054968" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_8 + (param_9 - iVar5),0,iVar5)" ( (binary_expression "param_8 + (param_9 - iVar5)" identifier + (parenthesized_expression "(param_9 - iVar5)" ( (binary_expression "param_9 - iVar5" identifier - identifier) ))) , number_literal , identifier ))) ;) }))) })) (goto_statement "goto LAB_00023404;" goto statement_identifier ;) })) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1974" identifier + number_literal) , (binary_expression "puVar10 + -0x14a8" identifier + number_literal) ))) ;) }) (else_clause "else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" else (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x16fc)" ( (binary_expression "PTR_s_tatus_00054840 + -0x16fc" identifier + number_literal) ))) ;) }))) (if_statement "if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }" if (parenthesized_expression "(param_11 == (int *)0x0)" ( (binary_expression "param_11 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = -1;\n  }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }" else (compound_statement "{\n    *param_11 = 0;\n    iVar4 = -1;\n  }" { (expression_statement "*param_11 = 0;" (assignment_expression "*param_11 = 0" (pointer_expression "*param_11" * identifier) = number_literal) ;) (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) }))) (labeled_statement "LAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }" statement_identifier : (if_statement "if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }" if (parenthesized_expression "(local_2c == *(int *)puVar1)" ( (binary_expression "local_2c == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) }))) (expression_statement "puVar10 = PTR___stack_chk_fail_00054a1c;" (assignment_expression "puVar10 = PTR___stack_chk_fail_00054a1c" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00054a1c)();" (call_expression "(*(code *)PTR___stack_chk_fail_00054a1c)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00054a1c)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00054a1c" * (cast_expression "(code *)PTR___stack_chk_fail_00054a1c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar2 = (**(code **)(puVar10 + 0x3138c))();" (assignment_expression "iVar2 = (**(code **)(puVar10 + 0x3138c))()" identifier = (call_expression "(**(code **)(puVar10 + 0x3138c))()" (parenthesized_expression "(**(code **)(puVar10 + 0x3138c))" ( (pointer_expression "**(code **)(puVar10 + 0x3138c)" * (pointer_expression "*(code **)(puVar10 + 0x3138c)" * (cast_expression "(code **)(puVar10 + 0x3138c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x3138c)" ( (binary_expression "puVar10 + 0x3138c" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar2;" 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 IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier short) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT) , (field_expression IDENT . field_identifier) )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT | IDENT) ))) << LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) << LIT)) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (call_expression IDENT (argument_list ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT << LIT) ))) | (binary_expression IDENT & LIT)) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (pointer_expression & IDENT)) )) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression & IDENT)) + LIT) , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression IDENT + LIT) , IDENT , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression & IDENT)) + LIT) , IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))))))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) , LIT , IDENT ))) ;) }))) })) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( )))) ;) (return_statement return IDENT ;) })))
(function_definition "int sg_ll_log_sense_v2(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  undefined *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  int local_7c;\n  undefined4 local_78;\n  uint local_74;\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_78 = 0x4d000000;\n  local_74 = 0;\n  local_70 = 0;\n  if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x3138c))();\n  return iVar2;\n}" (primitive_type "int") (function_declarator "sg_ll_log_sense_v2(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)" (identifier "sg_ll_log_sense_v2") (parameter_list "(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,\n                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,\n                      int *param_11,undefined1 param_12,int param_13)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "byte param_3" (type_identifier "byte") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "byte param_5" (type_identifier "byte") (identifier "param_5")) (, ",") (parameter_declaration "undefined1 param_6" (type_identifier "undefined1") (identifier "param_6")) (, ",") (parameter_declaration "undefined2 param_7" (type_identifier "undefined2") (identifier "param_7")) (, ",") (parameter_declaration "int param_8" (primitive_type "int") (identifier "param_8")) (, ",") (parameter_declaration "int param_9" (primitive_type "int") (identifier "param_9")) (, ",") (parameter_declaration "int param_10" (primitive_type "int") (identifier "param_10")) (, ",") (parameter_declaration "int *param_11" (primitive_type "int") (pointer_declarator "*param_11" (* "*") (identifier "param_11"))) (, ",") (parameter_declaration "undefined1 param_12" (type_identifier "undefined1") (identifier "param_12")) (, ",") (parameter_declaration "int param_13" (primitive_type "int") (identifier "param_13")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  byte bVar6;\n  undefined *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  int local_7c;\n  undefined4 local_78;\n  uint local_74;\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_78 = 0x4d000000;\n  local_74 = 0;\n  local_70 = 0;\n  if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }\n  if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }\nLAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x3138c))();\n  return iVar2;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "byte bVar6;" (type_identifier "byte") (identifier "bVar6") (; ";")) (declaration "undefined *puVar7;" (type_identifier "undefined") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "undefined4 *puVar8;" (type_identifier "undefined4") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "undefined4 *puVar9;" (type_identifier "undefined4") (pointer_declarator "*puVar9" (* "*") (identifier "puVar9")) (; ";")) (declaration "undefined *puVar10;" (type_identifier "undefined") (pointer_declarator "*puVar10" (* "*") (identifier "puVar10")) (; ";")) (declaration "int local_7c;" (primitive_type "int") (identifier "local_7c") (; ";")) (declaration "undefined4 local_78;" (type_identifier "undefined4") (identifier "local_78") (; ";")) (declaration "uint local_74;" (type_identifier "uint") (identifier "local_74") (; ";")) (declaration "short local_70;" (sized_type_specifier "short" (short "short")) (identifier "local_70") (; ";")) (declaration "undefined4 uStack_6e;" (type_identifier "undefined4") (identifier "uStack_6e") (; ";")) (declaration "int local_2c;" (primitive_type "int") (identifier "local_2c") (; ";")) (expression_statement "puVar1 = PTR___stack_chk_guard_00054a4c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00054a4c" (identifier "puVar1") (= "=") (identifier "PTR___stack_chk_guard_00054a4c")) (; ";")) (expression_statement "puVar10 = PTR_s_tatus_00054840;" (assignment_expression "puVar10 = PTR_s_tatus_00054840" (identifier "puVar10") (= "=") (identifier "PTR_s_tatus_00054840")) (; ";")) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_00054a4c;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_00054a4c" (identifier "local_2c") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_00054a4c" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_00054a4c" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_00054a4c")))) (; ";")) (expression_statement "local_78 = 0x4d000000;" (assignment_expression "local_78 = 0x4d000000" (identifier "local_78") (= "=") (number_literal "0x4d000000")) (; ";")) (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" (identifier "local_74") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_70 = 0;" (assignment_expression "local_70 = 0" (identifier "local_70") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_9 < 0x10000) {\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" (if "if") (parenthesized_expression "(param_9 < 0x10000)" (( "(") (binary_expression "param_9 < 0x10000" (identifier "param_9") (< "<") (number_literal "0x10000")) () ")")) (compound_statement "{\n    local_7c = CONCAT22((short)param_9,local_7c._2_2_);\n    bVar6 = 2;\n    if (param_2 == 0) {\n      bVar6 = 0;\n    }\n    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));\n    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);\n    local_70 = (ushort)(byte)param_9 << 8;\n    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);\n    if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }\n    if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);\n  }" ({ "{") (expression_statement "local_7c = CONCAT22((short)param_9,local_7c._2_2_);" (assignment_expression "local_7c = CONCAT22((short)param_9,local_7c._2_2_)" (identifier "local_7c") (= "=") (call_expression "CONCAT22((short)param_9,local_7c._2_2_)" (identifier "CONCAT22") (argument_list "((short)param_9,local_7c._2_2_)" (( "(") (cast_expression "(short)param_9" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "param_9")) (, ",") (field_expression "local_7c._2_2_" (identifier "local_7c") (. ".") (field_identifier "_2_2_")) () ")")))) (; ";")) (expression_statement "bVar6 = 2;" (assignment_expression "bVar6 = 2" (identifier "bVar6") (= "=") (number_literal "2")) (; ";")) (if_statement "if (param_2 == 0) {\n      bVar6 = 0;\n    }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      bVar6 = 0;\n    }" ({ "{") (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" (identifier "bVar6") (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));" (assignment_expression "local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8))" (identifier "local_74") (= "=") (cast_expression "(uint)CONCAT21(param_7,(char)((uint)param_9 >> 8))" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CONCAT21(param_7,(char)((uint)param_9 >> 8))" (identifier "CONCAT21") (argument_list "(param_7,(char)((uint)param_9 >> 8))" (( "(") (identifier "param_7") (, ",") (cast_expression "(char)((uint)param_9 >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)param_9 >> 8)" (( "(") (binary_expression "(uint)param_9 >> 8" (cast_expression "(uint)param_9" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_9")) (>> ">>") (number_literal "8")) () ")"))) () ")"))))) (; ";")) (expression_statement "local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);" (assignment_expression "local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10)" (identifier "local_78") (= "=") (call_expression "CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10)" (identifier "CONCAT13") (argument_list "(0x4d,(uint3)(bVar6 | param_3) << 0x10)" (( "(") (number_literal "0x4d") (, ",") (binary_expression "(uint3)(bVar6 | param_3) << 0x10" (call_expression "(uint3)(bVar6 | param_3)" (parenthesized_expression "(uint3)" (( "(") (identifier "uint3") () ")")) (argument_list "(bVar6 | param_3)" (( "(") (binary_expression "bVar6 | param_3" (identifier "bVar6") (| "|") (identifier "param_3")) () ")"))) (<< "<<") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "local_70 = (ushort)(byte)param_9 << 8;" (assignment_expression "local_70 = (ushort)(byte)param_9 << 8" (identifier "local_70") (= "=") (binary_expression "(ushort)(byte)param_9 << 8" (cast_expression "(ushort)(byte)param_9" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (cast_expression "(byte)param_9" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_9"))) (<< "<<") (number_literal "8"))) (; ";")) (expression_statement "local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);" (assignment_expression "local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6)" (field_expression "local_78._2_2_" (identifier "local_78") (. ".") (field_identifier "_2_2_")) (= "=") (call_expression "CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6)" (identifier "CONCAT11") (argument_list "((byte)(param_4 << 6) | param_5 & 0x3f,param_6)" (( "(") (binary_expression "(byte)(param_4 << 6) | param_5 & 0x3f" (call_expression "(byte)(param_4 << 6)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(param_4 << 6)" (( "(") (binary_expression "param_4 << 6" (identifier "param_4") (<< "<<") (number_literal "6")) () ")"))) (| "|") (binary_expression "param_5 & 0x3f" (identifier "param_5") (& "&") (number_literal "0x3f"))) (, ",") (identifier "param_6") () ")")))) (; ";")) (if_statement "if (param_13 != 0) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }" (if "if") (parenthesized_expression "(param_13 != 0)" (( "(") (binary_expression "param_13 != 0" (identifier "param_13") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);\n      puVar7 = PTR_LAB_0005483c + 0x1f1c;\n      puVar8 = &local_78;\n      do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    }" ({ "{") (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" (( "(") (pointer_expression "*(code *)PTR_pr2ws_000548ec" (* "*") (cast_expression "(code *)PTR_pr2ws_000548ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pr2ws_000548ec"))) () ")")) (argument_list "(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x1a50" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x1a50")) (, ",") (binary_expression "PTR_s_tatus_00054840 + -0x14a8" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x14a8")) () ")"))) (; ";")) (expression_statement "puVar7 = PTR_LAB_0005483c + 0x1f1c;" (assignment_expression "puVar7 = PTR_LAB_0005483c + 0x1f1c" (identifier "puVar7") (= "=") (binary_expression "PTR_LAB_0005483c + 0x1f1c" (identifier "PTR_LAB_0005483c") (+ "+") (number_literal "0x1f1c"))) (; ";")) (expression_statement "puVar8 = &local_78;" (assignment_expression "puVar8 = &local_78" (identifier "puVar8") (= "=") (pointer_expression "&local_78" (& "&") (identifier "local_78"))) (; ";")) (do_statement "do {\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      } while (puVar9 != &uStack_6e);" (do "do") (compound_statement "{\n        puVar9 = (undefined4 *)((int)puVar8 + 1);\n        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);\n        puVar8 = puVar9;\n      }" ({ "{") (expression_statement "puVar9 = (undefined4 *)((int)puVar8 + 1);" (assignment_expression "puVar9 = (undefined4 *)((int)puVar8 + 1)" (identifier "puVar9") (= "=") (cast_expression "(undefined4 *)((int)puVar8 + 1)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar8 + 1)" (( "(") (binary_expression "(int)puVar8 + 1" (cast_expression "(int)puVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar8")) (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" (( "(") (pointer_expression "*(code *)PTR_pr2ws_000548ec" (* "*") (cast_expression "(code *)PTR_pr2ws_000548ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pr2ws_000548ec"))) () ")")) (argument_list "(puVar7,*(undefined1 *)puVar8)" (( "(") (identifier "puVar7") (, ",") (pointer_expression "*(undefined1 *)puVar8" (* "*") (cast_expression "(undefined1 *)puVar8" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar8"))) () ")"))) (; ";")) (expression_statement "puVar8 = puVar9;" (assignment_expression "puVar8 = puVar9" (identifier "puVar8") (= "=") (identifier "puVar9")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar9 != &uStack_6e)" (( "(") (binary_expression "puVar9 != &uStack_6e" (identifier "puVar9") (!= "!=") (pointer_expression "&uStack_6e" (& "&") (identifier "uStack_6e"))) () ")")) (; ";")) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" (( "(") (pointer_expression "*(code *)PTR_pr2ws_000548ec" (* "*") (cast_expression "(code *)PTR_pr2ws_000548ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pr2ws_000548ec"))) () ")")) (argument_list "(PTR_s_tatus_00054840 + -0x990)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x990" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x990")) () ")"))) (; ";")) (} "}"))) (if_statement "if (param_10 < 1) {\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }\n    else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" (if "if") (parenthesized_expression "(param_10 < 1)" (( "(") (binary_expression "param_10 < 1" (identifier "param_10") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n      param_10 = 0x3c;\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" ({ "{") (expression_statement "param_10 = 0x3c;" (assignment_expression "param_10 = 0x3c" (identifier "param_10") (= "=") (number_literal "0x3c")) (; ";")) (expression_statement "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)()" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)()" (parenthesized_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)" (( "(") (pointer_expression "*(code *)PTR_construct_scsi_pt_obj_00054a54" (* "*") (cast_expression "(code *)PTR_construct_scsi_pt_obj_00054a54" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_construct_scsi_pt_obj_00054a54"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")) (else_clause "else {\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" (else "else") (compound_statement "{\n      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n    }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)()" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)()" (parenthesized_expression "(*(code *)PTR_construct_scsi_pt_obj_00054a54)" (( "(") (pointer_expression "*(code *)PTR_construct_scsi_pt_obj_00054a54" (* "*") (cast_expression "(code *)PTR_construct_scsi_pt_obj_00054a54" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_construct_scsi_pt_obj_00054a54"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")))) (if_statement "if (iVar2 != 0) {\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);\n      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);\n      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);\n      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);\n      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);\n      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);\n      if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }\n      if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }\n      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n      if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }\n      goto LAB_00023404;\n    }" ({ "{") (expression_statement "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)" (( "(") (pointer_expression "*(code *)PTR_set_scsi_pt_cdb_00054860" (* "*") (cast_expression "(code *)PTR_set_scsi_pt_cdb_00054860" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_set_scsi_pt_cdb_00054860"))) () ")")) (argument_list "(iVar2,&local_78,10)" (( "(") (identifier "iVar2") (, ",") (pointer_expression "&local_78" (& "&") (identifier "local_78")) (, ",") (number_literal "10") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)" (( "(") (pointer_expression "*(code *)PTR_set_scsi_pt_sense_000548f4" (* "*") (cast_expression "(code *)PTR_set_scsi_pt_sense_000548f4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_set_scsi_pt_sense_000548f4"))) () ")")) (argument_list "(iVar2,(int)&uStack_6e + 2,0x40)" (( "(") (identifier "iVar2") (, ",") (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "&uStack_6e" (& "&") (identifier "uStack_6e"))) (+ "+") (number_literal "2")) (, ",") (number_literal "0x40") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);" (call_expression "(*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_data_in_00054a80)" (( "(") (pointer_expression "*(code *)PTR_set_scsi_pt_data_in_00054a80" (* "*") (cast_expression "(code *)PTR_set_scsi_pt_data_in_00054a80" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_set_scsi_pt_data_in_00054a80"))) () ")")) (argument_list "(iVar2,param_8,param_9)" (( "(") (identifier "iVar2") (, ",") (identifier "param_8") (, ",") (identifier "param_9") () ")"))) (; ";")) (expression_statement "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);" (assignment_expression "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13)" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13)" (parenthesized_expression "(*(code *)PTR_do_scsi_pt_00054984)" (( "(") (pointer_expression "*(code *)PTR_do_scsi_pt_00054984" (* "*") (cast_expression "(code *)PTR_do_scsi_pt_00054984" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_do_scsi_pt_00054984"))) () ")")) (argument_list "(iVar2,param_1,param_10,param_13)" (( "(") (identifier "iVar2") (, ",") (identifier "param_1") (, ",") (identifier "param_10") (, ",") (identifier "param_13") () ")")))) (; ";")) (expression_statement "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c);" (assignment_expression "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c)" (identifier "iVar4") (= "=") (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c)" (parenthesized_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)" (( "(") (pointer_expression "*(code *)PTR_sg_cmds_process_resp_000548d0" (* "*") (cast_expression "(code *)PTR_sg_cmds_process_resp_000548d0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sg_cmds_process_resp_000548d0"))) () ")")) (argument_list "(iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13\n                         ,&local_7c)" (( "(") (identifier "iVar2") (, ",") (binary_expression "puVar10 + -0x14a8" (identifier "puVar10") (+ "+") (number_literal "-0x14a8")) (, ",") (identifier "uVar3") (, ",") (identifier "param_9") (, ",") (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "&uStack_6e" (& "&") (identifier "uStack_6e"))) (+ "+") (number_literal "2")) (, ",") (identifier "param_12") (, ",") (identifier "param_13") (, ",") (pointer_expression "&local_7c" (& "&") (identifier "local_7c")) () ")")))) (; ";")) (expression_statement "iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);" (assignment_expression "iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2)" (identifier "iVar5") (= "=") (call_expression "(*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2)" (parenthesized_expression "(*(code *)PTR_get_scsi_pt_resid_0005493c)" (( "(") (pointer_expression "*(code *)PTR_get_scsi_pt_resid_0005493c" (* "*") (cast_expression "(code *)PTR_get_scsi_pt_resid_0005493c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_get_scsi_pt_resid_0005493c"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (if_statement "if (param_11 != (int *)0x0) {\n        *param_11 = iVar5;\n      }" (if "if") (parenthesized_expression "(param_11 != (int *)0x0)" (( "(") (binary_expression "param_11 != (int *)0x0" (identifier "param_11") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        *param_11 = iVar5;\n      }" ({ "{") (expression_statement "*param_11 = iVar5;" (assignment_expression "*param_11 = iVar5" (pointer_expression "*param_11" (* "*") (identifier "param_11")) (= "=") (identifier "iVar5")) (; ";")) (} "}"))) (if_statement "if (iVar4 == -1) {\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }\n      else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" (if "if") (parenthesized_expression "(iVar4 == -1)" (( "(") (binary_expression "iVar4 == -1" (identifier "iVar4") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n      }" ({ "{") (expression_statement "uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);" (assignment_expression "uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2)" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2)" (parenthesized_expression "(*(code *)PTR_get_scsi_pt_os_err_00054a9c)" (( "(") (pointer_expression "*(code *)PTR_get_scsi_pt_os_err_00054a9c" (* "*") (cast_expression "(code *)PTR_get_scsi_pt_os_err_00054a9c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_get_scsi_pt_os_err_00054a9c"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);" (assignment_expression "iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3)" (identifier "iVar4") (= "=") (call_expression "(*(code *)PTR_sg_convert_errno_00054928)(uVar3)" (parenthesized_expression "(*(code *)PTR_sg_convert_errno_00054928)" (( "(") (pointer_expression "*(code *)PTR_sg_convert_errno_00054928" (* "*") (cast_expression "(code *)PTR_sg_convert_errno_00054928" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sg_convert_errno_00054928"))) () ")")) (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")")))) (; ";")) (} "}")) (else_clause "else if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" (else "else") (if_statement "if (iVar4 == -2) {\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }\n      else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" (if "if") (parenthesized_expression "(iVar4 == -2)" (( "(") (binary_expression "iVar4 == -2" (identifier "iVar4") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n        iVar4 = local_7c;\n        if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }\n      }" ({ "{") (expression_statement "iVar4 = local_7c;" (assignment_expression "iVar4 = local_7c" (identifier "iVar4") (= "=") (identifier "local_7c")) (; ";")) (if_statement "if (local_7c - 0x14U < 2) {\n          iVar4 = 0;\n        }" (if "if") (parenthesized_expression "(local_7c - 0x14U < 2)" (( "(") (binary_expression "local_7c - 0x14U < 2" (binary_expression "local_7c - 0x14U" (identifier "local_7c") (- "-") (number_literal "0x14U")) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n          iVar4 = 0;\n        }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")) (else_clause "else if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" (else "else") (if_statement "if ((param_9 < 4) || (3 < iVar4)) {\n        iVar4 = 0;\n      }\n      else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" (if "if") (parenthesized_expression "((param_9 < 4) || (3 < iVar4))" (( "(") (binary_expression "(param_9 < 4) || (3 < iVar4)" (parenthesized_expression "(param_9 < 4)" (( "(") (binary_expression "param_9 < 4" (identifier "param_9") (< "<") (number_literal "4")) () ")")) (|| "||") (parenthesized_expression "(3 < iVar4)" (( "(") (binary_expression "3 < iVar4" (number_literal "3") (< "<") (identifier "iVar4")) () ")"))) () ")")) (compound_statement "{\n        iVar4 = 0;\n      }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" (else "else") (compound_statement "{\n        *(undefined1 *)(param_8 + 2) = 0;\n        *(undefined1 *)(param_8 + 3) = 0;\n        iVar4 = 0;\n      }" ({ "{") (expression_statement "*(undefined1 *)(param_8 + 2) = 0;" (assignment_expression "*(undefined1 *)(param_8 + 2) = 0" (pointer_expression "*(undefined1 *)(param_8 + 2)" (* "*") (cast_expression "(undefined1 *)(param_8 + 2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_8 + 2)" (( "(") (binary_expression "param_8 + 2" (identifier "param_8") (+ "+") (number_literal "2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined1 *)(param_8 + 3) = 0;" (assignment_expression "*(undefined1 *)(param_8 + 3) = 0" (pointer_expression "*(undefined1 *)(param_8 + 3)" (* "*") (cast_expression "(undefined1 *)(param_8 + 3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_8 + 3)" (( "(") (binary_expression "param_8 + 3" (identifier "param_8") (+ "+") (number_literal "3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (} "}")))))))) (expression_statement "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);" (call_expression "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2)" (parenthesized_expression "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)" (( "(") (pointer_expression "*(code *)PTR_destruct_scsi_pt_obj_0005496c" (* "*") (cast_expression "(code *)PTR_destruct_scsi_pt_obj_0005496c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_destruct_scsi_pt_obj_0005496c"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (if_statement "if (0 < iVar5) {\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }" (if "if") (parenthesized_expression "(0 < iVar5)" (( "(") (binary_expression "0 < iVar5" (number_literal "0") (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n        if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }\n      }" ({ "{") (if_statement "if (param_9 < iVar5) {\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }\n        else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }" (if "if") (parenthesized_expression "(param_9 < iVar5)" (( "(") (binary_expression "param_9 < iVar5" (identifier "param_9") (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n          (*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);\n          if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }\n        }" ({ "{") (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" (( "(") (pointer_expression "*(code *)PTR_pr2ws_000548ec" (* "*") (cast_expression "(code *)PTR_pr2ws_000548ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pr2ws_000548ec"))) () ")")) (argument_list "(PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x16c0" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x16c0")) (, ",") (binary_expression "puVar10 + -0x14a8" (identifier "puVar10") (+ "+") (number_literal "-0x14a8")) (, ",") (identifier "iVar5") (, ",") (identifier "param_9") () ")"))) (; ";")) (if_statement "if (iVar4 == 0) {\n            iVar4 = 0x61;\n          }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            iVar4 = 0x61;\n          }" ({ "{") (expression_statement "iVar4 = 0x61;" (assignment_expression "iVar4 = 0x61" (identifier "iVar4") (= "=") (number_literal "0x61")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }" (else "else") (compound_statement "{\n          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);\n        }" ({ "{") (expression_statement "(*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);" (call_expression "(*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5)" (parenthesized_expression "(*(code *)PTR_memset_00054968)" (( "(") (pointer_expression "*(code *)PTR_memset_00054968" (* "*") (cast_expression "(code *)PTR_memset_00054968" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memset_00054968"))) () ")")) (argument_list "(param_8 + (param_9 - iVar5),0,iVar5)" (( "(") (binary_expression "param_8 + (param_9 - iVar5)" (identifier "param_8") (+ "+") (parenthesized_expression "(param_9 - iVar5)" (( "(") (binary_expression "param_9 - iVar5" (identifier "param_9") (- "-") (identifier "iVar5")) () ")"))) (, ",") (number_literal "0") (, ",") (identifier "iVar5") () ")"))) (; ";")) (} "}")))) (} "}"))) (goto_statement "goto LAB_00023404;" (goto "goto") (statement_identifier "LAB_00023404") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" (( "(") (pointer_expression "*(code *)PTR_pr2ws_000548ec" (* "*") (cast_expression "(code *)PTR_pr2ws_000548ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pr2ws_000548ec"))) () ")")) (argument_list "(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x1974" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x1974")) (, ",") (binary_expression "puVar10 + -0x14a8" (identifier "puVar10") (+ "+") (number_literal "-0x14a8")) () ")"))) (; ";")) (} "}")) (else_clause "else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" (else "else") (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);\n  }" ({ "{") (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" (( "(") (pointer_expression "*(code *)PTR_pr2ws_000548ec" (* "*") (cast_expression "(code *)PTR_pr2ws_000548ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pr2ws_000548ec"))) () ")")) (argument_list "(PTR_s_tatus_00054840 + -0x16fc)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x16fc" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x16fc")) () ")"))) (; ";")) (} "}")))) (if_statement "if (param_11 == (int *)0x0) {\n    iVar4 = -1;\n  }\n  else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }" (if "if") (parenthesized_expression "(param_11 == (int *)0x0)" (( "(") (binary_expression "param_11 == (int *)0x0" (identifier "param_11") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar4 = -1;\n  }" ({ "{") (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" (identifier "iVar4") (= "=") (number_literal "-1")) (; ";")) (} "}")) (else_clause "else {\n    *param_11 = 0;\n    iVar4 = -1;\n  }" (else "else") (compound_statement "{\n    *param_11 = 0;\n    iVar4 = -1;\n  }" ({ "{") (expression_statement "*param_11 = 0;" (assignment_expression "*param_11 = 0" (pointer_expression "*param_11" (* "*") (identifier "param_11")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" (identifier "iVar4") (= "=") (number_literal "-1")) (; ";")) (} "}")))) (labeled_statement "LAB_00023404:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }" (statement_identifier "LAB_00023404") (: ":") (if_statement "if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }" (if "if") (parenthesized_expression "(local_2c == *(int *)puVar1)" (( "(") (binary_expression "local_2c == *(int *)puVar1" (identifier "local_2c") (== "==") (pointer_expression "*(int *)puVar1" (* "*") (cast_expression "(int *)puVar1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1")))) () ")")) (compound_statement "{\n    return iVar4;\n  }" ({ "{") (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))) (expression_statement "puVar10 = PTR___stack_chk_fail_00054a1c;" (assignment_expression "puVar10 = PTR___stack_chk_fail_00054a1c" (identifier "puVar10") (= "=") (identifier "PTR___stack_chk_fail_00054a1c")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_00054a1c)();" (call_expression "(*(code *)PTR___stack_chk_fail_00054a1c)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00054a1c)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_00054a1c" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_00054a1c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_00054a1c"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar2 = (**(code **)(puVar10 + 0x3138c))();" (assignment_expression "iVar2 = (**(code **)(puVar10 + 0x3138c))()" (identifier "iVar2") (= "=") (call_expression "(**(code **)(puVar10 + 0x3138c))()" (parenthesized_expression "(**(code **)(puVar10 + 0x3138c))" (( "(") (pointer_expression "**(code **)(puVar10 + 0x3138c)" (* "*") (pointer_expression "*(code **)(puVar10 + 0x3138c)" (* "*") (cast_expression "(code **)(puVar10 + 0x3138c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar10 + 0x3138c)" (( "(") (binary_expression "puVar10 + 0x3138c" (identifier "puVar10") (+ "+") (number_literal "0x3138c")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) 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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) (field_expression argument: (identifier) field: (field_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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 (identifier) (cast_expression type: (type_descriptor type: (primitive_type)) value: (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: (call_expression function: (identifier) arguments: (argument_list (number_literal) (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))) right: (number_literal)))) (expression_statement (assignment_expression left: (field_expression argument: (identifier) field: (field_identifier)) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (binary_expression left: (identifier) right: (number_literal))) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (identifier))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (number_literal)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier))) right: (number_literal)) (number_literal)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)) (identifier) (identifier) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier))) right: (number_literal)) (identifier) (identifier) (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (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: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (number_literal)) (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (number_literal) (identifier))))))))) (goto_statement label: (statement_identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (number_literal)))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) consequence: (compound_statement (return_statement (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list)))) (return_statement (identifier)))))

int MASKED(undefined4 param_1,int param_2,byte param_3,int param_4,byte param_5,
                      undefined1 param_6,undefined2 param_7,int param_8,int param_9,int param_10,
                      int *param_11,undefined1 param_12,int param_13)

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  byte bVar6;
  undefined *puVar7;
  undefined4 *puVar8;
  undefined4 *puVar9;
  undefined *puVar10;
  int local_7c;
  undefined4 local_78;
  uint local_74;
  short local_70;
  undefined4 uStack_6e;
  int local_2c;
  
  puVar1 = PTR___stack_chk_guard_00054a4c;
  puVar10 = PTR_s_tatus_00054840;
  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;
  local_78 = 0x4d000000;
  local_74 = 0;
  local_70 = 0;
  if (param_9 < 0x10000) {
    local_7c = CONCAT22((short)param_9,local_7c._2_2_);
    bVar6 = 2;
    if (param_2 == 0) {
      bVar6 = 0;
    }
    local_74 = (uint)CONCAT21(param_7,(char)((uint)param_9 >> 8));
    local_78 = CONCAT13(0x4d,(uint3)(bVar6 | param_3) << 0x10);
    local_70 = (ushort)(byte)param_9 << 8;
    local_78._2_2_ = CONCAT11((byte)(param_4 << 6) | param_5 & 0x3f,param_6);
    if (param_13 != 0) {
      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x14a8);
      puVar7 = PTR_LAB_0005483c + 0x1f1c;
      puVar8 = &local_78;
      do {
        puVar9 = (undefined4 *)((int)puVar8 + 1);
        (*(code *)PTR_pr2ws_000548ec)(puVar7,*(undefined1 *)puVar8);
        puVar8 = puVar9;
      } while (puVar9 != &uStack_6e);
      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);
    }
    if (param_10 < 1) {
      param_10 = 0x3c;
      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
    }
    else {
      iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
    }
    if (iVar2 != 0) {
      (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,&local_78,10);
      (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);
      (*(code *)PTR_set_scsi_pt_data_in_00054a80)(iVar2,param_8,param_9);
      uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_10,param_13);
      iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)
                        (iVar2,puVar10 + -0x14a8,uVar3,param_9,(int)&uStack_6e + 2,param_12,param_13
                         ,&local_7c);
      iVar5 = (*(code *)PTR_get_scsi_pt_resid_0005493c)(iVar2);
      if (param_11 != (int *)0x0) {
        *param_11 = iVar5;
      }
      if (iVar4 == -1) {
        uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);
        iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);
      }
      else if (iVar4 == -2) {
        iVar4 = local_7c;
        if (local_7c - 0x14U < 2) {
          iVar4 = 0;
        }
      }
      else if ((param_9 < 4) || (3 < iVar4)) {
        iVar4 = 0;
      }
      else {
        *(undefined1 *)(param_8 + 2) = 0;
        *(undefined1 *)(param_8 + 3) = 0;
        iVar4 = 0;
      }
      (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);
      if (0 < iVar5) {
        if (param_9 < iVar5) {
          (*(code *)PTR_pr2ws_000548ec)
                    (PTR_s_tatus_00054840 + -0x16c0,puVar10 + -0x14a8,iVar5,param_9);
          if (iVar4 == 0) {
            iVar4 = 0x61;
          }
        }
        else {
          (*(code *)PTR_memset_00054968)(param_8 + (param_9 - iVar5),0,iVar5);
        }
      }
      goto LAB_00023404;
    }
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x14a8);
  }
  else {
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x16fc);
  }
  if (param_11 == (int *)0x0) {
    iVar4 = -1;
  }
  else {
    *param_11 = 0;
    iVar4 = -1;
  }
LAB_00023404:
  if (local_2c == *(int *)puVar1) {
    return iVar4;
  }
  puVar10 = PTR___stack_chk_fail_00054a1c;
  (*(code *)PTR___stack_chk_fail_00054a1c)();
  iVar2 = (**(code **)(puVar10 + 0x3138c))();
  return iVar2;
}

