
int sg_ll_mode_select6_v2
              (int sg_fd,_Bool pf,_Bool rtd,_Bool sp,void *paramp,int param_len,_Bool noisy,
              int verbose)

{
  undefined *puVar1;
  byte bVar6;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  int iVar5;
  undefined3 in_register_00000014;
  undefined3 in_register_00000018;
  uint8_t *puVar7;
  uint8_t *puVar8;
  undefined *puVar9;
  undefined *puVar10;
  int sense_cat;
  uint8_t modes_cdb [6];
  uint8_t auStack_6e [2];
  uint8_t sense_b [64];
  
  puVar1 = PTR___stack_chk_guard_00054a4c;
  puVar10 = PTR_s_tatus_00054840;
  bVar6 = 0x10;
  if (CONCAT31(in_register_00000014,pf) == 0) {
    bVar6 = 0;
  }
  modes_cdb[1] = bVar6 | sp;
  iVar2 = *(int *)PTR___stack_chk_guard_00054a4c;
  modes_cdb[0] = '\x15';
  modes_cdb[2] = '\0';
  modes_cdb[3] = '\0';
  if (CONCAT31(in_register_00000018,rtd) != 0) {
    modes_cdb[1] = modes_cdb[1] | 2;
  }
  modes_cdb._4_2_ = (ushort)(byte)param_len << 8;
  if (0xff < param_len) {
    iVar5 = -1;
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);
    goto LAB_00022554;
  }
  if (verbose == 0) {
LAB_00022478:
    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
  }
  else {
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);
    puVar9 = PTR_LAB_0005483c + 0x1f1c;
    puVar7 = modes_cdb;
    do {
      puVar8 = puVar7 + 1;
      (*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7);
      puVar7 = puVar8;
    } while (puVar8 != auStack_6e);
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);
    if (verbose < 2) goto LAB_00022478;
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar10 + -0x1678);
    (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);
    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
  }
  if (iVar3 == 0) {
    iVar5 = -1;
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x1678);
  }
  else {
    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar3,modes_cdb,6);
    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar3,sense_b,0x40);
    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar3,paramp,param_len);
    uVar4 = (*(code *)PTR_do_scsi_pt_00054984)(iVar3,sg_fd,0x3c,verbose);
    iVar5 = (*(code *)PTR_sg_cmds_process_resp_000548d0)
                      (iVar3,puVar10 + -0x1678,uVar4,0,sense_b,noisy,verbose,&sense_cat);
    if (iVar5 == -1) {
      uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3);
      iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4);
    }
    else if (iVar5 == -2) {
      iVar5 = sense_cat;
      if (sense_cat - 0x14U < 2) {
        iVar5 = 0;
      }
    }
    else {
      iVar5 = 0;
    }
    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar3);
  }
LAB_00022554:
  if (iVar2 == *(int *)puVar1) {
    return iVar5;
  }
  puVar10 = PTR___stack_chk_fail_00054a1c;
  (*(code *)PTR___stack_chk_fail_00054a1c)();
  iVar2 = (**(code **)(puVar10 + 0x32300))();
  return iVar2;
}



int sg_ll_mode_select6_v2
              (undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,
              int param_6,undefined1 param_7,int param_8)

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  byte *pbVar5;
  byte *pbVar6;
  undefined *puVar7;
  undefined *puVar8;
  int local_78;
  byte local_74 [2];
  undefined2 local_72;
  short local_70;
  byte abStack_6e [2];
  undefined1 auStack_6c [64];
  int local_2c;
  
  puVar1 = PTR___stack_chk_guard_00054a4c;
  puVar8 = PTR_s_tatus_00054840;
  local_74[1] = 0x10;
  if (param_2 == 0) {
    local_74[1] = 0;
  }
  local_74[1] = local_74[1] | param_4;
  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;
  local_74[0] = 0x15;
  local_72 = 0;
  if (param_3 != 0) {
    local_74[1] = local_74[1] | 2;
  }
  local_70 = (ushort)(byte)param_6 << 8;
  if (0xff < param_6) {
    iVar4 = -1;
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);
    goto LAB_00022554;
  }
  if (param_8 == 0) {
LAB_00022478:
    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
  }
  else {
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);
    puVar7 = PTR_LAB_0005483c + 0x1f1c;
    pbVar5 = local_74;
    do {
      pbVar6 = pbVar5 + 1;
      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);
      pbVar5 = pbVar6;
    } while (pbVar6 != abStack_6e);
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);
    if (param_8 < 2) goto LAB_00022478;
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);
    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);
    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
  }
  if (iVar2 == 0) {
    iVar4 = -1;
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);
  }
  else {
    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);
    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);
    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);
    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);
    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)
                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);
    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_78;
      if (local_78 - 0x14U < 2) {
        iVar4 = 0;
      }
    }
    else {
      iVar4 = 0;
    }
    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);
  }
LAB_00022554:
  if (local_2c == *(int *)puVar1) {
    return iVar4;
  }
  puVar8 = PTR___stack_chk_fail_00054a1c;
  (*(code *)PTR___stack_chk_fail_00054a1c)();
  iVar4 = (**(code **)(puVar8 + 0x32300))();
  return iVar4;
}


lui gp,0x4
addiu gp,gp,-0x5bd0
addu gp,gp,t9
addiu sp,sp,-0xa0
li v0,0x10
sw s2,0x80(sp)
movz v0,zero,a1
lw s2,-0x7dc4(gp)
sw gp,0x20(sp)
or a1,v0,zero
sw s5,0x8c(sp)
sw s4,0x88(sp)
or a1,a1,a3
lw v0,0x0(s2)
or s4,a0,zero
lw s5,0xbc(sp)
sw s3,0x84(sp)
sw v0,0x74(sp)
li v0,0x15
sw s1,0x7c(sp)
sw ra,0x9c(sp)
sw s8,0x98(sp)
sw s7,0x94(sp)
sw s6,0x90(sp)
sw s0,0x78(sp)
sb v0,0x2c(sp)
sh zero,0x2e(sp)
sh zero,0x30(sp)
lw s3,0xb0(sp)
beq a2,zero,0x00022460
_lw s1,0xb4(sp)
ori a1,a1,0x2
slti v0,s1,0x100
sb a1,0x2d(sp)
beq v0,zero,0x00022694
_sb s1,0x30(sp)
bne s5,zero,0x00022594
_lw s7,-0x7fd0(gp)
lw t9,-0x7dbc(gp)
jalr t9
_nop
lw gp,0x20(sp)
beq v0,zero,0x0002263c
_or s0,v0,zero
lw t9,-0x7fb0(gp)
li a2,0x6
addiu a1,sp,0x2c
jalr t9
_or a0,v0,zero
addiu s6,sp,0x34
lw gp,0x20(sp)
li a2,0x40
or a1,s6,zero
lw t9,-0x7f1c(gp)
jalr t9
_or a0,s0,zero
or a2,s1,zero
lw gp,0x20(sp)
or a1,s3,zero
lw t9,-0x7d9c(gp)
jalr t9
_or a0,s0,zero
li a2,0x3c
lw gp,0x20(sp)
or a3,s5,zero
or a1,s4,zero
lw t9,-0x7e8c(gp)
jalr t9
_or a0,s0,zero
addiu v1,sp,0x28
lw gp,0x20(sp)
or a2,v0,zero
lbu v0,0xbb(sp)
or a3,zero,zero
addiu a1,s7,-0x1678
sw v1,0x1c(sp)
sw s5,0x18(sp)
or a0,s0,zero
sw v0,0x14(sp)
lw t9,-0x7f40(gp)
jalr t9
_sw s6,0x10(sp)
li v1,-0x1
beq v0,v1,0x0002266c
_lw gp,0x20(sp)
li v1,-0x2
beq v0,v1,0x0002265c
_lw s1,0x28(sp)
or s1,zero,zero
lw t9,-0x7ea4(gp)
jalr t9
_or a0,s0,zero
lw gp,0x20(sp)
lw a0,0x74(sp)
or v0,s1,zero
lw v1,0x0(s2)
bne a0,v1,0x000226b8
_lw ra,0x9c(sp)
lw s8,0x98(sp)
lw s7,0x94(sp)
lw s6,0x90(sp)
lw s5,0x8c(sp)
lw s4,0x88(sp)
lw s3,0x84(sp)
lw s2,0x80(sp)
lw s1,0x7c(sp)
lw s0,0x78(sp)
jr ra
_addiu sp,sp,0xa0
lw a0,-0x7fd0(gp)
addiu a1,s7,-0x1678
lw t9,-0x7f24(gp)
addiu s0,sp,0x2c
addiu s8,sp,0x32
jalr t9
_addiu a0,a0,-0x1a50
lw gp,0x20(sp)
lw s6,-0x7fd4(gp)
addiu s6,s6,0x1f1c
lw t9,-0x7f24(gp)
addiu s0,s0,0x1
lbu a1,-0x1(s0)
jalr t9
_or a0,s6,zero
bne s0,s8,0x000225bc
_lw gp,0x20(sp)
lw a0,-0x7fd0(gp)
lw t9,-0x7f24(gp)
jalr t9
_addiu a0,a0,-0x990
slti v0,s5,0x2
bne v0,zero,0x00022478
_lw gp,0x20(sp)
lw a0,-0x7fd0(gp)
addiu a1,s7,-0x1678
lw t9,-0x7f24(gp)
jalr t9
_addiu a0,a0,-0x1650
li a2,-0x1
lw gp,0x20(sp)
or a1,s1,zero
lw t9,-0x7f74(gp)
jalr t9
_or a0,s3,zero
lw gp,0x20(sp)
lw t9,-0x7dbc(gp)
jalr t9
_nop
lw gp,0x20(sp)
bne v0,zero,0x00022490
_or s0,v0,zero
lw a0,-0x7fd0(gp)
addiu a1,s7,-0x1678
lw t9,-0x7f24(gp)
li s1,-0x1
jalr t9
_addiu a0,a0,-0x1974
b 0x00022554
_lw gp,0x20(sp)
addiu v0,s1,-0x14
sltiu v0,v0,0x2
b 0x00022544
_movn s1,zero,v0
lw t9,-0x7d74(gp)
jalr t9
_or a0,s0,zero
lw gp,0x20(sp)
lw t9,-0x7ee8(gp)
jalr t9
_or a0,v0,zero
lw gp,0x20(sp)
b 0x00022544
_or s1,v0,zero
lw a1,-0x7fd0(gp)
li s1,-0x1
lw a0,-0x7fd0(gp)
lw t9,-0x7f24(gp)
addiu a1,a1,-0x1678
jalr t9
_addiu a0,a0,-0x1668
b 0x00022554
_lw gp,0x20(sp)
lw t9,-0x7df4(gp)
jalr t9
_nop
(translation_unit "int sg_ll_mode_select6_v2\n              (undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  undefined *puVar7;\n  undefined *puVar8;\n  int local_78;\n  byte local_74 [2];\n  undefined2 local_72;\n  short local_70;\n  byte abStack_6e [2];\n  undefined1 auStack_6c [64];\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  local_74[1] = 0x10;\n  if (param_2 == 0) {\n    local_74[1] = 0;\n  }\n  local_74[1] = local_74[1] | param_4;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_74[0] = 0x15;\n  local_72 = 0;\n  if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }\n  local_70 = (ushort)(byte)param_6 << 8;\n  if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\nLAB_00022554:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar8 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar4 = (**(code **)(puVar8 + 0x32300))();\n  return iVar4;\n}\n\n" (function_definition "int sg_ll_mode_select6_v2\n              (undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  undefined *puVar7;\n  undefined *puVar8;\n  int local_78;\n  byte local_74 [2];\n  undefined2 local_72;\n  short local_70;\n  byte abStack_6e [2];\n  undefined1 auStack_6c [64];\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  local_74[1] = 0x10;\n  if (param_2 == 0) {\n    local_74[1] = 0;\n  }\n  local_74[1] = local_74[1] | param_4;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_74[0] = 0x15;\n  local_72 = 0;\n  if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }\n  local_70 = (ushort)(byte)param_6 << 8;\n  if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\nLAB_00022554:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar8 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar4 = (**(code **)(puVar8 + 0x32300))();\n  return iVar4;\n}" primitive_type (function_declarator "sg_ll_mode_select6_v2\n              (undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)" identifier (parameter_list "(undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "byte param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "int param_6" primitive_type identifier) , (parameter_declaration "undefined1 param_7" type_identifier identifier) , (parameter_declaration "int param_8" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  undefined *puVar7;\n  undefined *puVar8;\n  int local_78;\n  byte local_74 [2];\n  undefined2 local_72;\n  short local_70;\n  byte abStack_6e [2];\n  undefined1 auStack_6c [64];\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  local_74[1] = 0x10;\n  if (param_2 == 0) {\n    local_74[1] = 0;\n  }\n  local_74[1] = local_74[1] | param_4;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_74[0] = 0x15;\n  local_72 = 0;\n  if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }\n  local_70 = (ushort)(byte)param_6 << 8;\n  if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\nLAB_00022554:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar8 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar4 = (**(code **)(puVar8 + 0x32300))();\n  return iVar4;\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 "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "int local_78;" primitive_type identifier ;) (declaration "byte local_74 [2];" type_identifier (array_declarator "local_74 [2]" identifier [ number_literal ]) ;) (declaration "undefined2 local_72;" type_identifier identifier ;) (declaration "short local_70;" (sized_type_specifier "short" short) identifier ;) (declaration "byte abStack_6e [2];" type_identifier (array_declarator "abStack_6e [2]" identifier [ number_literal ]) ;) (declaration "undefined1 auStack_6c [64];" type_identifier (array_declarator "auStack_6c [64]" identifier [ number_literal ]) ;) (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 "puVar8 = PTR_s_tatus_00054840;" (assignment_expression "puVar8 = PTR_s_tatus_00054840" identifier = identifier) ;) (expression_statement "local_74[1] = 0x10;" (assignment_expression "local_74[1] = 0x10" (subscript_expression "local_74[1]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (param_2 == 0) {\n    local_74[1] = 0;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    local_74[1] = 0;\n  }" { (expression_statement "local_74[1] = 0;" (assignment_expression "local_74[1] = 0" (subscript_expression "local_74[1]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "local_74[1] = local_74[1] | param_4;" (assignment_expression "local_74[1] = local_74[1] | param_4" (subscript_expression "local_74[1]" identifier [ number_literal ]) = (binary_expression "local_74[1] | param_4" (subscript_expression "local_74[1]" identifier [ number_literal ]) | 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_74[0] = 0x15;" (assignment_expression "local_74[0] = 0x15" (subscript_expression "local_74[0]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_72 = 0;" (assignment_expression "local_72 = 0" identifier = number_literal) ;) (if_statement "if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    local_74[1] = local_74[1] | 2;\n  }" { (expression_statement "local_74[1] = local_74[1] | 2;" (assignment_expression "local_74[1] = local_74[1] | 2" (subscript_expression "local_74[1]" identifier [ number_literal ]) = (binary_expression "local_74[1] | 2" (subscript_expression "local_74[1]" identifier [ number_literal ]) | number_literal)) ;) })) (expression_statement "local_70 = (ushort)(byte)param_6 << 8;" (assignment_expression "local_70 = (ushort)(byte)param_6 << 8" identifier = (binary_expression "(ushort)(byte)param_6 << 8" (cast_expression "(ushort)(byte)param_6" ( (type_descriptor "ushort" type_identifier) ) (cast_expression "(byte)param_6" ( (type_descriptor "byte" type_identifier) ) identifier)) << number_literal)) ;) (if_statement "if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }" if (parenthesized_expression "(0xff < param_6)" ( (binary_expression "0xff < param_6" number_literal < identifier) )) (compound_statement "{\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678)" (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 + -0x1668,PTR_s_tatus_00054840 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1668" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x1678" identifier + number_literal) ))) ;) (goto_statement "goto LAB_00022554;" goto statement_identifier ;) })) (if_statement "if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" if (parenthesized_expression "(param_8 == 0)" ( (binary_expression "param_8 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" { (labeled_statement "LAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" statement_identifier : (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    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" else (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678)" (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 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1a50" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x1678" 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 "pbVar5 = local_74;" (assignment_expression "pbVar5 = local_74" identifier = identifier) ;) (do_statement "do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);" do (compound_statement "{\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    }" { (expression_statement "pbVar6 = pbVar5 + 1;" (assignment_expression "pbVar6 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5)" (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,*pbVar5)" ( identifier , (pointer_expression "*pbVar5" * identifier) ))) ;) (expression_statement "pbVar5 = pbVar6;" (assignment_expression "pbVar5 = pbVar6" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar6 != abStack_6e)" ( (binary_expression "pbVar6 != abStack_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 (param_8 < 2) goto LAB_00022478;" if (parenthesized_expression "(param_8 < 2)" ( (binary_expression "param_8 < 2" identifier < number_literal) )) (goto_statement "goto LAB_00022478;" goto statement_identifier ;)) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678)" (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 + -0x1650,puVar8 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1650" identifier + number_literal) , (binary_expression "puVar8 + -0x1678" identifier + number_literal) ))) ;) (expression_statement "(*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);" (call_expression "(*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff)" (parenthesized_expression "(*(code *)PTR_hex2stderr_0005489c)" ( (pointer_expression "*(code *)PTR_hex2stderr_0005489c" * (cast_expression "(code *)PTR_hex2stderr_0005489c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_5,param_6,0xffffffff)" ( identifier , 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 "()" ( )))) ;) }))) (if_statement "if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678)" (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,puVar8 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1974" identifier + number_literal) , (binary_expression "puVar8 + -0x1678" identifier + number_literal) ))) ;) }) (else_clause "else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }" else (compound_statement "{\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }" { (expression_statement "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6)" (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_74,6)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,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,auStack_6c,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);" (call_expression "(*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_data_out_00054a74)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_data_out_00054a74" * (cast_expression "(code *)PTR_set_scsi_pt_data_out_00054a74" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_5,param_6)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);" (assignment_expression "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8)" identifier = (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8)" (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,0x3c,param_8)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);" (assignment_expression "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78)" identifier = (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78)" (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,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78)" ( identifier , (binary_expression "puVar8 + -0x1678" identifier + number_literal) , identifier , number_literal , identifier , identifier , identifier , (pointer_expression "&local_78" & 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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }" else (if_statement "if (iVar4 == -2) {\n      iVar4 = local_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }" if (parenthesized_expression "(iVar4 == -2)" ( (binary_expression "iVar4 == -2" identifier == number_literal) )) (compound_statement "{\n      iVar4 = local_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }" { (expression_statement "iVar4 = local_78;" (assignment_expression "iVar4 = local_78" identifier = identifier) ;) (if_statement "if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }" if (parenthesized_expression "(local_78 - 0x14U < 2)" ( (binary_expression "local_78 - 0x14U < 2" (binary_expression "local_78 - 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 {\n      iVar4 = 0;\n    }" else (compound_statement "{\n      iVar4 = 0;\n    }" { (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 ))) ;) }))) (labeled_statement "LAB_00022554:\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 "puVar8 = PTR___stack_chk_fail_00054a1c;" (assignment_expression "puVar8 = 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 "iVar4 = (**(code **)(puVar8 + 0x32300))();" (assignment_expression "iVar4 = (**(code **)(puVar8 + 0x32300))()" identifier = (call_expression "(**(code **)(puVar8 + 0x32300))()" (parenthesized_expression "(**(code **)(puVar8 + 0x32300))" ( (pointer_expression "**(code **)(puVar8 + 0x32300)" * (pointer_expression "*(code **)(puVar8 + 0x32300)" * (cast_expression "(code **)(puVar8 + 0x32300)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar8 + 0x32300)" ( (binary_expression "puVar8 + 0x32300" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "int sg_ll_mode_select6_v2\n              (int sg_fd,_Bool pf,_Bool rtd,_Bool sp,void *paramp,int param_len,_Bool noisy,\n              int verbose)\n\n{\n  undefined *puVar1;\n  byte bVar6;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined3 in_register_00000014;\n  undefined3 in_register_00000018;\n  uint8_t *puVar7;\n  uint8_t *puVar8;\n  undefined *puVar9;\n  undefined *puVar10;\n  int sense_cat;\n  uint8_t modes_cdb [6];\n  uint8_t auStack_6e [2];\n  uint8_t sense_b [64];\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  bVar6 = 0x10;\n  if (CONCAT31(in_register_00000014,pf) == 0) {\n    bVar6 = 0;\n  }\n  modes_cdb[1] = bVar6 | sp;\n  iVar2 = *(int *)PTR___stack_chk_guard_00054a4c;\n  modes_cdb[0] = '\x15';\n  modes_cdb[2] = '\0';\n  modes_cdb[3] = '\0';\n  if (CONCAT31(in_register_00000018,rtd) != 0) {\n    modes_cdb[1] = modes_cdb[1] | 2;\n  }\n  modes_cdb._4_2_ = (ushort)(byte)param_len << 8;\n  if (0xff < param_len) {\n    iVar5 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (verbose == 0) {\nLAB_00022478:\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar9 = PTR_LAB_0005483c + 0x1f1c;\n    puVar7 = modes_cdb;\n    do {\n      puVar8 = puVar7 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7);\n      puVar7 = puVar8;\n    } while (puVar8 != auStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (verbose < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar10 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar3 == 0) {\n    iVar5 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar3,modes_cdb,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar3,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar3,paramp,param_len);\n    uVar4 = (*(code *)PTR_do_scsi_pt_00054984)(iVar3,sg_fd,0x3c,verbose);\n    iVar5 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar3,puVar10 + -0x1678,uVar4,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar5 == -1) {\n      uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3);\n      iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4);\n    }\n    else if (iVar5 == -2) {\n      iVar5 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar5 = 0;\n      }\n    }\n    else {\n      iVar5 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar3);\n  }\nLAB_00022554:\n  if (iVar2 == *(int *)puVar1) {\n    return iVar5;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x32300))();\n  return iVar2;\n}\n\n" (function_definition "int sg_ll_mode_select6_v2\n              (int sg_fd,_Bool pf,_Bool rtd,_Bool sp,void *paramp,int param_len,_Bool noisy,\n              int verbose)\n\n{\n  undefined *puVar1;\n  byte bVar6;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined3 in_register_00000014;\n  undefined3 in_register_00000018;\n  uint8_t *puVar7;\n  uint8_t *puVar8;\n  undefined *puVar9;\n  undefined *puVar10;\n  int sense_cat;\n  uint8_t modes_cdb [6];\n  uint8_t auStack_6e [2];\n  uint8_t sense_b [64];\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  bVar6 = 0x10;\n  if (CONCAT31(in_register_00000014,pf) == 0) {\n    bVar6 = 0;\n  }\n  modes_cdb[1] = bVar6 | sp;\n  iVar2 = *(int *)PTR___stack_chk_guard_00054a4c;\n  modes_cdb[0] = '\x15';\n  modes_cdb[2] = '\0';\n  modes_cdb[3] = '\0';\n  if (CONCAT31(in_register_00000018,rtd) != 0) {\n    modes_cdb[1] = modes_cdb[1] | 2;\n  }\n  modes_cdb._4_2_ = (ushort)(byte)param_len << 8;\n  if (0xff < param_len) {\n    iVar5 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (verbose == 0) {\nLAB_00022478:\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar9 = PTR_LAB_0005483c + 0x1f1c;\n    puVar7 = modes_cdb;\n    do {\n      puVar8 = puVar7 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7);\n      puVar7 = puVar8;\n    } while (puVar8 != auStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (verbose < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar10 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar3 == 0) {\n    iVar5 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar3,modes_cdb,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar3,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar3,paramp,param_len);\n    uVar4 = (*(code *)PTR_do_scsi_pt_00054984)(iVar3,sg_fd,0x3c,verbose);\n    iVar5 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar3,puVar10 + -0x1678,uVar4,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar5 == -1) {\n      uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3);\n      iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4);\n    }\n    else if (iVar5 == -2) {\n      iVar5 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar5 = 0;\n      }\n    }\n    else {\n      iVar5 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar3);\n  }\nLAB_00022554:\n  if (iVar2 == *(int *)puVar1) {\n    return iVar5;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x32300))();\n  return iVar2;\n}" primitive_type (function_declarator "sg_ll_mode_select6_v2\n              (int sg_fd,_Bool pf,_Bool rtd,_Bool sp,void *paramp,int param_len,_Bool noisy,\n              int verbose)" identifier (parameter_list "(int sg_fd,_Bool pf,_Bool rtd,_Bool sp,void *paramp,int param_len,_Bool noisy,\n              int verbose)" ( (parameter_declaration "int sg_fd" primitive_type identifier) , (parameter_declaration "_Bool pf" type_identifier identifier) , (parameter_declaration "_Bool rtd" type_identifier identifier) , (parameter_declaration "_Bool sp" type_identifier identifier) , (parameter_declaration "void *paramp" primitive_type (pointer_declarator "*paramp" * identifier)) , (parameter_declaration "int param_len" primitive_type identifier) , (parameter_declaration "_Bool noisy" type_identifier identifier) , (parameter_declaration "int verbose" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  byte bVar6;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined3 in_register_00000014;\n  undefined3 in_register_00000018;\n  uint8_t *puVar7;\n  uint8_t *puVar8;\n  undefined *puVar9;\n  undefined *puVar10;\n  int sense_cat;\n  uint8_t modes_cdb [6];\n  uint8_t auStack_6e [2];\n  uint8_t sense_b [64];\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar10 = PTR_s_tatus_00054840;\n  bVar6 = 0x10;\n  if (CONCAT31(in_register_00000014,pf) == 0) {\n    bVar6 = 0;\n  }\n  modes_cdb[1] = bVar6 | sp;\n  iVar2 = *(int *)PTR___stack_chk_guard_00054a4c;\n  modes_cdb[0] = '\x15';\n  modes_cdb[2] = '\0';\n  modes_cdb[3] = '\0';\n  if (CONCAT31(in_register_00000018,rtd) != 0) {\n    modes_cdb[1] = modes_cdb[1] | 2;\n  }\n  modes_cdb._4_2_ = (ushort)(byte)param_len << 8;\n  if (0xff < param_len) {\n    iVar5 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (verbose == 0) {\nLAB_00022478:\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar9 = PTR_LAB_0005483c + 0x1f1c;\n    puVar7 = modes_cdb;\n    do {\n      puVar8 = puVar7 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7);\n      puVar7 = puVar8;\n    } while (puVar8 != auStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (verbose < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar10 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar3 == 0) {\n    iVar5 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar3,modes_cdb,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar3,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar3,paramp,param_len);\n    uVar4 = (*(code *)PTR_do_scsi_pt_00054984)(iVar3,sg_fd,0x3c,verbose);\n    iVar5 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar3,puVar10 + -0x1678,uVar4,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar5 == -1) {\n      uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3);\n      iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4);\n    }\n    else if (iVar5 == -2) {\n      iVar5 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar5 = 0;\n      }\n    }\n    else {\n      iVar5 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar3);\n  }\nLAB_00022554:\n  if (iVar2 == *(int *)puVar1) {\n    return iVar5;\n  }\n  puVar10 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar2 = (**(code **)(puVar10 + 0x32300))();\n  return iVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "byte bVar6;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined3 in_register_00000014;" type_identifier identifier ;) (declaration "undefined3 in_register_00000018;" type_identifier identifier ;) (declaration "uint8_t *puVar7;" primitive_type (pointer_declarator "*puVar7" * identifier) ;) (declaration "uint8_t *puVar8;" primitive_type (pointer_declarator "*puVar8" * identifier) ;) (declaration "undefined *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "int sense_cat;" primitive_type identifier ;) (declaration "uint8_t modes_cdb [6];" primitive_type (array_declarator "modes_cdb [6]" 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 "puVar10 = PTR_s_tatus_00054840;" (assignment_expression "puVar10 = PTR_s_tatus_00054840" identifier = identifier) ;) (expression_statement "bVar6 = 0x10;" (assignment_expression "bVar6 = 0x10" identifier = number_literal) ;) (if_statement "if (CONCAT31(in_register_00000014,pf) == 0) {\n    bVar6 = 0;\n  }" if (parenthesized_expression "(CONCAT31(in_register_00000014,pf) == 0)" ( (binary_expression "CONCAT31(in_register_00000014,pf) == 0" (call_expression "CONCAT31(in_register_00000014,pf)" identifier (argument_list "(in_register_00000014,pf)" ( identifier , identifier ))) == number_literal) )) (compound_statement "{\n    bVar6 = 0;\n  }" { (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) })) (expression_statement "modes_cdb[1] = bVar6 | sp;" (assignment_expression "modes_cdb[1] = bVar6 | sp" (subscript_expression "modes_cdb[1]" identifier [ number_literal ]) = (binary_expression "bVar6 | sp" identifier | identifier)) ;) (expression_statement "iVar2 = *(int *)PTR___stack_chk_guard_00054a4c;" (assignment_expression "iVar2 = *(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 "modes_cdb[0] = '\x15';" (assignment_expression "modes_cdb[0] = '\x15'" (subscript_expression "modes_cdb[0]" identifier [ number_literal ]) = (char_literal "'\x15'" ' escape_sequence ')) ;) (expression_statement "modes_cdb[2] = '\0';" (assignment_expression "modes_cdb[2] = '\0'" (subscript_expression "modes_cdb[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "modes_cdb[3] = '\0';" (assignment_expression "modes_cdb[3] = '\0'" (subscript_expression "modes_cdb[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (CONCAT31(in_register_00000018,rtd) != 0) {\n    modes_cdb[1] = modes_cdb[1] | 2;\n  }" if (parenthesized_expression "(CONCAT31(in_register_00000018,rtd) != 0)" ( (binary_expression "CONCAT31(in_register_00000018,rtd) != 0" (call_expression "CONCAT31(in_register_00000018,rtd)" identifier (argument_list "(in_register_00000018,rtd)" ( identifier , identifier ))) != number_literal) )) (compound_statement "{\n    modes_cdb[1] = modes_cdb[1] | 2;\n  }" { (expression_statement "modes_cdb[1] = modes_cdb[1] | 2;" (assignment_expression "modes_cdb[1] = modes_cdb[1] | 2" (subscript_expression "modes_cdb[1]" identifier [ number_literal ]) = (binary_expression "modes_cdb[1] | 2" (subscript_expression "modes_cdb[1]" identifier [ number_literal ]) | number_literal)) ;) })) (expression_statement "modes_cdb._4_2_ = (ushort)(byte)param_len << 8;" (assignment_expression "modes_cdb._4_2_ = (ushort)(byte)param_len << 8" (field_expression "modes_cdb._4_2_" identifier . field_identifier) = (binary_expression "(ushort)(byte)param_len << 8" (cast_expression "(ushort)(byte)param_len" ( (type_descriptor "ushort" type_identifier) ) (cast_expression "(byte)param_len" ( (type_descriptor "byte" type_identifier) ) identifier)) << number_literal)) ;) (if_statement "if (0xff < param_len) {\n    iVar5 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }" if (parenthesized_expression "(0xff < param_len)" ( (binary_expression "0xff < param_len" number_literal < identifier) )) (compound_statement "{\n    iVar5 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }" { (expression_statement "iVar5 = -1;" (assignment_expression "iVar5 = -1" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678)" (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 + -0x1668,PTR_s_tatus_00054840 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1668" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x1678" identifier + number_literal) ))) ;) (goto_statement "goto LAB_00022554;" goto statement_identifier ;) })) (if_statement "if (verbose == 0) {\nLAB_00022478:\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar9 = PTR_LAB_0005483c + 0x1f1c;\n    puVar7 = modes_cdb;\n    do {\n      puVar8 = puVar7 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7);\n      puVar7 = puVar8;\n    } while (puVar8 != auStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (verbose < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar10 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" if (parenthesized_expression "(verbose == 0)" ( (binary_expression "verbose == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00022478:\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" { (labeled_statement "LAB_00022478:\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" statement_identifier : (expression_statement "iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar3 = (*(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    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar9 = PTR_LAB_0005483c + 0x1f1c;\n    puVar7 = modes_cdb;\n    do {\n      puVar8 = puVar7 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7);\n      puVar7 = puVar8;\n    } while (puVar8 != auStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (verbose < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar10 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" else (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar9 = PTR_LAB_0005483c + 0x1f1c;\n    puVar7 = modes_cdb;\n    do {\n      puVar8 = puVar7 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7);\n      puVar7 = puVar8;\n    } while (puVar8 != auStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (verbose < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar10 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678)" (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 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1a50" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x1678" identifier + number_literal) ))) ;) (expression_statement "puVar9 = PTR_LAB_0005483c + 0x1f1c;" (assignment_expression "puVar9 = PTR_LAB_0005483c + 0x1f1c" identifier = (binary_expression "PTR_LAB_0005483c + 0x1f1c" identifier + number_literal)) ;) (expression_statement "puVar7 = modes_cdb;" (assignment_expression "puVar7 = modes_cdb" identifier = identifier) ;) (do_statement "do {\n      puVar8 = puVar7 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7);\n      puVar7 = puVar8;\n    } while (puVar8 != auStack_6e);" do (compound_statement "{\n      puVar8 = puVar7 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7);\n      puVar7 = puVar8;\n    }" { (expression_statement "puVar8 = puVar7 + 1;" (assignment_expression "puVar8 = puVar7 + 1" identifier = (binary_expression "puVar7 + 1" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar9,*puVar7)" (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 "(puVar9,*puVar7)" ( identifier , (pointer_expression "*puVar7" * identifier) ))) ;) (expression_statement "puVar7 = puVar8;" (assignment_expression "puVar7 = puVar8" identifier = identifier) ;) }) while (parenthesized_expression "(puVar8 != auStack_6e)" ( (binary_expression "puVar8 != 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 (verbose < 2) goto LAB_00022478;" if (parenthesized_expression "(verbose < 2)" ( (binary_expression "verbose < 2" identifier < number_literal) )) (goto_statement "goto LAB_00022478;" goto statement_identifier ;)) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar10 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar10 + -0x1678)" (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 + -0x1650,puVar10 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1650" identifier + number_literal) , (binary_expression "puVar10 + -0x1678" identifier + number_literal) ))) ;) (expression_statement "(*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);" (call_expression "(*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff)" (parenthesized_expression "(*(code *)PTR_hex2stderr_0005489c)" ( (pointer_expression "*(code *)PTR_hex2stderr_0005489c" * (cast_expression "(code *)PTR_hex2stderr_0005489c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(paramp,param_len,0xffffffff)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar3 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar3 = (*(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 (iVar3 == 0) {\n    iVar5 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar3,modes_cdb,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar3,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar3,paramp,param_len);\n    uVar4 = (*(code *)PTR_do_scsi_pt_00054984)(iVar3,sg_fd,0x3c,verbose);\n    iVar5 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar3,puVar10 + -0x1678,uVar4,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar5 == -1) {\n      uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3);\n      iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4);\n    }\n    else if (iVar5 == -2) {\n      iVar5 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar5 = 0;\n      }\n    }\n    else {\n      iVar5 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar3);\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar5 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x1678);\n  }" { (expression_statement "iVar5 = -1;" (assignment_expression "iVar5 = -1" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar10 + -0x1678)" (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 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1974" identifier + number_literal) , (binary_expression "puVar10 + -0x1678" identifier + number_literal) ))) ;) }) (else_clause "else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar3,modes_cdb,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar3,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar3,paramp,param_len);\n    uVar4 = (*(code *)PTR_do_scsi_pt_00054984)(iVar3,sg_fd,0x3c,verbose);\n    iVar5 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar3,puVar10 + -0x1678,uVar4,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar5 == -1) {\n      uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3);\n      iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4);\n    }\n    else if (iVar5 == -2) {\n      iVar5 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar5 = 0;\n      }\n    }\n    else {\n      iVar5 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar3);\n  }" else (compound_statement "{\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar3,modes_cdb,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar3,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar3,paramp,param_len);\n    uVar4 = (*(code *)PTR_do_scsi_pt_00054984)(iVar3,sg_fd,0x3c,verbose);\n    iVar5 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar3,puVar10 + -0x1678,uVar4,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar5 == -1) {\n      uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3);\n      iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4);\n    }\n    else if (iVar5 == -2) {\n      iVar5 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar5 = 0;\n      }\n    }\n    else {\n      iVar5 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar3);\n  }" { (expression_statement "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar3,modes_cdb,6);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar3,modes_cdb,6)" (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 "(iVar3,modes_cdb,6)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar3,sense_b,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar3,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 "(iVar3,sense_b,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar3,paramp,param_len);" (call_expression "(*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar3,paramp,param_len)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_data_out_00054a74)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_data_out_00054a74" * (cast_expression "(code *)PTR_set_scsi_pt_data_out_00054a74" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3,paramp,param_len)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar4 = (*(code *)PTR_do_scsi_pt_00054984)(iVar3,sg_fd,0x3c,verbose);" (assignment_expression "uVar4 = (*(code *)PTR_do_scsi_pt_00054984)(iVar3,sg_fd,0x3c,verbose)" identifier = (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar3,sg_fd,0x3c,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 "(iVar3,sg_fd,0x3c,verbose)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "iVar5 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar3,puVar10 + -0x1678,uVar4,0,sense_b,noisy,verbose,&sense_cat);" (assignment_expression "iVar5 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar3,puVar10 + -0x1678,uVar4,0,sense_b,noisy,verbose,&sense_cat)" identifier = (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar3,puVar10 + -0x1678,uVar4,0,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 "(iVar3,puVar10 + -0x1678,uVar4,0,sense_b,noisy,verbose,&sense_cat)" ( identifier , (binary_expression "puVar10 + -0x1678" identifier + number_literal) , identifier , number_literal , identifier , identifier , identifier , (pointer_expression "&sense_cat" & identifier) )))) ;) (if_statement "if (iVar5 == -1) {\n      uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3);\n      iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4);\n    }\n    else if (iVar5 == -2) {\n      iVar5 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar5 = 0;\n      }\n    }\n    else {\n      iVar5 = 0;\n    }" if (parenthesized_expression "(iVar5 == -1)" ( (binary_expression "iVar5 == -1" identifier == number_literal) )) (compound_statement "{\n      uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3);\n      iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4);\n    }" { (expression_statement "uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3);" (assignment_expression "uVar4 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3)" identifier = (call_expression "(*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar3)" (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 "(iVar3)" ( identifier )))) ;) (expression_statement "iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4);" (assignment_expression "iVar5 = (*(code *)PTR_sg_convert_errno_00054928)(uVar4)" identifier = (call_expression "(*(code *)PTR_sg_convert_errno_00054928)(uVar4)" (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 "(uVar4)" ( identifier )))) ;) }) (else_clause "else if (iVar5 == -2) {\n      iVar5 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar5 = 0;\n      }\n    }\n    else {\n      iVar5 = 0;\n    }" else (if_statement "if (iVar5 == -2) {\n      iVar5 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar5 = 0;\n      }\n    }\n    else {\n      iVar5 = 0;\n    }" if (parenthesized_expression "(iVar5 == -2)" ( (binary_expression "iVar5 == -2" identifier == number_literal) )) (compound_statement "{\n      iVar5 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar5 = 0;\n      }\n    }" { (expression_statement "iVar5 = sense_cat;" (assignment_expression "iVar5 = sense_cat" identifier = identifier) ;) (if_statement "if (sense_cat - 0x14U < 2) {\n        iVar5 = 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        iVar5 = 0;\n      }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) })) }) (else_clause "else {\n      iVar5 = 0;\n    }" else (compound_statement "{\n      iVar5 = 0;\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) }))))) (expression_statement "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar3);" (call_expression "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar3)" (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 "(iVar3)" ( identifier ))) ;) }))) (labeled_statement "LAB_00022554:\n  if (iVar2 == *(int *)puVar1) {\n    return iVar5;\n  }" statement_identifier : (if_statement "if (iVar2 == *(int *)puVar1) {\n    return iVar5;\n  }" if (parenthesized_expression "(iVar2 == *(int *)puVar1)" ( (binary_expression "iVar2 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return iVar5;\n  }" { (return_statement "return iVar5;" 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 + 0x32300))();" (assignment_expression "iVar2 = (**(code **)(puVar10 + 0x32300))()" identifier = (call_expression "(**(code **)(puVar10 + 0x32300))()" (parenthesized_expression "(**(code **)(puVar10 + 0x32300))" ( (pointer_expression "**(code **)(puVar10 + 0x32300)" * (pointer_expression "*(code **)(puVar10 + 0x32300)" * (cast_expression "(code **)(puVar10 + 0x32300)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x32300)" ( (binary_expression "puVar10 + 0x32300" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int sg_ll_mode_select6_v2\n              (undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  undefined *puVar7;\n  undefined *puVar8;\n  int local_78;\n  byte local_74 [2];\n  undefined2 local_72;\n  short local_70;\n  byte abStack_6e [2];\n  undefined1 auStack_6c [64];\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  local_74[1] = 0x10;\n  if (param_2 == 0) {\n    local_74[1] = 0;\n  }\n  local_74[1] = local_74[1] | param_4;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_74[0] = 0x15;\n  local_72 = 0;\n  if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }\n  local_70 = (ushort)(byte)param_6 << 8;\n  if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\nLAB_00022554:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar8 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar4 = (**(code **)(puVar8 + 0x32300))();\n  return iVar4;\n}\n\n" (function_definition "int sg_ll_mode_select6_v2\n              (undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  undefined *puVar7;\n  undefined *puVar8;\n  int local_78;\n  byte local_74 [2];\n  undefined2 local_72;\n  short local_70;\n  byte abStack_6e [2];\n  undefined1 auStack_6c [64];\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  local_74[1] = 0x10;\n  if (param_2 == 0) {\n    local_74[1] = 0;\n  }\n  local_74[1] = local_74[1] | param_4;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_74[0] = 0x15;\n  local_72 = 0;\n  if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }\n  local_70 = (ushort)(byte)param_6 << 8;\n  if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\nLAB_00022554:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar8 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar4 = (**(code **)(puVar8 + 0x32300))();\n  return iVar4;\n}" primitive_type (function_declarator "sg_ll_mode_select6_v2\n              (undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)" identifier (parameter_list "(undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "byte param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "int param_6" primitive_type identifier) , (parameter_declaration "undefined1 param_7" type_identifier identifier) , (parameter_declaration "int param_8" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  undefined *puVar7;\n  undefined *puVar8;\n  int local_78;\n  byte local_74 [2];\n  undefined2 local_72;\n  short local_70;\n  byte abStack_6e [2];\n  undefined1 auStack_6c [64];\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  local_74[1] = 0x10;\n  if (param_2 == 0) {\n    local_74[1] = 0;\n  }\n  local_74[1] = local_74[1] | param_4;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_74[0] = 0x15;\n  local_72 = 0;\n  if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }\n  local_70 = (ushort)(byte)param_6 << 8;\n  if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\nLAB_00022554:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar8 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar4 = (**(code **)(puVar8 + 0x32300))();\n  return iVar4;\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 "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "int local_78;" primitive_type identifier ;) (declaration "byte local_74 [2];" type_identifier (array_declarator "local_74 [2]" identifier [ number_literal ]) ;) (declaration "undefined2 local_72;" type_identifier identifier ;) (declaration "short local_70;" (sized_type_specifier "short" short) identifier ;) (declaration "byte abStack_6e [2];" type_identifier (array_declarator "abStack_6e [2]" identifier [ number_literal ]) ;) (declaration "undefined1 auStack_6c [64];" type_identifier (array_declarator "auStack_6c [64]" identifier [ number_literal ]) ;) (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 "puVar8 = PTR_s_tatus_00054840;" (assignment_expression "puVar8 = PTR_s_tatus_00054840" identifier = identifier) ;) (expression_statement "local_74[1] = 0x10;" (assignment_expression "local_74[1] = 0x10" (subscript_expression "local_74[1]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (param_2 == 0) {\n    local_74[1] = 0;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    local_74[1] = 0;\n  }" { (expression_statement "local_74[1] = 0;" (assignment_expression "local_74[1] = 0" (subscript_expression "local_74[1]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "local_74[1] = local_74[1] | param_4;" (assignment_expression "local_74[1] = local_74[1] | param_4" (subscript_expression "local_74[1]" identifier [ number_literal ]) = (binary_expression "local_74[1] | param_4" (subscript_expression "local_74[1]" identifier [ number_literal ]) | 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_74[0] = 0x15;" (assignment_expression "local_74[0] = 0x15" (subscript_expression "local_74[0]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_72 = 0;" (assignment_expression "local_72 = 0" identifier = number_literal) ;) (if_statement "if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    local_74[1] = local_74[1] | 2;\n  }" { (expression_statement "local_74[1] = local_74[1] | 2;" (assignment_expression "local_74[1] = local_74[1] | 2" (subscript_expression "local_74[1]" identifier [ number_literal ]) = (binary_expression "local_74[1] | 2" (subscript_expression "local_74[1]" identifier [ number_literal ]) | number_literal)) ;) })) (expression_statement "local_70 = (ushort)(byte)param_6 << 8;" (assignment_expression "local_70 = (ushort)(byte)param_6 << 8" identifier = (binary_expression "(ushort)(byte)param_6 << 8" (cast_expression "(ushort)(byte)param_6" ( (type_descriptor "ushort" type_identifier) ) (cast_expression "(byte)param_6" ( (type_descriptor "byte" type_identifier) ) identifier)) << number_literal)) ;) (if_statement "if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }" if (parenthesized_expression "(0xff < param_6)" ( (binary_expression "0xff < param_6" number_literal < identifier) )) (compound_statement "{\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678)" (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 + -0x1668,PTR_s_tatus_00054840 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1668" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x1678" identifier + number_literal) ))) ;) (goto_statement "goto LAB_00022554;" goto statement_identifier ;) })) (if_statement "if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" if (parenthesized_expression "(param_8 == 0)" ( (binary_expression "param_8 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" { (labeled_statement "LAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" statement_identifier : (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    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" else (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678)" (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 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1a50" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x1678" 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 "pbVar5 = local_74;" (assignment_expression "pbVar5 = local_74" identifier = identifier) ;) (do_statement "do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);" do (compound_statement "{\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    }" { (expression_statement "pbVar6 = pbVar5 + 1;" (assignment_expression "pbVar6 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5)" (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,*pbVar5)" ( identifier , (pointer_expression "*pbVar5" * identifier) ))) ;) (expression_statement "pbVar5 = pbVar6;" (assignment_expression "pbVar5 = pbVar6" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar6 != abStack_6e)" ( (binary_expression "pbVar6 != abStack_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 (param_8 < 2) goto LAB_00022478;" if (parenthesized_expression "(param_8 < 2)" ( (binary_expression "param_8 < 2" identifier < number_literal) )) (goto_statement "goto LAB_00022478;" goto statement_identifier ;)) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678)" (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 + -0x1650,puVar8 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1650" identifier + number_literal) , (binary_expression "puVar8 + -0x1678" identifier + number_literal) ))) ;) (expression_statement "(*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);" (call_expression "(*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff)" (parenthesized_expression "(*(code *)PTR_hex2stderr_0005489c)" ( (pointer_expression "*(code *)PTR_hex2stderr_0005489c" * (cast_expression "(code *)PTR_hex2stderr_0005489c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_5,param_6,0xffffffff)" ( identifier , 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 "()" ( )))) ;) }))) (if_statement "if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678)" (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,puVar8 + -0x1678)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1974" identifier + number_literal) , (binary_expression "puVar8 + -0x1678" identifier + number_literal) ))) ;) }) (else_clause "else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }" else (compound_statement "{\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }" { (expression_statement "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6)" (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_74,6)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,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,auStack_6c,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);" (call_expression "(*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_data_out_00054a74)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_data_out_00054a74" * (cast_expression "(code *)PTR_set_scsi_pt_data_out_00054a74" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_5,param_6)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);" (assignment_expression "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8)" identifier = (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8)" (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,0x3c,param_8)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);" (assignment_expression "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78)" identifier = (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78)" (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,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78)" ( identifier , (binary_expression "puVar8 + -0x1678" identifier + number_literal) , identifier , number_literal , identifier , identifier , identifier , (pointer_expression "&local_78" & 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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }" else (if_statement "if (iVar4 == -2) {\n      iVar4 = local_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }" if (parenthesized_expression "(iVar4 == -2)" ( (binary_expression "iVar4 == -2" identifier == number_literal) )) (compound_statement "{\n      iVar4 = local_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }" { (expression_statement "iVar4 = local_78;" (assignment_expression "iVar4 = local_78" identifier = identifier) ;) (if_statement "if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }" if (parenthesized_expression "(local_78 - 0x14U < 2)" ( (binary_expression "local_78 - 0x14U < 2" (binary_expression "local_78 - 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 {\n      iVar4 = 0;\n    }" else (compound_statement "{\n      iVar4 = 0;\n    }" { (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 ))) ;) }))) (labeled_statement "LAB_00022554:\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 "puVar8 = PTR___stack_chk_fail_00054a1c;" (assignment_expression "puVar8 = 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 "iVar4 = (**(code **)(puVar8 + 0x32300))();" (assignment_expression "iVar4 = (**(code **)(puVar8 + 0x32300))()" identifier = (call_expression "(**(code **)(puVar8 + 0x32300))()" (parenthesized_expression "(**(code **)(puVar8 + 0x32300))" ( (pointer_expression "**(code **)(puVar8 + 0x32300)" * (pointer_expression "*(code **)(puVar8 + 0x32300)" * (cast_expression "(code **)(puVar8 + 0x32300)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar8 + 0x32300)" ( (binary_expression "puVar8 + 0x32300" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar4;" 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) ))) (compound_statement { (declaration TYPE (pointer_declarator * 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 (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier short) IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) | IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) | LIT)) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) << LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (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 ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) ))) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (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 (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 = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (pointer_expression * IDENT) ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != 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) )) (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) ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , LIT ))) ;) (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 (assignment_expression IDENT = LIT) ;) (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 ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , 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 , LIT , 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 , LIT , IDENT , IDENT , IDENT , (pointer_expression & 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 (compound_statement { (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 ))) ;) }))) (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_mode_select6_v2\n              (undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  undefined *puVar7;\n  undefined *puVar8;\n  int local_78;\n  byte local_74 [2];\n  undefined2 local_72;\n  short local_70;\n  byte abStack_6e [2];\n  undefined1 auStack_6c [64];\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  local_74[1] = 0x10;\n  if (param_2 == 0) {\n    local_74[1] = 0;\n  }\n  local_74[1] = local_74[1] | param_4;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_74[0] = 0x15;\n  local_72 = 0;\n  if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }\n  local_70 = (ushort)(byte)param_6 << 8;\n  if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\nLAB_00022554:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar8 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar4 = (**(code **)(puVar8 + 0x32300))();\n  return iVar4;\n}" (primitive_type "int") (function_declarator "sg_ll_mode_select6_v2\n              (undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)" (identifier "sg_ll_mode_select6_v2") (parameter_list "(undefined4 param_1,int param_2,int param_3,byte param_4,undefined4 param_5,\n              int param_6,undefined1 param_7,int param_8)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "byte param_4" (type_identifier "byte") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "int param_6" (primitive_type "int") (identifier "param_6")) (, ",") (parameter_declaration "undefined1 param_7" (type_identifier "undefined1") (identifier "param_7")) (, ",") (parameter_declaration "int param_8" (primitive_type "int") (identifier "param_8")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  undefined *puVar7;\n  undefined *puVar8;\n  int local_78;\n  byte local_74 [2];\n  undefined2 local_72;\n  short local_70;\n  byte abStack_6e [2];\n  undefined1 auStack_6c [64];\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  local_74[1] = 0x10;\n  if (param_2 == 0) {\n    local_74[1] = 0;\n  }\n  local_74[1] = local_74[1] | param_4;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  local_74[0] = 0x15;\n  local_72 = 0;\n  if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }\n  local_70 = (ushort)(byte)param_6 << 8;\n  if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }\n  if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\nLAB_00022554:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }\n  puVar8 = PTR___stack_chk_fail_00054a1c;\n  (*(code *)PTR___stack_chk_fail_00054a1c)();\n  iVar4 = (**(code **)(puVar8 + 0x32300))();\n  return iVar4;\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 "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (declaration "undefined *puVar7;" (type_identifier "undefined") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "undefined *puVar8;" (type_identifier "undefined") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "int local_78;" (primitive_type "int") (identifier "local_78") (; ";")) (declaration "byte local_74 [2];" (type_identifier "byte") (array_declarator "local_74 [2]" (identifier "local_74") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "undefined2 local_72;" (type_identifier "undefined2") (identifier "local_72") (; ";")) (declaration "short local_70;" (sized_type_specifier "short" (short "short")) (identifier "local_70") (; ";")) (declaration "byte abStack_6e [2];" (type_identifier "byte") (array_declarator "abStack_6e [2]" (identifier "abStack_6e") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "undefined1 auStack_6c [64];" (type_identifier "undefined1") (array_declarator "auStack_6c [64]" (identifier "auStack_6c") ([ "[") (number_literal "64") (] "]")) (; ";")) (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 "puVar8 = PTR_s_tatus_00054840;" (assignment_expression "puVar8 = PTR_s_tatus_00054840" (identifier "puVar8") (= "=") (identifier "PTR_s_tatus_00054840")) (; ";")) (expression_statement "local_74[1] = 0x10;" (assignment_expression "local_74[1] = 0x10" (subscript_expression "local_74[1]" (identifier "local_74") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0x10")) (; ";")) (if_statement "if (param_2 == 0) {\n    local_74[1] = 0;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    local_74[1] = 0;\n  }" ({ "{") (expression_statement "local_74[1] = 0;" (assignment_expression "local_74[1] = 0" (subscript_expression "local_74[1]" (identifier "local_74") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "local_74[1] = local_74[1] | param_4;" (assignment_expression "local_74[1] = local_74[1] | param_4" (subscript_expression "local_74[1]" (identifier "local_74") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "local_74[1] | param_4" (subscript_expression "local_74[1]" (identifier "local_74") ([ "[") (number_literal "1") (] "]")) (| "|") (identifier "param_4"))) (; ";")) (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_74[0] = 0x15;" (assignment_expression "local_74[0] = 0x15" (subscript_expression "local_74[0]" (identifier "local_74") ([ "[") (number_literal "0") (] "]")) (= "=") (number_literal "0x15")) (; ";")) (expression_statement "local_72 = 0;" (assignment_expression "local_72 = 0" (identifier "local_72") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_3 != 0) {\n    local_74[1] = local_74[1] | 2;\n  }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    local_74[1] = local_74[1] | 2;\n  }" ({ "{") (expression_statement "local_74[1] = local_74[1] | 2;" (assignment_expression "local_74[1] = local_74[1] | 2" (subscript_expression "local_74[1]" (identifier "local_74") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "local_74[1] | 2" (subscript_expression "local_74[1]" (identifier "local_74") ([ "[") (number_literal "1") (] "]")) (| "|") (number_literal "2"))) (; ";")) (} "}"))) (expression_statement "local_70 = (ushort)(byte)param_6 << 8;" (assignment_expression "local_70 = (ushort)(byte)param_6 << 8" (identifier "local_70") (= "=") (binary_expression "(ushort)(byte)param_6 << 8" (cast_expression "(ushort)(byte)param_6" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (cast_expression "(byte)param_6" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_6"))) (<< "<<") (number_literal "8"))) (; ";")) (if_statement "if (0xff < param_6) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }" (if "if") (parenthesized_expression "(0xff < param_6)" (( "(") (binary_expression "0xff < param_6" (number_literal "0xff") (< "<") (identifier "param_6")) () ")")) (compound_statement "{\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);\n    goto LAB_00022554;\n  }" ({ "{") (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" (identifier "iVar4") (= "=") (number_literal "-1")) (; ";")) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678)" (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 + -0x1668,PTR_s_tatus_00054840 + -0x1678)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x1668" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x1668")) (, ",") (binary_expression "PTR_s_tatus_00054840 + -0x1678" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x1678")) () ")"))) (; ";")) (goto_statement "goto LAB_00022554;" (goto "goto") (statement_identifier "LAB_00022554") (; ";")) (} "}"))) (if_statement "if (param_8 == 0) {\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }\n  else {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" (if "if") (parenthesized_expression "(param_8 == 0)" (( "(") (binary_expression "param_8 == 0" (identifier "param_8") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" ({ "{") (labeled_statement "LAB_00022478:\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (statement_identifier "LAB_00022478") (: ":") (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    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" (else "else") (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    pbVar5 = local_74;\n    do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (param_8 < 2) goto LAB_00022478;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);\n    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  }" ({ "{") (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678)" (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 + -0x1678)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x1a50" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x1a50")) (, ",") (binary_expression "PTR_s_tatus_00054840 + -0x1678" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x1678")) () ")"))) (; ";")) (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 "pbVar5 = local_74;" (assignment_expression "pbVar5 = local_74" (identifier "pbVar5") (= "=") (identifier "local_74")) (; ";")) (do_statement "do {\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    } while (pbVar6 != abStack_6e);" (do "do") (compound_statement "{\n      pbVar6 = pbVar5 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);\n      pbVar5 = pbVar6;\n    }" ({ "{") (expression_statement "pbVar6 = pbVar5 + 1;" (assignment_expression "pbVar6 = pbVar5 + 1" (identifier "pbVar6") (= "=") (binary_expression "pbVar5 + 1" (identifier "pbVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5)" (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,*pbVar5)" (( "(") (identifier "puVar7") (, ",") (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")) () ")"))) (; ";")) (expression_statement "pbVar5 = pbVar6;" (assignment_expression "pbVar5 = pbVar6" (identifier "pbVar5") (= "=") (identifier "pbVar6")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar6 != abStack_6e)" (( "(") (binary_expression "pbVar6 != abStack_6e" (identifier "pbVar6") (!= "!=") (identifier "abStack_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_8 < 2) goto LAB_00022478;" (if "if") (parenthesized_expression "(param_8 < 2)" (( "(") (binary_expression "param_8 < 2" (identifier "param_8") (< "<") (number_literal "2")) () ")")) (goto_statement "goto LAB_00022478;" (goto "goto") (statement_identifier "LAB_00022478") (; ";"))) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678)" (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 + -0x1650,puVar8 + -0x1678)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x1650" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x1650")) (, ",") (binary_expression "puVar8 + -0x1678" (identifier "puVar8") (+ "+") (number_literal "-0x1678")) () ")"))) (; ";")) (expression_statement "(*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);" (call_expression "(*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff)" (parenthesized_expression "(*(code *)PTR_hex2stderr_0005489c)" (( "(") (pointer_expression "*(code *)PTR_hex2stderr_0005489c" (* "*") (cast_expression "(code *)PTR_hex2stderr_0005489c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_hex2stderr_0005489c"))) () ")")) (argument_list "(param_5,param_6,0xffffffff)" (( "(") (identifier "param_5") (, ",") (identifier "param_6") (, ",") (number_literal "0xffffffff") () ")"))) (; ";")) (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    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);\n  }" ({ "{") (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" (identifier "iVar4") (= "=") (number_literal "-1")) (; ";")) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678)" (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,puVar8 + -0x1678)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x1974" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x1974")) (, ",") (binary_expression "puVar8 + -0x1678" (identifier "puVar8") (+ "+") (number_literal "-0x1678")) () ")"))) (; ";")) (} "}")) (else_clause "else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }" (else "else") (compound_statement "{\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);\n    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }" ({ "{") (expression_statement "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6)" (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_74,6)" (( "(") (identifier "iVar2") (, ",") (identifier "local_74") (, ",") (number_literal "6") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,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,auStack_6c,0x40)" (( "(") (identifier "iVar2") (, ",") (identifier "auStack_6c") (, ",") (number_literal "0x40") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);" (call_expression "(*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_data_out_00054a74)" (( "(") (pointer_expression "*(code *)PTR_set_scsi_pt_data_out_00054a74" (* "*") (cast_expression "(code *)PTR_set_scsi_pt_data_out_00054a74" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_set_scsi_pt_data_out_00054a74"))) () ")")) (argument_list "(iVar2,param_5,param_6)" (( "(") (identifier "iVar2") (, ",") (identifier "param_5") (, ",") (identifier "param_6") () ")"))) (; ";")) (expression_statement "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);" (assignment_expression "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8)" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8)" (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,0x3c,param_8)" (( "(") (identifier "iVar2") (, ",") (identifier "param_1") (, ",") (number_literal "0x3c") (, ",") (identifier "param_8") () ")")))) (; ";")) (expression_statement "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);" (assignment_expression "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78)" (identifier "iVar4") (= "=") (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78)" (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,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78)" (( "(") (identifier "iVar2") (, ",") (binary_expression "puVar8 + -0x1678" (identifier "puVar8") (+ "+") (number_literal "-0x1678")) (, ",") (identifier "uVar3") (, ",") (number_literal "0") (, ",") (identifier "auStack_6c") (, ",") (identifier "param_7") (, ",") (identifier "param_8") (, ",") (pointer_expression "&local_78" (& "&") (identifier "local_78")) () ")")))) (; ";")) (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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\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_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }" (else "else") (if_statement "if (iVar4 == -2) {\n      iVar4 = local_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }" (if "if") (parenthesized_expression "(iVar4 == -2)" (( "(") (binary_expression "iVar4 == -2" (identifier "iVar4") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n      iVar4 = local_78;\n      if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }" ({ "{") (expression_statement "iVar4 = local_78;" (assignment_expression "iVar4 = local_78" (identifier "iVar4") (= "=") (identifier "local_78")) (; ";")) (if_statement "if (local_78 - 0x14U < 2) {\n        iVar4 = 0;\n      }" (if "if") (parenthesized_expression "(local_78 - 0x14U < 2)" (( "(") (binary_expression "local_78 - 0x14U < 2" (binary_expression "local_78 - 0x14U" (identifier "local_78") (- "-") (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 {\n      iVar4 = 0;\n    }" (else "else") (compound_statement "{\n      iVar4 = 0;\n    }" ({ "{") (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") () ")"))) (; ";")) (} "}")))) (labeled_statement "LAB_00022554:\n  if (local_2c == *(int *)puVar1) {\n    return iVar4;\n  }" (statement_identifier "LAB_00022554") (: ":") (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 "puVar8 = PTR___stack_chk_fail_00054a1c;" (assignment_expression "puVar8 = PTR___stack_chk_fail_00054a1c" (identifier "puVar8") (= "=") (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 "iVar4 = (**(code **)(puVar8 + 0x32300))();" (assignment_expression "iVar4 = (**(code **)(puVar8 + 0x32300))()" (identifier "iVar4") (= "=") (call_expression "(**(code **)(puVar8 + 0x32300))()" (parenthesized_expression "(**(code **)(puVar8 + 0x32300))" (( "(") (pointer_expression "**(code **)(puVar8 + 0x32300)" (* "*") (pointer_expression "*(code **)(puVar8 + 0x32300)" (* "*") (cast_expression "(code **)(puVar8 + 0x32300)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar8 + 0x32300)" (( "(") (binary_expression "puVar8 + 0x32300" (identifier "puVar8") (+ "+") (number_literal "0x32300")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))
(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: (primitive_type) 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: (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: (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: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (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: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) 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: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) 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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (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 (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (number_literal))))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (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 (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: (identifier))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_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) (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_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 (binary_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (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 (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) (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (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 (identifier) (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) (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) (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) (number_literal) (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) (number_literal) (identifier) (identifier) (identifier) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (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 (compound_statement (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))))))) (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,int param_3,byte param_4,undefined4 param_5,
              int param_6,undefined1 param_7,int param_8)

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  byte *pbVar5;
  byte *pbVar6;
  undefined *puVar7;
  undefined *puVar8;
  int local_78;
  byte local_74 [2];
  undefined2 local_72;
  short local_70;
  byte abStack_6e [2];
  undefined1 auStack_6c [64];
  int local_2c;
  
  puVar1 = PTR___stack_chk_guard_00054a4c;
  puVar8 = PTR_s_tatus_00054840;
  local_74[1] = 0x10;
  if (param_2 == 0) {
    local_74[1] = 0;
  }
  local_74[1] = local_74[1] | param_4;
  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;
  local_74[0] = 0x15;
  local_72 = 0;
  if (param_3 != 0) {
    local_74[1] = local_74[1] | 2;
  }
  local_70 = (ushort)(byte)param_6 << 8;
  if (0xff < param_6) {
    iVar4 = -1;
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1668,PTR_s_tatus_00054840 + -0x1678);
    goto LAB_00022554;
  }
  if (param_8 == 0) {
LAB_00022478:
    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
  }
  else {
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x1678);
    puVar7 = PTR_LAB_0005483c + 0x1f1c;
    pbVar5 = local_74;
    do {
      pbVar6 = pbVar5 + 1;
      (*(code *)PTR_pr2ws_000548ec)(puVar7,*pbVar5);
      pbVar5 = pbVar6;
    } while (pbVar6 != abStack_6e);
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);
    if (param_8 < 2) goto LAB_00022478;
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1650,puVar8 + -0x1678);
    (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);
    iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
  }
  if (iVar2 == 0) {
    iVar4 = -1;
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x1678);
  }
  else {
    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_74,6);
    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,auStack_6c,0x40);
    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);
    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,0x3c,param_8);
    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)
                      (iVar2,puVar8 + -0x1678,uVar3,0,auStack_6c,param_7,param_8,&local_78);
    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_78;
      if (local_78 - 0x14U < 2) {
        iVar4 = 0;
      }
    }
    else {
      iVar4 = 0;
    }
    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);
  }
LAB_00022554:
  if (local_2c == *(int *)puVar1) {
    return iVar4;
  }
  puVar8 = PTR___stack_chk_fail_00054a1c;
  (*(code *)PTR___stack_chk_fail_00054a1c)();
  iVar4 = (**(code **)(puVar8 + 0x32300))();
  return iVar4;
}

