
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Switch with 1 destination removed at 0x00017690 */

int sg_cmds_process_resp
              (sg_pt_base *ptvp,char *leadin,int pt_res,int mx_di_len,uint8_t *sbp,_Bool noisy,
              int verbose,int *o_sense_cat)

{
  uint uVar1;
  int iVar2;
  char *pcVar3;
  int iVar4;
  int in_GS_OFFSET;
  
  iVar2 = *(int *)(in_GS_OFFSET + 0x14);
  if (leadin == (char *)0x0) {
    leadin = "";
  }
  if (pt_res < 0) {
    if (verbose == 0) {
      if (o_sense_cat != (int *)0x0 && pt_res == -6) {
LAB_0001ff48:
        *o_sense_cat = 2;
        iVar4 = -2;
        goto LAB_0001ff54;
      }
      if (noisy) {
        iVar4 = -1;
        pcVar3 = safe_strerror(-pt_res);
        pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);
        goto LAB_0001ff54;
      }
    }
    else {
      pcVar3 = safe_strerror(-pt_res);
      pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);
      if (o_sense_cat != (int *)0x0 && pt_res == -6) {
        if (2 < verbose) {
          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");
        }
        goto LAB_0001ff48;
      }
    }
  }
  else {
    if (pt_res == 1) {
      iVar4 = -1;
      pr2ws("%s: bad %s setup\n",leadin,"pass-through");
      goto LAB_0001ff54;
    }
    if (pt_res == 2) {
      iVar4 = -1;
      pr2ws("%s: %s timeout\n",leadin,"pass-through");
      goto LAB_0001ff54;
    }
    if ((2 < verbose) && (iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4)) {
      pr2ws("      duration=%d ms\n",iVar4);
    }
    if (0 < mx_di_len) {
      get_scsi_pt_resid(ptvp);
    }
    get_scsi_pt_sense_len();
    uVar1 = get_scsi_pt_result_category(ptvp);
    if (uVar1 < 5) {
                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +
                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))();
      return iVar2;
    }
    pr2ws("%s: unknown %s result category (%d)\n",leadin,"pass-through",uVar1);
  }
  iVar4 = -1;
LAB_0001ff54:
  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return iVar4;
}



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

undefined4 __regparm2
sg_cmds_process_resp
          (undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,
          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)

{
  int iVar1;
  uint uVar2;
  undefined4 uVar3;
  int iVar4;
  undefined4 uVar5;
  undefined **ppuVar6;
  int in_GS_OFFSET;
  undefined4 unaff_retaddr;
  
  ppuVar6 = &__DT_PLTGOT;
  entry(param_2,0x1fe49,&__DT_PLTGOT);
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_3 == (char *)0x0) {
    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);
  }
  if (param_4 < 0) {
    if (param_8 == 0) {
      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {
LAB_0001ff48:
        *param_9 = 2;
        uVar3 = 0xfffffffe;
        goto LAB_0001ff54;
      }
      if (param_7 != '\0') {
        uVar3 = 0xffffffff;
        uVar5 = safe_strerror(-param_4);
        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);
        goto LAB_0001ff54;
      }
    }
    else {
      uVar3 = safe_strerror(-param_4);
      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);
      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {
        if (2 < param_8) {
          pr2ws((int)ppuVar6 + 0x1d4c3);
        }
        goto LAB_0001ff48;
      }
    }
  }
  else {
    if (param_4 == 1) {
      uVar3 = 0xffffffff;
      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);
      goto LAB_0001ff54;
    }
    if (param_4 == 2) {
      uVar3 = 0xffffffff;
      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);
      goto LAB_0001ff54;
    }
    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {
      pr2ws(ppuVar6 + 0x74f1,iVar4);
    }
    if (0 < param_5) {
      get_scsi_pt_resid(unaff_retaddr);
    }
    get_scsi_pt_sense_len(unaff_retaddr);
    uVar2 = get_scsi_pt_result_category(unaff_retaddr);
    if (uVar2 < 5) {
                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();
      return uVar3;
    }
    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);
  }
  uVar3 = 0xffffffff;
LAB_0001ff54:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00030280();
  }
  return uVar3;
}


JMP dword ptr [EBX + 0x1a0]
(translation_unit "/* WARNING: Switch with 1 destination removed at 0x00017690 */\n\nundefined4 __regparm2\nsg_cmds_process_resp\n          (undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined **ppuVar6;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  entry(param_2,0x1fe49,&__DT_PLTGOT);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }\n  if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }\n  uVar3 = 0xffffffff;\nLAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }\n  return uVar3;\n}\n\n" comment (function_definition "undefined4 __regparm2\nsg_cmds_process_resp\n          (undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined **ppuVar6;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  entry(param_2,0x1fe49,&__DT_PLTGOT);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }\n  if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }\n  uVar3 = 0xffffffff;\nLAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }\n  return uVar3;\n}" type_identifier (ERROR "__regparm2" identifier) (function_declarator "sg_cmds_process_resp\n          (undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) , (parameter_declaration "char param_7" primitive_type identifier) , (parameter_declaration "int param_8" primitive_type identifier) , (parameter_declaration "undefined4 *param_9" type_identifier (pointer_declarator "*param_9" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined **ppuVar6;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  entry(param_2,0x1fe49,&__DT_PLTGOT);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }\n  if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }\n  uVar3 = 0xffffffff;\nLAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined **ppuVar6;" type_identifier (pointer_declarator "**ppuVar6" * (pointer_declarator "*ppuVar6" * identifier)) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 unaff_retaddr;" type_identifier identifier ;) (expression_statement "ppuVar6 = &__DT_PLTGOT;" (assignment_expression "ppuVar6 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (expression_statement "entry(param_2,0x1fe49,&__DT_PLTGOT);" (call_expression "entry(param_2,0x1fe49,&__DT_PLTGOT)" identifier (argument_list "(param_2,0x1fe49,&__DT_PLTGOT)" ( identifier , number_literal , (pointer_expression "&__DT_PLTGOT" & identifier) ))) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }" if (parenthesized_expression "(param_3 == (char *)0x0)" ( (binary_expression "param_3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }" { (expression_statement "param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);" (assignment_expression "param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1)" identifier = (binary_expression ""__vsnprintf_chk" + (int)(ppuVar6 + 1)" (string_literal ""__vsnprintf_chk"" " string_content ") + (cast_expression "(int)(ppuVar6 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(ppuVar6 + 1)" ( (binary_expression "ppuVar6 + 1" identifier + number_literal) ))))) ;) })) (if_statement "if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }" if (parenthesized_expression "(param_4 < 0)" ( (binary_expression "param_4 < 0" identifier < number_literal) )) (compound_statement "{\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }" { (if_statement "if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }" if (parenthesized_expression "(param_8 == 0)" ( (binary_expression "param_8 == 0" identifier == number_literal) )) (compound_statement "{\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }" { (if_statement "if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }" if (parenthesized_expression "(param_9 != (undefined4 *)0x0 && param_4 == -6)" ( (binary_expression "param_9 != (undefined4 *)0x0 && param_4 == -6" (binary_expression "param_9 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) && (binary_expression "param_4 == -6" identifier == number_literal)) )) (compound_statement "{\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }" { (labeled_statement "LAB_0001ff48:\n        *param_9 = 2;" statement_identifier : (expression_statement "*param_9 = 2;" (assignment_expression "*param_9 = 2" (pointer_expression "*param_9" * identifier) = number_literal) ;)) (expression_statement "uVar3 = 0xfffffffe;" (assignment_expression "uVar3 = 0xfffffffe" identifier = number_literal) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) (if_statement "if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }" if (parenthesized_expression "(param_7 != '\0')" ( (binary_expression "param_7 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (expression_statement "uVar5 = safe_strerror(-param_4);" (assignment_expression "uVar5 = safe_strerror(-param_4)" identifier = (call_expression "safe_strerror(-param_4)" identifier (argument_list "(-param_4)" ( (unary_expression "-param_4" - identifier) )))) ;) (expression_statement "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);" (call_expression "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5)" identifier (argument_list "((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5)" ( (binary_expression "(int)ppuVar6 + 0x1d38d" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier , (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) }) (else_clause "else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }" else (compound_statement "{\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }" { (expression_statement "uVar3 = safe_strerror(-param_4);" (assignment_expression "uVar3 = safe_strerror(-param_4)" identifier = (call_expression "safe_strerror(-param_4)" identifier (argument_list "(-param_4)" ( (unary_expression "-param_4" - identifier) )))) ;) (expression_statement "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);" (call_expression "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3)" identifier (argument_list "((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3)" ( (binary_expression "(int)ppuVar6 + 0x1d38d" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier , (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) (if_statement "if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }" if (parenthesized_expression "(param_9 != (undefined4 *)0x0 && param_4 == -6)" ( (binary_expression "param_9 != (undefined4 *)0x0 && param_4 == -6" (binary_expression "param_9 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) && (binary_expression "param_4 == -6" identifier == number_literal)) )) (compound_statement "{\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }" { (if_statement "if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }" if (parenthesized_expression "(2 < param_8)" ( (binary_expression "2 < param_8" number_literal < identifier) )) (compound_statement "{\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }" { (expression_statement "pr2ws((int)ppuVar6 + 0x1d4c3);" (call_expression "pr2ws((int)ppuVar6 + 0x1d4c3)" identifier (argument_list "((int)ppuVar6 + 0x1d4c3)" ( (binary_expression "(int)ppuVar6 + 0x1d4c3" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ;) })) (goto_statement "goto LAB_0001ff48;" goto statement_identifier ;) })) }))) }) (else_clause "else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }" else (compound_statement "{\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }" { (if_statement "if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);" (call_expression "pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372)" identifier (argument_list "((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372)" ( (binary_expression "(int)ppuVar6 + 0x1d3a2" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier , (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) (if_statement "if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" if (parenthesized_expression "(param_4 == 2)" ( (binary_expression "param_4 == 2" identifier == number_literal) )) (compound_statement "{\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);" (call_expression "pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372)" identifier (argument_list "(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372)" ( (binary_expression "ppuVar6 + 0x74ed" identifier + number_literal) , identifier , (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) (if_statement "if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }" if (parenthesized_expression "((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4))" ( (binary_expression "(2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)" (parenthesized_expression "(2 < param_8)" ( (binary_expression "2 < param_8" number_literal < identifier) )) && (parenthesized_expression "(iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)" ( (comma_expression "iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4" (assignment_expression "iVar4 = get_scsi_pt_duration_ms(unaff_retaddr)" identifier = (call_expression "get_scsi_pt_duration_ms(unaff_retaddr)" identifier (argument_list "(unaff_retaddr)" ( identifier )))) , (binary_expression "-1 < iVar4" number_literal < identifier)) ))) )) (compound_statement "{\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }" { (expression_statement "pr2ws(ppuVar6 + 0x74f1,iVar4);" (call_expression "pr2ws(ppuVar6 + 0x74f1,iVar4)" identifier (argument_list "(ppuVar6 + 0x74f1,iVar4)" ( (binary_expression "ppuVar6 + 0x74f1" identifier + number_literal) , identifier ))) ;) })) (if_statement "if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }" if (parenthesized_expression "(0 < param_5)" ( (binary_expression "0 < param_5" number_literal < identifier) )) (compound_statement "{\n      get_scsi_pt_resid(unaff_retaddr);\n    }" { (expression_statement "get_scsi_pt_resid(unaff_retaddr);" (call_expression "get_scsi_pt_resid(unaff_retaddr)" identifier (argument_list "(unaff_retaddr)" ( identifier ))) ;) })) (expression_statement "get_scsi_pt_sense_len(unaff_retaddr);" (call_expression "get_scsi_pt_sense_len(unaff_retaddr)" identifier (argument_list "(unaff_retaddr)" ( identifier ))) ;) (expression_statement "uVar2 = get_scsi_pt_result_category(unaff_retaddr);" (assignment_expression "uVar2 = get_scsi_pt_result_category(unaff_retaddr)" identifier = (call_expression "get_scsi_pt_result_category(unaff_retaddr)" identifier (argument_list "(unaff_retaddr)" ( identifier )))) ;) (if_statement "if (uVar2 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }" if (parenthesized_expression "(uVar2 < 5)" ( (binary_expression "uVar2 < 5" identifier < number_literal) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }" { comment comment (expression_statement "uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();" (assignment_expression "uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))()" identifier = (call_expression "(*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))()" (parenthesized_expression "(*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))" ( (pointer_expression "*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f)" * (cast_expression "(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f)" ( (binary_expression "(int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f" (binary_expression "(int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + (pointer_expression "*(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" * (cast_expression "(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" ( (binary_expression "(int)ppuVar6 + uVar2 * 4 + 0x1d6ab" (binary_expression "(int)ppuVar6 + uVar2 * 4" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "uVar2 * 4" identifier * number_literal)) + number_literal) ))))) + number_literal) )))) )) (argument_list "()" ( )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);" (call_expression "pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2)" identifier (argument_list "((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2)" ( (binary_expression "(int)ppuVar6 + 0x1d55b" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier , (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) }))) (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (labeled_statement "LAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }" { comment (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Switch with 1 destination removed at 0x00017690 */\n\nint sg_cmds_process_resp\n              (sg_pt_base *ptvp,char *leadin,int pt_res,int mx_di_len,uint8_t *sbp,_Bool noisy,\n              int verbose,int *o_sense_cat)\n\n{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  if (leadin == (char *)0x0) {\n    leadin = "";\n  }\n  if (pt_res < 0) {\n    if (verbose == 0) {\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\nLAB_0001ff48:\n        *o_sense_cat = 2;\n        iVar4 = -2;\n        goto LAB_0001ff54;\n      }\n      if (noisy) {\n        iVar4 = -1;\n        pcVar3 = safe_strerror(-pt_res);\n        pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      pcVar3 = safe_strerror(-pt_res);\n      pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\n        if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (pt_res == 1) {\n      iVar4 = -1;\n      pr2ws("%s: bad %s setup\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if (pt_res == 2) {\n      iVar4 = -1;\n      pr2ws("%s: %s timeout\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if ((2 < verbose) && (iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4)) {\n      pr2ws("      duration=%d ms\n",iVar4);\n    }\n    if (0 < mx_di_len) {\n      get_scsi_pt_resid(ptvp);\n    }\n    get_scsi_pt_sense_len();\n    uVar1 = get_scsi_pt_result_category(ptvp);\n    if (uVar1 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))();\n      return iVar2;\n    }\n    pr2ws("%s: unknown %s result category (%d)\n",leadin,"pass-through",uVar1);\n  }\n  iVar4 = -1;\nLAB_0001ff54:\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar4;\n}\n\n" comment comment (function_definition "int sg_cmds_process_resp\n              (sg_pt_base *ptvp,char *leadin,int pt_res,int mx_di_len,uint8_t *sbp,_Bool noisy,\n              int verbose,int *o_sense_cat)\n\n{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  if (leadin == (char *)0x0) {\n    leadin = "";\n  }\n  if (pt_res < 0) {\n    if (verbose == 0) {\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\nLAB_0001ff48:\n        *o_sense_cat = 2;\n        iVar4 = -2;\n        goto LAB_0001ff54;\n      }\n      if (noisy) {\n        iVar4 = -1;\n        pcVar3 = safe_strerror(-pt_res);\n        pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      pcVar3 = safe_strerror(-pt_res);\n      pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\n        if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (pt_res == 1) {\n      iVar4 = -1;\n      pr2ws("%s: bad %s setup\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if (pt_res == 2) {\n      iVar4 = -1;\n      pr2ws("%s: %s timeout\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if ((2 < verbose) && (iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4)) {\n      pr2ws("      duration=%d ms\n",iVar4);\n    }\n    if (0 < mx_di_len) {\n      get_scsi_pt_resid(ptvp);\n    }\n    get_scsi_pt_sense_len();\n    uVar1 = get_scsi_pt_result_category(ptvp);\n    if (uVar1 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))();\n      return iVar2;\n    }\n    pr2ws("%s: unknown %s result category (%d)\n",leadin,"pass-through",uVar1);\n  }\n  iVar4 = -1;\nLAB_0001ff54:\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar4;\n}" primitive_type (function_declarator "sg_cmds_process_resp\n              (sg_pt_base *ptvp,char *leadin,int pt_res,int mx_di_len,uint8_t *sbp,_Bool noisy,\n              int verbose,int *o_sense_cat)" identifier (parameter_list "(sg_pt_base *ptvp,char *leadin,int pt_res,int mx_di_len,uint8_t *sbp,_Bool noisy,\n              int verbose,int *o_sense_cat)" ( (parameter_declaration "sg_pt_base *ptvp" type_identifier (pointer_declarator "*ptvp" * identifier)) , (parameter_declaration "char *leadin" primitive_type (pointer_declarator "*leadin" * identifier)) , (parameter_declaration "int pt_res" primitive_type identifier) , (parameter_declaration "int mx_di_len" primitive_type identifier) , (parameter_declaration "uint8_t *sbp" primitive_type (pointer_declarator "*sbp" * identifier)) , (parameter_declaration "_Bool noisy" type_identifier identifier) , (parameter_declaration "int verbose" primitive_type identifier) , (parameter_declaration "int *o_sense_cat" primitive_type (pointer_declarator "*o_sense_cat" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  if (leadin == (char *)0x0) {\n    leadin = "";\n  }\n  if (pt_res < 0) {\n    if (verbose == 0) {\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\nLAB_0001ff48:\n        *o_sense_cat = 2;\n        iVar4 = -2;\n        goto LAB_0001ff54;\n      }\n      if (noisy) {\n        iVar4 = -1;\n        pcVar3 = safe_strerror(-pt_res);\n        pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      pcVar3 = safe_strerror(-pt_res);\n      pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\n        if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (pt_res == 1) {\n      iVar4 = -1;\n      pr2ws("%s: bad %s setup\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if (pt_res == 2) {\n      iVar4 = -1;\n      pr2ws("%s: %s timeout\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if ((2 < verbose) && (iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4)) {\n      pr2ws("      duration=%d ms\n",iVar4);\n    }\n    if (0 < mx_di_len) {\n      get_scsi_pt_resid(ptvp);\n    }\n    get_scsi_pt_sense_len();\n    uVar1 = get_scsi_pt_result_category(ptvp);\n    if (uVar1 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))();\n      return iVar2;\n    }\n    pr2ws("%s: unknown %s result category (%d)\n",leadin,"pass-through",uVar1);\n  }\n  iVar4 = -1;\nLAB_0001ff54:\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar4;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar2 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar2 = *(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) ))))) ;) (if_statement "if (leadin == (char *)0x0) {\n    leadin = "";\n  }" if (parenthesized_expression "(leadin == (char *)0x0)" ( (binary_expression "leadin == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    leadin = "";\n  }" { (expression_statement "leadin = "";" (assignment_expression "leadin = """ identifier = (string_literal """" " ")) ;) })) (if_statement "if (pt_res < 0) {\n    if (verbose == 0) {\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\nLAB_0001ff48:\n        *o_sense_cat = 2;\n        iVar4 = -2;\n        goto LAB_0001ff54;\n      }\n      if (noisy) {\n        iVar4 = -1;\n        pcVar3 = safe_strerror(-pt_res);\n        pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      pcVar3 = safe_strerror(-pt_res);\n      pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\n        if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (pt_res == 1) {\n      iVar4 = -1;\n      pr2ws("%s: bad %s setup\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if (pt_res == 2) {\n      iVar4 = -1;\n      pr2ws("%s: %s timeout\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if ((2 < verbose) && (iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4)) {\n      pr2ws("      duration=%d ms\n",iVar4);\n    }\n    if (0 < mx_di_len) {\n      get_scsi_pt_resid(ptvp);\n    }\n    get_scsi_pt_sense_len();\n    uVar1 = get_scsi_pt_result_category(ptvp);\n    if (uVar1 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))();\n      return iVar2;\n    }\n    pr2ws("%s: unknown %s result category (%d)\n",leadin,"pass-through",uVar1);\n  }" if (parenthesized_expression "(pt_res < 0)" ( (binary_expression "pt_res < 0" identifier < number_literal) )) (compound_statement "{\n    if (verbose == 0) {\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\nLAB_0001ff48:\n        *o_sense_cat = 2;\n        iVar4 = -2;\n        goto LAB_0001ff54;\n      }\n      if (noisy) {\n        iVar4 = -1;\n        pcVar3 = safe_strerror(-pt_res);\n        pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      pcVar3 = safe_strerror(-pt_res);\n      pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\n        if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }" { (if_statement "if (verbose == 0) {\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\nLAB_0001ff48:\n        *o_sense_cat = 2;\n        iVar4 = -2;\n        goto LAB_0001ff54;\n      }\n      if (noisy) {\n        iVar4 = -1;\n        pcVar3 = safe_strerror(-pt_res);\n        pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      pcVar3 = safe_strerror(-pt_res);\n      pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\n        if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }\n        goto LAB_0001ff48;\n      }\n    }" if (parenthesized_expression "(verbose == 0)" ( (binary_expression "verbose == 0" identifier == number_literal) )) (compound_statement "{\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\nLAB_0001ff48:\n        *o_sense_cat = 2;\n        iVar4 = -2;\n        goto LAB_0001ff54;\n      }\n      if (noisy) {\n        iVar4 = -1;\n        pcVar3 = safe_strerror(-pt_res);\n        pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n        goto LAB_0001ff54;\n      }\n    }" { (if_statement "if (o_sense_cat != (int *)0x0 && pt_res == -6) {\nLAB_0001ff48:\n        *o_sense_cat = 2;\n        iVar4 = -2;\n        goto LAB_0001ff54;\n      }" if (parenthesized_expression "(o_sense_cat != (int *)0x0 && pt_res == -6)" ( (binary_expression "o_sense_cat != (int *)0x0 && pt_res == -6" (binary_expression "o_sense_cat != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) && (binary_expression "pt_res == -6" identifier == number_literal)) )) (compound_statement "{\nLAB_0001ff48:\n        *o_sense_cat = 2;\n        iVar4 = -2;\n        goto LAB_0001ff54;\n      }" { (labeled_statement "LAB_0001ff48:\n        *o_sense_cat = 2;" statement_identifier : (expression_statement "*o_sense_cat = 2;" (assignment_expression "*o_sense_cat = 2" (pointer_expression "*o_sense_cat" * identifier) = number_literal) ;)) (expression_statement "iVar4 = -2;" (assignment_expression "iVar4 = -2" identifier = number_literal) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) (if_statement "if (noisy) {\n        iVar4 = -1;\n        pcVar3 = safe_strerror(-pt_res);\n        pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n        goto LAB_0001ff54;\n      }" if (parenthesized_expression "(noisy)" ( identifier )) (compound_statement "{\n        iVar4 = -1;\n        pcVar3 = safe_strerror(-pt_res);\n        pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n        goto LAB_0001ff54;\n      }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (expression_statement "pcVar3 = safe_strerror(-pt_res);" (assignment_expression "pcVar3 = safe_strerror(-pt_res)" identifier = (call_expression "safe_strerror(-pt_res)" identifier (argument_list "(-pt_res)" ( (unary_expression "-pt_res" - identifier) )))) ;) (expression_statement "pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);" (call_expression "pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3)" identifier (argument_list "("%s: %s os error: %s\n",leadin,"pass-through",pcVar3)" ( (string_literal ""%s: %s os error: %s\n"" " string_content escape_sequence ") , identifier , (string_literal ""pass-through"" " string_content ") , identifier ))) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) }) (else_clause "else {\n      pcVar3 = safe_strerror(-pt_res);\n      pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\n        if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }\n        goto LAB_0001ff48;\n      }\n    }" else (compound_statement "{\n      pcVar3 = safe_strerror(-pt_res);\n      pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);\n      if (o_sense_cat != (int *)0x0 && pt_res == -6) {\n        if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }\n        goto LAB_0001ff48;\n      }\n    }" { (expression_statement "pcVar3 = safe_strerror(-pt_res);" (assignment_expression "pcVar3 = safe_strerror(-pt_res)" identifier = (call_expression "safe_strerror(-pt_res)" identifier (argument_list "(-pt_res)" ( (unary_expression "-pt_res" - identifier) )))) ;) (expression_statement "pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3);" (call_expression "pr2ws("%s: %s os error: %s\n",leadin,"pass-through",pcVar3)" identifier (argument_list "("%s: %s os error: %s\n",leadin,"pass-through",pcVar3)" ( (string_literal ""%s: %s os error: %s\n"" " string_content escape_sequence ") , identifier , (string_literal ""pass-through"" " string_content ") , identifier ))) ;) (if_statement "if (o_sense_cat != (int *)0x0 && pt_res == -6) {\n        if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }\n        goto LAB_0001ff48;\n      }" if (parenthesized_expression "(o_sense_cat != (int *)0x0 && pt_res == -6)" ( (binary_expression "o_sense_cat != (int *)0x0 && pt_res == -6" (binary_expression "o_sense_cat != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) && (binary_expression "pt_res == -6" identifier == number_literal)) )) (compound_statement "{\n        if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }\n        goto LAB_0001ff48;\n      }" { (if_statement "if (2 < verbose) {\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }" if (parenthesized_expression "(2 < verbose)" ( (binary_expression "2 < verbose" number_literal < identifier) )) (compound_statement "{\n          pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");\n        }" { (expression_statement "pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n");" (call_expression "pr2ws("map ENXIO to SG_LIB_CAT_NOT_READY\n")" identifier (argument_list "("map ENXIO to SG_LIB_CAT_NOT_READY\n")" ( (string_literal ""map ENXIO to SG_LIB_CAT_NOT_READY\n"" " string_content escape_sequence ") ))) ;) })) (goto_statement "goto LAB_0001ff48;" goto statement_identifier ;) })) }))) }) (else_clause "else {\n    if (pt_res == 1) {\n      iVar4 = -1;\n      pr2ws("%s: bad %s setup\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if (pt_res == 2) {\n      iVar4 = -1;\n      pr2ws("%s: %s timeout\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if ((2 < verbose) && (iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4)) {\n      pr2ws("      duration=%d ms\n",iVar4);\n    }\n    if (0 < mx_di_len) {\n      get_scsi_pt_resid(ptvp);\n    }\n    get_scsi_pt_sense_len();\n    uVar1 = get_scsi_pt_result_category(ptvp);\n    if (uVar1 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))();\n      return iVar2;\n    }\n    pr2ws("%s: unknown %s result category (%d)\n",leadin,"pass-through",uVar1);\n  }" else (compound_statement "{\n    if (pt_res == 1) {\n      iVar4 = -1;\n      pr2ws("%s: bad %s setup\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if (pt_res == 2) {\n      iVar4 = -1;\n      pr2ws("%s: %s timeout\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }\n    if ((2 < verbose) && (iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4)) {\n      pr2ws("      duration=%d ms\n",iVar4);\n    }\n    if (0 < mx_di_len) {\n      get_scsi_pt_resid(ptvp);\n    }\n    get_scsi_pt_sense_len();\n    uVar1 = get_scsi_pt_result_category(ptvp);\n    if (uVar1 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))();\n      return iVar2;\n    }\n    pr2ws("%s: unknown %s result category (%d)\n",leadin,"pass-through",uVar1);\n  }" { (if_statement "if (pt_res == 1) {\n      iVar4 = -1;\n      pr2ws("%s: bad %s setup\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }" if (parenthesized_expression "(pt_res == 1)" ( (binary_expression "pt_res == 1" identifier == number_literal) )) (compound_statement "{\n      iVar4 = -1;\n      pr2ws("%s: bad %s setup\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (expression_statement "pr2ws("%s: bad %s setup\n",leadin,"pass-through");" (call_expression "pr2ws("%s: bad %s setup\n",leadin,"pass-through")" identifier (argument_list "("%s: bad %s setup\n",leadin,"pass-through")" ( (string_literal ""%s: bad %s setup\n"" " string_content escape_sequence ") , identifier , (string_literal ""pass-through"" " string_content ") ))) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) (if_statement "if (pt_res == 2) {\n      iVar4 = -1;\n      pr2ws("%s: %s timeout\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }" if (parenthesized_expression "(pt_res == 2)" ( (binary_expression "pt_res == 2" identifier == number_literal) )) (compound_statement "{\n      iVar4 = -1;\n      pr2ws("%s: %s timeout\n",leadin,"pass-through");\n      goto LAB_0001ff54;\n    }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (expression_statement "pr2ws("%s: %s timeout\n",leadin,"pass-through");" (call_expression "pr2ws("%s: %s timeout\n",leadin,"pass-through")" identifier (argument_list "("%s: %s timeout\n",leadin,"pass-through")" ( (string_literal ""%s: %s timeout\n"" " string_content escape_sequence ") , identifier , (string_literal ""pass-through"" " string_content ") ))) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) (if_statement "if ((2 < verbose) && (iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4)) {\n      pr2ws("      duration=%d ms\n",iVar4);\n    }" if (parenthesized_expression "((2 < verbose) && (iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4))" ( (binary_expression "(2 < verbose) && (iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4)" (parenthesized_expression "(2 < verbose)" ( (binary_expression "2 < verbose" number_literal < identifier) )) && (parenthesized_expression "(iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4)" ( (comma_expression "iVar4 = get_scsi_pt_duration_ms(), -1 < iVar4" (assignment_expression "iVar4 = get_scsi_pt_duration_ms()" identifier = (call_expression "get_scsi_pt_duration_ms()" identifier (argument_list "()" ( )))) , (binary_expression "-1 < iVar4" number_literal < identifier)) ))) )) (compound_statement "{\n      pr2ws("      duration=%d ms\n",iVar4);\n    }" { (expression_statement "pr2ws("      duration=%d ms\n",iVar4);" (call_expression "pr2ws("      duration=%d ms\n",iVar4)" identifier (argument_list "("      duration=%d ms\n",iVar4)" ( (string_literal ""      duration=%d ms\n"" " string_content escape_sequence ") , identifier ))) ;) })) (if_statement "if (0 < mx_di_len) {\n      get_scsi_pt_resid(ptvp);\n    }" if (parenthesized_expression "(0 < mx_di_len)" ( (binary_expression "0 < mx_di_len" number_literal < identifier) )) (compound_statement "{\n      get_scsi_pt_resid(ptvp);\n    }" { (expression_statement "get_scsi_pt_resid(ptvp);" (call_expression "get_scsi_pt_resid(ptvp)" identifier (argument_list "(ptvp)" ( identifier ))) ;) })) (expression_statement "get_scsi_pt_sense_len();" (call_expression "get_scsi_pt_sense_len()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = get_scsi_pt_result_category(ptvp);" (assignment_expression "uVar1 = get_scsi_pt_result_category(ptvp)" identifier = (call_expression "get_scsi_pt_result_category(ptvp)" identifier (argument_list "(ptvp)" ( identifier )))) ;) (if_statement "if (uVar1 < 5) {\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))();\n      return iVar2;\n    }" if (parenthesized_expression "(uVar1 < 5)" ( (binary_expression "uVar1 < 5" identifier < number_literal) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))();\n      return iVar2;\n    }" { comment comment (expression_statement "iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))();" (assignment_expression "iVar2 = (*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))()" identifier = (call_expression "(*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))()" (parenthesized_expression "(*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]))" ( (pointer_expression "*(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1])" * (cast_expression "(code *)((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1])" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1])" ( (binary_expression "(int)&_GLOBAL_OFFSET_TABLE_ +\n                        (&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]" (cast_expression "(int)&_GLOBAL_OFFSET_TABLE_" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&_GLOBAL_OFFSET_TABLE_" & identifier)) + (subscript_expression "(&switchD_0001ff09::switchdataD_0003d4f4)[uVar1]" (parenthesized_expression "(&switchD_0001ff09::switchdataD_0003d4f4)" ( (ERROR "&switchD_0001ff09::" (pointer_expression "&switchD_0001ff09" & identifier) : :) identifier )) [ identifier ])) )))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar2;" return identifier ;) })) (expression_statement "pr2ws("%s: unknown %s result category (%d)\n",leadin,"pass-through",uVar1);" (call_expression "pr2ws("%s: unknown %s result category (%d)\n",leadin,"pass-through",uVar1)" identifier (argument_list "("%s: unknown %s result category (%d)\n",leadin,"pass-through",uVar1)" ( (string_literal ""%s: unknown %s result category (%d)\n"" " string_content escape_sequence ") , identifier , (string_literal ""pass-through"" " string_content ") , identifier ))) ;) }))) (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (labeled_statement "LAB_0001ff54:\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar2 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar2 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "undefined4 __regparm2\nsg_cmds_process_resp\n          (undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined **ppuVar6;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  entry(param_2,0x1fe49,&__DT_PLTGOT);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }\n  if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }\n  uVar3 = 0xffffffff;\nLAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined4 __regparm2\nsg_cmds_process_resp\n          (undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined **ppuVar6;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  entry(param_2,0x1fe49,&__DT_PLTGOT);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }\n  if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }\n  uVar3 = 0xffffffff;\nLAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }\n  return uVar3;\n}" type_identifier (ERROR "__regparm2" identifier) (function_declarator "sg_cmds_process_resp\n          (undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) , (parameter_declaration "char param_7" primitive_type identifier) , (parameter_declaration "int param_8" primitive_type identifier) , (parameter_declaration "undefined4 *param_9" type_identifier (pointer_declarator "*param_9" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined **ppuVar6;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  entry(param_2,0x1fe49,&__DT_PLTGOT);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }\n  if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }\n  uVar3 = 0xffffffff;\nLAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined **ppuVar6;" type_identifier (pointer_declarator "**ppuVar6" * (pointer_declarator "*ppuVar6" * identifier)) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 unaff_retaddr;" type_identifier identifier ;) (expression_statement "ppuVar6 = &__DT_PLTGOT;" (assignment_expression "ppuVar6 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (expression_statement "entry(param_2,0x1fe49,&__DT_PLTGOT);" (call_expression "entry(param_2,0x1fe49,&__DT_PLTGOT)" identifier (argument_list "(param_2,0x1fe49,&__DT_PLTGOT)" ( identifier , number_literal , (pointer_expression "&__DT_PLTGOT" & identifier) ))) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }" if (parenthesized_expression "(param_3 == (char *)0x0)" ( (binary_expression "param_3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }" { (expression_statement "param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);" (assignment_expression "param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1)" identifier = (binary_expression ""__vsnprintf_chk" + (int)(ppuVar6 + 1)" (string_literal ""__vsnprintf_chk"" " string_content ") + (cast_expression "(int)(ppuVar6 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(ppuVar6 + 1)" ( (binary_expression "ppuVar6 + 1" identifier + number_literal) ))))) ;) })) (if_statement "if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }" if (parenthesized_expression "(param_4 < 0)" ( (binary_expression "param_4 < 0" identifier < number_literal) )) (compound_statement "{\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }" { (if_statement "if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }" if (parenthesized_expression "(param_8 == 0)" ( (binary_expression "param_8 == 0" identifier == number_literal) )) (compound_statement "{\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }" { (if_statement "if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }" if (parenthesized_expression "(param_9 != (undefined4 *)0x0 && param_4 == -6)" ( (binary_expression "param_9 != (undefined4 *)0x0 && param_4 == -6" (binary_expression "param_9 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) && (binary_expression "param_4 == -6" identifier == number_literal)) )) (compound_statement "{\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }" { (labeled_statement "LAB_0001ff48:\n        *param_9 = 2;" statement_identifier : (expression_statement "*param_9 = 2;" (assignment_expression "*param_9 = 2" (pointer_expression "*param_9" * identifier) = number_literal) ;)) (expression_statement "uVar3 = 0xfffffffe;" (assignment_expression "uVar3 = 0xfffffffe" identifier = number_literal) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) (if_statement "if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }" if (parenthesized_expression "(param_7 != '\0')" ( (binary_expression "param_7 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (expression_statement "uVar5 = safe_strerror(-param_4);" (assignment_expression "uVar5 = safe_strerror(-param_4)" identifier = (call_expression "safe_strerror(-param_4)" identifier (argument_list "(-param_4)" ( (unary_expression "-param_4" - identifier) )))) ;) (expression_statement "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);" (call_expression "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5)" identifier (argument_list "((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5)" ( (binary_expression "(int)ppuVar6 + 0x1d38d" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier , (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) }) (else_clause "else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }" else (compound_statement "{\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }" { (expression_statement "uVar3 = safe_strerror(-param_4);" (assignment_expression "uVar3 = safe_strerror(-param_4)" identifier = (call_expression "safe_strerror(-param_4)" identifier (argument_list "(-param_4)" ( (unary_expression "-param_4" - identifier) )))) ;) (expression_statement "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);" (call_expression "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3)" identifier (argument_list "((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3)" ( (binary_expression "(int)ppuVar6 + 0x1d38d" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier , (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) (if_statement "if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }" if (parenthesized_expression "(param_9 != (undefined4 *)0x0 && param_4 == -6)" ( (binary_expression "param_9 != (undefined4 *)0x0 && param_4 == -6" (binary_expression "param_9 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) && (binary_expression "param_4 == -6" identifier == number_literal)) )) (compound_statement "{\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }" { (if_statement "if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }" if (parenthesized_expression "(2 < param_8)" ( (binary_expression "2 < param_8" number_literal < identifier) )) (compound_statement "{\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }" { (expression_statement "pr2ws((int)ppuVar6 + 0x1d4c3);" (call_expression "pr2ws((int)ppuVar6 + 0x1d4c3)" identifier (argument_list "((int)ppuVar6 + 0x1d4c3)" ( (binary_expression "(int)ppuVar6 + 0x1d4c3" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ;) })) (goto_statement "goto LAB_0001ff48;" goto statement_identifier ;) })) }))) }) (else_clause "else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }" else (compound_statement "{\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }" { (if_statement "if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);" (call_expression "pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372)" identifier (argument_list "((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372)" ( (binary_expression "(int)ppuVar6 + 0x1d3a2" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier , (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) (if_statement "if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" if (parenthesized_expression "(param_4 == 2)" ( (binary_expression "param_4 == 2" identifier == number_literal) )) (compound_statement "{\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (expression_statement "pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);" (call_expression "pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372)" identifier (argument_list "(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372)" ( (binary_expression "ppuVar6 + 0x74ed" identifier + number_literal) , identifier , (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ;) (goto_statement "goto LAB_0001ff54;" goto statement_identifier ;) })) (if_statement "if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }" if (parenthesized_expression "((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4))" ( (binary_expression "(2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)" (parenthesized_expression "(2 < param_8)" ( (binary_expression "2 < param_8" number_literal < identifier) )) && (parenthesized_expression "(iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)" ( (comma_expression "iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4" (assignment_expression "iVar4 = get_scsi_pt_duration_ms(unaff_retaddr)" identifier = (call_expression "get_scsi_pt_duration_ms(unaff_retaddr)" identifier (argument_list "(unaff_retaddr)" ( identifier )))) , (binary_expression "-1 < iVar4" number_literal < identifier)) ))) )) (compound_statement "{\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }" { (expression_statement "pr2ws(ppuVar6 + 0x74f1,iVar4);" (call_expression "pr2ws(ppuVar6 + 0x74f1,iVar4)" identifier (argument_list "(ppuVar6 + 0x74f1,iVar4)" ( (binary_expression "ppuVar6 + 0x74f1" identifier + number_literal) , identifier ))) ;) })) (if_statement "if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }" if (parenthesized_expression "(0 < param_5)" ( (binary_expression "0 < param_5" number_literal < identifier) )) (compound_statement "{\n      get_scsi_pt_resid(unaff_retaddr);\n    }" { (expression_statement "get_scsi_pt_resid(unaff_retaddr);" (call_expression "get_scsi_pt_resid(unaff_retaddr)" identifier (argument_list "(unaff_retaddr)" ( identifier ))) ;) })) (expression_statement "get_scsi_pt_sense_len(unaff_retaddr);" (call_expression "get_scsi_pt_sense_len(unaff_retaddr)" identifier (argument_list "(unaff_retaddr)" ( identifier ))) ;) (expression_statement "uVar2 = get_scsi_pt_result_category(unaff_retaddr);" (assignment_expression "uVar2 = get_scsi_pt_result_category(unaff_retaddr)" identifier = (call_expression "get_scsi_pt_result_category(unaff_retaddr)" identifier (argument_list "(unaff_retaddr)" ( identifier )))) ;) (if_statement "if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }" if (parenthesized_expression "(uVar2 < 5)" ( (binary_expression "uVar2 < 5" identifier < number_literal) )) (compound_statement "{\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }" { (expression_statement "uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();" (assignment_expression "uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))()" identifier = (call_expression "(*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))()" (parenthesized_expression "(*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))" ( (pointer_expression "*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f)" * (cast_expression "(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f)" ( (binary_expression "(int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f" (binary_expression "(int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + (pointer_expression "*(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" * (cast_expression "(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" ( (binary_expression "(int)ppuVar6 + uVar2 * 4 + 0x1d6ab" (binary_expression "(int)ppuVar6 + uVar2 * 4" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "uVar2 * 4" identifier * number_literal)) + number_literal) ))))) + number_literal) )))) )) (argument_list "()" ( )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);" (call_expression "pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2)" identifier (argument_list "((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2)" ( (binary_expression "(int)ppuVar6 + 0x1d55b" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier , (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier ))) ;) }))) (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (labeled_statement "LAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_00030280();\n  }" { (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * 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 IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (string_literal " string_content ") + (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) && (binary_expression IDENT == LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (unary_expression - IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT ))) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (unary_expression - IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) && (binary_expression IDENT == LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ))) ;) })) (goto_statement goto statement_identifier ;) })) }))) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ))) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ))) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression LIT < IDENT)) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression IDENT * LIT)) + LIT) ))))) + LIT) )))) )) (argument_list ( )))) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 __regparm2\nsg_cmds_process_resp\n          (undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined **ppuVar6;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  entry(param_2,0x1fe49,&__DT_PLTGOT);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }\n  if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }\n  uVar3 = 0xffffffff;\nLAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }\n  return uVar3;\n}" (type_identifier "undefined4") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "sg_cmds_process_resp\n          (undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)" (identifier "sg_cmds_process_resp") (parameter_list "(undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,\n          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "char *param_3" (primitive_type "char") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) (, ",") (parameter_declaration "undefined4 param_6" (type_identifier "undefined4") (identifier "param_6")) (, ",") (parameter_declaration "char param_7" (primitive_type "char") (identifier "param_7")) (, ",") (parameter_declaration "int param_8" (primitive_type "int") (identifier "param_8")) (, ",") (parameter_declaration "undefined4 *param_9" (type_identifier "undefined4") (pointer_declarator "*param_9" (* "*") (identifier "param_9"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined **ppuVar6;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  \n  ppuVar6 = &__DT_PLTGOT;\n  entry(param_2,0x1fe49,&__DT_PLTGOT);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }\n  if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }\n  uVar3 = 0xffffffff;\nLAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }\n  return uVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "undefined **ppuVar6;" (type_identifier "undefined") (pointer_declarator "**ppuVar6" (* "*") (pointer_declarator "*ppuVar6" (* "*") (identifier "ppuVar6"))) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 unaff_retaddr;" (type_identifier "undefined4") (identifier "unaff_retaddr") (; ";")) (expression_statement "ppuVar6 = &__DT_PLTGOT;" (assignment_expression "ppuVar6 = &__DT_PLTGOT" (identifier "ppuVar6") (= "=") (pointer_expression "&__DT_PLTGOT" (& "&") (identifier "__DT_PLTGOT"))) (; ";")) (expression_statement "entry(param_2,0x1fe49,&__DT_PLTGOT);" (call_expression "entry(param_2,0x1fe49,&__DT_PLTGOT)" (identifier "entry") (argument_list "(param_2,0x1fe49,&__DT_PLTGOT)" (( "(") (identifier "param_2") (, ",") (number_literal "0x1fe49") (, ",") (pointer_expression "&__DT_PLTGOT" (& "&") (identifier "__DT_PLTGOT")) () ")"))) (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (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")) () ")"))))) (; ";")) (if_statement "if (param_3 == (char *)0x0) {\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }" (if "if") (parenthesized_expression "(param_3 == (char *)0x0)" (( "(") (binary_expression "param_3 == (char *)0x0" (identifier "param_3") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);\n  }" ({ "{") (expression_statement "param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);" (assignment_expression "param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1)" (identifier "param_3") (= "=") (binary_expression ""__vsnprintf_chk" + (int)(ppuVar6 + 1)" (string_literal ""__vsnprintf_chk"" (" """) (string_content "__vsnprintf_chk") (" """)) (+ "+") (cast_expression "(int)(ppuVar6 + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(ppuVar6 + 1)" (( "(") (binary_expression "ppuVar6 + 1" (identifier "ppuVar6") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (} "}"))) (if_statement "if (param_4 < 0) {\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }\n  else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }" (if "if") (parenthesized_expression "(param_4 < 0)" (( "(") (binary_expression "param_4 < 0" (identifier "param_4") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }\n  }" ({ "{") (if_statement "if (param_8 == 0) {\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }\n    else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }" (if "if") (parenthesized_expression "(param_8 == 0)" (( "(") (binary_expression "param_8 == 0" (identifier "param_8") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }\n      if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }\n    }" ({ "{") (if_statement "if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }" (if "if") (parenthesized_expression "(param_9 != (undefined4 *)0x0 && param_4 == -6)" (( "(") (binary_expression "param_9 != (undefined4 *)0x0 && param_4 == -6" (binary_expression "param_9 != (undefined4 *)0x0" (identifier "param_9") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (&& "&&") (binary_expression "param_4 == -6" (identifier "param_4") (== "==") (number_literal "-6"))) () ")")) (compound_statement "{\nLAB_0001ff48:\n        *param_9 = 2;\n        uVar3 = 0xfffffffe;\n        goto LAB_0001ff54;\n      }" ({ "{") (labeled_statement "LAB_0001ff48:\n        *param_9 = 2;" (statement_identifier "LAB_0001ff48") (: ":") (expression_statement "*param_9 = 2;" (assignment_expression "*param_9 = 2" (pointer_expression "*param_9" (* "*") (identifier "param_9")) (= "=") (number_literal "2")) (; ";"))) (expression_statement "uVar3 = 0xfffffffe;" (assignment_expression "uVar3 = 0xfffffffe" (identifier "uVar3") (= "=") (number_literal "0xfffffffe")) (; ";")) (goto_statement "goto LAB_0001ff54;" (goto "goto") (statement_identifier "LAB_0001ff54") (; ";")) (} "}"))) (if_statement "if (param_7 != '\0') {\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }" (if "if") (parenthesized_expression "(param_7 != '\0')" (( "(") (binary_expression "param_7 != '\0'" (identifier "param_7") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        uVar3 = 0xffffffff;\n        uVar5 = safe_strerror(-param_4);\n        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);\n        goto LAB_0001ff54;\n      }" ({ "{") (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" (identifier "uVar3") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "uVar5 = safe_strerror(-param_4);" (assignment_expression "uVar5 = safe_strerror(-param_4)" (identifier "uVar5") (= "=") (call_expression "safe_strerror(-param_4)" (identifier "safe_strerror") (argument_list "(-param_4)" (( "(") (unary_expression "-param_4" (- "-") (identifier "param_4")) () ")")))) (; ";")) (expression_statement "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);" (call_expression "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5)" (identifier "pr2ws") (argument_list "((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5)" (( "(") (binary_expression "(int)ppuVar6 + 0x1d38d" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x1d38d")) (, ",") (identifier "param_3") (, ",") (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x1d372")) (, ",") (identifier "uVar5") () ")"))) (; ";")) (goto_statement "goto LAB_0001ff54;" (goto "goto") (statement_identifier "LAB_0001ff54") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }" (else "else") (compound_statement "{\n      uVar3 = safe_strerror(-param_4);\n      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);\n      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }\n    }" ({ "{") (expression_statement "uVar3 = safe_strerror(-param_4);" (assignment_expression "uVar3 = safe_strerror(-param_4)" (identifier "uVar3") (= "=") (call_expression "safe_strerror(-param_4)" (identifier "safe_strerror") (argument_list "(-param_4)" (( "(") (unary_expression "-param_4" (- "-") (identifier "param_4")) () ")")))) (; ";")) (expression_statement "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);" (call_expression "pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3)" (identifier "pr2ws") (argument_list "((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3)" (( "(") (binary_expression "(int)ppuVar6 + 0x1d38d" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x1d38d")) (, ",") (identifier "param_3") (, ",") (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x1d372")) (, ",") (identifier "uVar3") () ")"))) (; ";")) (if_statement "if (param_9 != (undefined4 *)0x0 && param_4 == -6) {\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }" (if "if") (parenthesized_expression "(param_9 != (undefined4 *)0x0 && param_4 == -6)" (( "(") (binary_expression "param_9 != (undefined4 *)0x0 && param_4 == -6" (binary_expression "param_9 != (undefined4 *)0x0" (identifier "param_9") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (&& "&&") (binary_expression "param_4 == -6" (identifier "param_4") (== "==") (number_literal "-6"))) () ")")) (compound_statement "{\n        if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }\n        goto LAB_0001ff48;\n      }" ({ "{") (if_statement "if (2 < param_8) {\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }" (if "if") (parenthesized_expression "(2 < param_8)" (( "(") (binary_expression "2 < param_8" (number_literal "2") (< "<") (identifier "param_8")) () ")")) (compound_statement "{\n          pr2ws((int)ppuVar6 + 0x1d4c3);\n        }" ({ "{") (expression_statement "pr2ws((int)ppuVar6 + 0x1d4c3);" (call_expression "pr2ws((int)ppuVar6 + 0x1d4c3)" (identifier "pr2ws") (argument_list "((int)ppuVar6 + 0x1d4c3)" (( "(") (binary_expression "(int)ppuVar6 + 0x1d4c3" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x1d4c3")) () ")"))) (; ";")) (} "}"))) (goto_statement "goto LAB_0001ff48;" (goto "goto") (statement_identifier "LAB_0001ff48") (; ";")) (} "}"))) (} "}")))) (} "}")) (else_clause "else {\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }" (else "else") (compound_statement "{\n    if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }\n    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }\n    if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }\n    get_scsi_pt_sense_len(unaff_retaddr);\n    uVar2 = get_scsi_pt_result_category(unaff_retaddr);\n    if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }\n    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);\n  }" ({ "{") (if_statement "if (param_4 == 1) {\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" (if "if") (parenthesized_expression "(param_4 == 1)" (( "(") (binary_expression "param_4 == 1" (identifier "param_4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      uVar3 = 0xffffffff;\n      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" ({ "{") (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" (identifier "uVar3") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);" (call_expression "pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372)" (identifier "pr2ws") (argument_list "((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372)" (( "(") (binary_expression "(int)ppuVar6 + 0x1d3a2" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x1d3a2")) (, ",") (identifier "param_3") (, ",") (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x1d372")) () ")"))) (; ";")) (goto_statement "goto LAB_0001ff54;" (goto "goto") (statement_identifier "LAB_0001ff54") (; ";")) (} "}"))) (if_statement "if (param_4 == 2) {\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" (if "if") (parenthesized_expression "(param_4 == 2)" (( "(") (binary_expression "param_4 == 2" (identifier "param_4") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n      uVar3 = 0xffffffff;\n      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);\n      goto LAB_0001ff54;\n    }" ({ "{") (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" (identifier "uVar3") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);" (call_expression "pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372)" (identifier "pr2ws") (argument_list "(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372)" (( "(") (binary_expression "ppuVar6 + 0x74ed" (identifier "ppuVar6") (+ "+") (number_literal "0x74ed")) (, ",") (identifier "param_3") (, ",") (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x1d372")) () ")"))) (; ";")) (goto_statement "goto LAB_0001ff54;" (goto "goto") (statement_identifier "LAB_0001ff54") (; ";")) (} "}"))) (if_statement "if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }" (if "if") (parenthesized_expression "((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4))" (( "(") (binary_expression "(2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)" (parenthesized_expression "(2 < param_8)" (( "(") (binary_expression "2 < param_8" (number_literal "2") (< "<") (identifier "param_8")) () ")")) (&& "&&") (parenthesized_expression "(iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)" (( "(") (comma_expression "iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4" (assignment_expression "iVar4 = get_scsi_pt_duration_ms(unaff_retaddr)" (identifier "iVar4") (= "=") (call_expression "get_scsi_pt_duration_ms(unaff_retaddr)" (identifier "get_scsi_pt_duration_ms") (argument_list "(unaff_retaddr)" (( "(") (identifier "unaff_retaddr") () ")")))) (, ",") (binary_expression "-1 < iVar4" (number_literal "-1") (< "<") (identifier "iVar4"))) () ")"))) () ")")) (compound_statement "{\n      pr2ws(ppuVar6 + 0x74f1,iVar4);\n    }" ({ "{") (expression_statement "pr2ws(ppuVar6 + 0x74f1,iVar4);" (call_expression "pr2ws(ppuVar6 + 0x74f1,iVar4)" (identifier "pr2ws") (argument_list "(ppuVar6 + 0x74f1,iVar4)" (( "(") (binary_expression "ppuVar6 + 0x74f1" (identifier "ppuVar6") (+ "+") (number_literal "0x74f1")) (, ",") (identifier "iVar4") () ")"))) (; ";")) (} "}"))) (if_statement "if (0 < param_5) {\n      get_scsi_pt_resid(unaff_retaddr);\n    }" (if "if") (parenthesized_expression "(0 < param_5)" (( "(") (binary_expression "0 < param_5" (number_literal "0") (< "<") (identifier "param_5")) () ")")) (compound_statement "{\n      get_scsi_pt_resid(unaff_retaddr);\n    }" ({ "{") (expression_statement "get_scsi_pt_resid(unaff_retaddr);" (call_expression "get_scsi_pt_resid(unaff_retaddr)" (identifier "get_scsi_pt_resid") (argument_list "(unaff_retaddr)" (( "(") (identifier "unaff_retaddr") () ")"))) (; ";")) (} "}"))) (expression_statement "get_scsi_pt_sense_len(unaff_retaddr);" (call_expression "get_scsi_pt_sense_len(unaff_retaddr)" (identifier "get_scsi_pt_sense_len") (argument_list "(unaff_retaddr)" (( "(") (identifier "unaff_retaddr") () ")"))) (; ";")) (expression_statement "uVar2 = get_scsi_pt_result_category(unaff_retaddr);" (assignment_expression "uVar2 = get_scsi_pt_result_category(unaff_retaddr)" (identifier "uVar2") (= "=") (call_expression "get_scsi_pt_result_category(unaff_retaddr)" (identifier "get_scsi_pt_result_category") (argument_list "(unaff_retaddr)" (( "(") (identifier "unaff_retaddr") () ")")))) (; ";")) (if_statement "if (uVar2 < 5) {\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }" (if "if") (parenthesized_expression "(uVar2 < 5)" (( "(") (binary_expression "uVar2 < 5" (identifier "uVar2") (< "<") (number_literal "5")) () ")")) (compound_statement "{\n                    \n                    \n      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();\n      return uVar3;\n    }" ({ "{") (expression_statement "uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();" (assignment_expression "uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))()" (identifier "uVar3") (= "=") (call_expression "(*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))()" (parenthesized_expression "(*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))" (( "(") (pointer_expression "*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f)" (* "*") (cast_expression "(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f)" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f)" (( "(") (binary_expression "(int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f" (binary_expression "(int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (pointer_expression "*(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" (* "*") (cast_expression "(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)ppuVar6 + uVar2 * 4 + 0x1d6ab)" (( "(") (binary_expression "(int)ppuVar6 + uVar2 * 4 + 0x1d6ab" (binary_expression "(int)ppuVar6 + uVar2 * 4" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (binary_expression "uVar2 * 4" (identifier "uVar2") (* "*") (number_literal "4"))) (+ "+") (number_literal "0x1d6ab")) () ")"))))) (+ "+") (number_literal "0x29f3f")) () ")")))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);" (call_expression "pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2)" (identifier "pr2ws") (argument_list "((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2)" (( "(") (binary_expression "(int)ppuVar6 + 0x1d55b" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x1d55b")) (, ",") (identifier "param_3") (, ",") (binary_expression "(int)ppuVar6 + 0x1d372" (cast_expression "(int)ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar6")) (+ "+") (number_literal "0x1d372")) (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}")))) (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" (identifier "uVar3") (= "=") (number_literal "0xffffffff")) (; ";")) (labeled_statement "LAB_0001ff54:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }" (statement_identifier "LAB_0001ff54") (: ":") (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }" (if "if") (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_00030280();\n  }" ({ "{") (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" (identifier "FUN_00030280") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Switch with 1 destination removed at 0x00017690 */

int function_1
              (type_1 *ptvp,char *var_2,int var_3,int var_10,uint8_t *sbp,type_2 noisy,
              int var_4,int *var_5)

{
  type_3 var_14;
  int var_15;
  char *pcVar3;
  int var_9;
  int var_1;
  
  var_15 = *(int *)(var_1 + 0x14);
  if (var_2 == (char *)0x0) {
    var_2 = "";
  }
  if (var_3 < 0) {
    if (var_4 == 0) {
      if (var_5 != (int *)0x0 && var_3 == -6) {
LAB_0001ff48:
        *var_5 = 2;
        var_9 = -2;
        goto LAB_0001ff54;
      }
      if (noisy) {
        var_9 = -1;
        pcVar3 = var_6(-var_3);
        var_7("%s: %s os error: %s\n",var_2,"pass-through",pcVar3);
        goto LAB_0001ff54;
      }
    }
    else {
      pcVar3 = var_6(-var_3);
      var_7("%s: %s os error: %s\n",var_2,"pass-through",pcVar3);
      if (var_5 != (int *)0x0 && var_3 == -6) {
        if (2 < var_4) {
          var_7("map ENXIO to SG_LIB_CAT_NOT_READY\n");
        }
        goto LAB_0001ff48;
      }
    }
  }
  else {
    if (var_3 == 1) {
      var_9 = -1;
      var_7("%s: bad %s setup\n",var_2,"pass-through");
      goto LAB_0001ff54;
    }
    if (var_3 == 2) {
      var_9 = -1;
      var_7("%s: %s timeout\n",var_2,"pass-through");
      goto LAB_0001ff54;
    }
    if ((2 < var_4) && (var_9 = var_8(), -1 < var_9)) {
      var_7("      duration=%d ms\n",var_9);
    }
    if (0 < var_10) {
      var_11(ptvp);
    }
    var_12();
    var_14 = var_13(ptvp);
    if (var_14 < 5) {
                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      var_15 = (*(type_4 *)((int)&_GLOBAL_OFFSET_TABLE_ +
                        (&switchD_0001ff09::switchdataD_0003d4f4)[var_14]))();
      return var_15;
    }
    var_7("%s: unknown %s result category (%d)\n",var_2,"pass-through",var_14);
  }
  var_9 = -1;
LAB_0001ff54:
  if (var_15 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_16();
  }
  return var_9;
}


(translation_unit (function_definition type: (type_identifier) (ERROR (identifier)) 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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (pointer_declarator declarator: (identifier)))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (pointer_expression argument: (identifier))))) (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (string_literal (string_content)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (unary_expression argument: (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) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)) (identifier)))) (goto_statement label: (statement_identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (unary_expression argument: (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) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) 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))))))) (goto_statement label: (statement_identifier)))))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)) (identifier) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (number_literal) right: (identifier)))))) consequence: (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: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))))) right: (number_literal)))))) arguments: (argument_list)))) (return_statement (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) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)) (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))) (return_statement (identifier)))))

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

undefined4 __regparm2
MASKED
          (undefined4 param_1,undefined4 param_2,char *param_3,int param_4,int param_5,
          undefined4 param_6,char param_7,int param_8,undefined4 *param_9)

{
  int iVar1;
  uint uVar2;
  undefined4 uVar3;
  int iVar4;
  undefined4 uVar5;
  undefined **ppuVar6;
  int in_GS_OFFSET;
  undefined4 unaff_retaddr;
  
  ppuVar6 = &__DT_PLTGOT;
  entry(param_2,0x1fe49,&__DT_PLTGOT);
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_3 == (char *)0x0) {
    param_3 = "__vsnprintf_chk" + (int)(ppuVar6 + 1);
  }
  if (param_4 < 0) {
    if (param_8 == 0) {
      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {
LAB_0001ff48:
        *param_9 = 2;
        uVar3 = 0xfffffffe;
        goto LAB_0001ff54;
      }
      if (param_7 != '\0') {
        uVar3 = 0xffffffff;
        uVar5 = safe_strerror(-param_4);
        pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar5);
        goto LAB_0001ff54;
      }
    }
    else {
      uVar3 = safe_strerror(-param_4);
      pr2ws((int)ppuVar6 + 0x1d38d,param_3,(int)ppuVar6 + 0x1d372,uVar3);
      if (param_9 != (undefined4 *)0x0 && param_4 == -6) {
        if (2 < param_8) {
          pr2ws((int)ppuVar6 + 0x1d4c3);
        }
        goto LAB_0001ff48;
      }
    }
  }
  else {
    if (param_4 == 1) {
      uVar3 = 0xffffffff;
      pr2ws((int)ppuVar6 + 0x1d3a2,param_3,(int)ppuVar6 + 0x1d372);
      goto LAB_0001ff54;
    }
    if (param_4 == 2) {
      uVar3 = 0xffffffff;
      pr2ws(ppuVar6 + 0x74ed,param_3,(int)ppuVar6 + 0x1d372);
      goto LAB_0001ff54;
    }
    if ((2 < param_8) && (iVar4 = get_scsi_pt_duration_ms(unaff_retaddr), -1 < iVar4)) {
      pr2ws(ppuVar6 + 0x74f1,iVar4);
    }
    if (0 < param_5) {
      get_scsi_pt_resid(unaff_retaddr);
    }
    get_scsi_pt_sense_len(unaff_retaddr);
    uVar2 = get_scsi_pt_result_category(unaff_retaddr);
    if (uVar2 < 5) {
                    /* WARNING: Could not recover jumptable at 0x0001ff09. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      uVar3 = (*(code *)((int)ppuVar6 + *(int *)((int)ppuVar6 + uVar2 * 4 + 0x1d6ab) + 0x29f3f))();
      return uVar3;
    }
    pr2ws((int)ppuVar6 + 0x1d55b,param_3,(int)ppuVar6 + 0x1d372,uVar2);
  }
  uVar3 = 0xffffffff;
LAB_0001ff54:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00030280();
  }
  return uVar3;
}

