
int sg_ll_unmap_v2(int sg_fd,_Bool anchor,int group_num,int timeout_secs,void *paramp,int param_len,
                  _Bool noisy,int verbose)

{
  ushort uVar1;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  undefined4 uVar5;
  int iVar6;
  undefined3 in_register_00000014;
  undefined *puVar7;
  undefined *puVar8;
  uint8_t *puVar9;
  uint8_t *puVar10;
  int sense_cat;
  uint8_t u_cdb [10];
  uint8_t auStack_6e [2];
  uint8_t sense_b [64];
  
  puVar2 = PTR___stack_chk_guard_00054a4c;
  puVar8 = PTR_s_tatus_00054840;
  u_cdb[0] = 'B';
  u_cdb[1] = '\0';
  u_cdb[2] = '\0';
  u_cdb[3] = '\0';
  iVar3 = *(int *)PTR___stack_chk_guard_00054a4c;
  if (CONCAT31(in_register_00000014,anchor) != 0) {
    u_cdb[0] = 'B';
    u_cdb[1] = '\x01';
    u_cdb[2] = '\0';
    u_cdb[3] = '\0';
  }
  if (timeout_secs < 1) {
    timeout_secs = 0x3c;
  }
  sense_cat = CONCAT22((short)param_len,sense_cat._2_2_);
  u_cdb._8_2_ = (ushort)(byte)param_len << 8;
  uVar1 = CONCAT11((char)group_num,(char)((uint)param_len >> 8)) & 0x1fff;
  u_cdb[4] = '\0';
  u_cdb[5] = '\0';
  u_cdb[6] = (char)(uVar1 >> 8);
  u_cdb[7] = (char)uVar1;
  if (verbose != 0) {
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);
    puVar7 = PTR_LAB_0005483c + 0x1f1c;
    puVar9 = u_cdb;
    do {
      puVar10 = puVar9 + 1;
      (*(code *)PTR_pr2ws_000548ec)(puVar7,*puVar9);
      puVar9 = puVar10;
    } while (auStack_6e != puVar10);
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);
    if (((1 < verbose) && (paramp != (void *)0x0)) && (param_len != 0)) {
      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar8 + -0x10c0);
      (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);
    }
  }
  iVar4 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();
  if (iVar4 == 0) {
    iVar6 = -1;
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x10c0);
  }
  else {
    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar4,u_cdb,10);
    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar4,sense_b,0x40);
    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar4,paramp,param_len);
    uVar5 = (*(code *)PTR_do_scsi_pt_00054984)(iVar4,sg_fd,timeout_secs,verbose);
    iVar6 = (*(code *)PTR_sg_cmds_process_resp_000548d0)
                      (iVar4,puVar8 + -0x10c0,uVar5,0,sense_b,noisy,verbose,&sense_cat);
    if (iVar6 == -1) {
      uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4);
      iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5);
    }
    else if (iVar6 == -2) {
      iVar6 = sense_cat;
      if (sense_cat - 0x14U < 2) {
        iVar6 = 0;
      }
    }
    else {
      iVar6 = 0;
    }
    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar4);
  }
  if (iVar3 != *(int *)puVar2) {
    puVar8 = PTR___stack_chk_fail_00054a1c;
    (*(code *)PTR___stack_chk_fail_00054a1c)();
    iVar3 = (**(code **)(puVar8 + 0x2a938))();
    return iVar3;
  }
  return iVar6;
}



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

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  undefined *puVar5;
  undefined *puVar6;
  int *piVar7;
  int *piVar8;
  int local_7c [3];
  short local_70;
  undefined4 uStack_6e;
  int local_2c;
  
  puVar1 = PTR___stack_chk_guard_00054a4c;
  puVar6 = PTR_s_tatus_00054840;
  local_7c[1] = 0x42000000;
  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;
  if (param_2 != 0) {
    local_7c[1] = 0x42010000;
  }
  if (param_4 < 1) {
    param_4 = 0x3c;
  }
  local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);
  local_70 = (ushort)(byte)param_6 << 8;
  local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);
  if (param_8 != 0) {
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);
    puVar5 = PTR_LAB_0005483c + 0x1f1c;
    piVar7 = local_7c + 1;
    do {
      piVar8 = (int *)((int)piVar7 + 1);
      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);
      piVar7 = piVar8;
    } while (&uStack_6e != piVar8);
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);
    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {
      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);
      (*(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,puVar6 + -0x10c0);
  }
  else {
    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);
    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);
    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);
    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_4,param_8);
    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)
                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);
    if (iVar4 == -1) {
      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);
      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);
    }
    else if (iVar4 == -2) {
      iVar4 = local_7c[0];
      if (local_7c[0] - 0x14U < 2) {
        iVar4 = 0;
      }
    }
    else {
      iVar4 = 0;
    }
    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);
  }
  if (local_2c != *(int *)puVar1) {
    puVar6 = PTR___stack_chk_fail_00054a1c;
    (*(code *)PTR___stack_chk_fail_00054a1c)();
    iVar2 = (**(code **)(puVar6 + 0x2a938))();
    return iVar2;
  }
  return iVar4;
}


lui gp,0x3
addiu gp,gp,0x29f0
addu gp,gp,t9
addiu sp,sp,-0xb0
lui v1,0x4200
sw s4,0x98(sp)
lw s4,-0x7dc4(gp)
sw gp,0x20(sp)
sw s7,0xa4(sp)
sw s6,0xa0(sp)
sw s3,0x94(sp)
or s3,a3,zero
sw s0,0x88(sp)
sw ra,0xac(sp)
sw s8,0xa8(sp)
sw s5,0x9c(sp)
sw s2,0x90(sp)
sw s1,0x8c(sp)
sw a0,0xb0(sp)
sw v1,0x38(sp)
sw zero,0x3c(sp)
sh zero,0x40(sp)
lw v0,0x0(s4)
lw s7,0xc0(sp)
lw s0,0xc4(sp)
lw s6,0xcc(sp)
sw v0,0x84(sp)
beq a1,zero,0x00029e98
_li v0,0x1
sb v0,0x39(sp)
bgtz s3,0x00029ea4
_ext v0,s0,0x8,0x8
li s3,0x3c
lw s5,-0x7fd0(gp)
addiu v1,sp,0x38
sh s0,0x34(sp)
andi a2,a2,0x1f
sb s0,0x40(sp)
sb a2,0x3e(sp)
sw v1,0x2c(sp)
bne s6,zero,0x00029fe4
_sb v0,0x3f(sp)
lw t9,-0x7dbc(gp)
jalr t9
_nop
lw gp,0x20(sp)
beq v0,zero,0x0002a0bc
_or s1,v0,zero
lw t9,-0x7fb0(gp)
li a2,0xa
lw a1,0x2c(sp)
or a0,v0,zero
jalr t9
_addiu s2,sp,0x44
li a2,0x40
lw gp,0x20(sp)
or a1,s2,zero
lw t9,-0x7f1c(gp)
jalr t9
_or a0,s1,zero
or a2,s0,zero
lw gp,0x20(sp)
or a1,s7,zero
lw t9,-0x7d9c(gp)
jalr t9
_or a0,s1,zero
or a3,s6,zero
lw gp,0x20(sp)
or a2,s3,zero
lw a1,0xb0(sp)
lw t9,-0x7e8c(gp)
jalr t9
_or a0,s1,zero
addiu v1,sp,0x34
lw gp,0x20(sp)
or a2,v0,zero
lbu v0,0xcb(sp)
or a3,zero,zero
addiu a1,s5,-0x10c0
sw v1,0x1c(sp)
sw s6,0x18(sp)
or a0,s1,zero
sw v0,0x14(sp)
lw t9,-0x7f40(gp)
jalr t9
_sw s2,0x10(sp)
li v1,-0x1
beq v0,v1,0x0002a094
_lw gp,0x20(sp)
li v1,-0x2
beq v0,v1,0x0002a084
_lw s0,0x34(sp)
or s0,zero,zero
lw t9,-0x7ea4(gp)
jalr t9
_or a0,s1,zero
lw gp,0x20(sp)
lw a0,0x84(sp)
or v0,s0,zero
lw v1,0x0(s4)
bne a0,v1,0x0002a0dc
_lw ra,0xac(sp)
lw s8,0xa8(sp)
lw s7,0xa4(sp)
lw s6,0xa0(sp)
lw s5,0x9c(sp)
lw s4,0x98(sp)
lw s3,0x94(sp)
lw s2,0x90(sp)
lw s1,0x8c(sp)
lw s0,0x88(sp)
jr ra
_addiu sp,sp,0xb0
lw a0,-0x7fd0(gp)
addiu a1,s5,-0x10c0
lw t9,-0x7f24(gp)
addiu s2,sp,0x42
jalr t9
_addiu a0,a0,-0x1a50
lw gp,0x20(sp)
lw s8,0x2c(sp)
lw s1,-0x7fd4(gp)
addiu s1,s1,0x1f1c
lw t9,-0x7f24(gp)
addiu s8,s8,0x1
lbu a1,-0x1(s8)
jalr t9
_or a0,s1,zero
bne s2,s8,0x0002a00c
_lw gp,0x20(sp)
lw a0,-0x7fd0(gp)
lw t9,-0x7f24(gp)
jalr t9
_addiu a0,a0,-0x990
slti v0,s6,0x2
bne v0,zero,0x00029ec8
_lw gp,0x20(sp)
beq s7,zero,0x00029ecc
_lw t9,-0x7dbc(gp)
beq s0,zero,0x00029ecc
_lw a0,-0x7fd0(gp)
addiu a1,s5,-0x10c0
lw t9,-0x7f24(gp)
jalr t9
_addiu a0,a0,-0x13cc
li a2,-0x1
lw gp,0x20(sp)
or a1,s0,zero
lw t9,-0x7f74(gp)
jalr t9
_or a0,s7,zero
b 0x00029ec8
_lw gp,0x20(sp)
addiu v0,s0,-0x14
sltiu v0,v0,0x2
b 0x00029f94
_movn s0,zero,v0
lw t9,-0x7d74(gp)
jalr t9
_or a0,s1,zero
lw gp,0x20(sp)
lw t9,-0x7ee8(gp)
jalr t9
_or a0,v0,zero
lw gp,0x20(sp)
b 0x00029f94
_or s0,v0,zero
lw a0,-0x7fd0(gp)
addiu a1,s5,-0x10c0
lw t9,-0x7f24(gp)
li s0,-0x1
jalr t9
_addiu a0,a0,-0x1974
b 0x00029fa4
_lw gp,0x20(sp)
lw t9,-0x7df4(gp)
jalr t9
_nop
(translation_unit "int sg_ll_unmap_v2(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int 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  undefined *puVar5;\n  undefined *puVar6;\n  int *piVar7;\n  int *piVar8;\n  int local_7c [3];\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar6 = PTR_s_tatus_00054840;\n  local_7c[1] = 0x42000000;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }\n  if (param_4 < 1) {\n    param_4 = 0x3c;\n  }\n  local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);\n  local_70 = (ushort)(byte)param_6 << 8;\n  local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);\n  if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }\n  iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\n  if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }\n  return iVar4;\n}\n\n" (function_definition "int sg_ll_unmap_v2(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int 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  undefined *puVar5;\n  undefined *puVar6;\n  int *piVar7;\n  int *piVar8;\n  int local_7c [3];\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar6 = PTR_s_tatus_00054840;\n  local_7c[1] = 0x42000000;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }\n  if (param_4 < 1) {\n    param_4 = 0x3c;\n  }\n  local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);\n  local_70 = (ushort)(byte)param_6 << 8;\n  local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);\n  if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }\n  iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\n  if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }\n  return iVar4;\n}" primitive_type (function_declarator "sg_ll_unmap_v2(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int param_5,\n                  int param_6,undefined1 param_7,int param_8)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int 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 "undefined1 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int param_5" primitive_type 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  undefined *puVar5;\n  undefined *puVar6;\n  int *piVar7;\n  int *piVar8;\n  int local_7c [3];\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar6 = PTR_s_tatus_00054840;\n  local_7c[1] = 0x42000000;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }\n  if (param_4 < 1) {\n    param_4 = 0x3c;\n  }\n  local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);\n  local_70 = (ushort)(byte)param_6 << 8;\n  local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);\n  if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }\n  iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\n  if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }\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 "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "undefined *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int local_7c [3];" primitive_type (array_declarator "local_7c [3]" identifier [ number_literal ]) ;) (declaration "short local_70;" (sized_type_specifier "short" short) identifier ;) (declaration "undefined4 uStack_6e;" type_identifier identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_00054a4c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00054a4c" identifier = identifier) ;) (expression_statement "puVar6 = PTR_s_tatus_00054840;" (assignment_expression "puVar6 = PTR_s_tatus_00054840" identifier = identifier) ;) (expression_statement "local_7c[1] = 0x42000000;" (assignment_expression "local_7c[1] = 0x42000000" (subscript_expression "local_7c[1]" identifier [ number_literal ]) = number_literal) ;) (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))) ;) (if_statement "if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    local_7c[1] = 0x42010000;\n  }" { (expression_statement "local_7c[1] = 0x42010000;" (assignment_expression "local_7c[1] = 0x42010000" (subscript_expression "local_7c[1]" identifier [ number_literal ]) = number_literal) ;) })) (if_statement "if (param_4 < 1) {\n    param_4 = 0x3c;\n  }" if (parenthesized_expression "(param_4 < 1)" ( (binary_expression "param_4 < 1" identifier < number_literal) )) (compound_statement "{\n    param_4 = 0x3c;\n  }" { (expression_statement "param_4 = 0x3c;" (assignment_expression "param_4 = 0x3c" identifier = number_literal) ;) })) (expression_statement "local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);" (assignment_expression "local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_)" (subscript_expression "local_7c[0]" identifier [ number_literal ]) = (call_expression "CONCAT22((short)param_6,local_7c[0]._2_2_)" identifier (argument_list "((short)param_6,local_7c[0]._2_2_)" ( (cast_expression "(short)param_6" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) , (field_expression "local_7c[0]._2_2_" (subscript_expression "local_7c[0]" identifier [ number_literal ]) . field_identifier) )))) ;) (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)) ;) (expression_statement "local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);" (assignment_expression "local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff)" (subscript_expression "local_7c[2]" identifier [ number_literal ]) = (cast_expression "(int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff)" ( (binary_expression "CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff" (call_expression "CONCAT11(param_3,(char)((uint)param_6 >> 8))" identifier (argument_list "(param_3,(char)((uint)param_6 >> 8))" ( identifier , (cast_expression "(char)((uint)param_6 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)param_6 >> 8)" ( (binary_expression "(uint)param_6 >> 8" (cast_expression "(uint)param_6" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) ))) & number_literal) )))) ;) (if_statement "if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }" if (parenthesized_expression "(param_8 != 0)" ( (binary_expression "param_8 != 0" identifier != number_literal) )) (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0)" (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 + -0x10c0)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1a50" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x10c0" identifier + number_literal) ))) ;) (expression_statement "puVar5 = PTR_LAB_0005483c + 0x1f1c;" (assignment_expression "puVar5 = PTR_LAB_0005483c + 0x1f1c" identifier = (binary_expression "PTR_LAB_0005483c + 0x1f1c" identifier + number_literal)) ;) (expression_statement "piVar7 = local_7c + 1;" (assignment_expression "piVar7 = local_7c + 1" identifier = (binary_expression "local_7c + 1" identifier + number_literal)) ;) (do_statement "do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);" do (compound_statement "{\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    }" { (expression_statement "piVar8 = (int *)((int)piVar7 + 1);" (assignment_expression "piVar8 = (int *)((int)piVar7 + 1)" identifier = (cast_expression "(int *)((int)piVar7 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar7 + 1)" ( (binary_expression "(int)piVar7 + 1" (cast_expression "(int)piVar7" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7)" (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 "(puVar5,*(undefined1 *)piVar7)" ( identifier , (pointer_expression "*(undefined1 *)piVar7" * (cast_expression "(undefined1 *)piVar7" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ))) ;) (expression_statement "piVar7 = piVar8;" (assignment_expression "piVar7 = piVar8" identifier = identifier) ;) }) while (parenthesized_expression "(&uStack_6e != piVar8)" ( (binary_expression "&uStack_6e != piVar8" (pointer_expression "&uStack_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 (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }" if (parenthesized_expression "(((1 < param_8) && (param_5 != 0)) && (param_6 != 0))" ( (binary_expression "((1 < param_8) && (param_5 != 0)) && (param_6 != 0)" (parenthesized_expression "((1 < param_8) && (param_5 != 0))" ( (binary_expression "(1 < param_8) && (param_5 != 0)" (parenthesized_expression "(1 < param_8)" ( (binary_expression "1 < param_8" number_literal < identifier) )) && (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) ))) )) && (parenthesized_expression "(param_6 != 0)" ( (binary_expression "param_6 != 0" identifier != number_literal) ))) )) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0)" (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 + -0x13cc,puVar6 + -0x10c0)" ( (binary_expression "PTR_s_tatus_00054840 + -0x13cc" identifier + number_literal) , (binary_expression "puVar6 + -0x10c0" 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,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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,puVar6 + -0x10c0);\n  }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0)" (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,puVar6 + -0x10c0)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1974" identifier + number_literal) , (binary_expression "puVar6 + -0x10c0" identifier + number_literal) ))) ;) }) (else_clause "else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c + 1,10);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_cdb_00054860" * (cast_expression "(code *)PTR_set_scsi_pt_cdb_00054860" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,local_7c + 1,10)" ( identifier , (binary_expression "local_7c + 1" identifier + number_literal) , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_sense_000548f4" * (cast_expression "(code *)PTR_set_scsi_pt_sense_000548f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,(int)&uStack_6e + 2,0x40)" ( identifier , (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&uStack_6e" & identifier)) + number_literal) , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_data_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,param_4,param_8);" (assignment_expression "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_4,param_8)" identifier = (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_4,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,param_4,param_8)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);" (assignment_expression "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c)" identifier = (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c)" (parenthesized_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)" ( (pointer_expression "*(code *)PTR_sg_cmds_process_resp_000548d0" * (cast_expression "(code *)PTR_sg_cmds_process_resp_000548d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c)" ( identifier , (binary_expression "puVar6 + -0x10c0" identifier + number_literal) , identifier , number_literal , (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&uStack_6e" & identifier)) + number_literal) , identifier , identifier , identifier )))) ;) (if_statement "if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }" else (if_statement "if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }" { (expression_statement "iVar4 = local_7c[0];" (assignment_expression "iVar4 = local_7c[0]" identifier = (subscript_expression "local_7c[0]" identifier [ number_literal ])) ;) (if_statement "if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }" if (parenthesized_expression "(local_7c[0] - 0x14U < 2)" ( (binary_expression "local_7c[0] - 0x14U < 2" (binary_expression "local_7c[0] - 0x14U" (subscript_expression "local_7c[0]" identifier [ number_literal ]) - 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 ))) ;) }))) (if_statement "if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\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    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }" { (expression_statement "puVar6 = PTR___stack_chk_fail_00054a1c;" (assignment_expression "puVar6 = 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 **)(puVar6 + 0x2a938))();" (assignment_expression "iVar2 = (**(code **)(puVar6 + 0x2a938))()" identifier = (call_expression "(**(code **)(puVar6 + 0x2a938))()" (parenthesized_expression "(**(code **)(puVar6 + 0x2a938))" ( (pointer_expression "**(code **)(puVar6 + 0x2a938)" * (pointer_expression "*(code **)(puVar6 + 0x2a938)" * (cast_expression "(code **)(puVar6 + 0x2a938)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar6 + 0x2a938)" ( (binary_expression "puVar6 + 0x2a938" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar2;" return identifier ;) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "int sg_ll_unmap_v2(int sg_fd,_Bool anchor,int group_num,int timeout_secs,void *paramp,int param_len,\n                  _Bool noisy,int verbose)\n\n{\n  ushort uVar1;\n  undefined *puVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  int iVar6;\n  undefined3 in_register_00000014;\n  undefined *puVar7;\n  undefined *puVar8;\n  uint8_t *puVar9;\n  uint8_t *puVar10;\n  int sense_cat;\n  uint8_t u_cdb [10];\n  uint8_t auStack_6e [2];\n  uint8_t sense_b [64];\n  \n  puVar2 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  u_cdb[0] = 'B';\n  u_cdb[1] = '\0';\n  u_cdb[2] = '\0';\n  u_cdb[3] = '\0';\n  iVar3 = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (CONCAT31(in_register_00000014,anchor) != 0) {\n    u_cdb[0] = 'B';\n    u_cdb[1] = '\x01';\n    u_cdb[2] = '\0';\n    u_cdb[3] = '\0';\n  }\n  if (timeout_secs < 1) {\n    timeout_secs = 0x3c;\n  }\n  sense_cat = CONCAT22((short)param_len,sense_cat._2_2_);\n  u_cdb._8_2_ = (ushort)(byte)param_len << 8;\n  uVar1 = CONCAT11((char)group_num,(char)((uint)param_len >> 8)) & 0x1fff;\n  u_cdb[4] = '\0';\n  u_cdb[5] = '\0';\n  u_cdb[6] = (char)(uVar1 >> 8);\n  u_cdb[7] = (char)uVar1;\n  if (verbose != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    puVar9 = u_cdb;\n    do {\n      puVar10 = puVar9 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*puVar9);\n      puVar9 = puVar10;\n    } while (auStack_6e != puVar10);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < verbose) && (paramp != (void *)0x0)) && (param_len != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar8 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    }\n  }\n  iVar4 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar4 == 0) {\n    iVar6 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar4,u_cdb,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar4,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar4,paramp,param_len);\n    uVar5 = (*(code *)PTR_do_scsi_pt_00054984)(iVar4,sg_fd,timeout_secs,verbose);\n    iVar6 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar4,puVar8 + -0x10c0,uVar5,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar6 == -1) {\n      uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4);\n      iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5);\n    }\n    else if (iVar6 == -2) {\n      iVar6 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar6 = 0;\n      }\n    }\n    else {\n      iVar6 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar4);\n  }\n  if (iVar3 != *(int *)puVar2) {\n    puVar8 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar3 = (**(code **)(puVar8 + 0x2a938))();\n    return iVar3;\n  }\n  return iVar6;\n}\n\n" (function_definition "int sg_ll_unmap_v2(int sg_fd,_Bool anchor,int group_num,int timeout_secs,void *paramp,int param_len,\n                  _Bool noisy,int verbose)\n\n{\n  ushort uVar1;\n  undefined *puVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  int iVar6;\n  undefined3 in_register_00000014;\n  undefined *puVar7;\n  undefined *puVar8;\n  uint8_t *puVar9;\n  uint8_t *puVar10;\n  int sense_cat;\n  uint8_t u_cdb [10];\n  uint8_t auStack_6e [2];\n  uint8_t sense_b [64];\n  \n  puVar2 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  u_cdb[0] = 'B';\n  u_cdb[1] = '\0';\n  u_cdb[2] = '\0';\n  u_cdb[3] = '\0';\n  iVar3 = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (CONCAT31(in_register_00000014,anchor) != 0) {\n    u_cdb[0] = 'B';\n    u_cdb[1] = '\x01';\n    u_cdb[2] = '\0';\n    u_cdb[3] = '\0';\n  }\n  if (timeout_secs < 1) {\n    timeout_secs = 0x3c;\n  }\n  sense_cat = CONCAT22((short)param_len,sense_cat._2_2_);\n  u_cdb._8_2_ = (ushort)(byte)param_len << 8;\n  uVar1 = CONCAT11((char)group_num,(char)((uint)param_len >> 8)) & 0x1fff;\n  u_cdb[4] = '\0';\n  u_cdb[5] = '\0';\n  u_cdb[6] = (char)(uVar1 >> 8);\n  u_cdb[7] = (char)uVar1;\n  if (verbose != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    puVar9 = u_cdb;\n    do {\n      puVar10 = puVar9 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*puVar9);\n      puVar9 = puVar10;\n    } while (auStack_6e != puVar10);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < verbose) && (paramp != (void *)0x0)) && (param_len != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar8 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    }\n  }\n  iVar4 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar4 == 0) {\n    iVar6 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar4,u_cdb,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar4,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar4,paramp,param_len);\n    uVar5 = (*(code *)PTR_do_scsi_pt_00054984)(iVar4,sg_fd,timeout_secs,verbose);\n    iVar6 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar4,puVar8 + -0x10c0,uVar5,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar6 == -1) {\n      uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4);\n      iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5);\n    }\n    else if (iVar6 == -2) {\n      iVar6 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar6 = 0;\n      }\n    }\n    else {\n      iVar6 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar4);\n  }\n  if (iVar3 != *(int *)puVar2) {\n    puVar8 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar3 = (**(code **)(puVar8 + 0x2a938))();\n    return iVar3;\n  }\n  return iVar6;\n}" primitive_type (function_declarator "sg_ll_unmap_v2(int sg_fd,_Bool anchor,int group_num,int timeout_secs,void *paramp,int param_len,\n                  _Bool noisy,int verbose)" identifier (parameter_list "(int sg_fd,_Bool anchor,int group_num,int timeout_secs,void *paramp,int param_len,\n                  _Bool noisy,int verbose)" ( (parameter_declaration "int sg_fd" primitive_type identifier) , (parameter_declaration "_Bool anchor" type_identifier identifier) , (parameter_declaration "int group_num" primitive_type identifier) , (parameter_declaration "int timeout_secs" primitive_type 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  ushort uVar1;\n  undefined *puVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  int iVar6;\n  undefined3 in_register_00000014;\n  undefined *puVar7;\n  undefined *puVar8;\n  uint8_t *puVar9;\n  uint8_t *puVar10;\n  int sense_cat;\n  uint8_t u_cdb [10];\n  uint8_t auStack_6e [2];\n  uint8_t sense_b [64];\n  \n  puVar2 = PTR___stack_chk_guard_00054a4c;\n  puVar8 = PTR_s_tatus_00054840;\n  u_cdb[0] = 'B';\n  u_cdb[1] = '\0';\n  u_cdb[2] = '\0';\n  u_cdb[3] = '\0';\n  iVar3 = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (CONCAT31(in_register_00000014,anchor) != 0) {\n    u_cdb[0] = 'B';\n    u_cdb[1] = '\x01';\n    u_cdb[2] = '\0';\n    u_cdb[3] = '\0';\n  }\n  if (timeout_secs < 1) {\n    timeout_secs = 0x3c;\n  }\n  sense_cat = CONCAT22((short)param_len,sense_cat._2_2_);\n  u_cdb._8_2_ = (ushort)(byte)param_len << 8;\n  uVar1 = CONCAT11((char)group_num,(char)((uint)param_len >> 8)) & 0x1fff;\n  u_cdb[4] = '\0';\n  u_cdb[5] = '\0';\n  u_cdb[6] = (char)(uVar1 >> 8);\n  u_cdb[7] = (char)uVar1;\n  if (verbose != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    puVar9 = u_cdb;\n    do {\n      puVar10 = puVar9 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*puVar9);\n      puVar9 = puVar10;\n    } while (auStack_6e != puVar10);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < verbose) && (paramp != (void *)0x0)) && (param_len != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar8 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    }\n  }\n  iVar4 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar4 == 0) {\n    iVar6 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar4,u_cdb,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar4,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar4,paramp,param_len);\n    uVar5 = (*(code *)PTR_do_scsi_pt_00054984)(iVar4,sg_fd,timeout_secs,verbose);\n    iVar6 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar4,puVar8 + -0x10c0,uVar5,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar6 == -1) {\n      uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4);\n      iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5);\n    }\n    else if (iVar6 == -2) {\n      iVar6 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar6 = 0;\n      }\n    }\n    else {\n      iVar6 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar4);\n  }\n  if (iVar3 != *(int *)puVar2) {\n    puVar8 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar3 = (**(code **)(puVar8 + 0x2a938))();\n    return iVar3;\n  }\n  return iVar6;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined3 in_register_00000014;" type_identifier identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint8_t *puVar9;" primitive_type (pointer_declarator "*puVar9" * identifier) ;) (declaration "uint8_t *puVar10;" primitive_type (pointer_declarator "*puVar10" * identifier) ;) (declaration "int sense_cat;" primitive_type identifier ;) (declaration "uint8_t u_cdb [10];" primitive_type (array_declarator "u_cdb [10]" identifier [ number_literal ]) ;) (declaration "uint8_t auStack_6e [2];" primitive_type (array_declarator "auStack_6e [2]" identifier [ number_literal ]) ;) (declaration "uint8_t sense_b [64];" primitive_type (array_declarator "sense_b [64]" identifier [ number_literal ]) ;) (expression_statement "puVar2 = PTR___stack_chk_guard_00054a4c;" (assignment_expression "puVar2 = 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 "u_cdb[0] = 'B';" (assignment_expression "u_cdb[0] = 'B'" (subscript_expression "u_cdb[0]" identifier [ number_literal ]) = (char_literal "'B'" ' character ')) ;) (expression_statement "u_cdb[1] = '\0';" (assignment_expression "u_cdb[1] = '\0'" (subscript_expression "u_cdb[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "u_cdb[2] = '\0';" (assignment_expression "u_cdb[2] = '\0'" (subscript_expression "u_cdb[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "u_cdb[3] = '\0';" (assignment_expression "u_cdb[3] = '\0'" (subscript_expression "u_cdb[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar3 = *(int *)PTR___stack_chk_guard_00054a4c;" (assignment_expression "iVar3 = *(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))) ;) (if_statement "if (CONCAT31(in_register_00000014,anchor) != 0) {\n    u_cdb[0] = 'B';\n    u_cdb[1] = '\x01';\n    u_cdb[2] = '\0';\n    u_cdb[3] = '\0';\n  }" if (parenthesized_expression "(CONCAT31(in_register_00000014,anchor) != 0)" ( (binary_expression "CONCAT31(in_register_00000014,anchor) != 0" (call_expression "CONCAT31(in_register_00000014,anchor)" identifier (argument_list "(in_register_00000014,anchor)" ( identifier , identifier ))) != number_literal) )) (compound_statement "{\n    u_cdb[0] = 'B';\n    u_cdb[1] = '\x01';\n    u_cdb[2] = '\0';\n    u_cdb[3] = '\0';\n  }" { (expression_statement "u_cdb[0] = 'B';" (assignment_expression "u_cdb[0] = 'B'" (subscript_expression "u_cdb[0]" identifier [ number_literal ]) = (char_literal "'B'" ' character ')) ;) (expression_statement "u_cdb[1] = '\x01';" (assignment_expression "u_cdb[1] = '\x01'" (subscript_expression "u_cdb[1]" identifier [ number_literal ]) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "u_cdb[2] = '\0';" (assignment_expression "u_cdb[2] = '\0'" (subscript_expression "u_cdb[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "u_cdb[3] = '\0';" (assignment_expression "u_cdb[3] = '\0'" (subscript_expression "u_cdb[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) })) (if_statement "if (timeout_secs < 1) {\n    timeout_secs = 0x3c;\n  }" if (parenthesized_expression "(timeout_secs < 1)" ( (binary_expression "timeout_secs < 1" identifier < number_literal) )) (compound_statement "{\n    timeout_secs = 0x3c;\n  }" { (expression_statement "timeout_secs = 0x3c;" (assignment_expression "timeout_secs = 0x3c" identifier = number_literal) ;) })) (expression_statement "sense_cat = CONCAT22((short)param_len,sense_cat._2_2_);" (assignment_expression "sense_cat = CONCAT22((short)param_len,sense_cat._2_2_)" identifier = (call_expression "CONCAT22((short)param_len,sense_cat._2_2_)" identifier (argument_list "((short)param_len,sense_cat._2_2_)" ( (cast_expression "(short)param_len" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) , (field_expression "sense_cat._2_2_" identifier . field_identifier) )))) ;) (expression_statement "u_cdb._8_2_ = (ushort)(byte)param_len << 8;" (assignment_expression "u_cdb._8_2_ = (ushort)(byte)param_len << 8" (field_expression "u_cdb._8_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)) ;) (expression_statement "uVar1 = CONCAT11((char)group_num,(char)((uint)param_len >> 8)) & 0x1fff;" (assignment_expression "uVar1 = CONCAT11((char)group_num,(char)((uint)param_len >> 8)) & 0x1fff" identifier = (binary_expression "CONCAT11((char)group_num,(char)((uint)param_len >> 8)) & 0x1fff" (call_expression "CONCAT11((char)group_num,(char)((uint)param_len >> 8))" identifier (argument_list "((char)group_num,(char)((uint)param_len >> 8))" ( (cast_expression "(char)group_num" ( (type_descriptor "char" primitive_type) ) identifier) , (cast_expression "(char)((uint)param_len >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)param_len >> 8)" ( (binary_expression "(uint)param_len >> 8" (cast_expression "(uint)param_len" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) ))) & number_literal)) ;) (expression_statement "u_cdb[4] = '\0';" (assignment_expression "u_cdb[4] = '\0'" (subscript_expression "u_cdb[4]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "u_cdb[5] = '\0';" (assignment_expression "u_cdb[5] = '\0'" (subscript_expression "u_cdb[5]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "u_cdb[6] = (char)(uVar1 >> 8);" (assignment_expression "u_cdb[6] = (char)(uVar1 >> 8)" (subscript_expression "u_cdb[6]" identifier [ number_literal ]) = (cast_expression "(char)(uVar1 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar1 >> 8)" ( (binary_expression "uVar1 >> 8" identifier >> number_literal) )))) ;) (expression_statement "u_cdb[7] = (char)uVar1;" (assignment_expression "u_cdb[7] = (char)uVar1" (subscript_expression "u_cdb[7]" identifier [ number_literal ]) = (cast_expression "(char)uVar1" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (if_statement "if (verbose != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    puVar9 = u_cdb;\n    do {\n      puVar10 = puVar9 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*puVar9);\n      puVar9 = puVar10;\n    } while (auStack_6e != puVar10);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < verbose) && (paramp != (void *)0x0)) && (param_len != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar8 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    }\n  }" if (parenthesized_expression "(verbose != 0)" ( (binary_expression "verbose != 0" identifier != number_literal) )) (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar7 = PTR_LAB_0005483c + 0x1f1c;\n    puVar9 = u_cdb;\n    do {\n      puVar10 = puVar9 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*puVar9);\n      puVar9 = puVar10;\n    } while (auStack_6e != puVar10);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < verbose) && (paramp != (void *)0x0)) && (param_len != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar8 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    }\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0)" (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 + -0x10c0)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1a50" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x10c0" 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 "puVar9 = u_cdb;" (assignment_expression "puVar9 = u_cdb" identifier = identifier) ;) (do_statement "do {\n      puVar10 = puVar9 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*puVar9);\n      puVar9 = puVar10;\n    } while (auStack_6e != puVar10);" do (compound_statement "{\n      puVar10 = puVar9 + 1;\n      (*(code *)PTR_pr2ws_000548ec)(puVar7,*puVar9);\n      puVar9 = puVar10;\n    }" { (expression_statement "puVar10 = puVar9 + 1;" (assignment_expression "puVar10 = puVar9 + 1" identifier = (binary_expression "puVar9 + 1" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar7,*puVar9);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar7,*puVar9)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar7,*puVar9)" ( identifier , (pointer_expression "*puVar9" * identifier) ))) ;) (expression_statement "puVar9 = puVar10;" (assignment_expression "puVar9 = puVar10" identifier = identifier) ;) }) while (parenthesized_expression "(auStack_6e != puVar10)" ( (binary_expression "auStack_6e != puVar10" 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 (((1 < verbose) && (paramp != (void *)0x0)) && (param_len != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar8 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    }" if (parenthesized_expression "(((1 < verbose) && (paramp != (void *)0x0)) && (param_len != 0))" ( (binary_expression "((1 < verbose) && (paramp != (void *)0x0)) && (param_len != 0)" (parenthesized_expression "((1 < verbose) && (paramp != (void *)0x0))" ( (binary_expression "(1 < verbose) && (paramp != (void *)0x0)" (parenthesized_expression "(1 < verbose)" ( (binary_expression "1 < verbose" number_literal < identifier) )) && (parenthesized_expression "(paramp != (void *)0x0)" ( (binary_expression "paramp != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) && (parenthesized_expression "(param_len != 0)" ( (binary_expression "param_len != 0" identifier != number_literal) ))) )) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar8 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(paramp,param_len,0xffffffff);\n    }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar8 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar8 + -0x10c0)" (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 + -0x13cc,puVar8 + -0x10c0)" ( (binary_expression "PTR_s_tatus_00054840 + -0x13cc" identifier + number_literal) , (binary_expression "puVar8 + -0x10c0" 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 "iVar4 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();" (assignment_expression "iVar4 = (*(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 (iVar4 == 0) {\n    iVar6 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar4,u_cdb,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar4,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar4,paramp,param_len);\n    uVar5 = (*(code *)PTR_do_scsi_pt_00054984)(iVar4,sg_fd,timeout_secs,verbose);\n    iVar6 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar4,puVar8 + -0x10c0,uVar5,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar6 == -1) {\n      uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4);\n      iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5);\n    }\n    else if (iVar6 == -2) {\n      iVar6 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar6 = 0;\n      }\n    }\n    else {\n      iVar6 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar4);\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar6 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x10c0);\n  }" { (expression_statement "iVar6 = -1;" (assignment_expression "iVar6 = -1" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar8 + -0x10c0)" (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 + -0x10c0)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1974" identifier + number_literal) , (binary_expression "puVar8 + -0x10c0" identifier + number_literal) ))) ;) }) (else_clause "else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar4,u_cdb,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar4,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar4,paramp,param_len);\n    uVar5 = (*(code *)PTR_do_scsi_pt_00054984)(iVar4,sg_fd,timeout_secs,verbose);\n    iVar6 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar4,puVar8 + -0x10c0,uVar5,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar6 == -1) {\n      uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4);\n      iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5);\n    }\n    else if (iVar6 == -2) {\n      iVar6 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar6 = 0;\n      }\n    }\n    else {\n      iVar6 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar4);\n  }" else (compound_statement "{\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar4,u_cdb,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar4,sense_b,0x40);\n    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar4,paramp,param_len);\n    uVar5 = (*(code *)PTR_do_scsi_pt_00054984)(iVar4,sg_fd,timeout_secs,verbose);\n    iVar6 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar4,puVar8 + -0x10c0,uVar5,0,sense_b,noisy,verbose,&sense_cat);\n    if (iVar6 == -1) {\n      uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4);\n      iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5);\n    }\n    else if (iVar6 == -2) {\n      iVar6 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar6 = 0;\n      }\n    }\n    else {\n      iVar6 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar4);\n  }" { (expression_statement "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar4,u_cdb,10);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar4,u_cdb,10)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_cdb_00054860" * (cast_expression "(code *)PTR_set_scsi_pt_cdb_00054860" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4,u_cdb,10)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar4,sense_b,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar4,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 "(iVar4,sense_b,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar4,paramp,param_len);" (call_expression "(*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar4,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 "(iVar4,paramp,param_len)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar5 = (*(code *)PTR_do_scsi_pt_00054984)(iVar4,sg_fd,timeout_secs,verbose);" (assignment_expression "uVar5 = (*(code *)PTR_do_scsi_pt_00054984)(iVar4,sg_fd,timeout_secs,verbose)" identifier = (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar4,sg_fd,timeout_secs,verbose)" (parenthesized_expression "(*(code *)PTR_do_scsi_pt_00054984)" ( (pointer_expression "*(code *)PTR_do_scsi_pt_00054984" * (cast_expression "(code *)PTR_do_scsi_pt_00054984" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4,sg_fd,timeout_secs,verbose)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "iVar6 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar4,puVar8 + -0x10c0,uVar5,0,sense_b,noisy,verbose,&sense_cat);" (assignment_expression "iVar6 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar4,puVar8 + -0x10c0,uVar5,0,sense_b,noisy,verbose,&sense_cat)" identifier = (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar4,puVar8 + -0x10c0,uVar5,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 "(iVar4,puVar8 + -0x10c0,uVar5,0,sense_b,noisy,verbose,&sense_cat)" ( identifier , (binary_expression "puVar8 + -0x10c0" identifier + number_literal) , identifier , number_literal , identifier , identifier , identifier , (pointer_expression "&sense_cat" & identifier) )))) ;) (if_statement "if (iVar6 == -1) {\n      uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4);\n      iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5);\n    }\n    else if (iVar6 == -2) {\n      iVar6 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar6 = 0;\n      }\n    }\n    else {\n      iVar6 = 0;\n    }" if (parenthesized_expression "(iVar6 == -1)" ( (binary_expression "iVar6 == -1" identifier == number_literal) )) (compound_statement "{\n      uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4);\n      iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5);\n    }" { (expression_statement "uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4);" (assignment_expression "uVar5 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4)" identifier = (call_expression "(*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar4)" (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 "(iVar4)" ( identifier )))) ;) (expression_statement "iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5);" (assignment_expression "iVar6 = (*(code *)PTR_sg_convert_errno_00054928)(uVar5)" identifier = (call_expression "(*(code *)PTR_sg_convert_errno_00054928)(uVar5)" (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 "(uVar5)" ( identifier )))) ;) }) (else_clause "else if (iVar6 == -2) {\n      iVar6 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar6 = 0;\n      }\n    }\n    else {\n      iVar6 = 0;\n    }" else (if_statement "if (iVar6 == -2) {\n      iVar6 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar6 = 0;\n      }\n    }\n    else {\n      iVar6 = 0;\n    }" if (parenthesized_expression "(iVar6 == -2)" ( (binary_expression "iVar6 == -2" identifier == number_literal) )) (compound_statement "{\n      iVar6 = sense_cat;\n      if (sense_cat - 0x14U < 2) {\n        iVar6 = 0;\n      }\n    }" { (expression_statement "iVar6 = sense_cat;" (assignment_expression "iVar6 = sense_cat" identifier = identifier) ;) (if_statement "if (sense_cat - 0x14U < 2) {\n        iVar6 = 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        iVar6 = 0;\n      }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) })) }) (else_clause "else {\n      iVar6 = 0;\n    }" else (compound_statement "{\n      iVar6 = 0;\n    }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) }))))) (expression_statement "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar4);" (call_expression "(*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar4)" (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 "(iVar4)" ( identifier ))) ;) }))) (if_statement "if (iVar3 != *(int *)puVar2) {\n    puVar8 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar3 = (**(code **)(puVar8 + 0x2a938))();\n    return iVar3;\n  }" if (parenthesized_expression "(iVar3 != *(int *)puVar2)" ( (binary_expression "iVar3 != *(int *)puVar2" identifier != (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    puVar8 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar3 = (**(code **)(puVar8 + 0x2a938))();\n    return iVar3;\n  }" { (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 "iVar3 = (**(code **)(puVar8 + 0x2a938))();" (assignment_expression "iVar3 = (**(code **)(puVar8 + 0x2a938))()" identifier = (call_expression "(**(code **)(puVar8 + 0x2a938))()" (parenthesized_expression "(**(code **)(puVar8 + 0x2a938))" ( (pointer_expression "**(code **)(puVar8 + 0x2a938)" * (pointer_expression "*(code **)(puVar8 + 0x2a938)" * (cast_expression "(code **)(puVar8 + 0x2a938)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar8 + 0x2a938)" ( (binary_expression "puVar8 + 0x2a938" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar3;" return identifier ;) })) (return_statement "return iVar6;" return identifier ;) })))
(translation_unit "int sg_ll_unmap_v2(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int 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  undefined *puVar5;\n  undefined *puVar6;\n  int *piVar7;\n  int *piVar8;\n  int local_7c [3];\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar6 = PTR_s_tatus_00054840;\n  local_7c[1] = 0x42000000;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }\n  if (param_4 < 1) {\n    param_4 = 0x3c;\n  }\n  local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);\n  local_70 = (ushort)(byte)param_6 << 8;\n  local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);\n  if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }\n  iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\n  if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }\n  return iVar4;\n}\n\n" (function_definition "int sg_ll_unmap_v2(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int 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  undefined *puVar5;\n  undefined *puVar6;\n  int *piVar7;\n  int *piVar8;\n  int local_7c [3];\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar6 = PTR_s_tatus_00054840;\n  local_7c[1] = 0x42000000;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }\n  if (param_4 < 1) {\n    param_4 = 0x3c;\n  }\n  local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);\n  local_70 = (ushort)(byte)param_6 << 8;\n  local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);\n  if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }\n  iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\n  if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }\n  return iVar4;\n}" primitive_type (function_declarator "sg_ll_unmap_v2(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int param_5,\n                  int param_6,undefined1 param_7,int param_8)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int 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 "undefined1 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int param_5" primitive_type 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  undefined *puVar5;\n  undefined *puVar6;\n  int *piVar7;\n  int *piVar8;\n  int local_7c [3];\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar6 = PTR_s_tatus_00054840;\n  local_7c[1] = 0x42000000;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }\n  if (param_4 < 1) {\n    param_4 = 0x3c;\n  }\n  local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);\n  local_70 = (ushort)(byte)param_6 << 8;\n  local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);\n  if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }\n  iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\n  if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }\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 "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "undefined *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int local_7c [3];" primitive_type (array_declarator "local_7c [3]" identifier [ number_literal ]) ;) (declaration "short local_70;" (sized_type_specifier "short" short) identifier ;) (declaration "undefined4 uStack_6e;" type_identifier identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_00054a4c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00054a4c" identifier = identifier) ;) (expression_statement "puVar6 = PTR_s_tatus_00054840;" (assignment_expression "puVar6 = PTR_s_tatus_00054840" identifier = identifier) ;) (expression_statement "local_7c[1] = 0x42000000;" (assignment_expression "local_7c[1] = 0x42000000" (subscript_expression "local_7c[1]" identifier [ number_literal ]) = number_literal) ;) (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))) ;) (if_statement "if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    local_7c[1] = 0x42010000;\n  }" { (expression_statement "local_7c[1] = 0x42010000;" (assignment_expression "local_7c[1] = 0x42010000" (subscript_expression "local_7c[1]" identifier [ number_literal ]) = number_literal) ;) })) (if_statement "if (param_4 < 1) {\n    param_4 = 0x3c;\n  }" if (parenthesized_expression "(param_4 < 1)" ( (binary_expression "param_4 < 1" identifier < number_literal) )) (compound_statement "{\n    param_4 = 0x3c;\n  }" { (expression_statement "param_4 = 0x3c;" (assignment_expression "param_4 = 0x3c" identifier = number_literal) ;) })) (expression_statement "local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);" (assignment_expression "local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_)" (subscript_expression "local_7c[0]" identifier [ number_literal ]) = (call_expression "CONCAT22((short)param_6,local_7c[0]._2_2_)" identifier (argument_list "((short)param_6,local_7c[0]._2_2_)" ( (cast_expression "(short)param_6" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) , (field_expression "local_7c[0]._2_2_" (subscript_expression "local_7c[0]" identifier [ number_literal ]) . field_identifier) )))) ;) (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)) ;) (expression_statement "local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);" (assignment_expression "local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff)" (subscript_expression "local_7c[2]" identifier [ number_literal ]) = (cast_expression "(int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff)" ( (binary_expression "CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff" (call_expression "CONCAT11(param_3,(char)((uint)param_6 >> 8))" identifier (argument_list "(param_3,(char)((uint)param_6 >> 8))" ( identifier , (cast_expression "(char)((uint)param_6 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)param_6 >> 8)" ( (binary_expression "(uint)param_6 >> 8" (cast_expression "(uint)param_6" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) ))) & number_literal) )))) ;) (if_statement "if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }" if (parenthesized_expression "(param_8 != 0)" ( (binary_expression "param_8 != 0" identifier != number_literal) )) (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0)" (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 + -0x10c0)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1a50" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0x10c0" identifier + number_literal) ))) ;) (expression_statement "puVar5 = PTR_LAB_0005483c + 0x1f1c;" (assignment_expression "puVar5 = PTR_LAB_0005483c + 0x1f1c" identifier = (binary_expression "PTR_LAB_0005483c + 0x1f1c" identifier + number_literal)) ;) (expression_statement "piVar7 = local_7c + 1;" (assignment_expression "piVar7 = local_7c + 1" identifier = (binary_expression "local_7c + 1" identifier + number_literal)) ;) (do_statement "do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);" do (compound_statement "{\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    }" { (expression_statement "piVar8 = (int *)((int)piVar7 + 1);" (assignment_expression "piVar8 = (int *)((int)piVar7 + 1)" identifier = (cast_expression "(int *)((int)piVar7 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar7 + 1)" ( (binary_expression "(int)piVar7 + 1" (cast_expression "(int)piVar7" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7)" (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 "(puVar5,*(undefined1 *)piVar7)" ( identifier , (pointer_expression "*(undefined1 *)piVar7" * (cast_expression "(undefined1 *)piVar7" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ))) ;) (expression_statement "piVar7 = piVar8;" (assignment_expression "piVar7 = piVar8" identifier = identifier) ;) }) while (parenthesized_expression "(&uStack_6e != piVar8)" ( (binary_expression "&uStack_6e != piVar8" (pointer_expression "&uStack_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 (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }" if (parenthesized_expression "(((1 < param_8) && (param_5 != 0)) && (param_6 != 0))" ( (binary_expression "((1 < param_8) && (param_5 != 0)) && (param_6 != 0)" (parenthesized_expression "((1 < param_8) && (param_5 != 0))" ( (binary_expression "(1 < param_8) && (param_5 != 0)" (parenthesized_expression "(1 < param_8)" ( (binary_expression "1 < param_8" number_literal < identifier) )) && (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) ))) )) && (parenthesized_expression "(param_6 != 0)" ( (binary_expression "param_6 != 0" identifier != number_literal) ))) )) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0)" (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 + -0x13cc,puVar6 + -0x10c0)" ( (binary_expression "PTR_s_tatus_00054840 + -0x13cc" identifier + number_literal) , (binary_expression "puVar6 + -0x10c0" 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,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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,puVar6 + -0x10c0);\n  }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0)" (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,puVar6 + -0x10c0)" ( (binary_expression "PTR_s_tatus_00054840 + -0x1974" identifier + number_literal) , (binary_expression "puVar6 + -0x10c0" identifier + number_literal) ))) ;) }) (else_clause "else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c + 1,10);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_cdb_00054860" * (cast_expression "(code *)PTR_set_scsi_pt_cdb_00054860" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,local_7c + 1,10)" ( identifier , (binary_expression "local_7c + 1" identifier + number_literal) , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)" ( (pointer_expression "*(code *)PTR_set_scsi_pt_sense_000548f4" * (cast_expression "(code *)PTR_set_scsi_pt_sense_000548f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,(int)&uStack_6e + 2,0x40)" ( identifier , (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&uStack_6e" & identifier)) + number_literal) , number_literal ))) ;) (expression_statement "(*(code *)PTR_set_scsi_pt_data_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,param_4,param_8);" (assignment_expression "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_4,param_8)" identifier = (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_4,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,param_4,param_8)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);" (assignment_expression "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c)" identifier = (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c)" (parenthesized_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)" ( (pointer_expression "*(code *)PTR_sg_cmds_process_resp_000548d0" * (cast_expression "(code *)PTR_sg_cmds_process_resp_000548d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c)" ( identifier , (binary_expression "puVar6 + -0x10c0" identifier + number_literal) , identifier , number_literal , (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&uStack_6e" & identifier)) + number_literal) , identifier , identifier , identifier )))) ;) (if_statement "if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }" else (if_statement "if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }" { (expression_statement "iVar4 = local_7c[0];" (assignment_expression "iVar4 = local_7c[0]" identifier = (subscript_expression "local_7c[0]" identifier [ number_literal ])) ;) (if_statement "if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }" if (parenthesized_expression "(local_7c[0] - 0x14U < 2)" ( (binary_expression "local_7c[0] - 0x14U < 2" (binary_expression "local_7c[0] - 0x14U" (subscript_expression "local_7c[0]" identifier [ number_literal ]) - 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 ))) ;) }))) (if_statement "if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\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    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }" { (expression_statement "puVar6 = PTR___stack_chk_fail_00054a1c;" (assignment_expression "puVar6 = 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 **)(puVar6 + 0x2a938))();" (assignment_expression "iVar2 = (**(code **)(puVar6 + 0x2a938))()" identifier = (call_expression "(**(code **)(puVar6 + 0x2a938))()" (parenthesized_expression "(**(code **)(puVar6 + 0x2a938))" ( (pointer_expression "**(code **)(puVar6 + 0x2a938)" * (pointer_expression "*(code **)(puVar6 + 0x2a938)" * (cast_expression "(code **)(puVar6 + 0x2a938)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar6 + 0x2a938)" ( (binary_expression "puVar6 + 0x2a938" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar2;" return identifier ;) })) (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 (array_declarator IDENT [ LIT ]) ;) (declaration (sized_type_specifier short) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT) , (field_expression (subscript_expression IDENT [ LIT ]) . field_identifier) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) << LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) ))) & LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression (pointer_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 (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) ))) ;) (expression_statement (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 , (binary_expression IDENT + LIT) , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression & IDENT)) + LIT) , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression IDENT + LIT) , IDENT , LIT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression & IDENT)) + LIT) , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) - 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 ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (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 ;) })) (return_statement return IDENT ;) })))
(function_definition "int sg_ll_unmap_v2(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int 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  undefined *puVar5;\n  undefined *puVar6;\n  int *piVar7;\n  int *piVar8;\n  int local_7c [3];\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar6 = PTR_s_tatus_00054840;\n  local_7c[1] = 0x42000000;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }\n  if (param_4 < 1) {\n    param_4 = 0x3c;\n  }\n  local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);\n  local_70 = (ushort)(byte)param_6 << 8;\n  local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);\n  if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }\n  iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\n  if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }\n  return iVar4;\n}" (primitive_type "int") (function_declarator "sg_ll_unmap_v2(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int param_5,\n                  int param_6,undefined1 param_7,int param_8)" (identifier "sg_ll_unmap_v2") (parameter_list "(undefined4 param_1,int param_2,undefined1 param_3,int param_4,int 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 "undefined1 param_3" (type_identifier "undefined1") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (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  undefined *puVar5;\n  undefined *puVar6;\n  int *piVar7;\n  int *piVar8;\n  int local_7c [3];\n  short local_70;\n  undefined4 uStack_6e;\n  int local_2c;\n  \n  puVar1 = PTR___stack_chk_guard_00054a4c;\n  puVar6 = PTR_s_tatus_00054840;\n  local_7c[1] = 0x42000000;\n  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;\n  if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }\n  if (param_4 < 1) {\n    param_4 = 0x3c;\n  }\n  local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);\n  local_70 = (ushort)(byte)param_6 << 8;\n  local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);\n  if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }\n  iVar2 = (*(code *)PTR_construct_scsi_pt_obj_00054a54)();\n  if (iVar2 == 0) {\n    iVar4 = -1;\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }\n    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);\n  }\n  if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }\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 "undefined *puVar5;" (type_identifier "undefined") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "undefined *puVar6;" (type_identifier "undefined") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "int *piVar7;" (primitive_type "int") (pointer_declarator "*piVar7" (* "*") (identifier "piVar7")) (; ";")) (declaration "int *piVar8;" (primitive_type "int") (pointer_declarator "*piVar8" (* "*") (identifier "piVar8")) (; ";")) (declaration "int local_7c [3];" (primitive_type "int") (array_declarator "local_7c [3]" (identifier "local_7c") ([ "[") (number_literal "3") (] "]")) (; ";")) (declaration "short local_70;" (sized_type_specifier "short" (short "short")) (identifier "local_70") (; ";")) (declaration "undefined4 uStack_6e;" (type_identifier "undefined4") (identifier "uStack_6e") (; ";")) (declaration "int local_2c;" (primitive_type "int") (identifier "local_2c") (; ";")) (expression_statement "puVar1 = PTR___stack_chk_guard_00054a4c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00054a4c" (identifier "puVar1") (= "=") (identifier "PTR___stack_chk_guard_00054a4c")) (; ";")) (expression_statement "puVar6 = PTR_s_tatus_00054840;" (assignment_expression "puVar6 = PTR_s_tatus_00054840" (identifier "puVar6") (= "=") (identifier "PTR_s_tatus_00054840")) (; ";")) (expression_statement "local_7c[1] = 0x42000000;" (assignment_expression "local_7c[1] = 0x42000000" (subscript_expression "local_7c[1]" (identifier "local_7c") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0x42000000")) (; ";")) (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")))) (; ";")) (if_statement "if (param_2 != 0) {\n    local_7c[1] = 0x42010000;\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    local_7c[1] = 0x42010000;\n  }" ({ "{") (expression_statement "local_7c[1] = 0x42010000;" (assignment_expression "local_7c[1] = 0x42010000" (subscript_expression "local_7c[1]" (identifier "local_7c") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0x42010000")) (; ";")) (} "}"))) (if_statement "if (param_4 < 1) {\n    param_4 = 0x3c;\n  }" (if "if") (parenthesized_expression "(param_4 < 1)" (( "(") (binary_expression "param_4 < 1" (identifier "param_4") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n    param_4 = 0x3c;\n  }" ({ "{") (expression_statement "param_4 = 0x3c;" (assignment_expression "param_4 = 0x3c" (identifier "param_4") (= "=") (number_literal "0x3c")) (; ";")) (} "}"))) (expression_statement "local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);" (assignment_expression "local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_)" (subscript_expression "local_7c[0]" (identifier "local_7c") ([ "[") (number_literal "0") (] "]")) (= "=") (call_expression "CONCAT22((short)param_6,local_7c[0]._2_2_)" (identifier "CONCAT22") (argument_list "((short)param_6,local_7c[0]._2_2_)" (( "(") (cast_expression "(short)param_6" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "param_6")) (, ",") (field_expression "local_7c[0]._2_2_" (subscript_expression "local_7c[0]" (identifier "local_7c") ([ "[") (number_literal "0") (] "]")) (. ".") (field_identifier "_2_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"))) (; ";")) (expression_statement "local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);" (assignment_expression "local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff)" (subscript_expression "local_7c[2]" (identifier "local_7c") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff)" (( "(") (binary_expression "CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff" (call_expression "CONCAT11(param_3,(char)((uint)param_6 >> 8))" (identifier "CONCAT11") (argument_list "(param_3,(char)((uint)param_6 >> 8))" (( "(") (identifier "param_3") (, ",") (cast_expression "(char)((uint)param_6 >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)param_6 >> 8)" (( "(") (binary_expression "(uint)param_6 >> 8" (cast_expression "(uint)param_6" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_6")) (>> ">>") (number_literal "8")) () ")"))) () ")"))) (& "&") (number_literal "0x1fff")) () ")")))) (; ";")) (if_statement "if (param_8 != 0) {\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }" (if "if") (parenthesized_expression "(param_8 != 0)" (( "(") (binary_expression "param_8 != 0" (identifier "param_8") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);\n    puVar5 = PTR_LAB_0005483c + 0x1f1c;\n    piVar7 = local_7c + 1;\n    do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);\n    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);\n    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }\n  }" ({ "{") (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0)" (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 + -0x10c0)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x1a50" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x1a50")) (, ",") (binary_expression "PTR_s_tatus_00054840 + -0x10c0" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x10c0")) () ")"))) (; ";")) (expression_statement "puVar5 = PTR_LAB_0005483c + 0x1f1c;" (assignment_expression "puVar5 = PTR_LAB_0005483c + 0x1f1c" (identifier "puVar5") (= "=") (binary_expression "PTR_LAB_0005483c + 0x1f1c" (identifier "PTR_LAB_0005483c") (+ "+") (number_literal "0x1f1c"))) (; ";")) (expression_statement "piVar7 = local_7c + 1;" (assignment_expression "piVar7 = local_7c + 1" (identifier "piVar7") (= "=") (binary_expression "local_7c + 1" (identifier "local_7c") (+ "+") (number_literal "1"))) (; ";")) (do_statement "do {\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    } while (&uStack_6e != piVar8);" (do "do") (compound_statement "{\n      piVar8 = (int *)((int)piVar7 + 1);\n      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);\n      piVar7 = piVar8;\n    }" ({ "{") (expression_statement "piVar8 = (int *)((int)piVar7 + 1);" (assignment_expression "piVar8 = (int *)((int)piVar7 + 1)" (identifier "piVar8") (= "=") (cast_expression "(int *)((int)piVar7 + 1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar7 + 1)" (( "(") (binary_expression "(int)piVar7 + 1" (cast_expression "(int)piVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar7")) (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "(*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7)" (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 "(puVar5,*(undefined1 *)piVar7)" (( "(") (identifier "puVar5") (, ",") (pointer_expression "*(undefined1 *)piVar7" (* "*") (cast_expression "(undefined1 *)piVar7" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "piVar7"))) () ")"))) (; ";")) (expression_statement "piVar7 = piVar8;" (assignment_expression "piVar7 = piVar8" (identifier "piVar7") (= "=") (identifier "piVar8")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(&uStack_6e != piVar8)" (( "(") (binary_expression "&uStack_6e != piVar8" (pointer_expression "&uStack_6e" (& "&") (identifier "uStack_6e")) (!= "!=") (identifier "piVar8")) () ")")) (; ";")) (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 (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }" (if "if") (parenthesized_expression "(((1 < param_8) && (param_5 != 0)) && (param_6 != 0))" (( "(") (binary_expression "((1 < param_8) && (param_5 != 0)) && (param_6 != 0)" (parenthesized_expression "((1 < param_8) && (param_5 != 0))" (( "(") (binary_expression "(1 < param_8) && (param_5 != 0)" (parenthesized_expression "(1 < param_8)" (( "(") (binary_expression "1 < param_8" (number_literal "1") (< "<") (identifier "param_8")) () ")")) (&& "&&") (parenthesized_expression "(param_5 != 0)" (( "(") (binary_expression "param_5 != 0" (identifier "param_5") (!= "!=") (number_literal "0")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(param_6 != 0)" (( "(") (binary_expression "param_6 != 0" (identifier "param_6") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);\n      (*(code *)PTR_hex2stderr_0005489c)(param_5,param_6,0xffffffff);\n    }" ({ "{") (expression_statement "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0)" (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 + -0x13cc,puVar6 + -0x10c0)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x13cc" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x13cc")) (, ",") (binary_expression "puVar6 + -0x10c0" (identifier "puVar6") (+ "+") (number_literal "-0x10c0")) () ")"))) (; ";")) (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,puVar6 + -0x10c0);\n  }\n  else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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,puVar6 + -0x10c0);\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,puVar6 + -0x10c0);" (call_expression "(*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1974,puVar6 + -0x10c0)" (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,puVar6 + -0x10c0)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x1974" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x1974")) (, ",") (binary_expression "puVar6 + -0x10c0" (identifier "puVar6") (+ "+") (number_literal "-0x10c0")) () ")"))) (; ";")) (} "}")) (else_clause "else {\n    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c + 1,10);\n    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,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,param_4,param_8);\n    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);\n    if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c + 1,10);" (call_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_cdb_00054860)" (( "(") (pointer_expression "*(code *)PTR_set_scsi_pt_cdb_00054860" (* "*") (cast_expression "(code *)PTR_set_scsi_pt_cdb_00054860" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_set_scsi_pt_cdb_00054860"))) () ")")) (argument_list "(iVar2,local_7c + 1,10)" (( "(") (identifier "iVar2") (, ",") (binary_expression "local_7c + 1" (identifier "local_7c") (+ "+") (number_literal "1")) (, ",") (number_literal "10") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);" (call_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40)" (parenthesized_expression "(*(code *)PTR_set_scsi_pt_sense_000548f4)" (( "(") (pointer_expression "*(code *)PTR_set_scsi_pt_sense_000548f4" (* "*") (cast_expression "(code *)PTR_set_scsi_pt_sense_000548f4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_set_scsi_pt_sense_000548f4"))) () ")")) (argument_list "(iVar2,(int)&uStack_6e + 2,0x40)" (( "(") (identifier "iVar2") (, ",") (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "&uStack_6e" (& "&") (identifier "uStack_6e"))) (+ "+") (number_literal "2")) (, ",") (number_literal "0x40") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_set_scsi_pt_data_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,param_4,param_8);" (assignment_expression "uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_4,param_8)" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_4,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,param_4,param_8)" (( "(") (identifier "iVar2") (, ",") (identifier "param_1") (, ",") (identifier "param_4") (, ",") (identifier "param_8") () ")")))) (; ";")) (expression_statement "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);" (assignment_expression "iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c)" (identifier "iVar4") (= "=") (call_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)\n                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c)" (parenthesized_expression "(*(code *)PTR_sg_cmds_process_resp_000548d0)" (( "(") (pointer_expression "*(code *)PTR_sg_cmds_process_resp_000548d0" (* "*") (cast_expression "(code *)PTR_sg_cmds_process_resp_000548d0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sg_cmds_process_resp_000548d0"))) () ")")) (argument_list "(iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c)" (( "(") (identifier "iVar2") (, ",") (binary_expression "puVar6 + -0x10c0" (identifier "puVar6") (+ "+") (number_literal "-0x10c0")) (, ",") (identifier "uVar3") (, ",") (number_literal "0") (, ",") (binary_expression "(int)&uStack_6e + 2" (cast_expression "(int)&uStack_6e" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "&uStack_6e" (& "&") (identifier "uStack_6e"))) (+ "+") (number_literal "2")) (, ",") (identifier "param_7") (, ",") (identifier "param_8") (, ",") (identifier "local_7c") () ")")))) (; ";")) (if_statement "if (iVar4 == -1) {\n      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);\n      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);\n    }\n    else if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }\n    else {\n      iVar4 = 0;\n    }" (else "else") (if_statement "if (iVar4 == -2) {\n      iVar4 = local_7c[0];\n      if (local_7c[0] - 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_7c[0];\n      if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }\n    }" ({ "{") (expression_statement "iVar4 = local_7c[0];" (assignment_expression "iVar4 = local_7c[0]" (identifier "iVar4") (= "=") (subscript_expression "local_7c[0]" (identifier "local_7c") ([ "[") (number_literal "0") (] "]"))) (; ";")) (if_statement "if (local_7c[0] - 0x14U < 2) {\n        iVar4 = 0;\n      }" (if "if") (parenthesized_expression "(local_7c[0] - 0x14U < 2)" (( "(") (binary_expression "local_7c[0] - 0x14U < 2" (binary_expression "local_7c[0] - 0x14U" (subscript_expression "local_7c[0]" (identifier "local_7c") ([ "[") (number_literal "0") (] "]")) (- "-") (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") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_2c != *(int *)puVar1) {\n    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\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    puVar6 = PTR___stack_chk_fail_00054a1c;\n    (*(code *)PTR___stack_chk_fail_00054a1c)();\n    iVar2 = (**(code **)(puVar6 + 0x2a938))();\n    return iVar2;\n  }" ({ "{") (expression_statement "puVar6 = PTR___stack_chk_fail_00054a1c;" (assignment_expression "puVar6 = PTR___stack_chk_fail_00054a1c" (identifier "puVar6") (= "=") (identifier "PTR___stack_chk_fail_00054a1c")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_00054a1c)();" (call_expression "(*(code *)PTR___stack_chk_fail_00054a1c)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00054a1c)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_00054a1c" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_00054a1c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_00054a1c"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar2 = (**(code **)(puVar6 + 0x2a938))();" (assignment_expression "iVar2 = (**(code **)(puVar6 + 0x2a938))()" (identifier "iVar2") (= "=") (call_expression "(**(code **)(puVar6 + 0x2a938))()" (parenthesized_expression "(**(code **)(puVar6 + 0x2a938))" (( "(") (pointer_expression "**(code **)(puVar6 + 0x2a938)" (* "*") (pointer_expression "*(code **)(puVar6 + 0x2a938)" (* "*") (cast_expression "(code **)(puVar6 + 0x2a938)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar6 + 0x2a938)" (( "(") (binary_expression "puVar6 + 0x2a938" (identifier "puVar6") (+ "+") (number_literal "0x2a938")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

int function_1(int sg_fd,type_1 anchor,int group_num,int var_2,void *var_12,int var_13,
                  type_1 noisy,int var_6)

{
  type_2 var_5;
  type_3 *puVar2;
  int var_18;
  int var_15;
  type_4 uVar5;
  int var_16;
  type_5 in_register_00000014;
  type_3 *puVar7;
  type_3 *var_14;
  uint8_t *var_9;
  uint8_t *var_11;
  int var_17;
  uint8_t u_cdb [10];
  uint8_t var_10 [2];
  uint8_t sense_b [64];
  
  puVar2 = PTR___stack_chk_guard_00054a4c;
  var_14 = var_7;
  u_cdb[0] = 'B';
  u_cdb[1] = '\0';
  u_cdb[2] = '\0';
  u_cdb[3] = '\0';
  var_18 = *(int *)PTR___stack_chk_guard_00054a4c;
  if (var_1(in_register_00000014,anchor) != 0) {
    u_cdb[0] = 'B';
    u_cdb[1] = '\x01';
    u_cdb[2] = '\0';
    u_cdb[3] = '\0';
  }
  if (var_2 < 1) {
    var_2 = 0x3c;
  }
  var_17 = var_3((short)var_13,var_17._2_2_);
  u_cdb._8_2_ = (type_2)(type_6)var_13 << 8;
  var_5 = var_4((char)group_num,(char)((type_7)var_13 >> 8)) & 0x1fff;
  u_cdb[4] = '\0';
  u_cdb[5] = '\0';
  u_cdb[6] = (char)(var_5 >> 8);
  u_cdb[7] = (char)var_5;
  if (var_6 != 0) {
    (*(type_8 *)PTR_pr2ws_000548ec)(var_7 + -0x1a50,var_7 + -0x10c0);
    puVar7 = var_8 + 0x1f1c;
    var_9 = u_cdb;
    do {
      var_11 = var_9 + 1;
      (*(type_8 *)PTR_pr2ws_000548ec)(puVar7,*var_9);
      var_9 = var_11;
    } while (var_10 != var_11);
    (*(type_8 *)PTR_pr2ws_000548ec)(var_7 + -0x990);
    if (((1 < var_6) && (var_12 != (void *)0x0)) && (var_13 != 0)) {
      (*(type_8 *)PTR_pr2ws_000548ec)(var_7 + -0x13cc,var_14 + -0x10c0);
      (*(type_8 *)PTR_hex2stderr_0005489c)(var_12,var_13,0xffffffff);
    }
  }
  var_15 = (*(type_8 *)PTR_construct_scsi_pt_obj_00054a54)();
  if (var_15 == 0) {
    var_16 = -1;
    (*(type_8 *)PTR_pr2ws_000548ec)(var_7 + -0x1974,var_14 + -0x10c0);
  }
  else {
    (*(type_8 *)PTR_set_scsi_pt_cdb_00054860)(var_15,u_cdb,10);
    (*(type_8 *)PTR_set_scsi_pt_sense_000548f4)(var_15,sense_b,0x40);
    (*(type_8 *)PTR_set_scsi_pt_data_out_00054a74)(var_15,var_12,var_13);
    uVar5 = (*(type_8 *)PTR_do_scsi_pt_00054984)(var_15,sg_fd,var_2,var_6);
    var_16 = (*(type_8 *)PTR_sg_cmds_process_resp_000548d0)
                      (var_15,var_14 + -0x10c0,uVar5,0,sense_b,noisy,var_6,&var_17);
    if (var_16 == -1) {
      uVar5 = (*(type_8 *)PTR_get_scsi_pt_os_err_00054a9c)(var_15);
      var_16 = (*(type_8 *)PTR_sg_convert_errno_00054928)(uVar5);
    }
    else if (var_16 == -2) {
      var_16 = var_17;
      if (var_17 - 0x14U < 2) {
        var_16 = 0;
      }
    }
    else {
      var_16 = 0;
    }
    (*(type_8 *)PTR_destruct_scsi_pt_obj_0005496c)(var_15);
  }
  if (var_18 != *(int *)puVar2) {
    var_14 = PTR___stack_chk_fail_00054a1c;
    (*(type_8 *)PTR___stack_chk_fail_00054a1c)();
    var_18 = (**(type_8 **)(var_14 + 0x2a938))();
    return var_18;
  }
  return var_16;
}


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

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

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  undefined *puVar5;
  undefined *puVar6;
  int *piVar7;
  int *piVar8;
  int local_7c [3];
  short local_70;
  undefined4 uStack_6e;
  int local_2c;
  
  puVar1 = PTR___stack_chk_guard_00054a4c;
  puVar6 = PTR_s_tatus_00054840;
  local_7c[1] = 0x42000000;
  local_2c = *(int *)PTR___stack_chk_guard_00054a4c;
  if (param_2 != 0) {
    local_7c[1] = 0x42010000;
  }
  if (param_4 < 1) {
    param_4 = 0x3c;
  }
  local_7c[0] = CONCAT22((short)param_6,local_7c[0]._2_2_);
  local_70 = (ushort)(byte)param_6 << 8;
  local_7c[2] = (int)(CONCAT11(param_3,(char)((uint)param_6 >> 8)) & 0x1fff);
  if (param_8 != 0) {
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x1a50,PTR_s_tatus_00054840 + -0x10c0);
    puVar5 = PTR_LAB_0005483c + 0x1f1c;
    piVar7 = local_7c + 1;
    do {
      piVar8 = (int *)((int)piVar7 + 1);
      (*(code *)PTR_pr2ws_000548ec)(puVar5,*(undefined1 *)piVar7);
      piVar7 = piVar8;
    } while (&uStack_6e != piVar8);
    (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x990);
    if (((1 < param_8) && (param_5 != 0)) && (param_6 != 0)) {
      (*(code *)PTR_pr2ws_000548ec)(PTR_s_tatus_00054840 + -0x13cc,puVar6 + -0x10c0);
      (*(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,puVar6 + -0x10c0);
  }
  else {
    (*(code *)PTR_set_scsi_pt_cdb_00054860)(iVar2,local_7c + 1,10);
    (*(code *)PTR_set_scsi_pt_sense_000548f4)(iVar2,(int)&uStack_6e + 2,0x40);
    (*(code *)PTR_set_scsi_pt_data_out_00054a74)(iVar2,param_5,param_6);
    uVar3 = (*(code *)PTR_do_scsi_pt_00054984)(iVar2,param_1,param_4,param_8);
    iVar4 = (*(code *)PTR_sg_cmds_process_resp_000548d0)
                      (iVar2,puVar6 + -0x10c0,uVar3,0,(int)&uStack_6e + 2,param_7,param_8,local_7c);
    if (iVar4 == -1) {
      uVar3 = (*(code *)PTR_get_scsi_pt_os_err_00054a9c)(iVar2);
      iVar4 = (*(code *)PTR_sg_convert_errno_00054928)(uVar3);
    }
    else if (iVar4 == -2) {
      iVar4 = local_7c[0];
      if (local_7c[0] - 0x14U < 2) {
        iVar4 = 0;
      }
    }
    else {
      iVar4 = 0;
    }
    (*(code *)PTR_destruct_scsi_pt_obj_0005496c)(iVar2);
  }
  if (local_2c != *(int *)puVar1) {
    puVar6 = PTR___stack_chk_fail_00054a1c;
    (*(code *)PTR___stack_chk_fail_00054a1c)();
    iVar2 = (**(code **)(puVar6 + 0x2a938))();
    return iVar2;
  }
  return iVar4;
}

