
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Switch with 1 destination removed at 0x000171c0 */
/* WARNING: Unknown calling convention */

int sg_ll_get_lba_status16
              (int sg_fd,uint64_t start_llba,uint8_t rt,void *resp,int alloc_len,_Bool noisy,
              int verbose)

{
  sg_pt_base *vp;
  int iVar1;
  uint uVar2;
  char *pcVar3;
  byte *pbVar4;
  int in_GS_OFFSET;
  int no_ascii;
  int iStack_74;
  undefined2 uStack_70;
  uint uStack_6e;
  uint uStack_6a;
  uint uStack_66;
  ushort uStack_62;
  byte abStack_60 [64];
  int iStack_20;
  undefined4 uStack_14;
  undefined **ppuStack_10;
  
  ppuStack_10 = &_GLOBAL_OFFSET_TABLE_;
  uStack_14 = 0x23bbe;
  iStack_20 = *(int *)(in_GS_OFFSET + 0x14);
  uStack_70 = 0x129e;
  uStack_6e = start_llba._4_4_ >> 0x18 | (start_llba._4_4_ & 0xff0000) >> 8 |
              (start_llba._4_4_ & 0xff00) << 8 | start_llba._4_4_ << 0x18;
  uStack_6a = (uint)start_llba >> 0x18 | ((uint)start_llba & 0xff0000) >> 8 |
              ((uint)start_llba & 0xff00) << 8 | (uint)start_llba << 0x18;
  uStack_66 = (uint)alloc_len >> 0x18 | (alloc_len & 0xff0000U) >> 8 | (alloc_len & 0xff00U) << 8 |
              alloc_len << 0x18;
  uStack_62 = (ushort)rt;
  pcVar3 = "Get LBA status(16)";
  if (verbose == 0) {
    vp = construct_scsi_pt_obj();
  }
  else {
    pr2ws("    %s cdb: ","Get LBA status(16)");
    pbVar4 = (byte *)&uStack_70;
    do {
      uVar2 = (uint)*pbVar4;
      pbVar4 = pbVar4 + 1;
      pr2ws("%02x ",uVar2);
    } while (abStack_60 != pbVar4);
    pr2ws("\n",uVar2);
    vp = construct_scsi_pt_obj();
  }
  if (vp == (sg_pt_base *)0x0) {
    pr2ws("%s: out of memory\n","Get LBA status(16)");
    iStack_74 = sg_convert_errno(0xc);
  }
  else {
    set_scsi_pt_cdb(vp,(uint8_t *)&uStack_70,0x10);
    set_scsi_pt_sense(vp,abStack_60,0x40);
    set_scsi_pt_data_in(vp,(uint8_t *)resp,alloc_len);
    iVar1 = do_scsi_pt(vp,sg_fd,0x3c,verbose);
    iVar1 = sg_cmds_process_resp
                      (vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74);
    if (iVar1 == -1) {
      iVar1 = get_scsi_pt_os_err();
      iStack_74 = sg_convert_errno(iVar1);
    }
    else if (iVar1 == -2) {
      if (iStack_74 - 0x14U < 2) {
        iStack_74 = 0;
      }
    }
    else if ((verbose < 3) || (iVar1 < 1)) {
      iStack_74 = 0;
    }
    else {
      pr2ws("    %s: response\n","Get LBA status(16)");
      if (verbose == 3) {
        pcVar3 = ", first 256 bytes";
        if (iVar1 < 0x101) {
          pcVar3 = "";
        }
        pr2ws("%s:\n",pcVar3);
        no_ascii = -1;
        if (0x100 < iVar1) {
          iVar1 = 0x100;
        }
      }
      else {
        pr2ws(":\n",pcVar3);
        no_ascii = 0;
      }
      hex2stderr((uint8_t *)resp,iVar1,no_ascii);
      iStack_74 = 0;
    }
    destruct_scsi_pt_obj(vp);
  }
  if (iStack_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iStack_74;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



/* WARNING: Switch with 1 destination removed at 0x000171c0 */

int sg_ll_get_lba_status16
              (uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,
              int param_7)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  undefined **ppuVar6;
  byte *pbVar7;
  int in_GS_OFFSET;
  undefined4 unaff_retaddr;
  char *pcVar8;
  byte *pbVar9;
  int iStack_78;
  undefined2 uStack_74;
  uint uStack_72;
  uint uStack_6e;
  uint uStack_6a;
  ushort uStack_66;
  byte abStack_64 [64];
  int iStack_24;
  undefined4 uStack_14;
  undefined **ppuStack_10;
  
  ppuVar6 = &__DT_PLTGOT;
  uStack_74 = 0x129e;
  ppuStack_10 = &__DT_PLTGOT;
  uStack_14 = 0x23bbe;
  entry();
  iStack_24 = *(int *)(in_GS_OFFSET + 0x14);
  pbVar7 = (byte *)&uStack_74;
  uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |
              param_2 << 0x18;
  uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |
              param_1 << 0x18;
  uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |
              param_5 << 0x18;
  uStack_66 = (ushort)param_3;
  pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;
  if (param_7 == 0) {
    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);
  }
  else {
    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);
    pbVar9 = pbVar7;
    do {
      uVar4 = (uint)*pbVar7;
      pbVar7 = pbVar7 + 1;
      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);
    } while (abStack_64 != pbVar7);
    pr2ws((int)ppuVar6 + 0xdb12,uVar4);
    iVar1 = construct_scsi_pt_obj();
    pbVar7 = pbVar9;
  }
  if (iVar1 == 0) {
    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);
    iStack_78 = sg_convert_errno(0xc);
  }
  else {
    set_scsi_pt_cdb(iVar1,pbVar7,0x10);
    set_scsi_pt_sense(iVar1,abStack_64,0x40);
    set_scsi_pt_data_in(iVar1,param_4,param_5);
    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);
    iVar3 = sg_cmds_process_resp
                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);
    if (iVar3 == -1) {
      uVar2 = get_scsi_pt_os_err(iVar1);
      iStack_78 = sg_convert_errno(uVar2);
    }
    else if (iVar3 == -2) {
      if (iStack_78 - 0x14U < 2) {
        iStack_78 = 0;
      }
    }
    else if ((param_7 < 3) || (iVar3 < 1)) {
      iStack_78 = 0;
    }
    else {
      pr2ws(ppuVar6 + 0x6770,pcVar8);
      if (param_7 == 3) {
        iVar5 = (int)ppuVar6 + 0x19ac5;
        if (iVar3 < 0x101) {
          iVar5 = (int)ppuVar6 + 0xde07;
        }
        pr2ws(ppuVar6 + 0x35ea,iVar5);
        uVar2 = 0xffffffff;
        if (0x100 < iVar3) {
          iVar3 = 0x100;
        }
      }
      else {
        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);
        uVar2 = 0;
      }
      hex2stderr(param_4,iVar3,uVar2);
      iStack_78 = 0;
    }
    destruct_scsi_pt_obj(iVar1);
  }
  if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iStack_78;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00030280();
}


JMP dword ptr [EBX + 0x6c]
(translation_unit "/* WARNING: Switch with 1 destination removed at 0x000171c0 */\n\nint sg_ll_get_lba_status16\n              (uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  undefined **ppuVar6;\n  byte *pbVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  char *pcVar8;\n  byte *pbVar9;\n  int iStack_78;\n  undefined2 uStack_74;\n  uint uStack_72;\n  uint uStack_6e;\n  uint uStack_6a;\n  ushort uStack_66;\n  byte abStack_64 [64];\n  int iStack_24;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  uStack_74 = 0x129e;\n  ppuStack_10 = &__DT_PLTGOT;\n  uStack_14 = 0x23bbe;\n  entry();\n  iStack_24 = *(int *)(in_GS_OFFSET + 0x14);\n  pbVar7 = (byte *)&uStack_74;\n  uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;\n  uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;\n  uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;\n  uStack_66 = (ushort)param_3;\n  pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;\n  if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }\n  if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }\n  if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00030280();\n}\n\n" comment (function_definition "int sg_ll_get_lba_status16\n              (uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  undefined **ppuVar6;\n  byte *pbVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  char *pcVar8;\n  byte *pbVar9;\n  int iStack_78;\n  undefined2 uStack_74;\n  uint uStack_72;\n  uint uStack_6e;\n  uint uStack_6a;\n  ushort uStack_66;\n  byte abStack_64 [64];\n  int iStack_24;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  uStack_74 = 0x129e;\n  ppuStack_10 = &__DT_PLTGOT;\n  uStack_14 = 0x23bbe;\n  entry();\n  iStack_24 = *(int *)(in_GS_OFFSET + 0x14);\n  pbVar7 = (byte *)&uStack_74;\n  uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;\n  uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;\n  uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;\n  uStack_66 = (ushort)param_3;\n  pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;\n  if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }\n  if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }\n  if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00030280();\n}" primitive_type (function_declarator "sg_ll_get_lba_status16\n              (uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)" identifier (parameter_list "(uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "byte param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "uint param_5" type_identifier identifier) , (parameter_declaration "uint param_6" type_identifier identifier) , (parameter_declaration "int param_7" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  undefined **ppuVar6;\n  byte *pbVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  char *pcVar8;\n  byte *pbVar9;\n  int iStack_78;\n  undefined2 uStack_74;\n  uint uStack_72;\n  uint uStack_6e;\n  uint uStack_6a;\n  ushort uStack_66;\n  byte abStack_64 [64];\n  int iStack_24;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  uStack_74 = 0x129e;\n  ppuStack_10 = &__DT_PLTGOT;\n  uStack_14 = 0x23bbe;\n  entry();\n  iStack_24 = *(int *)(in_GS_OFFSET + 0x14);\n  pbVar7 = (byte *)&uStack_74;\n  uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;\n  uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;\n  uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;\n  uStack_66 = (ushort)param_3;\n  pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;\n  if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }\n  if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }\n  if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00030280();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined **ppuVar6;" type_identifier (pointer_declarator "**ppuVar6" * (pointer_declarator "*ppuVar6" * identifier)) ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 unaff_retaddr;" type_identifier identifier ;) (declaration "char *pcVar8;" primitive_type (pointer_declarator "*pcVar8" * identifier) ;) (declaration "byte *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "int iStack_78;" primitive_type identifier ;) (declaration "undefined2 uStack_74;" type_identifier identifier ;) (declaration "uint uStack_72;" type_identifier identifier ;) (declaration "uint uStack_6e;" type_identifier identifier ;) (declaration "uint uStack_6a;" type_identifier identifier ;) (declaration "ushort uStack_66;" type_identifier identifier ;) (declaration "byte abStack_64 [64];" type_identifier (array_declarator "abStack_64 [64]" identifier [ number_literal ]) ;) (declaration "int iStack_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (declaration "undefined **ppuStack_10;" type_identifier (pointer_declarator "**ppuStack_10" * (pointer_declarator "*ppuStack_10" * identifier)) ;) (expression_statement "ppuVar6 = &__DT_PLTGOT;" (assignment_expression "ppuVar6 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (expression_statement "uStack_74 = 0x129e;" (assignment_expression "uStack_74 = 0x129e" identifier = number_literal) ;) (expression_statement "ppuStack_10 = &__DT_PLTGOT;" (assignment_expression "ppuStack_10 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (expression_statement "uStack_14 = 0x23bbe;" (assignment_expression "uStack_14 = 0x23bbe" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "iStack_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iStack_24 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "pbVar7 = (byte *)&uStack_74;" (assignment_expression "pbVar7 = (byte *)&uStack_74" identifier = (cast_expression "(byte *)&uStack_74" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&uStack_74" & identifier))) ;) (expression_statement "uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;" (assignment_expression "uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18" identifier = (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8" (binary_expression "param_2 >> 0x18" identifier >> number_literal) | (binary_expression "(param_2 & 0xff0000) >> 8" (parenthesized_expression "(param_2 & 0xff0000)" ( (binary_expression "param_2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_2 & 0xff00) << 8" (parenthesized_expression "(param_2 & 0xff00)" ( (binary_expression "param_2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_2 << 0x18" identifier << number_literal))) ;) (expression_statement "uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;" (assignment_expression "uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18" identifier = (binary_expression "param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18" (binary_expression "param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8" (binary_expression "param_1 >> 0x18 | (param_1 & 0xff0000) >> 8" (binary_expression "param_1 >> 0x18" identifier >> number_literal) | (binary_expression "(param_1 & 0xff0000) >> 8" (parenthesized_expression "(param_1 & 0xff0000)" ( (binary_expression "param_1 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_1 & 0xff00) << 8" (parenthesized_expression "(param_1 & 0xff00)" ( (binary_expression "param_1 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_1 << 0x18" identifier << number_literal))) ;) (expression_statement "uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;" (assignment_expression "uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18" identifier = (binary_expression "param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18" (binary_expression "param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8" (binary_expression "param_5 >> 0x18 | (param_5 & 0xff0000) >> 8" (binary_expression "param_5 >> 0x18" identifier >> number_literal) | (binary_expression "(param_5 & 0xff0000) >> 8" (parenthesized_expression "(param_5 & 0xff0000)" ( (binary_expression "param_5 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_5 & 0xff00) << 8" (parenthesized_expression "(param_5 & 0xff00)" ( (binary_expression "param_5 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_5 << 0x18" identifier << number_literal))) ;) (expression_statement "uStack_66 = (ushort)param_3;" (assignment_expression "uStack_66 = (ushort)param_3" identifier = (cast_expression "(ushort)param_3" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (expression_statement "pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;" (assignment_expression "pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2" identifier = (binary_expression ""sg_ll_mode_select6" + (int)ppuVar6 + 2" (binary_expression ""sg_ll_mode_select6" + (int)ppuVar6" (string_literal ""sg_ll_mode_select6"" " string_content ") + (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier)) + number_literal)) ;) (if_statement "if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }" if (parenthesized_expression "(param_7 == 0)" ( (binary_expression "param_7 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }" { (expression_statement "iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);" (assignment_expression "iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6)" identifier = (call_expression "construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6)" identifier (argument_list "(pcVar8,pbVar7,param_4,param_6)" ( identifier , identifier , identifier , identifier )))) ;) }) (else_clause "else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }" else (compound_statement "{\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }" { (expression_statement "pr2ws((int)ppuVar6 + 0x196a1,pcVar8);" (call_expression "pr2ws((int)ppuVar6 + 0x196a1,pcVar8)" identifier (argument_list "((int)ppuVar6 + 0x196a1,pcVar8)" ( (binary_expression "(int)ppuVar6 + 0x196a1" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) (expression_statement "pbVar9 = pbVar7;" (assignment_expression "pbVar9 = pbVar7" identifier = identifier) ;) (do_statement "do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);" do (compound_statement "{\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    }" { (expression_statement "uVar4 = (uint)*pbVar7;" (assignment_expression "uVar4 = (uint)*pbVar7" identifier = (binary_expression "(uint)*pbVar7" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);" (call_expression "pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4)" identifier (argument_list "(&UNK_0001a941 + (int)ppuVar6,uVar4)" ( (binary_expression "&UNK_0001a941 + (int)ppuVar6" (pointer_expression "&UNK_0001a941" & identifier) + (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier ))) ;) }) while (parenthesized_expression "(abStack_64 != pbVar7)" ( (binary_expression "abStack_64 != pbVar7" identifier != identifier) )) ;) (expression_statement "pr2ws((int)ppuVar6 + 0xdb12,uVar4);" (call_expression "pr2ws((int)ppuVar6 + 0xdb12,uVar4)" identifier (argument_list "((int)ppuVar6 + 0xdb12,uVar4)" ( (binary_expression "(int)ppuVar6 + 0xdb12" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) (expression_statement "iVar1 = construct_scsi_pt_obj();" (assignment_expression "iVar1 = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar7 = pbVar9;" (assignment_expression "pbVar7 = pbVar9" identifier = identifier) ;) }))) (if_statement "if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }" { (expression_statement "pr2ws((int)ppuVar6 + 0x196f1,pcVar8);" (call_expression "pr2ws((int)ppuVar6 + 0x196f1,pcVar8)" identifier (argument_list "((int)ppuVar6 + 0x196f1,pcVar8)" ( (binary_expression "(int)ppuVar6 + 0x196f1" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) (expression_statement "iStack_78 = sg_convert_errno(0xc);" (assignment_expression "iStack_78 = sg_convert_errno(0xc)" identifier = (call_expression "sg_convert_errno(0xc)" identifier (argument_list "(0xc)" ( number_literal )))) ;) }) (else_clause "else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }" else (compound_statement "{\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }" { (expression_statement "set_scsi_pt_cdb(iVar1,pbVar7,0x10);" (call_expression "set_scsi_pt_cdb(iVar1,pbVar7,0x10)" identifier (argument_list "(iVar1,pbVar7,0x10)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(iVar1,abStack_64,0x40);" (call_expression "set_scsi_pt_sense(iVar1,abStack_64,0x40)" identifier (argument_list "(iVar1,abStack_64,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_in(iVar1,param_4,param_5);" (call_expression "set_scsi_pt_data_in(iVar1,param_4,param_5)" identifier (argument_list "(iVar1,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);" (assignment_expression "uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7)" identifier = (call_expression "do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7)" identifier (argument_list "(iVar1,unaff_retaddr,0x3c,param_7)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);" (assignment_expression "iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78)" identifier = (call_expression "sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78)" identifier (argument_list "(iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78)" ( identifier , identifier , identifier , identifier , identifier , (binary_expression "param_6 & 0xff" identifier & number_literal) , identifier , (pointer_expression "&iStack_78" & identifier) )))) ;) (if_statement "if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }" { (expression_statement "uVar2 = get_scsi_pt_os_err(iVar1);" (assignment_expression "uVar2 = get_scsi_pt_os_err(iVar1)" identifier = (call_expression "get_scsi_pt_os_err(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (expression_statement "iStack_78 = sg_convert_errno(uVar2);" (assignment_expression "iStack_78 = sg_convert_errno(uVar2)" identifier = (call_expression "sg_convert_errno(uVar2)" identifier (argument_list "(uVar2)" ( identifier )))) ;) }) (else_clause "else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" else (if_statement "if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" if (parenthesized_expression "(iVar3 == -2)" ( (binary_expression "iVar3 == -2" identifier == number_literal) )) (compound_statement "{\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }" { (if_statement "if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }" if (parenthesized_expression "(iStack_78 - 0x14U < 2)" ( (binary_expression "iStack_78 - 0x14U < 2" (binary_expression "iStack_78 - 0x14U" identifier - number_literal) < number_literal) )) (compound_statement "{\n        iStack_78 = 0;\n      }" { (expression_statement "iStack_78 = 0;" (assignment_expression "iStack_78 = 0" identifier = number_literal) ;) })) }) (else_clause "else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" else (if_statement "if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" if (parenthesized_expression "((param_7 < 3) || (iVar3 < 1))" ( (binary_expression "(param_7 < 3) || (iVar3 < 1)" (parenthesized_expression "(param_7 < 3)" ( (binary_expression "param_7 < 3" identifier < number_literal) )) || (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) ))) )) (compound_statement "{\n      iStack_78 = 0;\n    }" { (expression_statement "iStack_78 = 0;" (assignment_expression "iStack_78 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" else (compound_statement "{\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" { (expression_statement "pr2ws(ppuVar6 + 0x6770,pcVar8);" (call_expression "pr2ws(ppuVar6 + 0x6770,pcVar8)" identifier (argument_list "(ppuVar6 + 0x6770,pcVar8)" ( (binary_expression "ppuVar6 + 0x6770" identifier + number_literal) , identifier ))) ;) (if_statement "if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }" if (parenthesized_expression "(param_7 == 3)" ( (binary_expression "param_7 == 3" identifier == number_literal) )) (compound_statement "{\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }" { (expression_statement "iVar5 = (int)ppuVar6 + 0x19ac5;" (assignment_expression "iVar5 = (int)ppuVar6 + 0x19ac5" identifier = (binary_expression "(int)ppuVar6 + 0x19ac5" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) (if_statement "if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }" if (parenthesized_expression "(iVar3 < 0x101)" ( (binary_expression "iVar3 < 0x101" identifier < number_literal) )) (compound_statement "{\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }" { (expression_statement "iVar5 = (int)ppuVar6 + 0xde07;" (assignment_expression "iVar5 = (int)ppuVar6 + 0xde07" identifier = (binary_expression "(int)ppuVar6 + 0xde07" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) })) (expression_statement "pr2ws(ppuVar6 + 0x35ea,iVar5);" (call_expression "pr2ws(ppuVar6 + 0x35ea,iVar5)" identifier (argument_list "(ppuVar6 + 0x35ea,iVar5)" ( (binary_expression "ppuVar6 + 0x35ea" identifier + number_literal) , identifier ))) ;) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }" if (parenthesized_expression "(0x100 < iVar3)" ( (binary_expression "0x100 < iVar3" number_literal < identifier) )) (compound_statement "{\n          iVar3 = 0x100;\n        }" { (expression_statement "iVar3 = 0x100;" (assignment_expression "iVar3 = 0x100" identifier = number_literal) ;) })) }) (else_clause "else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }" else (compound_statement "{\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }" { (expression_statement "pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);" (call_expression "pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8)" identifier (argument_list "(&UNK_0001aa03 + (int)ppuVar6,pcVar8)" ( (binary_expression "&UNK_0001aa03 + (int)ppuVar6" (pointer_expression "&UNK_0001aa03" & identifier) + (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }))) (expression_statement "hex2stderr(param_4,iVar3,uVar2);" (call_expression "hex2stderr(param_4,iVar3,uVar2)" identifier (argument_list "(param_4,iVar3,uVar2)" ( identifier , identifier , identifier ))) ;) (expression_statement "iStack_78 = 0;" (assignment_expression "iStack_78 = 0" identifier = number_literal) ;) }))))))) (expression_statement "destruct_scsi_pt_obj(iVar1);" (call_expression "destruct_scsi_pt_obj(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) }))) (if_statement "if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }" if (parenthesized_expression "(iStack_24 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iStack_24 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iStack_78;\n  }" { (return_statement "return iStack_78;" return identifier ;) })) comment (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Switch with 1 destination removed at 0x000171c0 */\n/* WARNING: Unknown calling convention */\n\nint sg_ll_get_lba_status16\n              (int sg_fd,uint64_t start_llba,uint8_t rt,void *resp,int alloc_len,_Bool noisy,\n              int verbose)\n\n{\n  sg_pt_base *vp;\n  int iVar1;\n  uint uVar2;\n  char *pcVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  int no_ascii;\n  int iStack_74;\n  undefined2 uStack_70;\n  uint uStack_6e;\n  uint uStack_6a;\n  uint uStack_66;\n  ushort uStack_62;\n  byte abStack_60 [64];\n  int iStack_20;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuStack_10 = &_GLOBAL_OFFSET_TABLE_;\n  uStack_14 = 0x23bbe;\n  iStack_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uStack_70 = 0x129e;\n  uStack_6e = start_llba._4_4_ >> 0x18 | (start_llba._4_4_ & 0xff0000) >> 8 |\n              (start_llba._4_4_ & 0xff00) << 8 | start_llba._4_4_ << 0x18;\n  uStack_6a = (uint)start_llba >> 0x18 | ((uint)start_llba & 0xff0000) >> 8 |\n              ((uint)start_llba & 0xff00) << 8 | (uint)start_llba << 0x18;\n  uStack_66 = (uint)alloc_len >> 0x18 | (alloc_len & 0xff0000U) >> 8 | (alloc_len & 0xff00U) << 8 |\n              alloc_len << 0x18;\n  uStack_62 = (ushort)rt;\n  pcVar3 = "Get LBA status(16)";\n  if (verbose == 0) {\n    vp = construct_scsi_pt_obj();\n  }\n  else {\n    pr2ws("    %s cdb: ","Get LBA status(16)");\n    pbVar4 = (byte *)&uStack_70;\n    do {\n      uVar2 = (uint)*pbVar4;\n      pbVar4 = pbVar4 + 1;\n      pr2ws("%02x ",uVar2);\n    } while (abStack_60 != pbVar4);\n    pr2ws("\n",uVar2);\n    vp = construct_scsi_pt_obj();\n  }\n  if (vp == (sg_pt_base *)0x0) {\n    pr2ws("%s: out of memory\n","Get LBA status(16)");\n    iStack_74 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(vp,(uint8_t *)&uStack_70,0x10);\n    set_scsi_pt_sense(vp,abStack_60,0x40);\n    set_scsi_pt_data_in(vp,(uint8_t *)resp,alloc_len);\n    iVar1 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar1 = sg_cmds_process_resp\n                      (vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74);\n    if (iVar1 == -1) {\n      iVar1 = get_scsi_pt_os_err();\n      iStack_74 = sg_convert_errno(iVar1);\n    }\n    else if (iVar1 == -2) {\n      if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }\n    }\n    else if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }\n    destruct_scsi_pt_obj(vp);\n  }\n  if (iStack_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_74;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment comment (function_definition "int sg_ll_get_lba_status16\n              (int sg_fd,uint64_t start_llba,uint8_t rt,void *resp,int alloc_len,_Bool noisy,\n              int verbose)\n\n{\n  sg_pt_base *vp;\n  int iVar1;\n  uint uVar2;\n  char *pcVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  int no_ascii;\n  int iStack_74;\n  undefined2 uStack_70;\n  uint uStack_6e;\n  uint uStack_6a;\n  uint uStack_66;\n  ushort uStack_62;\n  byte abStack_60 [64];\n  int iStack_20;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuStack_10 = &_GLOBAL_OFFSET_TABLE_;\n  uStack_14 = 0x23bbe;\n  iStack_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uStack_70 = 0x129e;\n  uStack_6e = start_llba._4_4_ >> 0x18 | (start_llba._4_4_ & 0xff0000) >> 8 |\n              (start_llba._4_4_ & 0xff00) << 8 | start_llba._4_4_ << 0x18;\n  uStack_6a = (uint)start_llba >> 0x18 | ((uint)start_llba & 0xff0000) >> 8 |\n              ((uint)start_llba & 0xff00) << 8 | (uint)start_llba << 0x18;\n  uStack_66 = (uint)alloc_len >> 0x18 | (alloc_len & 0xff0000U) >> 8 | (alloc_len & 0xff00U) << 8 |\n              alloc_len << 0x18;\n  uStack_62 = (ushort)rt;\n  pcVar3 = "Get LBA status(16)";\n  if (verbose == 0) {\n    vp = construct_scsi_pt_obj();\n  }\n  else {\n    pr2ws("    %s cdb: ","Get LBA status(16)");\n    pbVar4 = (byte *)&uStack_70;\n    do {\n      uVar2 = (uint)*pbVar4;\n      pbVar4 = pbVar4 + 1;\n      pr2ws("%02x ",uVar2);\n    } while (abStack_60 != pbVar4);\n    pr2ws("\n",uVar2);\n    vp = construct_scsi_pt_obj();\n  }\n  if (vp == (sg_pt_base *)0x0) {\n    pr2ws("%s: out of memory\n","Get LBA status(16)");\n    iStack_74 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(vp,(uint8_t *)&uStack_70,0x10);\n    set_scsi_pt_sense(vp,abStack_60,0x40);\n    set_scsi_pt_data_in(vp,(uint8_t *)resp,alloc_len);\n    iVar1 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar1 = sg_cmds_process_resp\n                      (vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74);\n    if (iVar1 == -1) {\n      iVar1 = get_scsi_pt_os_err();\n      iStack_74 = sg_convert_errno(iVar1);\n    }\n    else if (iVar1 == -2) {\n      if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }\n    }\n    else if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }\n    destruct_scsi_pt_obj(vp);\n  }\n  if (iStack_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_74;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "sg_ll_get_lba_status16\n              (int sg_fd,uint64_t start_llba,uint8_t rt,void *resp,int alloc_len,_Bool noisy,\n              int verbose)" identifier (parameter_list "(int sg_fd,uint64_t start_llba,uint8_t rt,void *resp,int alloc_len,_Bool noisy,\n              int verbose)" ( (parameter_declaration "int sg_fd" primitive_type identifier) , (parameter_declaration "uint64_t start_llba" primitive_type identifier) , (parameter_declaration "uint8_t rt" primitive_type identifier) , (parameter_declaration "void *resp" primitive_type (pointer_declarator "*resp" * identifier)) , (parameter_declaration "int alloc_len" primitive_type identifier) , (parameter_declaration "_Bool noisy" type_identifier identifier) , (parameter_declaration "int verbose" primitive_type identifier) ))) (compound_statement "{\n  sg_pt_base *vp;\n  int iVar1;\n  uint uVar2;\n  char *pcVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  int no_ascii;\n  int iStack_74;\n  undefined2 uStack_70;\n  uint uStack_6e;\n  uint uStack_6a;\n  uint uStack_66;\n  ushort uStack_62;\n  byte abStack_60 [64];\n  int iStack_20;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuStack_10 = &_GLOBAL_OFFSET_TABLE_;\n  uStack_14 = 0x23bbe;\n  iStack_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uStack_70 = 0x129e;\n  uStack_6e = start_llba._4_4_ >> 0x18 | (start_llba._4_4_ & 0xff0000) >> 8 |\n              (start_llba._4_4_ & 0xff00) << 8 | start_llba._4_4_ << 0x18;\n  uStack_6a = (uint)start_llba >> 0x18 | ((uint)start_llba & 0xff0000) >> 8 |\n              ((uint)start_llba & 0xff00) << 8 | (uint)start_llba << 0x18;\n  uStack_66 = (uint)alloc_len >> 0x18 | (alloc_len & 0xff0000U) >> 8 | (alloc_len & 0xff00U) << 8 |\n              alloc_len << 0x18;\n  uStack_62 = (ushort)rt;\n  pcVar3 = "Get LBA status(16)";\n  if (verbose == 0) {\n    vp = construct_scsi_pt_obj();\n  }\n  else {\n    pr2ws("    %s cdb: ","Get LBA status(16)");\n    pbVar4 = (byte *)&uStack_70;\n    do {\n      uVar2 = (uint)*pbVar4;\n      pbVar4 = pbVar4 + 1;\n      pr2ws("%02x ",uVar2);\n    } while (abStack_60 != pbVar4);\n    pr2ws("\n",uVar2);\n    vp = construct_scsi_pt_obj();\n  }\n  if (vp == (sg_pt_base *)0x0) {\n    pr2ws("%s: out of memory\n","Get LBA status(16)");\n    iStack_74 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(vp,(uint8_t *)&uStack_70,0x10);\n    set_scsi_pt_sense(vp,abStack_60,0x40);\n    set_scsi_pt_data_in(vp,(uint8_t *)resp,alloc_len);\n    iVar1 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar1 = sg_cmds_process_resp\n                      (vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74);\n    if (iVar1 == -1) {\n      iVar1 = get_scsi_pt_os_err();\n      iStack_74 = sg_convert_errno(iVar1);\n    }\n    else if (iVar1 == -2) {\n      if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }\n    }\n    else if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }\n    destruct_scsi_pt_obj(vp);\n  }\n  if (iStack_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_74;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "sg_pt_base *vp;" type_identifier (pointer_declarator "*vp" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int no_ascii;" primitive_type identifier ;) (declaration "int iStack_74;" primitive_type identifier ;) (declaration "undefined2 uStack_70;" type_identifier identifier ;) (declaration "uint uStack_6e;" type_identifier identifier ;) (declaration "uint uStack_6a;" type_identifier identifier ;) (declaration "uint uStack_66;" type_identifier identifier ;) (declaration "ushort uStack_62;" type_identifier identifier ;) (declaration "byte abStack_60 [64];" type_identifier (array_declarator "abStack_60 [64]" identifier [ number_literal ]) ;) (declaration "int iStack_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (declaration "undefined **ppuStack_10;" type_identifier (pointer_declarator "**ppuStack_10" * (pointer_declarator "*ppuStack_10" * identifier)) ;) (expression_statement "ppuStack_10 = &_GLOBAL_OFFSET_TABLE_;" (assignment_expression "ppuStack_10 = &_GLOBAL_OFFSET_TABLE_" identifier = (pointer_expression "&_GLOBAL_OFFSET_TABLE_" & identifier)) ;) (expression_statement "uStack_14 = 0x23bbe;" (assignment_expression "uStack_14 = 0x23bbe" identifier = number_literal) ;) (expression_statement "iStack_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iStack_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uStack_70 = 0x129e;" (assignment_expression "uStack_70 = 0x129e" identifier = number_literal) ;) (expression_statement "uStack_6e = start_llba._4_4_ >> 0x18 | (start_llba._4_4_ & 0xff0000) >> 8 |\n              (start_llba._4_4_ & 0xff00) << 8 | start_llba._4_4_ << 0x18;" (assignment_expression "uStack_6e = start_llba._4_4_ >> 0x18 | (start_llba._4_4_ & 0xff0000) >> 8 |\n              (start_llba._4_4_ & 0xff00) << 8 | start_llba._4_4_ << 0x18" identifier = (binary_expression "start_llba._4_4_ >> 0x18 | (start_llba._4_4_ & 0xff0000) >> 8 |\n              (start_llba._4_4_ & 0xff00) << 8 | start_llba._4_4_ << 0x18" (binary_expression "start_llba._4_4_ >> 0x18 | (start_llba._4_4_ & 0xff0000) >> 8 |\n              (start_llba._4_4_ & 0xff00) << 8" (binary_expression "start_llba._4_4_ >> 0x18 | (start_llba._4_4_ & 0xff0000) >> 8" (binary_expression "start_llba._4_4_ >> 0x18" (field_expression "start_llba._4_4_" identifier . field_identifier) >> number_literal) | (binary_expression "(start_llba._4_4_ & 0xff0000) >> 8" (parenthesized_expression "(start_llba._4_4_ & 0xff0000)" ( (binary_expression "start_llba._4_4_ & 0xff0000" (field_expression "start_llba._4_4_" identifier . field_identifier) & number_literal) )) >> number_literal)) | (binary_expression "(start_llba._4_4_ & 0xff00) << 8" (parenthesized_expression "(start_llba._4_4_ & 0xff00)" ( (binary_expression "start_llba._4_4_ & 0xff00" (field_expression "start_llba._4_4_" identifier . field_identifier) & number_literal) )) << number_literal)) | (binary_expression "start_llba._4_4_ << 0x18" (field_expression "start_llba._4_4_" identifier . field_identifier) << number_literal))) ;) (expression_statement "uStack_6a = (uint)start_llba >> 0x18 | ((uint)start_llba & 0xff0000) >> 8 |\n              ((uint)start_llba & 0xff00) << 8 | (uint)start_llba << 0x18;" (assignment_expression "uStack_6a = (uint)start_llba >> 0x18 | ((uint)start_llba & 0xff0000) >> 8 |\n              ((uint)start_llba & 0xff00) << 8 | (uint)start_llba << 0x18" identifier = (binary_expression "(uint)start_llba >> 0x18 | ((uint)start_llba & 0xff0000) >> 8 |\n              ((uint)start_llba & 0xff00) << 8 | (uint)start_llba << 0x18" (binary_expression "(uint)start_llba >> 0x18 | ((uint)start_llba & 0xff0000) >> 8 |\n              ((uint)start_llba & 0xff00) << 8" (binary_expression "(uint)start_llba >> 0x18 | ((uint)start_llba & 0xff0000) >> 8" (binary_expression "(uint)start_llba >> 0x18" (cast_expression "(uint)start_llba" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) | (binary_expression "((uint)start_llba & 0xff0000) >> 8" (parenthesized_expression "((uint)start_llba & 0xff0000)" ( (binary_expression "(uint)start_llba & 0xff0000" (cast_expression "(uint)start_llba" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal) )) >> number_literal)) | (binary_expression "((uint)start_llba & 0xff00) << 8" (parenthesized_expression "((uint)start_llba & 0xff00)" ( (binary_expression "(uint)start_llba & 0xff00" (cast_expression "(uint)start_llba" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal) )) << number_literal)) | (binary_expression "(uint)start_llba << 0x18" (cast_expression "(uint)start_llba" ( (type_descriptor "uint" type_identifier) ) identifier) << number_literal))) ;) (expression_statement "uStack_66 = (uint)alloc_len >> 0x18 | (alloc_len & 0xff0000U) >> 8 | (alloc_len & 0xff00U) << 8 |\n              alloc_len << 0x18;" (assignment_expression "uStack_66 = (uint)alloc_len >> 0x18 | (alloc_len & 0xff0000U) >> 8 | (alloc_len & 0xff00U) << 8 |\n              alloc_len << 0x18" identifier = (binary_expression "(uint)alloc_len >> 0x18 | (alloc_len & 0xff0000U) >> 8 | (alloc_len & 0xff00U) << 8 |\n              alloc_len << 0x18" (binary_expression "(uint)alloc_len >> 0x18 | (alloc_len & 0xff0000U) >> 8 | (alloc_len & 0xff00U) << 8" (binary_expression "(uint)alloc_len >> 0x18 | (alloc_len & 0xff0000U) >> 8" (binary_expression "(uint)alloc_len >> 0x18" (cast_expression "(uint)alloc_len" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) | (binary_expression "(alloc_len & 0xff0000U) >> 8" (parenthesized_expression "(alloc_len & 0xff0000U)" ( (binary_expression "alloc_len & 0xff0000U" identifier & number_literal) )) >> number_literal)) | (binary_expression "(alloc_len & 0xff00U) << 8" (parenthesized_expression "(alloc_len & 0xff00U)" ( (binary_expression "alloc_len & 0xff00U" identifier & number_literal) )) << number_literal)) | (binary_expression "alloc_len << 0x18" identifier << number_literal))) ;) (expression_statement "uStack_62 = (ushort)rt;" (assignment_expression "uStack_62 = (ushort)rt" identifier = (cast_expression "(ushort)rt" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (expression_statement "pcVar3 = "Get LBA status(16)";" (assignment_expression "pcVar3 = "Get LBA status(16)"" identifier = (string_literal ""Get LBA status(16)"" " string_content ")) ;) (if_statement "if (verbose == 0) {\n    vp = construct_scsi_pt_obj();\n  }\n  else {\n    pr2ws("    %s cdb: ","Get LBA status(16)");\n    pbVar4 = (byte *)&uStack_70;\n    do {\n      uVar2 = (uint)*pbVar4;\n      pbVar4 = pbVar4 + 1;\n      pr2ws("%02x ",uVar2);\n    } while (abStack_60 != pbVar4);\n    pr2ws("\n",uVar2);\n    vp = construct_scsi_pt_obj();\n  }" if (parenthesized_expression "(verbose == 0)" ( (binary_expression "verbose == 0" identifier == number_literal) )) (compound_statement "{\n    vp = construct_scsi_pt_obj();\n  }" { (expression_statement "vp = construct_scsi_pt_obj();" (assignment_expression "vp = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n    pr2ws("    %s cdb: ","Get LBA status(16)");\n    pbVar4 = (byte *)&uStack_70;\n    do {\n      uVar2 = (uint)*pbVar4;\n      pbVar4 = pbVar4 + 1;\n      pr2ws("%02x ",uVar2);\n    } while (abStack_60 != pbVar4);\n    pr2ws("\n",uVar2);\n    vp = construct_scsi_pt_obj();\n  }" else (compound_statement "{\n    pr2ws("    %s cdb: ","Get LBA status(16)");\n    pbVar4 = (byte *)&uStack_70;\n    do {\n      uVar2 = (uint)*pbVar4;\n      pbVar4 = pbVar4 + 1;\n      pr2ws("%02x ",uVar2);\n    } while (abStack_60 != pbVar4);\n    pr2ws("\n",uVar2);\n    vp = construct_scsi_pt_obj();\n  }" { (expression_statement "pr2ws("    %s cdb: ","Get LBA status(16)");" (call_expression "pr2ws("    %s cdb: ","Get LBA status(16)")" identifier (argument_list "("    %s cdb: ","Get LBA status(16)")" ( (string_literal ""    %s cdb: "" " string_content ") , (string_literal ""Get LBA status(16)"" " string_content ") ))) ;) (expression_statement "pbVar4 = (byte *)&uStack_70;" (assignment_expression "pbVar4 = (byte *)&uStack_70" identifier = (cast_expression "(byte *)&uStack_70" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&uStack_70" & identifier))) ;) (do_statement "do {\n      uVar2 = (uint)*pbVar4;\n      pbVar4 = pbVar4 + 1;\n      pr2ws("%02x ",uVar2);\n    } while (abStack_60 != pbVar4);" do (compound_statement "{\n      uVar2 = (uint)*pbVar4;\n      pbVar4 = pbVar4 + 1;\n      pr2ws("%02x ",uVar2);\n    }" { (expression_statement "uVar2 = (uint)*pbVar4;" (assignment_expression "uVar2 = (uint)*pbVar4" identifier = (binary_expression "(uint)*pbVar4" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws("%02x ",uVar2);" (call_expression "pr2ws("%02x ",uVar2)" identifier (argument_list "("%02x ",uVar2)" ( (string_literal ""%02x "" " string_content ") , identifier ))) ;) }) while (parenthesized_expression "(abStack_60 != pbVar4)" ( (binary_expression "abStack_60 != pbVar4" identifier != identifier) )) ;) (expression_statement "pr2ws("\n",uVar2);" (call_expression "pr2ws("\n",uVar2)" identifier (argument_list "("\n",uVar2)" ( (string_literal ""\n"" " escape_sequence ") , identifier ))) ;) (expression_statement "vp = construct_scsi_pt_obj();" (assignment_expression "vp = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (vp == (sg_pt_base *)0x0) {\n    pr2ws("%s: out of memory\n","Get LBA status(16)");\n    iStack_74 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(vp,(uint8_t *)&uStack_70,0x10);\n    set_scsi_pt_sense(vp,abStack_60,0x40);\n    set_scsi_pt_data_in(vp,(uint8_t *)resp,alloc_len);\n    iVar1 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar1 = sg_cmds_process_resp\n                      (vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74);\n    if (iVar1 == -1) {\n      iVar1 = get_scsi_pt_os_err();\n      iStack_74 = sg_convert_errno(iVar1);\n    }\n    else if (iVar1 == -2) {\n      if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }\n    }\n    else if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }\n    destruct_scsi_pt_obj(vp);\n  }" if (parenthesized_expression "(vp == (sg_pt_base *)0x0)" ( (binary_expression "vp == (sg_pt_base *)0x0" identifier == (cast_expression "(sg_pt_base *)0x0" ( (type_descriptor "sg_pt_base *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pr2ws("%s: out of memory\n","Get LBA status(16)");\n    iStack_74 = sg_convert_errno(0xc);\n  }" { (expression_statement "pr2ws("%s: out of memory\n","Get LBA status(16)");" (call_expression "pr2ws("%s: out of memory\n","Get LBA status(16)")" identifier (argument_list "("%s: out of memory\n","Get LBA status(16)")" ( (string_literal ""%s: out of memory\n"" " string_content escape_sequence ") , (string_literal ""Get LBA status(16)"" " string_content ") ))) ;) (expression_statement "iStack_74 = sg_convert_errno(0xc);" (assignment_expression "iStack_74 = sg_convert_errno(0xc)" identifier = (call_expression "sg_convert_errno(0xc)" identifier (argument_list "(0xc)" ( number_literal )))) ;) }) (else_clause "else {\n    set_scsi_pt_cdb(vp,(uint8_t *)&uStack_70,0x10);\n    set_scsi_pt_sense(vp,abStack_60,0x40);\n    set_scsi_pt_data_in(vp,(uint8_t *)resp,alloc_len);\n    iVar1 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar1 = sg_cmds_process_resp\n                      (vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74);\n    if (iVar1 == -1) {\n      iVar1 = get_scsi_pt_os_err();\n      iStack_74 = sg_convert_errno(iVar1);\n    }\n    else if (iVar1 == -2) {\n      if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }\n    }\n    else if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }\n    destruct_scsi_pt_obj(vp);\n  }" else (compound_statement "{\n    set_scsi_pt_cdb(vp,(uint8_t *)&uStack_70,0x10);\n    set_scsi_pt_sense(vp,abStack_60,0x40);\n    set_scsi_pt_data_in(vp,(uint8_t *)resp,alloc_len);\n    iVar1 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar1 = sg_cmds_process_resp\n                      (vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74);\n    if (iVar1 == -1) {\n      iVar1 = get_scsi_pt_os_err();\n      iStack_74 = sg_convert_errno(iVar1);\n    }\n    else if (iVar1 == -2) {\n      if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }\n    }\n    else if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }\n    destruct_scsi_pt_obj(vp);\n  }" { (expression_statement "set_scsi_pt_cdb(vp,(uint8_t *)&uStack_70,0x10);" (call_expression "set_scsi_pt_cdb(vp,(uint8_t *)&uStack_70,0x10)" identifier (argument_list "(vp,(uint8_t *)&uStack_70,0x10)" ( identifier , (cast_expression "(uint8_t *)&uStack_70" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&uStack_70" & identifier)) , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(vp,abStack_60,0x40);" (call_expression "set_scsi_pt_sense(vp,abStack_60,0x40)" identifier (argument_list "(vp,abStack_60,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_in(vp,(uint8_t *)resp,alloc_len);" (call_expression "set_scsi_pt_data_in(vp,(uint8_t *)resp,alloc_len)" identifier (argument_list "(vp,(uint8_t *)resp,alloc_len)" ( identifier , (cast_expression "(uint8_t *)resp" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "iVar1 = do_scsi_pt(vp,sg_fd,0x3c,verbose);" (assignment_expression "iVar1 = do_scsi_pt(vp,sg_fd,0x3c,verbose)" identifier = (call_expression "do_scsi_pt(vp,sg_fd,0x3c,verbose)" identifier (argument_list "(vp,sg_fd,0x3c,verbose)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "iVar1 = sg_cmds_process_resp\n                      (vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74);" (assignment_expression "iVar1 = sg_cmds_process_resp\n                      (vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74)" identifier = (call_expression "sg_cmds_process_resp\n                      (vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74)" identifier (argument_list "(vp,"Get LBA status(16)",iVar1,alloc_len,abStack_60,noisy,verbose,&iStack_74)" ( identifier , (string_literal ""Get LBA status(16)"" " string_content ") , identifier , identifier , identifier , identifier , identifier , (pointer_expression "&iStack_74" & identifier) )))) ;) (if_statement "if (iVar1 == -1) {\n      iVar1 = get_scsi_pt_os_err();\n      iStack_74 = sg_convert_errno(iVar1);\n    }\n    else if (iVar1 == -2) {\n      if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }\n    }\n    else if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }" if (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) (compound_statement "{\n      iVar1 = get_scsi_pt_os_err();\n      iStack_74 = sg_convert_errno(iVar1);\n    }" { (expression_statement "iVar1 = get_scsi_pt_os_err();" (assignment_expression "iVar1 = get_scsi_pt_os_err()" identifier = (call_expression "get_scsi_pt_os_err()" identifier (argument_list "()" ( )))) ;) (expression_statement "iStack_74 = sg_convert_errno(iVar1);" (assignment_expression "iStack_74 = sg_convert_errno(iVar1)" identifier = (call_expression "sg_convert_errno(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) }) (else_clause "else if (iVar1 == -2) {\n      if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }\n    }\n    else if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }" else (if_statement "if (iVar1 == -2) {\n      if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }\n    }\n    else if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }" if (parenthesized_expression "(iVar1 == -2)" ( (binary_expression "iVar1 == -2" identifier == number_literal) )) (compound_statement "{\n      if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }\n    }" { (if_statement "if (iStack_74 - 0x14U < 2) {\n        iStack_74 = 0;\n      }" if (parenthesized_expression "(iStack_74 - 0x14U < 2)" ( (binary_expression "iStack_74 - 0x14U < 2" (binary_expression "iStack_74 - 0x14U" identifier - number_literal) < number_literal) )) (compound_statement "{\n        iStack_74 = 0;\n      }" { (expression_statement "iStack_74 = 0;" (assignment_expression "iStack_74 = 0" identifier = number_literal) ;) })) }) (else_clause "else if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }" else (if_statement "if ((verbose < 3) || (iVar1 < 1)) {\n      iStack_74 = 0;\n    }\n    else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }" if (parenthesized_expression "((verbose < 3) || (iVar1 < 1))" ( (binary_expression "(verbose < 3) || (iVar1 < 1)" (parenthesized_expression "(verbose < 3)" ( (binary_expression "verbose < 3" identifier < number_literal) )) || (parenthesized_expression "(iVar1 < 1)" ( (binary_expression "iVar1 < 1" identifier < number_literal) ))) )) (compound_statement "{\n      iStack_74 = 0;\n    }" { (expression_statement "iStack_74 = 0;" (assignment_expression "iStack_74 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }" else (compound_statement "{\n      pr2ws("    %s: response\n","Get LBA status(16)");\n      if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }\n      hex2stderr((uint8_t *)resp,iVar1,no_ascii);\n      iStack_74 = 0;\n    }" { (expression_statement "pr2ws("    %s: response\n","Get LBA status(16)");" (call_expression "pr2ws("    %s: response\n","Get LBA status(16)")" identifier (argument_list "("    %s: response\n","Get LBA status(16)")" ( (string_literal ""    %s: response\n"" " string_content escape_sequence ") , (string_literal ""Get LBA status(16)"" " string_content ") ))) ;) (if_statement "if (verbose == 3) {\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }\n      else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }" if (parenthesized_expression "(verbose == 3)" ( (binary_expression "verbose == 3" identifier == number_literal) )) (compound_statement "{\n        pcVar3 = ", first 256 bytes";\n        if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }\n        pr2ws("%s:\n",pcVar3);\n        no_ascii = -1;\n        if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }\n      }" { (expression_statement "pcVar3 = ", first 256 bytes";" (assignment_expression "pcVar3 = ", first 256 bytes"" identifier = (string_literal "", first 256 bytes"" " string_content ")) ;) (if_statement "if (iVar1 < 0x101) {\n          pcVar3 = "";\n        }" if (parenthesized_expression "(iVar1 < 0x101)" ( (binary_expression "iVar1 < 0x101" identifier < number_literal) )) (compound_statement "{\n          pcVar3 = "";\n        }" { (expression_statement "pcVar3 = "";" (assignment_expression "pcVar3 = """ identifier = (string_literal """" " ")) ;) })) (expression_statement "pr2ws("%s:\n",pcVar3);" (call_expression "pr2ws("%s:\n",pcVar3)" identifier (argument_list "("%s:\n",pcVar3)" ( (string_literal ""%s:\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "no_ascii = -1;" (assignment_expression "no_ascii = -1" identifier = number_literal) ;) (if_statement "if (0x100 < iVar1) {\n          iVar1 = 0x100;\n        }" if (parenthesized_expression "(0x100 < iVar1)" ( (binary_expression "0x100 < iVar1" number_literal < identifier) )) (compound_statement "{\n          iVar1 = 0x100;\n        }" { (expression_statement "iVar1 = 0x100;" (assignment_expression "iVar1 = 0x100" identifier = number_literal) ;) })) }) (else_clause "else {\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }" else (compound_statement "{\n        pr2ws(":\n",pcVar3);\n        no_ascii = 0;\n      }" { (expression_statement "pr2ws(":\n",pcVar3);" (call_expression "pr2ws(":\n",pcVar3)" identifier (argument_list "(":\n",pcVar3)" ( (string_literal "":\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "no_ascii = 0;" (assignment_expression "no_ascii = 0" identifier = number_literal) ;) }))) (expression_statement "hex2stderr((uint8_t *)resp,iVar1,no_ascii);" (call_expression "hex2stderr((uint8_t *)resp,iVar1,no_ascii)" identifier (argument_list "((uint8_t *)resp,iVar1,no_ascii)" ( (cast_expression "(uint8_t *)resp" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier ))) ;) (expression_statement "iStack_74 = 0;" (assignment_expression "iStack_74 = 0" identifier = number_literal) ;) }))))))) (expression_statement "destruct_scsi_pt_obj(vp);" (call_expression "destruct_scsi_pt_obj(vp)" identifier (argument_list "(vp)" ( identifier ))) ;) }))) (if_statement "if (iStack_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_74;\n  }" if (parenthesized_expression "(iStack_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iStack_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iStack_74;\n  }" { (return_statement "return iStack_74;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int sg_ll_get_lba_status16\n              (uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  undefined **ppuVar6;\n  byte *pbVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  char *pcVar8;\n  byte *pbVar9;\n  int iStack_78;\n  undefined2 uStack_74;\n  uint uStack_72;\n  uint uStack_6e;\n  uint uStack_6a;\n  ushort uStack_66;\n  byte abStack_64 [64];\n  int iStack_24;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  uStack_74 = 0x129e;\n  ppuStack_10 = &__DT_PLTGOT;\n  uStack_14 = 0x23bbe;\n  entry();\n  iStack_24 = *(int *)(in_GS_OFFSET + 0x14);\n  pbVar7 = (byte *)&uStack_74;\n  uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;\n  uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;\n  uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;\n  uStack_66 = (ushort)param_3;\n  pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;\n  if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }\n  if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }\n  if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }\n                    \n  FUN_00030280();\n}\n\n" (function_definition "int sg_ll_get_lba_status16\n              (uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  undefined **ppuVar6;\n  byte *pbVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  char *pcVar8;\n  byte *pbVar9;\n  int iStack_78;\n  undefined2 uStack_74;\n  uint uStack_72;\n  uint uStack_6e;\n  uint uStack_6a;\n  ushort uStack_66;\n  byte abStack_64 [64];\n  int iStack_24;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  uStack_74 = 0x129e;\n  ppuStack_10 = &__DT_PLTGOT;\n  uStack_14 = 0x23bbe;\n  entry();\n  iStack_24 = *(int *)(in_GS_OFFSET + 0x14);\n  pbVar7 = (byte *)&uStack_74;\n  uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;\n  uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;\n  uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;\n  uStack_66 = (ushort)param_3;\n  pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;\n  if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }\n  if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }\n  if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }\n                    \n  FUN_00030280();\n}" primitive_type (function_declarator "sg_ll_get_lba_status16\n              (uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)" identifier (parameter_list "(uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "byte param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "uint param_5" type_identifier identifier) , (parameter_declaration "uint param_6" type_identifier identifier) , (parameter_declaration "int param_7" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  undefined **ppuVar6;\n  byte *pbVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  char *pcVar8;\n  byte *pbVar9;\n  int iStack_78;\n  undefined2 uStack_74;\n  uint uStack_72;\n  uint uStack_6e;\n  uint uStack_6a;\n  ushort uStack_66;\n  byte abStack_64 [64];\n  int iStack_24;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  uStack_74 = 0x129e;\n  ppuStack_10 = &__DT_PLTGOT;\n  uStack_14 = 0x23bbe;\n  entry();\n  iStack_24 = *(int *)(in_GS_OFFSET + 0x14);\n  pbVar7 = (byte *)&uStack_74;\n  uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;\n  uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;\n  uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;\n  uStack_66 = (ushort)param_3;\n  pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;\n  if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }\n  if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }\n  if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }\n                    \n  FUN_00030280();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined **ppuVar6;" type_identifier (pointer_declarator "**ppuVar6" * (pointer_declarator "*ppuVar6" * identifier)) ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 unaff_retaddr;" type_identifier identifier ;) (declaration "char *pcVar8;" primitive_type (pointer_declarator "*pcVar8" * identifier) ;) (declaration "byte *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "int iStack_78;" primitive_type identifier ;) (declaration "undefined2 uStack_74;" type_identifier identifier ;) (declaration "uint uStack_72;" type_identifier identifier ;) (declaration "uint uStack_6e;" type_identifier identifier ;) (declaration "uint uStack_6a;" type_identifier identifier ;) (declaration "ushort uStack_66;" type_identifier identifier ;) (declaration "byte abStack_64 [64];" type_identifier (array_declarator "abStack_64 [64]" identifier [ number_literal ]) ;) (declaration "int iStack_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (declaration "undefined **ppuStack_10;" type_identifier (pointer_declarator "**ppuStack_10" * (pointer_declarator "*ppuStack_10" * identifier)) ;) (expression_statement "ppuVar6 = &__DT_PLTGOT;" (assignment_expression "ppuVar6 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (expression_statement "uStack_74 = 0x129e;" (assignment_expression "uStack_74 = 0x129e" identifier = number_literal) ;) (expression_statement "ppuStack_10 = &__DT_PLTGOT;" (assignment_expression "ppuStack_10 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (expression_statement "uStack_14 = 0x23bbe;" (assignment_expression "uStack_14 = 0x23bbe" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "iStack_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iStack_24 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "pbVar7 = (byte *)&uStack_74;" (assignment_expression "pbVar7 = (byte *)&uStack_74" identifier = (cast_expression "(byte *)&uStack_74" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&uStack_74" & identifier))) ;) (expression_statement "uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;" (assignment_expression "uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18" identifier = (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8" (binary_expression "param_2 >> 0x18" identifier >> number_literal) | (binary_expression "(param_2 & 0xff0000) >> 8" (parenthesized_expression "(param_2 & 0xff0000)" ( (binary_expression "param_2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_2 & 0xff00) << 8" (parenthesized_expression "(param_2 & 0xff00)" ( (binary_expression "param_2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_2 << 0x18" identifier << number_literal))) ;) (expression_statement "uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;" (assignment_expression "uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18" identifier = (binary_expression "param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18" (binary_expression "param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8" (binary_expression "param_1 >> 0x18 | (param_1 & 0xff0000) >> 8" (binary_expression "param_1 >> 0x18" identifier >> number_literal) | (binary_expression "(param_1 & 0xff0000) >> 8" (parenthesized_expression "(param_1 & 0xff0000)" ( (binary_expression "param_1 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_1 & 0xff00) << 8" (parenthesized_expression "(param_1 & 0xff00)" ( (binary_expression "param_1 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_1 << 0x18" identifier << number_literal))) ;) (expression_statement "uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;" (assignment_expression "uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18" identifier = (binary_expression "param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18" (binary_expression "param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8" (binary_expression "param_5 >> 0x18 | (param_5 & 0xff0000) >> 8" (binary_expression "param_5 >> 0x18" identifier >> number_literal) | (binary_expression "(param_5 & 0xff0000) >> 8" (parenthesized_expression "(param_5 & 0xff0000)" ( (binary_expression "param_5 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_5 & 0xff00) << 8" (parenthesized_expression "(param_5 & 0xff00)" ( (binary_expression "param_5 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_5 << 0x18" identifier << number_literal))) ;) (expression_statement "uStack_66 = (ushort)param_3;" (assignment_expression "uStack_66 = (ushort)param_3" identifier = (cast_expression "(ushort)param_3" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (expression_statement "pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;" (assignment_expression "pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2" identifier = (binary_expression ""sg_ll_mode_select6" + (int)ppuVar6 + 2" (binary_expression ""sg_ll_mode_select6" + (int)ppuVar6" (string_literal ""sg_ll_mode_select6"" " string_content ") + (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier)) + number_literal)) ;) (if_statement "if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }" if (parenthesized_expression "(param_7 == 0)" ( (binary_expression "param_7 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }" { (expression_statement "iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);" (assignment_expression "iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6)" identifier = (call_expression "construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6)" identifier (argument_list "(pcVar8,pbVar7,param_4,param_6)" ( identifier , identifier , identifier , identifier )))) ;) }) (else_clause "else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }" else (compound_statement "{\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }" { (expression_statement "pr2ws((int)ppuVar6 + 0x196a1,pcVar8);" (call_expression "pr2ws((int)ppuVar6 + 0x196a1,pcVar8)" identifier (argument_list "((int)ppuVar6 + 0x196a1,pcVar8)" ( (binary_expression "(int)ppuVar6 + 0x196a1" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) (expression_statement "pbVar9 = pbVar7;" (assignment_expression "pbVar9 = pbVar7" identifier = identifier) ;) (do_statement "do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);" do (compound_statement "{\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    }" { (expression_statement "uVar4 = (uint)*pbVar7;" (assignment_expression "uVar4 = (uint)*pbVar7" identifier = (binary_expression "(uint)*pbVar7" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);" (call_expression "pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4)" identifier (argument_list "(&UNK_0001a941 + (int)ppuVar6,uVar4)" ( (binary_expression "&UNK_0001a941 + (int)ppuVar6" (pointer_expression "&UNK_0001a941" & identifier) + (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier ))) ;) }) while (parenthesized_expression "(abStack_64 != pbVar7)" ( (binary_expression "abStack_64 != pbVar7" identifier != identifier) )) ;) (expression_statement "pr2ws((int)ppuVar6 + 0xdb12,uVar4);" (call_expression "pr2ws((int)ppuVar6 + 0xdb12,uVar4)" identifier (argument_list "((int)ppuVar6 + 0xdb12,uVar4)" ( (binary_expression "(int)ppuVar6 + 0xdb12" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) (expression_statement "iVar1 = construct_scsi_pt_obj();" (assignment_expression "iVar1 = construct_scsi_pt_obj()" identifier = (call_expression "construct_scsi_pt_obj()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar7 = pbVar9;" (assignment_expression "pbVar7 = pbVar9" identifier = identifier) ;) }))) (if_statement "if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }" { (expression_statement "pr2ws((int)ppuVar6 + 0x196f1,pcVar8);" (call_expression "pr2ws((int)ppuVar6 + 0x196f1,pcVar8)" identifier (argument_list "((int)ppuVar6 + 0x196f1,pcVar8)" ( (binary_expression "(int)ppuVar6 + 0x196f1" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) (expression_statement "iStack_78 = sg_convert_errno(0xc);" (assignment_expression "iStack_78 = sg_convert_errno(0xc)" identifier = (call_expression "sg_convert_errno(0xc)" identifier (argument_list "(0xc)" ( number_literal )))) ;) }) (else_clause "else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }" else (compound_statement "{\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }" { (expression_statement "set_scsi_pt_cdb(iVar1,pbVar7,0x10);" (call_expression "set_scsi_pt_cdb(iVar1,pbVar7,0x10)" identifier (argument_list "(iVar1,pbVar7,0x10)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(iVar1,abStack_64,0x40);" (call_expression "set_scsi_pt_sense(iVar1,abStack_64,0x40)" identifier (argument_list "(iVar1,abStack_64,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_in(iVar1,param_4,param_5);" (call_expression "set_scsi_pt_data_in(iVar1,param_4,param_5)" identifier (argument_list "(iVar1,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);" (assignment_expression "uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7)" identifier = (call_expression "do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7)" identifier (argument_list "(iVar1,unaff_retaddr,0x3c,param_7)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);" (assignment_expression "iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78)" identifier = (call_expression "sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78)" identifier (argument_list "(iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78)" ( identifier , identifier , identifier , identifier , identifier , (binary_expression "param_6 & 0xff" identifier & number_literal) , identifier , (pointer_expression "&iStack_78" & identifier) )))) ;) (if_statement "if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }" { (expression_statement "uVar2 = get_scsi_pt_os_err(iVar1);" (assignment_expression "uVar2 = get_scsi_pt_os_err(iVar1)" identifier = (call_expression "get_scsi_pt_os_err(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (expression_statement "iStack_78 = sg_convert_errno(uVar2);" (assignment_expression "iStack_78 = sg_convert_errno(uVar2)" identifier = (call_expression "sg_convert_errno(uVar2)" identifier (argument_list "(uVar2)" ( identifier )))) ;) }) (else_clause "else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" else (if_statement "if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" if (parenthesized_expression "(iVar3 == -2)" ( (binary_expression "iVar3 == -2" identifier == number_literal) )) (compound_statement "{\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }" { (if_statement "if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }" if (parenthesized_expression "(iStack_78 - 0x14U < 2)" ( (binary_expression "iStack_78 - 0x14U < 2" (binary_expression "iStack_78 - 0x14U" identifier - number_literal) < number_literal) )) (compound_statement "{\n        iStack_78 = 0;\n      }" { (expression_statement "iStack_78 = 0;" (assignment_expression "iStack_78 = 0" identifier = number_literal) ;) })) }) (else_clause "else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" else (if_statement "if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" if (parenthesized_expression "((param_7 < 3) || (iVar3 < 1))" ( (binary_expression "(param_7 < 3) || (iVar3 < 1)" (parenthesized_expression "(param_7 < 3)" ( (binary_expression "param_7 < 3" identifier < number_literal) )) || (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) ))) )) (compound_statement "{\n      iStack_78 = 0;\n    }" { (expression_statement "iStack_78 = 0;" (assignment_expression "iStack_78 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" else (compound_statement "{\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" { (expression_statement "pr2ws(ppuVar6 + 0x6770,pcVar8);" (call_expression "pr2ws(ppuVar6 + 0x6770,pcVar8)" identifier (argument_list "(ppuVar6 + 0x6770,pcVar8)" ( (binary_expression "ppuVar6 + 0x6770" identifier + number_literal) , identifier ))) ;) (if_statement "if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }" if (parenthesized_expression "(param_7 == 3)" ( (binary_expression "param_7 == 3" identifier == number_literal) )) (compound_statement "{\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }" { (expression_statement "iVar5 = (int)ppuVar6 + 0x19ac5;" (assignment_expression "iVar5 = (int)ppuVar6 + 0x19ac5" identifier = (binary_expression "(int)ppuVar6 + 0x19ac5" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) (if_statement "if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }" if (parenthesized_expression "(iVar3 < 0x101)" ( (binary_expression "iVar3 < 0x101" identifier < number_literal) )) (compound_statement "{\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }" { (expression_statement "iVar5 = (int)ppuVar6 + 0xde07;" (assignment_expression "iVar5 = (int)ppuVar6 + 0xde07" identifier = (binary_expression "(int)ppuVar6 + 0xde07" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) })) (expression_statement "pr2ws(ppuVar6 + 0x35ea,iVar5);" (call_expression "pr2ws(ppuVar6 + 0x35ea,iVar5)" identifier (argument_list "(ppuVar6 + 0x35ea,iVar5)" ( (binary_expression "ppuVar6 + 0x35ea" identifier + number_literal) , identifier ))) ;) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }" if (parenthesized_expression "(0x100 < iVar3)" ( (binary_expression "0x100 < iVar3" number_literal < identifier) )) (compound_statement "{\n          iVar3 = 0x100;\n        }" { (expression_statement "iVar3 = 0x100;" (assignment_expression "iVar3 = 0x100" identifier = number_literal) ;) })) }) (else_clause "else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }" else (compound_statement "{\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }" { (expression_statement "pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);" (call_expression "pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8)" identifier (argument_list "(&UNK_0001aa03 + (int)ppuVar6,pcVar8)" ( (binary_expression "&UNK_0001aa03 + (int)ppuVar6" (pointer_expression "&UNK_0001aa03" & identifier) + (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }))) (expression_statement "hex2stderr(param_4,iVar3,uVar2);" (call_expression "hex2stderr(param_4,iVar3,uVar2)" identifier (argument_list "(param_4,iVar3,uVar2)" ( identifier , identifier , identifier ))) ;) (expression_statement "iStack_78 = 0;" (assignment_expression "iStack_78 = 0" identifier = number_literal) ;) }))))))) (expression_statement "destruct_scsi_pt_obj(iVar1);" (call_expression "destruct_scsi_pt_obj(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) }))) (if_statement "if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }" if (parenthesized_expression "(iStack_24 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iStack_24 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iStack_78;\n  }" { (return_statement "return iStack_78;" return identifier ;) })) (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (string_literal " string_content ") + (cast_expression ( (type_descriptor TYPE) ) IDENT)) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (pointer_expression & IDENT) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) , IDENT ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , (binary_expression IDENT & LIT) , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (binary_expression IDENT < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression (pointer_expression & IDENT) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))))))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int sg_ll_get_lba_status16\n              (uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  undefined **ppuVar6;\n  byte *pbVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  char *pcVar8;\n  byte *pbVar9;\n  int iStack_78;\n  undefined2 uStack_74;\n  uint uStack_72;\n  uint uStack_6e;\n  uint uStack_6a;\n  ushort uStack_66;\n  byte abStack_64 [64];\n  int iStack_24;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  uStack_74 = 0x129e;\n  ppuStack_10 = &__DT_PLTGOT;\n  uStack_14 = 0x23bbe;\n  entry();\n  iStack_24 = *(int *)(in_GS_OFFSET + 0x14);\n  pbVar7 = (byte *)&uStack_74;\n  uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;\n  uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;\n  uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;\n  uStack_66 = (ushort)param_3;\n  pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;\n  if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }\n  if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }\n  if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }\n                    \n  FUN_00030280();\n}" (primitive_type "int") (function_declarator "sg_ll_get_lba_status16\n              (uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)" (identifier "sg_ll_get_lba_status16") (parameter_list "(uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,\n              int param_7)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "byte param_3" (type_identifier "byte") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "uint param_5" (type_identifier "uint") (identifier "param_5")) (, ",") (parameter_declaration "uint param_6" (type_identifier "uint") (identifier "param_6")) (, ",") (parameter_declaration "int param_7" (primitive_type "int") (identifier "param_7")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  undefined **ppuVar6;\n  byte *pbVar7;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  char *pcVar8;\n  byte *pbVar9;\n  int iStack_78;\n  undefined2 uStack_74;\n  uint uStack_72;\n  uint uStack_6e;\n  uint uStack_6a;\n  ushort uStack_66;\n  byte abStack_64 [64];\n  int iStack_24;\n  undefined4 uStack_14;\n  undefined **ppuStack_10;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  uStack_74 = 0x129e;\n  ppuStack_10 = &__DT_PLTGOT;\n  uStack_14 = 0x23bbe;\n  entry();\n  iStack_24 = *(int *)(in_GS_OFFSET + 0x14);\n  pbVar7 = (byte *)&uStack_74;\n  uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;\n  uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;\n  uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;\n  uStack_66 = (ushort)param_3;\n  pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;\n  if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }\n  if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }\n  if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }\n                    \n  FUN_00030280();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined **ppuVar6;" (type_identifier "undefined") (pointer_declarator "**ppuVar6" (* "*") (pointer_declarator "*ppuVar6" (* "*") (identifier "ppuVar6"))) (; ";")) (declaration "byte *pbVar7;" (type_identifier "byte") (pointer_declarator "*pbVar7" (* "*") (identifier "pbVar7")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 unaff_retaddr;" (type_identifier "undefined4") (identifier "unaff_retaddr") (; ";")) (declaration "char *pcVar8;" (primitive_type "char") (pointer_declarator "*pcVar8" (* "*") (identifier "pcVar8")) (; ";")) (declaration "byte *pbVar9;" (type_identifier "byte") (pointer_declarator "*pbVar9" (* "*") (identifier "pbVar9")) (; ";")) (declaration "int iStack_78;" (primitive_type "int") (identifier "iStack_78") (; ";")) (declaration "undefined2 uStack_74;" (type_identifier "undefined2") (identifier "uStack_74") (; ";")) (declaration "uint uStack_72;" (type_identifier "uint") (identifier "uStack_72") (; ";")) (declaration "uint uStack_6e;" (type_identifier "uint") (identifier "uStack_6e") (; ";")) (declaration "uint uStack_6a;" (type_identifier "uint") (identifier "uStack_6a") (; ";")) (declaration "ushort uStack_66;" (type_identifier "ushort") (identifier "uStack_66") (; ";")) (declaration "byte abStack_64 [64];" (type_identifier "byte") (array_declarator "abStack_64 [64]" (identifier "abStack_64") ([ "[") (number_literal "64") (] "]")) (; ";")) (declaration "int iStack_24;" (primitive_type "int") (identifier "iStack_24") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (declaration "undefined **ppuStack_10;" (type_identifier "undefined") (pointer_declarator "**ppuStack_10" (* "*") (pointer_declarator "*ppuStack_10" (* "*") (identifier "ppuStack_10"))) (; ";")) (expression_statement "ppuVar6 = &__DT_PLTGOT;" (assignment_expression "ppuVar6 = &__DT_PLTGOT" (identifier "ppuVar6") (= "=") (pointer_expression "&__DT_PLTGOT" (& "&") (identifier "__DT_PLTGOT"))) (; ";")) (expression_statement "uStack_74 = 0x129e;" (assignment_expression "uStack_74 = 0x129e" (identifier "uStack_74") (= "=") (number_literal "0x129e")) (; ";")) (expression_statement "ppuStack_10 = &__DT_PLTGOT;" (assignment_expression "ppuStack_10 = &__DT_PLTGOT" (identifier "ppuStack_10") (= "=") (pointer_expression "&__DT_PLTGOT" (& "&") (identifier "__DT_PLTGOT"))) (; ";")) (expression_statement "uStack_14 = 0x23bbe;" (assignment_expression "uStack_14 = 0x23bbe" (identifier "uStack_14") (= "=") (number_literal "0x23bbe")) (; ";")) (expression_statement "entry();" (call_expression "entry()" (identifier "entry") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iStack_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iStack_24 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iStack_24") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "pbVar7 = (byte *)&uStack_74;" (assignment_expression "pbVar7 = (byte *)&uStack_74" (identifier "pbVar7") (= "=") (cast_expression "(byte *)&uStack_74" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&uStack_74" (& "&") (identifier "uStack_74")))) (; ";")) (expression_statement "uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18;" (assignment_expression "uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18" (identifier "uStack_72") (= "=") (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |\n              param_2 << 0x18" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8" (binary_expression "param_2 >> 0x18" (identifier "param_2") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(param_2 & 0xff0000) >> 8" (parenthesized_expression "(param_2 & 0xff0000)" (( "(") (binary_expression "param_2 & 0xff0000" (identifier "param_2") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(param_2 & 0xff00) << 8" (parenthesized_expression "(param_2 & 0xff00)" (( "(") (binary_expression "param_2 & 0xff00" (identifier "param_2") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "param_2 << 0x18" (identifier "param_2") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18;" (assignment_expression "uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18" (identifier "uStack_6e") (= "=") (binary_expression "param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |\n              param_1 << 0x18" (binary_expression "param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8" (binary_expression "param_1 >> 0x18 | (param_1 & 0xff0000) >> 8" (binary_expression "param_1 >> 0x18" (identifier "param_1") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(param_1 & 0xff0000) >> 8" (parenthesized_expression "(param_1 & 0xff0000)" (( "(") (binary_expression "param_1 & 0xff0000" (identifier "param_1") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(param_1 & 0xff00) << 8" (parenthesized_expression "(param_1 & 0xff00)" (( "(") (binary_expression "param_1 & 0xff00" (identifier "param_1") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "param_1 << 0x18" (identifier "param_1") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18;" (assignment_expression "uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18" (identifier "uStack_6a") (= "=") (binary_expression "param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |\n              param_5 << 0x18" (binary_expression "param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8" (binary_expression "param_5 >> 0x18 | (param_5 & 0xff0000) >> 8" (binary_expression "param_5 >> 0x18" (identifier "param_5") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(param_5 & 0xff0000) >> 8" (parenthesized_expression "(param_5 & 0xff0000)" (( "(") (binary_expression "param_5 & 0xff0000" (identifier "param_5") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(param_5 & 0xff00) << 8" (parenthesized_expression "(param_5 & 0xff00)" (( "(") (binary_expression "param_5 & 0xff00" (identifier "param_5") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "param_5 << 0x18" (identifier "param_5") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "uStack_66 = (ushort)param_3;" (assignment_expression "uStack_66 = (ushort)param_3" (identifier "uStack_66") (= "=") (cast_expression "(ushort)param_3" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "param_3"))) (; ";")) (expression_statement "pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;" (assignment_expression "pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2" (identifier "pcVar8") (= "=") (binary_expression ""sg_ll_mode_select6" + (int)ppuVar6 + 2" (binary_expression ""sg_ll_mode_select6" + (int)ppuVar6" (string_literal ""sg_ll_mode_select6"" (" """) (string_content "sg_ll_mode_select6") (" """)) (+ "+") (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6"))) (+ "+") (number_literal "2"))) (; ";")) (if_statement "if (param_7 == 0) {\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }\n  else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }" (if "if") (parenthesized_expression "(param_7 == 0)" (( "(") (binary_expression "param_7 == 0" (identifier "param_7") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);\n  }" ({ "{") (expression_statement "iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);" (assignment_expression "iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6)" (identifier "iVar1") (= "=") (call_expression "construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6)" (identifier "construct_scsi_pt_obj") (argument_list "(pcVar8,pbVar7,param_4,param_6)" (( "(") (identifier "pcVar8") (, ",") (identifier "pbVar7") (, ",") (identifier "param_4") (, ",") (identifier "param_6") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }" (else "else") (compound_statement "{\n    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);\n    pbVar9 = pbVar7;\n    do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);\n    pr2ws((int)ppuVar6 + 0xdb12,uVar4);\n    iVar1 = construct_scsi_pt_obj();\n    pbVar7 = pbVar9;\n  }" ({ "{") (expression_statement "pr2ws((int)ppuVar6 + 0x196a1,pcVar8);" (call_expression "pr2ws((int)ppuVar6 + 0x196a1,pcVar8)" (identifier "pr2ws") (argument_list "((int)ppuVar6 + 0x196a1,pcVar8)" (( "(") (binary_expression "(int)ppuVar6 + 0x196a1" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x196a1")) (, ",") (identifier "pcVar8") () ")"))) (; ";")) (expression_statement "pbVar9 = pbVar7;" (assignment_expression "pbVar9 = pbVar7" (identifier "pbVar9") (= "=") (identifier "pbVar7")) (; ";")) (do_statement "do {\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    } while (abStack_64 != pbVar7);" (do "do") (compound_statement "{\n      uVar4 = (uint)*pbVar7;\n      pbVar7 = pbVar7 + 1;\n      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);\n    }" ({ "{") (expression_statement "uVar4 = (uint)*pbVar7;" (assignment_expression "uVar4 = (uint)*pbVar7" (identifier "uVar4") (= "=") (binary_expression "(uint)*pbVar7" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar7"))) (; ";")) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" (identifier "pbVar7") (= "=") (binary_expression "pbVar7 + 1" (identifier "pbVar7") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);" (call_expression "pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4)" (identifier "pr2ws") (argument_list "(&UNK_0001a941 + (int)ppuVar6,uVar4)" (( "(") (binary_expression "&UNK_0001a941 + (int)ppuVar6" (pointer_expression "&UNK_0001a941" (& "&") (identifier "UNK_0001a941")) (+ "+") (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6"))) (, ",") (identifier "uVar4") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(abStack_64 != pbVar7)" (( "(") (binary_expression "abStack_64 != pbVar7" (identifier "abStack_64") (!= "!=") (identifier "pbVar7")) () ")")) (; ";")) (expression_statement "pr2ws((int)ppuVar6 + 0xdb12,uVar4);" (call_expression "pr2ws((int)ppuVar6 + 0xdb12,uVar4)" (identifier "pr2ws") (argument_list "((int)ppuVar6 + 0xdb12,uVar4)" (( "(") (binary_expression "(int)ppuVar6 + 0xdb12" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0xdb12")) (, ",") (identifier "uVar4") () ")"))) (; ";")) (expression_statement "iVar1 = construct_scsi_pt_obj();" (assignment_expression "iVar1 = construct_scsi_pt_obj()" (identifier "iVar1") (= "=") (call_expression "construct_scsi_pt_obj()" (identifier "construct_scsi_pt_obj") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pbVar7 = pbVar9;" (assignment_expression "pbVar7 = pbVar9" (identifier "pbVar7") (= "=") (identifier "pbVar9")) (; ";")) (} "}")))) (if_statement "if (iVar1 == 0) {\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }\n  else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);\n    iStack_78 = sg_convert_errno(0xc);\n  }" ({ "{") (expression_statement "pr2ws((int)ppuVar6 + 0x196f1,pcVar8);" (call_expression "pr2ws((int)ppuVar6 + 0x196f1,pcVar8)" (identifier "pr2ws") (argument_list "((int)ppuVar6 + 0x196f1,pcVar8)" (( "(") (binary_expression "(int)ppuVar6 + 0x196f1" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x196f1")) (, ",") (identifier "pcVar8") () ")"))) (; ";")) (expression_statement "iStack_78 = sg_convert_errno(0xc);" (assignment_expression "iStack_78 = sg_convert_errno(0xc)" (identifier "iStack_78") (= "=") (call_expression "sg_convert_errno(0xc)" (identifier "sg_convert_errno") (argument_list "(0xc)" (( "(") (number_literal "0xc") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }" (else "else") (compound_statement "{\n    set_scsi_pt_cdb(iVar1,pbVar7,0x10);\n    set_scsi_pt_sense(iVar1,abStack_64,0x40);\n    set_scsi_pt_data_in(iVar1,param_4,param_5);\n    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);\n    iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);\n    if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }\n    destruct_scsi_pt_obj(iVar1);\n  }" ({ "{") (expression_statement "set_scsi_pt_cdb(iVar1,pbVar7,0x10);" (call_expression "set_scsi_pt_cdb(iVar1,pbVar7,0x10)" (identifier "set_scsi_pt_cdb") (argument_list "(iVar1,pbVar7,0x10)" (( "(") (identifier "iVar1") (, ",") (identifier "pbVar7") (, ",") (number_literal "0x10") () ")"))) (; ";")) (expression_statement "set_scsi_pt_sense(iVar1,abStack_64,0x40);" (call_expression "set_scsi_pt_sense(iVar1,abStack_64,0x40)" (identifier "set_scsi_pt_sense") (argument_list "(iVar1,abStack_64,0x40)" (( "(") (identifier "iVar1") (, ",") (identifier "abStack_64") (, ",") (number_literal "0x40") () ")"))) (; ";")) (expression_statement "set_scsi_pt_data_in(iVar1,param_4,param_5);" (call_expression "set_scsi_pt_data_in(iVar1,param_4,param_5)" (identifier "set_scsi_pt_data_in") (argument_list "(iVar1,param_4,param_5)" (( "(") (identifier "iVar1") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")"))) (; ";")) (expression_statement "uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);" (assignment_expression "uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7)" (identifier "uVar2") (= "=") (call_expression "do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7)" (identifier "do_scsi_pt") (argument_list "(iVar1,unaff_retaddr,0x3c,param_7)" (( "(") (identifier "iVar1") (, ",") (identifier "unaff_retaddr") (, ",") (number_literal "0x3c") (, ",") (identifier "param_7") () ")")))) (; ";")) (expression_statement "iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);" (assignment_expression "iVar3 = sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78)" (identifier "iVar3") (= "=") (call_expression "sg_cmds_process_resp\n                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78)" (identifier "sg_cmds_process_resp") (argument_list "(iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78)" (( "(") (identifier "iVar1") (, ",") (identifier "pcVar8") (, ",") (identifier "uVar2") (, ",") (identifier "param_5") (, ",") (identifier "abStack_64") (, ",") (binary_expression "param_6 & 0xff" (identifier "param_6") (& "&") (number_literal "0xff")) (, ",") (identifier "param_7") (, ",") (pointer_expression "&iStack_78" (& "&") (identifier "iStack_78")) () ")")))) (; ";")) (if_statement "if (iVar3 == -1) {\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }\n    else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" (if "if") (parenthesized_expression "(iVar3 == -1)" (( "(") (binary_expression "iVar3 == -1" (identifier "iVar3") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      uVar2 = get_scsi_pt_os_err(iVar1);\n      iStack_78 = sg_convert_errno(uVar2);\n    }" ({ "{") (expression_statement "uVar2 = get_scsi_pt_os_err(iVar1);" (assignment_expression "uVar2 = get_scsi_pt_os_err(iVar1)" (identifier "uVar2") (= "=") (call_expression "get_scsi_pt_os_err(iVar1)" (identifier "get_scsi_pt_os_err") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")")))) (; ";")) (expression_statement "iStack_78 = sg_convert_errno(uVar2);" (assignment_expression "iStack_78 = sg_convert_errno(uVar2)" (identifier "iStack_78") (= "=") (call_expression "sg_convert_errno(uVar2)" (identifier "sg_convert_errno") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")")))) (; ";")) (} "}")) (else_clause "else if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" (else "else") (if_statement "if (iVar3 == -2) {\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }\n    else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" (if "if") (parenthesized_expression "(iVar3 == -2)" (( "(") (binary_expression "iVar3 == -2" (identifier "iVar3") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n      if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }\n    }" ({ "{") (if_statement "if (iStack_78 - 0x14U < 2) {\n        iStack_78 = 0;\n      }" (if "if") (parenthesized_expression "(iStack_78 - 0x14U < 2)" (( "(") (binary_expression "iStack_78 - 0x14U < 2" (binary_expression "iStack_78 - 0x14U" (identifier "iStack_78") (- "-") (number_literal "0x14U")) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n        iStack_78 = 0;\n      }" ({ "{") (expression_statement "iStack_78 = 0;" (assignment_expression "iStack_78 = 0" (identifier "iStack_78") (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")) (else_clause "else if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" (else "else") (if_statement "if ((param_7 < 3) || (iVar3 < 1)) {\n      iStack_78 = 0;\n    }\n    else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" (if "if") (parenthesized_expression "((param_7 < 3) || (iVar3 < 1))" (( "(") (binary_expression "(param_7 < 3) || (iVar3 < 1)" (parenthesized_expression "(param_7 < 3)" (( "(") (binary_expression "param_7 < 3" (identifier "param_7") (< "<") (number_literal "3")) () ")")) (|| "||") (parenthesized_expression "(iVar3 < 1)" (( "(") (binary_expression "iVar3 < 1" (identifier "iVar3") (< "<") (number_literal "1")) () ")"))) () ")")) (compound_statement "{\n      iStack_78 = 0;\n    }" ({ "{") (expression_statement "iStack_78 = 0;" (assignment_expression "iStack_78 = 0" (identifier "iStack_78") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" (else "else") (compound_statement "{\n      pr2ws(ppuVar6 + 0x6770,pcVar8);\n      if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }\n      hex2stderr(param_4,iVar3,uVar2);\n      iStack_78 = 0;\n    }" ({ "{") (expression_statement "pr2ws(ppuVar6 + 0x6770,pcVar8);" (call_expression "pr2ws(ppuVar6 + 0x6770,pcVar8)" (identifier "pr2ws") (argument_list "(ppuVar6 + 0x6770,pcVar8)" (( "(") (binary_expression "ppuVar6 + 0x6770" (identifier "ppuVar6") (+ "+") (number_literal "0x6770")) (, ",") (identifier "pcVar8") () ")"))) (; ";")) (if_statement "if (param_7 == 3) {\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }\n      else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }" (if "if") (parenthesized_expression "(param_7 == 3)" (( "(") (binary_expression "param_7 == 3" (identifier "param_7") (== "==") (number_literal "3")) () ")")) (compound_statement "{\n        iVar5 = (int)ppuVar6 + 0x19ac5;\n        if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }\n        pr2ws(ppuVar6 + 0x35ea,iVar5);\n        uVar2 = 0xffffffff;\n        if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }\n      }" ({ "{") (expression_statement "iVar5 = (int)ppuVar6 + 0x19ac5;" (assignment_expression "iVar5 = (int)ppuVar6 + 0x19ac5" (identifier "iVar5") (= "=") (binary_expression "(int)ppuVar6 + 0x19ac5" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x19ac5"))) (; ";")) (if_statement "if (iVar3 < 0x101) {\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }" (if "if") (parenthesized_expression "(iVar3 < 0x101)" (( "(") (binary_expression "iVar3 < 0x101" (identifier "iVar3") (< "<") (number_literal "0x101")) () ")")) (compound_statement "{\n          iVar5 = (int)ppuVar6 + 0xde07;\n        }" ({ "{") (expression_statement "iVar5 = (int)ppuVar6 + 0xde07;" (assignment_expression "iVar5 = (int)ppuVar6 + 0xde07" (identifier "iVar5") (= "=") (binary_expression "(int)ppuVar6 + 0xde07" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0xde07"))) (; ";")) (} "}"))) (expression_statement "pr2ws(ppuVar6 + 0x35ea,iVar5);" (call_expression "pr2ws(ppuVar6 + 0x35ea,iVar5)" (identifier "pr2ws") (argument_list "(ppuVar6 + 0x35ea,iVar5)" (( "(") (binary_expression "ppuVar6 + 0x35ea" (identifier "ppuVar6") (+ "+") (number_literal "0x35ea")) (, ",") (identifier "iVar5") () ")"))) (; ";")) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" (identifier "uVar2") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (0x100 < iVar3) {\n          iVar3 = 0x100;\n        }" (if "if") (parenthesized_expression "(0x100 < iVar3)" (( "(") (binary_expression "0x100 < iVar3" (number_literal "0x100") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n          iVar3 = 0x100;\n        }" ({ "{") (expression_statement "iVar3 = 0x100;" (assignment_expression "iVar3 = 0x100" (identifier "iVar3") (= "=") (number_literal "0x100")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }" (else "else") (compound_statement "{\n        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);\n        uVar2 = 0;\n      }" ({ "{") (expression_statement "pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);" (call_expression "pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8)" (identifier "pr2ws") (argument_list "(&UNK_0001aa03 + (int)ppuVar6,pcVar8)" (( "(") (binary_expression "&UNK_0001aa03 + (int)ppuVar6" (pointer_expression "&UNK_0001aa03" (& "&") (identifier "UNK_0001aa03")) (+ "+") (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6"))) (, ",") (identifier "pcVar8") () ")"))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}")))) (expression_statement "hex2stderr(param_4,iVar3,uVar2);" (call_expression "hex2stderr(param_4,iVar3,uVar2)" (identifier "hex2stderr") (argument_list "(param_4,iVar3,uVar2)" (( "(") (identifier "param_4") (, ",") (identifier "iVar3") (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "iStack_78 = 0;" (assignment_expression "iStack_78 = 0" (identifier "iStack_78") (= "=") (number_literal "0")) (; ";")) (} "}")))))))) (expression_statement "destruct_scsi_pt_obj(iVar1);" (call_expression "destruct_scsi_pt_obj(iVar1)" (identifier "destruct_scsi_pt_obj") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (} "}")))) (if_statement "if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iStack_78;\n  }" (if "if") (parenthesized_expression "(iStack_24 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iStack_24 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "iStack_24") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iStack_78;\n  }" ({ "{") (return_statement "return iStack_78;" (return "return") (identifier "iStack_78") (; ";")) (} "}"))) (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" (identifier "FUN_00030280") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Switch with 1 destination removed at 0x000171c0 */
/* WARNING: Unknown calling convention */

int function_1
              (int sg_fd,uint64_t start_llba,uint8_t rt,void *resp,int var_2,type_1 noisy,
              int var_3)

{
  type_2 *var_8;
  int var_15;
  type_3 uVar2;
  char *pcVar3;
  type_4 *var_6;
  int var_1;
  int no_ascii;
  int var_17;
  type_5 uStack_70;
  type_3 uStack_6e;
  type_3 uStack_6a;
  type_3 uStack_66;
  type_6 uStack_62;
  type_4 var_7 [64];
  int var_20;
  type_7 uStack_14;
  type_8 **ppuStack_10;
  
  ppuStack_10 = &_GLOBAL_OFFSET_TABLE_;
  uStack_14 = 0x23bbe;
  var_20 = *(int *)(var_1 + 0x14);
  uStack_70 = 0x129e;
  uStack_6e = start_llba._4_4_ >> 0x18 | (start_llba._4_4_ & 0xff0000) >> 8 |
              (start_llba._4_4_ & 0xff00) << 8 | start_llba._4_4_ << 0x18;
  uStack_6a = (type_3)start_llba >> 0x18 | ((type_3)start_llba & 0xff0000) >> 8 |
              ((type_3)start_llba & 0xff00) << 8 | (type_3)start_llba << 0x18;
  uStack_66 = (type_3)var_2 >> 0x18 | (var_2 & 0xff0000U) >> 8 | (var_2 & 0xff00U) << 8 |
              var_2 << 0x18;
  uStack_62 = (type_6)rt;
  pcVar3 = "Get LBA status(16)";
  if (var_3 == 0) {
    var_8 = var_4();
  }
  else {
    var_5("    %s cdb: ","Get LBA status(16)");
    var_6 = (type_4 *)&uStack_70;
    do {
      uVar2 = (type_3)*var_6;
      var_6 = var_6 + 1;
      var_5("%02x ",uVar2);
    } while (var_7 != var_6);
    var_5("\n",uVar2);
    var_8 = var_4();
  }
  if (var_8 == (type_2 *)0x0) {
    var_5("%s: out of memory\n","Get LBA status(16)");
    var_17 = var_9(0xc);
  }
  else {
    var_10(var_8,(uint8_t *)&uStack_70,0x10);
    var_11(var_8,var_7,0x40);
    var_12(var_8,(uint8_t *)resp,var_2);
    var_15 = var_13(var_8,sg_fd,0x3c,var_3);
    var_15 = var_14
                      (var_8,"Get LBA status(16)",var_15,var_2,var_7,noisy,var_3,&var_17);
    if (var_15 == -1) {
      var_15 = var_16();
      var_17 = var_9(var_15);
    }
    else if (var_15 == -2) {
      if (var_17 - 0x14U < 2) {
        var_17 = 0;
      }
    }
    else if ((var_3 < 3) || (var_15 < 1)) {
      var_17 = 0;
    }
    else {
      var_5("    %s: response\n","Get LBA status(16)");
      if (var_3 == 3) {
        pcVar3 = ", first 256 bytes";
        if (var_15 < 0x101) {
          pcVar3 = "";
        }
        var_5("%s:\n",pcVar3);
        no_ascii = -1;
        if (0x100 < var_15) {
          var_15 = 0x100;
        }
      }
      else {
        var_5(":\n",pcVar3);
        no_ascii = 0;
      }
      var_18((uint8_t *)resp,var_15,no_ascii);
      var_17 = 0;
    }
    var_19(var_8);
  }
  if (var_20 == *(int *)(var_1 + 0x14)) {
    return var_17;
  }
                    /* WARNING: Subroutine does not return */
  var_21();
}


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

/* WARNING: Switch with 1 destination removed at 0x000171c0 */

int MASKED
              (uint param_1,uint param_2,byte param_3,undefined4 param_4,uint param_5,uint param_6,
              int param_7)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  undefined **ppuVar6;
  byte *pbVar7;
  int in_GS_OFFSET;
  undefined4 unaff_retaddr;
  char *pcVar8;
  byte *pbVar9;
  int iStack_78;
  undefined2 uStack_74;
  uint uStack_72;
  uint uStack_6e;
  uint uStack_6a;
  ushort uStack_66;
  byte abStack_64 [64];
  int iStack_24;
  undefined4 uStack_14;
  undefined **ppuStack_10;
  
  ppuVar6 = &__DT_PLTGOT;
  uStack_74 = 0x129e;
  ppuStack_10 = &__DT_PLTGOT;
  uStack_14 = 0x23bbe;
  entry();
  iStack_24 = *(int *)(in_GS_OFFSET + 0x14);
  pbVar7 = (byte *)&uStack_74;
  uStack_72 = param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 |
              param_2 << 0x18;
  uStack_6e = param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 |
              param_1 << 0x18;
  uStack_6a = param_5 >> 0x18 | (param_5 & 0xff0000) >> 8 | (param_5 & 0xff00) << 8 |
              param_5 << 0x18;
  uStack_66 = (ushort)param_3;
  pcVar8 = "sg_ll_mode_select6" + (int)ppuVar6 + 2;
  if (param_7 == 0) {
    iVar1 = construct_scsi_pt_obj(pcVar8,pbVar7,param_4,param_6);
  }
  else {
    pr2ws((int)ppuVar6 + 0x196a1,pcVar8);
    pbVar9 = pbVar7;
    do {
      uVar4 = (uint)*pbVar7;
      pbVar7 = pbVar7 + 1;
      pr2ws(&UNK_0001a941 + (int)ppuVar6,uVar4);
    } while (abStack_64 != pbVar7);
    pr2ws((int)ppuVar6 + 0xdb12,uVar4);
    iVar1 = construct_scsi_pt_obj();
    pbVar7 = pbVar9;
  }
  if (iVar1 == 0) {
    pr2ws((int)ppuVar6 + 0x196f1,pcVar8);
    iStack_78 = sg_convert_errno(0xc);
  }
  else {
    set_scsi_pt_cdb(iVar1,pbVar7,0x10);
    set_scsi_pt_sense(iVar1,abStack_64,0x40);
    set_scsi_pt_data_in(iVar1,param_4,param_5);
    uVar2 = do_scsi_pt(iVar1,unaff_retaddr,0x3c,param_7);
    iVar3 = sg_cmds_process_resp
                      (iVar1,pcVar8,uVar2,param_5,abStack_64,param_6 & 0xff,param_7,&iStack_78);
    if (iVar3 == -1) {
      uVar2 = get_scsi_pt_os_err(iVar1);
      iStack_78 = sg_convert_errno(uVar2);
    }
    else if (iVar3 == -2) {
      if (iStack_78 - 0x14U < 2) {
        iStack_78 = 0;
      }
    }
    else if ((param_7 < 3) || (iVar3 < 1)) {
      iStack_78 = 0;
    }
    else {
      pr2ws(ppuVar6 + 0x6770,pcVar8);
      if (param_7 == 3) {
        iVar5 = (int)ppuVar6 + 0x19ac5;
        if (iVar3 < 0x101) {
          iVar5 = (int)ppuVar6 + 0xde07;
        }
        pr2ws(ppuVar6 + 0x35ea,iVar5);
        uVar2 = 0xffffffff;
        if (0x100 < iVar3) {
          iVar3 = 0x100;
        }
      }
      else {
        pr2ws(&UNK_0001aa03 + (int)ppuVar6,pcVar8);
        uVar2 = 0;
      }
      hex2stderr(param_4,iVar3,uVar2);
      iStack_78 = 0;
    }
    destruct_scsi_pt_obj(iVar1);
  }
  if (iStack_24 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iStack_78;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00030280();
}

