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

_Bool sg_nvme_status2scsi(uint16_t sct_sc,uint8_t *status_p,uint8_t *sk_p,uint8_t *asc_p,
                         uint8_t *ascq_p)

{
  uint8_t *puVar1;
  long lVar2;
  _Bool _Var3;
  bool bVar4;
  ushort *puVar5;
  ushort *puVar6;
  int iVar7;
  undefined *puVar8;
  
  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {
    _Var3 = false;
  }
  else {
    puVar6 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;
    if ((sct_sc & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {
      iVar7 = 0;
      puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;
      do {
        iVar7 = iVar7 + 1;
        puVar6 = puVar5 + 8;
        lVar2 = *(long *)(puVar5 + 0xc);
        bVar4 = iVar7 < 1000 && lVar2 != 0;
        if (999 < iVar7 || lVar2 == 0) {
          if (999 < iVar7) {
            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")
            ;
            return bVar4;
          }
          if (lVar2 == 0) {
            return bVar4;
          }
          break;
        }
        puVar5 = puVar6;
      } while ((sct_sc & 0x3ff) != *puVar6);
    }
    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {
      iVar7 = 0;
    }
    else {
      iVar7 = 0;
      puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;
      do {
        iVar7 = iVar7 + 1;
        bVar4 = puVar8[5] != -1 && iVar7 < 1000;
        puVar8 = puVar8 + 4;
      } while (bVar4);
      if (999 < iVar7) {
        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");
        return bVar4;
      }
    }
    _Var3 = false;
    if (*(int *)(puVar6 + 2) < iVar7) {
      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4;
      if (status_p != (uint8_t *)0x0) {
        *status_p = *puVar1;
      }
      if (sk_p != (uint8_t *)0x0) {
        *sk_p = puVar1[1];
      }
      if (asc_p != (uint8_t *)0x0) {
        *asc_p = puVar1[2];
      }
      _Var3 = true;
      if (ascq_p != (uint8_t *)0x0) {
        *ascq_p = puVar1[3];
      }
    }
  }
  return _Var3;
}



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

bool sg_nvme_status2scsi(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,
                        undefined1 *param_5)

{
  undefined1 *puVar1;
  long lVar2;
  bool bVar3;
  ushort *puVar4;
  ushort *puVar5;
  int iVar6;
  undefined *puVar7;
  
  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {
    bVar3 = false;
  }
  else {
    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;
    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {
      iVar6 = 0;
      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;
      do {
        iVar6 = iVar6 + 1;
        puVar5 = puVar4 + 8;
        lVar2 = *(long *)(puVar4 + 0xc);
        bVar3 = iVar6 < 1000 && lVar2 != 0;
        if (999 < iVar6 || lVar2 == 0) {
          if (999 < iVar6) {
            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")
            ;
            return bVar3;
          }
          if (lVar2 == 0) {
            return bVar3;
          }
          break;
        }
        puVar4 = puVar5;
      } while ((param_1 & 0x3ff) != *puVar5);
    }
    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {
      iVar6 = 0;
    }
    else {
      iVar6 = 0;
      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;
      do {
        iVar6 = iVar6 + 1;
        bVar3 = puVar7[5] != -1 && iVar6 < 1000;
        puVar7 = puVar7 + 4;
      } while (bVar3);
      if (999 < iVar6) {
        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");
        return bVar3;
      }
    }
    bVar3 = false;
    if (*(int *)(puVar5 + 2) < iVar6) {
      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;
      if (param_2 != (undefined1 *)0x0) {
        *param_2 = *puVar1;
      }
      if (param_3 != (undefined1 *)0x0) {
        *param_3 = puVar1[1];
      }
      if (param_4 != (undefined1 *)0x0) {
        *param_4 = puVar1[2];
      }
      bVar3 = true;
      if (param_5 != (undefined1 *)0x0) {
        *param_5 = puVar1[3];
      }
    }
  }
  return bVar3;
}


JMP qword ptr [0x00138e18]
(translation_unit "/* WARNING: Switch with 1 destination removed at 0x0010e5d0 */\n\nbool sg_nvme_status2scsi(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)\n\n{\n  undefined1 *puVar1;\n  long lVar2;\n  bool bVar3;\n  ushort *puVar4;\n  ushort *puVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }\n  return bVar3;\n}\n\n" comment (function_definition "bool sg_nvme_status2scsi(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)\n\n{\n  undefined1 *puVar1;\n  long lVar2;\n  bool bVar3;\n  ushort *puVar4;\n  ushort *puVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }\n  return bVar3;\n}" primitive_type (function_declarator "sg_nvme_status2scsi(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)" identifier (parameter_list "(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)" ( (parameter_declaration "ushort param_1" type_identifier identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined1 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined1 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined1 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  undefined1 *puVar1;\n  long lVar2;\n  bool bVar3;\n  ushort *puVar4;\n  ushort *puVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }\n  return bVar3;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "ushort *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "ushort *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (if_statement "if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }" if (parenthesized_expression "(*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0)" ( (binary_expression "*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0" (pointer_expression "*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" * (cast_expression "(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" ( (binary_expression "PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    bVar3 = false;\n  }" { (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) }) (else_clause "else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }" else (compound_statement "{\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }" { (expression_statement "puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;" (assignment_expression "puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" identifier = (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }" if (parenthesized_expression "((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0)" ( (binary_expression "(param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" (parenthesized_expression "(param_1 & 0x3ff)" ( (binary_expression "param_1 & 0x3ff" identifier & number_literal) )) != (pointer_expression "*(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" * (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;" (assignment_expression "puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" identifier = (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);" do (compound_statement "{\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      }" { (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "puVar5 = puVar4 + 8;" (assignment_expression "puVar5 = puVar4 + 8" identifier = (binary_expression "puVar4 + 8" identifier + number_literal)) ;) (expression_statement "lVar2 = *(long *)(puVar4 + 0xc);" (assignment_expression "lVar2 = *(long *)(puVar4 + 0xc)" identifier = (pointer_expression "*(long *)(puVar4 + 0xc)" * (cast_expression "(long *)(puVar4 + 0xc)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 0xc)" ( (binary_expression "puVar4 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "bVar3 = iVar6 < 1000 && lVar2 != 0;" (assignment_expression "bVar3 = iVar6 < 1000 && lVar2 != 0" identifier = (binary_expression "iVar6 < 1000 && lVar2 != 0" (binary_expression "iVar6 < 1000" identifier < number_literal) && (binary_expression "lVar2 != 0" identifier != number_literal))) ;) (if_statement "if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }" if (parenthesized_expression "(999 < iVar6 || lVar2 == 0)" ( (binary_expression "999 < iVar6 || lVar2 == 0" (binary_expression "999 < iVar6" number_literal < identifier) || (binary_expression "lVar2 == 0" identifier == number_literal)) )) (compound_statement "{\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }" { (if_statement "if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }" if (parenthesized_expression "(999 < iVar6)" ( (binary_expression "999 < iVar6" number_literal < identifier) )) (compound_statement "{\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }" { (expression_statement "pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;" (call_expression "pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")" identifier (argument_list "("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")" ( (string_literal ""%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n"" " string_content escape_sequence ") , (string_literal ""sg_nvme_status2scsi"" " string_content ") ))) ;) (return_statement "return bVar3;" return identifier ;) })) (if_statement "if (lVar2 == 0) {\n            return bVar3;\n          }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n            return bVar3;\n          }" { (return_statement "return bVar3;" return identifier ;) })) (break_statement "break;" break ;) })) (expression_statement "puVar4 = puVar5;" (assignment_expression "puVar4 = puVar5" identifier = identifier) ;) }) while (parenthesized_expression "((param_1 & 0x3ff) != *puVar5)" ( (binary_expression "(param_1 & 0x3ff) != *puVar5" (parenthesized_expression "(param_1 & 0x3ff)" ( (binary_expression "param_1 & 0x3ff" identifier & number_literal) )) != (pointer_expression "*puVar5" * identifier)) )) ;) })) (if_statement "if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }" if (parenthesized_expression "(PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1)" ( (binary_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1" (subscript_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60[1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      iVar6 = 0;\n    }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }" else (compound_statement "{\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;" (assignment_expression "puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60" identifier = identifier) ;) (do_statement "do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);" do (compound_statement "{\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      }" { (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "bVar3 = puVar7[5] != -1 && iVar6 < 1000;" (assignment_expression "bVar3 = puVar7[5] != -1 && iVar6 < 1000" identifier = (binary_expression "puVar7[5] != -1 && iVar6 < 1000" (binary_expression "puVar7[5] != -1" (subscript_expression "puVar7[5]" identifier [ number_literal ]) != number_literal) && (binary_expression "iVar6 < 1000" identifier < number_literal))) ;) (expression_statement "puVar7 = puVar7 + 4;" (assignment_expression "puVar7 = puVar7 + 4" identifier = (binary_expression "puVar7 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar3)" ( identifier )) ;) (if_statement "if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }" if (parenthesized_expression "(999 < iVar6)" ( (binary_expression "999 < iVar6" number_literal < identifier) )) (compound_statement "{\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }" { (expression_statement "pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");" (call_expression "pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi")" identifier (argument_list "("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi")" ( (string_literal ""%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n"" " string_content escape_sequence ") , (string_literal ""sg_nvme_status2scsi"" " string_content ") ))) ;) (return_statement "return bVar3;" return identifier ;) })) }))) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (if_statement "if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }" if (parenthesized_expression "(*(int *)(puVar5 + 2) < iVar6)" ( (binary_expression "*(int *)(puVar5 + 2) < iVar6" (pointer_expression "*(int *)(puVar5 + 2)" * (cast_expression "(int *)(puVar5 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar5 + 2)" ( (binary_expression "puVar5 + 2" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }" { (expression_statement "puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;" (assignment_expression "puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4" identifier = (binary_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4" identifier + (binary_expression "(long)*(int *)(puVar5 + 2) * 4" (cast_expression "(long)*(int *)(puVar5 + 2)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*(int *)(puVar5 + 2)" * (cast_expression "(int *)(puVar5 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar5 + 2)" ( (binary_expression "puVar5 + 2" identifier + number_literal) ))))) * number_literal))) ;) (if_statement "if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }" if (parenthesized_expression "(param_2 != (undefined1 *)0x0)" ( (binary_expression "param_2 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *param_2 = *puVar1;\n      }" { (expression_statement "*param_2 = *puVar1;" (assignment_expression "*param_2 = *puVar1" (pointer_expression "*param_2" * identifier) = (pointer_expression "*puVar1" * identifier)) ;) })) (if_statement "if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }" if (parenthesized_expression "(param_3 != (undefined1 *)0x0)" ( (binary_expression "param_3 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *param_3 = puVar1[1];\n      }" { (expression_statement "*param_3 = puVar1[1];" (assignment_expression "*param_3 = puVar1[1]" (pointer_expression "*param_3" * identifier) = (subscript_expression "puVar1[1]" identifier [ number_literal ])) ;) })) (if_statement "if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }" if (parenthesized_expression "(param_4 != (undefined1 *)0x0)" ( (binary_expression "param_4 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *param_4 = puVar1[2];\n      }" { (expression_statement "*param_4 = puVar1[2];" (assignment_expression "*param_4 = puVar1[2]" (pointer_expression "*param_4" * identifier) = (subscript_expression "puVar1[2]" identifier [ number_literal ])) ;) })) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) (if_statement "if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }" if (parenthesized_expression "(param_5 != (undefined1 *)0x0)" ( (binary_expression "param_5 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *param_5 = puVar1[3];\n      }" { (expression_statement "*param_5 = puVar1[3];" (assignment_expression "*param_5 = puVar1[3]" (pointer_expression "*param_5" * identifier) = (subscript_expression "puVar1[3]" identifier [ number_literal ])) ;) })) })) }))) (return_statement "return bVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Switch with 1 destination removed at 0x0010e5d0 */\n\n_Bool sg_nvme_status2scsi(uint16_t sct_sc,uint8_t *status_p,uint8_t *sk_p,uint8_t *asc_p,\n                         uint8_t *ascq_p)\n\n{\n  uint8_t *puVar1;\n  long lVar2;\n  _Bool _Var3;\n  bool bVar4;\n  ushort *puVar5;\n  ushort *puVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    _Var3 = false;\n  }\n  else {\n    puVar6 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((sct_sc & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar7 = 0;\n      puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar7 = iVar7 + 1;\n        puVar6 = puVar5 + 8;\n        lVar2 = *(long *)(puVar5 + 0xc);\n        bVar4 = iVar7 < 1000 && lVar2 != 0;\n        if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }\n        puVar5 = puVar6;\n      } while ((sct_sc & 0x3ff) != *puVar6);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar7 = 0;\n    }\n    else {\n      iVar7 = 0;\n      puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      } while (bVar4);\n      if (999 < iVar7) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }\n    }\n    _Var3 = false;\n    if (*(int *)(puVar6 + 2) < iVar7) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4;\n      if (status_p != (uint8_t *)0x0) {\n        *status_p = *puVar1;\n      }\n      if (sk_p != (uint8_t *)0x0) {\n        *sk_p = puVar1[1];\n      }\n      if (asc_p != (uint8_t *)0x0) {\n        *asc_p = puVar1[2];\n      }\n      _Var3 = true;\n      if (ascq_p != (uint8_t *)0x0) {\n        *ascq_p = puVar1[3];\n      }\n    }\n  }\n  return _Var3;\n}\n\n" comment (function_definition "_Bool sg_nvme_status2scsi(uint16_t sct_sc,uint8_t *status_p,uint8_t *sk_p,uint8_t *asc_p,\n                         uint8_t *ascq_p)\n\n{\n  uint8_t *puVar1;\n  long lVar2;\n  _Bool _Var3;\n  bool bVar4;\n  ushort *puVar5;\n  ushort *puVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    _Var3 = false;\n  }\n  else {\n    puVar6 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((sct_sc & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar7 = 0;\n      puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar7 = iVar7 + 1;\n        puVar6 = puVar5 + 8;\n        lVar2 = *(long *)(puVar5 + 0xc);\n        bVar4 = iVar7 < 1000 && lVar2 != 0;\n        if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }\n        puVar5 = puVar6;\n      } while ((sct_sc & 0x3ff) != *puVar6);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar7 = 0;\n    }\n    else {\n      iVar7 = 0;\n      puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      } while (bVar4);\n      if (999 < iVar7) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }\n    }\n    _Var3 = false;\n    if (*(int *)(puVar6 + 2) < iVar7) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4;\n      if (status_p != (uint8_t *)0x0) {\n        *status_p = *puVar1;\n      }\n      if (sk_p != (uint8_t *)0x0) {\n        *sk_p = puVar1[1];\n      }\n      if (asc_p != (uint8_t *)0x0) {\n        *asc_p = puVar1[2];\n      }\n      _Var3 = true;\n      if (ascq_p != (uint8_t *)0x0) {\n        *ascq_p = puVar1[3];\n      }\n    }\n  }\n  return _Var3;\n}" type_identifier (function_declarator "sg_nvme_status2scsi(uint16_t sct_sc,uint8_t *status_p,uint8_t *sk_p,uint8_t *asc_p,\n                         uint8_t *ascq_p)" identifier (parameter_list "(uint16_t sct_sc,uint8_t *status_p,uint8_t *sk_p,uint8_t *asc_p,\n                         uint8_t *ascq_p)" ( (parameter_declaration "uint16_t sct_sc" primitive_type identifier) , (parameter_declaration "uint8_t *status_p" primitive_type (pointer_declarator "*status_p" * identifier)) , (parameter_declaration "uint8_t *sk_p" primitive_type (pointer_declarator "*sk_p" * identifier)) , (parameter_declaration "uint8_t *asc_p" primitive_type (pointer_declarator "*asc_p" * identifier)) , (parameter_declaration "uint8_t *ascq_p" primitive_type (pointer_declarator "*ascq_p" * identifier)) ))) (compound_statement "{\n  uint8_t *puVar1;\n  long lVar2;\n  _Bool _Var3;\n  bool bVar4;\n  ushort *puVar5;\n  ushort *puVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    _Var3 = false;\n  }\n  else {\n    puVar6 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((sct_sc & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar7 = 0;\n      puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar7 = iVar7 + 1;\n        puVar6 = puVar5 + 8;\n        lVar2 = *(long *)(puVar5 + 0xc);\n        bVar4 = iVar7 < 1000 && lVar2 != 0;\n        if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }\n        puVar5 = puVar6;\n      } while ((sct_sc & 0x3ff) != *puVar6);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar7 = 0;\n    }\n    else {\n      iVar7 = 0;\n      puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      } while (bVar4);\n      if (999 < iVar7) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }\n    }\n    _Var3 = false;\n    if (*(int *)(puVar6 + 2) < iVar7) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4;\n      if (status_p != (uint8_t *)0x0) {\n        *status_p = *puVar1;\n      }\n      if (sk_p != (uint8_t *)0x0) {\n        *sk_p = puVar1[1];\n      }\n      if (asc_p != (uint8_t *)0x0) {\n        *asc_p = puVar1[2];\n      }\n      _Var3 = true;\n      if (ascq_p != (uint8_t *)0x0) {\n        *ascq_p = puVar1[3];\n      }\n    }\n  }\n  return _Var3;\n}" { (declaration "uint8_t *puVar1;" primitive_type (pointer_declarator "*puVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "_Bool _Var3;" type_identifier identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (declaration "ushort *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "ushort *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (if_statement "if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    _Var3 = false;\n  }\n  else {\n    puVar6 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((sct_sc & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar7 = 0;\n      puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar7 = iVar7 + 1;\n        puVar6 = puVar5 + 8;\n        lVar2 = *(long *)(puVar5 + 0xc);\n        bVar4 = iVar7 < 1000 && lVar2 != 0;\n        if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }\n        puVar5 = puVar6;\n      } while ((sct_sc & 0x3ff) != *puVar6);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar7 = 0;\n    }\n    else {\n      iVar7 = 0;\n      puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      } while (bVar4);\n      if (999 < iVar7) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }\n    }\n    _Var3 = false;\n    if (*(int *)(puVar6 + 2) < iVar7) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4;\n      if (status_p != (uint8_t *)0x0) {\n        *status_p = *puVar1;\n      }\n      if (sk_p != (uint8_t *)0x0) {\n        *sk_p = puVar1[1];\n      }\n      if (asc_p != (uint8_t *)0x0) {\n        *asc_p = puVar1[2];\n      }\n      _Var3 = true;\n      if (ascq_p != (uint8_t *)0x0) {\n        *ascq_p = puVar1[3];\n      }\n    }\n  }" if (parenthesized_expression "(*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0)" ( (binary_expression "*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0" (pointer_expression "*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" * (cast_expression "(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" ( (binary_expression "PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    _Var3 = false;\n  }" { (expression_statement "_Var3 = false;" (assignment_expression "_Var3 = false" identifier = false) ;) }) (else_clause "else {\n    puVar6 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((sct_sc & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar7 = 0;\n      puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar7 = iVar7 + 1;\n        puVar6 = puVar5 + 8;\n        lVar2 = *(long *)(puVar5 + 0xc);\n        bVar4 = iVar7 < 1000 && lVar2 != 0;\n        if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }\n        puVar5 = puVar6;\n      } while ((sct_sc & 0x3ff) != *puVar6);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar7 = 0;\n    }\n    else {\n      iVar7 = 0;\n      puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      } while (bVar4);\n      if (999 < iVar7) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }\n    }\n    _Var3 = false;\n    if (*(int *)(puVar6 + 2) < iVar7) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4;\n      if (status_p != (uint8_t *)0x0) {\n        *status_p = *puVar1;\n      }\n      if (sk_p != (uint8_t *)0x0) {\n        *sk_p = puVar1[1];\n      }\n      if (asc_p != (uint8_t *)0x0) {\n        *asc_p = puVar1[2];\n      }\n      _Var3 = true;\n      if (ascq_p != (uint8_t *)0x0) {\n        *ascq_p = puVar1[3];\n      }\n    }\n  }" else (compound_statement "{\n    puVar6 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((sct_sc & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar7 = 0;\n      puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar7 = iVar7 + 1;\n        puVar6 = puVar5 + 8;\n        lVar2 = *(long *)(puVar5 + 0xc);\n        bVar4 = iVar7 < 1000 && lVar2 != 0;\n        if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }\n        puVar5 = puVar6;\n      } while ((sct_sc & 0x3ff) != *puVar6);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar7 = 0;\n    }\n    else {\n      iVar7 = 0;\n      puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      } while (bVar4);\n      if (999 < iVar7) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }\n    }\n    _Var3 = false;\n    if (*(int *)(puVar6 + 2) < iVar7) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4;\n      if (status_p != (uint8_t *)0x0) {\n        *status_p = *puVar1;\n      }\n      if (sk_p != (uint8_t *)0x0) {\n        *sk_p = puVar1[1];\n      }\n      if (asc_p != (uint8_t *)0x0) {\n        *asc_p = puVar1[2];\n      }\n      _Var3 = true;\n      if (ascq_p != (uint8_t *)0x0) {\n        *ascq_p = puVar1[3];\n      }\n    }\n  }" { (expression_statement "puVar6 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;" (assignment_expression "puVar6 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" identifier = (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if ((sct_sc & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar7 = 0;\n      puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar7 = iVar7 + 1;\n        puVar6 = puVar5 + 8;\n        lVar2 = *(long *)(puVar5 + 0xc);\n        bVar4 = iVar7 < 1000 && lVar2 != 0;\n        if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }\n        puVar5 = puVar6;\n      } while ((sct_sc & 0x3ff) != *puVar6);\n    }" if (parenthesized_expression "((sct_sc & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0)" ( (binary_expression "(sct_sc & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" (parenthesized_expression "(sct_sc & 0x3ff)" ( (binary_expression "sct_sc & 0x3ff" identifier & number_literal) )) != (pointer_expression "*(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" * (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n      iVar7 = 0;\n      puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar7 = iVar7 + 1;\n        puVar6 = puVar5 + 8;\n        lVar2 = *(long *)(puVar5 + 0xc);\n        bVar4 = iVar7 < 1000 && lVar2 != 0;\n        if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }\n        puVar5 = puVar6;\n      } while ((sct_sc & 0x3ff) != *puVar6);\n    }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (expression_statement "puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;" (assignment_expression "puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" identifier = (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n        iVar7 = iVar7 + 1;\n        puVar6 = puVar5 + 8;\n        lVar2 = *(long *)(puVar5 + 0xc);\n        bVar4 = iVar7 < 1000 && lVar2 != 0;\n        if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }\n        puVar5 = puVar6;\n      } while ((sct_sc & 0x3ff) != *puVar6);" do (compound_statement "{\n        iVar7 = iVar7 + 1;\n        puVar6 = puVar5 + 8;\n        lVar2 = *(long *)(puVar5 + 0xc);\n        bVar4 = iVar7 < 1000 && lVar2 != 0;\n        if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }\n        puVar5 = puVar6;\n      }" { (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (expression_statement "puVar6 = puVar5 + 8;" (assignment_expression "puVar6 = puVar5 + 8" identifier = (binary_expression "puVar5 + 8" identifier + number_literal)) ;) (expression_statement "lVar2 = *(long *)(puVar5 + 0xc);" (assignment_expression "lVar2 = *(long *)(puVar5 + 0xc)" identifier = (pointer_expression "*(long *)(puVar5 + 0xc)" * (cast_expression "(long *)(puVar5 + 0xc)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar5 + 0xc)" ( (binary_expression "puVar5 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "bVar4 = iVar7 < 1000 && lVar2 != 0;" (assignment_expression "bVar4 = iVar7 < 1000 && lVar2 != 0" identifier = (binary_expression "iVar7 < 1000 && lVar2 != 0" (binary_expression "iVar7 < 1000" identifier < number_literal) && (binary_expression "lVar2 != 0" identifier != number_literal))) ;) (if_statement "if (999 < iVar7 || lVar2 == 0) {\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }" if (parenthesized_expression "(999 < iVar7 || lVar2 == 0)" ( (binary_expression "999 < iVar7 || lVar2 == 0" (binary_expression "999 < iVar7" number_literal < identifier) || (binary_expression "lVar2 == 0" identifier == number_literal)) )) (compound_statement "{\n          if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }\n          if (lVar2 == 0) {\n            return bVar4;\n          }\n          break;\n        }" { (if_statement "if (999 < iVar7) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }" if (parenthesized_expression "(999 < iVar7)" ( (binary_expression "999 < iVar7" number_literal < identifier) )) (compound_statement "{\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar4;\n          }" { (expression_statement "pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;" (call_expression "pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")" identifier (argument_list "("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")" ( (string_literal ""%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n"" " string_content escape_sequence ") , (string_literal ""sg_nvme_status2scsi"" " string_content ") ))) ;) (return_statement "return bVar4;" return identifier ;) })) (if_statement "if (lVar2 == 0) {\n            return bVar4;\n          }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n            return bVar4;\n          }" { (return_statement "return bVar4;" return identifier ;) })) (break_statement "break;" break ;) })) (expression_statement "puVar5 = puVar6;" (assignment_expression "puVar5 = puVar6" identifier = identifier) ;) }) while (parenthesized_expression "((sct_sc & 0x3ff) != *puVar6)" ( (binary_expression "(sct_sc & 0x3ff) != *puVar6" (parenthesized_expression "(sct_sc & 0x3ff)" ( (binary_expression "sct_sc & 0x3ff" identifier & number_literal) )) != (pointer_expression "*puVar6" * identifier)) )) ;) })) (if_statement "if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar7 = 0;\n    }\n    else {\n      iVar7 = 0;\n      puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      } while (bVar4);\n      if (999 < iVar7) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }\n    }" if (parenthesized_expression "(PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1)" ( (binary_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1" (subscript_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60[1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      iVar7 = 0;\n    }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      iVar7 = 0;\n      puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      } while (bVar4);\n      if (999 < iVar7) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }\n    }" else (compound_statement "{\n      iVar7 = 0;\n      puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      } while (bVar4);\n      if (999 < iVar7) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }\n    }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (expression_statement "puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60;" (assignment_expression "puVar8 = PTR_sg_lib_scsi_status_sense_arr_00138f60" identifier = identifier) ;) (do_statement "do {\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      } while (bVar4);" do (compound_statement "{\n        iVar7 = iVar7 + 1;\n        bVar4 = puVar8[5] != -1 && iVar7 < 1000;\n        puVar8 = puVar8 + 4;\n      }" { (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (expression_statement "bVar4 = puVar8[5] != -1 && iVar7 < 1000;" (assignment_expression "bVar4 = puVar8[5] != -1 && iVar7 < 1000" identifier = (binary_expression "puVar8[5] != -1 && iVar7 < 1000" (binary_expression "puVar8[5] != -1" (subscript_expression "puVar8[5]" identifier [ number_literal ]) != number_literal) && (binary_expression "iVar7 < 1000" identifier < number_literal))) ;) (expression_statement "puVar8 = puVar8 + 4;" (assignment_expression "puVar8 = puVar8 + 4" identifier = (binary_expression "puVar8 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar4)" ( identifier )) ;) (if_statement "if (999 < iVar7) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }" if (parenthesized_expression "(999 < iVar7)" ( (binary_expression "999 < iVar7" number_literal < identifier) )) (compound_statement "{\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar4;\n      }" { (expression_statement "pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");" (call_expression "pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi")" identifier (argument_list "("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi")" ( (string_literal ""%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n"" " string_content escape_sequence ") , (string_literal ""sg_nvme_status2scsi"" " string_content ") ))) ;) (return_statement "return bVar4;" return identifier ;) })) }))) (expression_statement "_Var3 = false;" (assignment_expression "_Var3 = false" identifier = false) ;) (if_statement "if (*(int *)(puVar6 + 2) < iVar7) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4;\n      if (status_p != (uint8_t *)0x0) {\n        *status_p = *puVar1;\n      }\n      if (sk_p != (uint8_t *)0x0) {\n        *sk_p = puVar1[1];\n      }\n      if (asc_p != (uint8_t *)0x0) {\n        *asc_p = puVar1[2];\n      }\n      _Var3 = true;\n      if (ascq_p != (uint8_t *)0x0) {\n        *ascq_p = puVar1[3];\n      }\n    }" if (parenthesized_expression "(*(int *)(puVar6 + 2) < iVar7)" ( (binary_expression "*(int *)(puVar6 + 2) < iVar7" (pointer_expression "*(int *)(puVar6 + 2)" * (cast_expression "(int *)(puVar6 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar6 + 2)" ( (binary_expression "puVar6 + 2" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4;\n      if (status_p != (uint8_t *)0x0) {\n        *status_p = *puVar1;\n      }\n      if (sk_p != (uint8_t *)0x0) {\n        *sk_p = puVar1[1];\n      }\n      if (asc_p != (uint8_t *)0x0) {\n        *asc_p = puVar1[2];\n      }\n      _Var3 = true;\n      if (ascq_p != (uint8_t *)0x0) {\n        *ascq_p = puVar1[3];\n      }\n    }" { (expression_statement "puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4;" (assignment_expression "puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4" identifier = (binary_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar6 + 2) * 4" identifier + (binary_expression "(long)*(int *)(puVar6 + 2) * 4" (cast_expression "(long)*(int *)(puVar6 + 2)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*(int *)(puVar6 + 2)" * (cast_expression "(int *)(puVar6 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar6 + 2)" ( (binary_expression "puVar6 + 2" identifier + number_literal) ))))) * number_literal))) ;) (if_statement "if (status_p != (uint8_t *)0x0) {\n        *status_p = *puVar1;\n      }" if (parenthesized_expression "(status_p != (uint8_t *)0x0)" ( (binary_expression "status_p != (uint8_t *)0x0" identifier != (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *status_p = *puVar1;\n      }" { (expression_statement "*status_p = *puVar1;" (assignment_expression "*status_p = *puVar1" (pointer_expression "*status_p" * identifier) = (pointer_expression "*puVar1" * identifier)) ;) })) (if_statement "if (sk_p != (uint8_t *)0x0) {\n        *sk_p = puVar1[1];\n      }" if (parenthesized_expression "(sk_p != (uint8_t *)0x0)" ( (binary_expression "sk_p != (uint8_t *)0x0" identifier != (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *sk_p = puVar1[1];\n      }" { (expression_statement "*sk_p = puVar1[1];" (assignment_expression "*sk_p = puVar1[1]" (pointer_expression "*sk_p" * identifier) = (subscript_expression "puVar1[1]" identifier [ number_literal ])) ;) })) (if_statement "if (asc_p != (uint8_t *)0x0) {\n        *asc_p = puVar1[2];\n      }" if (parenthesized_expression "(asc_p != (uint8_t *)0x0)" ( (binary_expression "asc_p != (uint8_t *)0x0" identifier != (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *asc_p = puVar1[2];\n      }" { (expression_statement "*asc_p = puVar1[2];" (assignment_expression "*asc_p = puVar1[2]" (pointer_expression "*asc_p" * identifier) = (subscript_expression "puVar1[2]" identifier [ number_literal ])) ;) })) (expression_statement "_Var3 = true;" (assignment_expression "_Var3 = true" identifier = true) ;) (if_statement "if (ascq_p != (uint8_t *)0x0) {\n        *ascq_p = puVar1[3];\n      }" if (parenthesized_expression "(ascq_p != (uint8_t *)0x0)" ( (binary_expression "ascq_p != (uint8_t *)0x0" identifier != (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *ascq_p = puVar1[3];\n      }" { (expression_statement "*ascq_p = puVar1[3];" (assignment_expression "*ascq_p = puVar1[3]" (pointer_expression "*ascq_p" * identifier) = (subscript_expression "puVar1[3]" identifier [ number_literal ])) ;) })) })) }))) (return_statement "return _Var3;" return identifier ;) })))
(translation_unit "bool sg_nvme_status2scsi(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)\n\n{\n  undefined1 *puVar1;\n  long lVar2;\n  bool bVar3;\n  ushort *puVar4;\n  ushort *puVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }\n  return bVar3;\n}\n\n" (function_definition "bool sg_nvme_status2scsi(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)\n\n{\n  undefined1 *puVar1;\n  long lVar2;\n  bool bVar3;\n  ushort *puVar4;\n  ushort *puVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }\n  return bVar3;\n}" primitive_type (function_declarator "sg_nvme_status2scsi(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)" identifier (parameter_list "(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)" ( (parameter_declaration "ushort param_1" type_identifier identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined1 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined1 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined1 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  undefined1 *puVar1;\n  long lVar2;\n  bool bVar3;\n  ushort *puVar4;\n  ushort *puVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }\n  return bVar3;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "ushort *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "ushort *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (if_statement "if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }" if (parenthesized_expression "(*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0)" ( (binary_expression "*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0" (pointer_expression "*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" * (cast_expression "(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" ( (binary_expression "PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    bVar3 = false;\n  }" { (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) }) (else_clause "else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }" else (compound_statement "{\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }" { (expression_statement "puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;" (assignment_expression "puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" identifier = (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }" if (parenthesized_expression "((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0)" ( (binary_expression "(param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" (parenthesized_expression "(param_1 & 0x3ff)" ( (binary_expression "param_1 & 0x3ff" identifier & number_literal) )) != (pointer_expression "*(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" * (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;" (assignment_expression "puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" identifier = (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);" do (compound_statement "{\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      }" { (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "puVar5 = puVar4 + 8;" (assignment_expression "puVar5 = puVar4 + 8" identifier = (binary_expression "puVar4 + 8" identifier + number_literal)) ;) (expression_statement "lVar2 = *(long *)(puVar4 + 0xc);" (assignment_expression "lVar2 = *(long *)(puVar4 + 0xc)" identifier = (pointer_expression "*(long *)(puVar4 + 0xc)" * (cast_expression "(long *)(puVar4 + 0xc)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 0xc)" ( (binary_expression "puVar4 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "bVar3 = iVar6 < 1000 && lVar2 != 0;" (assignment_expression "bVar3 = iVar6 < 1000 && lVar2 != 0" identifier = (binary_expression "iVar6 < 1000 && lVar2 != 0" (binary_expression "iVar6 < 1000" identifier < number_literal) && (binary_expression "lVar2 != 0" identifier != number_literal))) ;) (if_statement "if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }" if (parenthesized_expression "(999 < iVar6 || lVar2 == 0)" ( (binary_expression "999 < iVar6 || lVar2 == 0" (binary_expression "999 < iVar6" number_literal < identifier) || (binary_expression "lVar2 == 0" identifier == number_literal)) )) (compound_statement "{\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }" { (if_statement "if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }" if (parenthesized_expression "(999 < iVar6)" ( (binary_expression "999 < iVar6" number_literal < identifier) )) (compound_statement "{\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }" { (expression_statement "pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;" (call_expression "pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")" identifier (argument_list "("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")" ( (string_literal ""%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n"" " string_content escape_sequence ") , (string_literal ""sg_nvme_status2scsi"" " string_content ") ))) ;) (return_statement "return bVar3;" return identifier ;) })) (if_statement "if (lVar2 == 0) {\n            return bVar3;\n          }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n            return bVar3;\n          }" { (return_statement "return bVar3;" return identifier ;) })) (break_statement "break;" break ;) })) (expression_statement "puVar4 = puVar5;" (assignment_expression "puVar4 = puVar5" identifier = identifier) ;) }) while (parenthesized_expression "((param_1 & 0x3ff) != *puVar5)" ( (binary_expression "(param_1 & 0x3ff) != *puVar5" (parenthesized_expression "(param_1 & 0x3ff)" ( (binary_expression "param_1 & 0x3ff" identifier & number_literal) )) != (pointer_expression "*puVar5" * identifier)) )) ;) })) (if_statement "if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }" if (parenthesized_expression "(PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1)" ( (binary_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1" (subscript_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60[1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      iVar6 = 0;\n    }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }" else (compound_statement "{\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;" (assignment_expression "puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60" identifier = identifier) ;) (do_statement "do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);" do (compound_statement "{\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      }" { (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "bVar3 = puVar7[5] != -1 && iVar6 < 1000;" (assignment_expression "bVar3 = puVar7[5] != -1 && iVar6 < 1000" identifier = (binary_expression "puVar7[5] != -1 && iVar6 < 1000" (binary_expression "puVar7[5] != -1" (subscript_expression "puVar7[5]" identifier [ number_literal ]) != number_literal) && (binary_expression "iVar6 < 1000" identifier < number_literal))) ;) (expression_statement "puVar7 = puVar7 + 4;" (assignment_expression "puVar7 = puVar7 + 4" identifier = (binary_expression "puVar7 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar3)" ( identifier )) ;) (if_statement "if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }" if (parenthesized_expression "(999 < iVar6)" ( (binary_expression "999 < iVar6" number_literal < identifier) )) (compound_statement "{\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }" { (expression_statement "pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");" (call_expression "pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi")" identifier (argument_list "("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi")" ( (string_literal ""%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n"" " string_content escape_sequence ") , (string_literal ""sg_nvme_status2scsi"" " string_content ") ))) ;) (return_statement "return bVar3;" return identifier ;) })) }))) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (if_statement "if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }" if (parenthesized_expression "(*(int *)(puVar5 + 2) < iVar6)" ( (binary_expression "*(int *)(puVar5 + 2) < iVar6" (pointer_expression "*(int *)(puVar5 + 2)" * (cast_expression "(int *)(puVar5 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar5 + 2)" ( (binary_expression "puVar5 + 2" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }" { (expression_statement "puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;" (assignment_expression "puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4" identifier = (binary_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4" identifier + (binary_expression "(long)*(int *)(puVar5 + 2) * 4" (cast_expression "(long)*(int *)(puVar5 + 2)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*(int *)(puVar5 + 2)" * (cast_expression "(int *)(puVar5 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar5 + 2)" ( (binary_expression "puVar5 + 2" identifier + number_literal) ))))) * number_literal))) ;) (if_statement "if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }" if (parenthesized_expression "(param_2 != (undefined1 *)0x0)" ( (binary_expression "param_2 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *param_2 = *puVar1;\n      }" { (expression_statement "*param_2 = *puVar1;" (assignment_expression "*param_2 = *puVar1" (pointer_expression "*param_2" * identifier) = (pointer_expression "*puVar1" * identifier)) ;) })) (if_statement "if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }" if (parenthesized_expression "(param_3 != (undefined1 *)0x0)" ( (binary_expression "param_3 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *param_3 = puVar1[1];\n      }" { (expression_statement "*param_3 = puVar1[1];" (assignment_expression "*param_3 = puVar1[1]" (pointer_expression "*param_3" * identifier) = (subscript_expression "puVar1[1]" identifier [ number_literal ])) ;) })) (if_statement "if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }" if (parenthesized_expression "(param_4 != (undefined1 *)0x0)" ( (binary_expression "param_4 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *param_4 = puVar1[2];\n      }" { (expression_statement "*param_4 = puVar1[2];" (assignment_expression "*param_4 = puVar1[2]" (pointer_expression "*param_4" * identifier) = (subscript_expression "puVar1[2]" identifier [ number_literal ])) ;) })) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) (if_statement "if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }" if (parenthesized_expression "(param_5 != (undefined1 *)0x0)" ( (binary_expression "param_5 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *param_5 = puVar1[3];\n      }" { (expression_statement "*param_5 = puVar1[3];" (assignment_expression "*param_5 = puVar1[3]" (pointer_expression "*param_5" * identifier) = (subscript_expression "puVar1[3]" identifier [ number_literal ])) ;) })) })) }))) (return_statement "return bVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT < LIT) && (binary_expression IDENT != LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression LIT < IDENT) || (binary_expression IDENT == LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , (string_literal " string_content ") ))) ;) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (break_statement break ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != (pointer_expression * IDENT)) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) && (binary_expression IDENT < LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , (string_literal " string_content ") ))) ;) (return_statement return IDENT ;) })) }))) (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) * LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_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 (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) })) (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) })) })) }))) (return_statement return IDENT ;) })))
(function_definition "bool sg_nvme_status2scsi(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)\n\n{\n  undefined1 *puVar1;\n  long lVar2;\n  bool bVar3;\n  ushort *puVar4;\n  ushort *puVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }\n  return bVar3;\n}" (primitive_type "bool") (function_declarator "sg_nvme_status2scsi(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)" (identifier "sg_nvme_status2scsi") (parameter_list "(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,\n                        undefined1 *param_5)" (( "(") (parameter_declaration "ushort param_1" (type_identifier "ushort") (identifier "param_1")) (, ",") (parameter_declaration "undefined1 *param_2" (type_identifier "undefined1") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined1 *param_3" (type_identifier "undefined1") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined1 *param_4" (type_identifier "undefined1") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "undefined1 *param_5" (type_identifier "undefined1") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  undefined1 *puVar1;\n  long lVar2;\n  bool bVar3;\n  ushort *puVar4;\n  ushort *puVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }\n  return bVar3;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "bool bVar3;" (primitive_type "bool") (identifier "bVar3") (; ";")) (declaration "ushort *puVar4;" (type_identifier "ushort") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "ushort *puVar5;" (type_identifier "ushort") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "undefined *puVar7;" (type_identifier "undefined") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (if_statement "if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {\n    bVar3 = false;\n  }\n  else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }" (if "if") (parenthesized_expression "(*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0)" (( "(") (binary_expression "*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0" (pointer_expression "*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" (* "*") (cast_expression "(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8)" (( "(") (binary_expression "PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8" (identifier "PTR_sg_lib_nvme_cmd_status_arr_00138fc0") (+ "+") (number_literal "8")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    bVar3 = false;\n  }" ({ "{") (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" (identifier "bVar3") (= "=") (false "false")) (; ";")) (} "}")) (else_clause "else {\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }" (else "else") (compound_statement "{\n    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }\n    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }\n    bVar3 = false;\n    if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }\n  }" ({ "{") (expression_statement "puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;" (assignment_expression "puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" (identifier "puVar5") (= "=") (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sg_lib_nvme_cmd_status_arr_00138fc0"))) (; ";")) (if_statement "if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }" (if "if") (parenthesized_expression "((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0)" (( "(") (binary_expression "(param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" (parenthesized_expression "(param_1 & 0x3ff)" (( "(") (binary_expression "param_1 & 0x3ff" (identifier "param_1") (& "&") (number_literal "0x3ff")) () ")")) (!= "!=") (pointer_expression "*(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" (* "*") (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sg_lib_nvme_cmd_status_arr_00138fc0")))) () ")")) (compound_statement "{\n      iVar6 = 0;\n      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;\n      do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);\n    }" ({ "{") (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;" (assignment_expression "puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" (identifier "puVar4") (= "=") (cast_expression "(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sg_lib_nvme_cmd_status_arr_00138fc0"))) (; ";")) (do_statement "do {\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      } while ((param_1 & 0x3ff) != *puVar5);" (do "do") (compound_statement "{\n        iVar6 = iVar6 + 1;\n        puVar5 = puVar4 + 8;\n        lVar2 = *(long *)(puVar4 + 0xc);\n        bVar3 = iVar6 < 1000 && lVar2 != 0;\n        if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }\n        puVar4 = puVar5;\n      }" ({ "{") (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar5 = puVar4 + 8;" (assignment_expression "puVar5 = puVar4 + 8" (identifier "puVar5") (= "=") (binary_expression "puVar4 + 8" (identifier "puVar4") (+ "+") (number_literal "8"))) (; ";")) (expression_statement "lVar2 = *(long *)(puVar4 + 0xc);" (assignment_expression "lVar2 = *(long *)(puVar4 + 0xc)" (identifier "lVar2") (= "=") (pointer_expression "*(long *)(puVar4 + 0xc)" (* "*") (cast_expression "(long *)(puVar4 + 0xc)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar4 + 0xc)" (( "(") (binary_expression "puVar4 + 0xc" (identifier "puVar4") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "bVar3 = iVar6 < 1000 && lVar2 != 0;" (assignment_expression "bVar3 = iVar6 < 1000 && lVar2 != 0" (identifier "bVar3") (= "=") (binary_expression "iVar6 < 1000 && lVar2 != 0" (binary_expression "iVar6 < 1000" (identifier "iVar6") (< "<") (number_literal "1000")) (&& "&&") (binary_expression "lVar2 != 0" (identifier "lVar2") (!= "!=") (number_literal "0")))) (; ";")) (if_statement "if (999 < iVar6 || lVar2 == 0) {\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }" (if "if") (parenthesized_expression "(999 < iVar6 || lVar2 == 0)" (( "(") (binary_expression "999 < iVar6 || lVar2 == 0" (binary_expression "999 < iVar6" (number_literal "999") (< "<") (identifier "iVar6")) (|| "||") (binary_expression "lVar2 == 0" (identifier "lVar2") (== "==") (number_literal "0"))) () ")")) (compound_statement "{\n          if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }\n          if (lVar2 == 0) {\n            return bVar3;\n          }\n          break;\n        }" ({ "{") (if_statement "if (999 < iVar6) {\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }" (if "if") (parenthesized_expression "(999 < iVar6)" (( "(") (binary_expression "999 < iVar6" (number_literal "999") (< "<") (identifier "iVar6")) () ")")) (compound_statement "{\n            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;\n            return bVar3;\n          }" ({ "{") (expression_statement "pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")\n            ;" (call_expression "pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")" (identifier "pr2ws") (argument_list "("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")" (( "(") (string_literal ""%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n"" (" """) (string_content "%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??") (escape_sequence "\n") (" """)) (, ",") (string_literal ""sg_nvme_status2scsi"" (" """) (string_content "sg_nvme_status2scsi") (" """)) () ")"))) (; ";")) (return_statement "return bVar3;" (return "return") (identifier "bVar3") (; ";")) (} "}"))) (if_statement "if (lVar2 == 0) {\n            return bVar3;\n          }" (if "if") (parenthesized_expression "(lVar2 == 0)" (( "(") (binary_expression "lVar2 == 0" (identifier "lVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            return bVar3;\n          }" ({ "{") (return_statement "return bVar3;" (return "return") (identifier "bVar3") (; ";")) (} "}"))) (break_statement "break;" (break "break") (; ";")) (} "}"))) (expression_statement "puVar4 = puVar5;" (assignment_expression "puVar4 = puVar5" (identifier "puVar4") (= "=") (identifier "puVar5")) (; ";")) (} "}")) (while "while") (parenthesized_expression "((param_1 & 0x3ff) != *puVar5)" (( "(") (binary_expression "(param_1 & 0x3ff) != *puVar5" (parenthesized_expression "(param_1 & 0x3ff)" (( "(") (binary_expression "param_1 & 0x3ff" (identifier "param_1") (& "&") (number_literal "0x3ff")) () ")")) (!= "!=") (pointer_expression "*puVar5" (* "*") (identifier "puVar5"))) () ")")) (; ";")) (} "}"))) (if_statement "if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {\n      iVar6 = 0;\n    }\n    else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }" (if "if") (parenthesized_expression "(PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1)" (( "(") (binary_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1" (subscript_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60[1]" (identifier "PTR_sg_lib_scsi_status_sense_arr_00138f60") ([ "[") (number_literal "1") (] "]")) (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      iVar6 = 0;\n    }" ({ "{") (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }" (else "else") (compound_statement "{\n      iVar6 = 0;\n      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;\n      do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);\n      if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }\n    }" ({ "{") (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;" (assignment_expression "puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60" (identifier "puVar7") (= "=") (identifier "PTR_sg_lib_scsi_status_sense_arr_00138f60")) (; ";")) (do_statement "do {\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      } while (bVar3);" (do "do") (compound_statement "{\n        iVar6 = iVar6 + 1;\n        bVar3 = puVar7[5] != -1 && iVar6 < 1000;\n        puVar7 = puVar7 + 4;\n      }" ({ "{") (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "bVar3 = puVar7[5] != -1 && iVar6 < 1000;" (assignment_expression "bVar3 = puVar7[5] != -1 && iVar6 < 1000" (identifier "bVar3") (= "=") (binary_expression "puVar7[5] != -1 && iVar6 < 1000" (binary_expression "puVar7[5] != -1" (subscript_expression "puVar7[5]" (identifier "puVar7") ([ "[") (number_literal "5") (] "]")) (!= "!=") (number_literal "-1")) (&& "&&") (binary_expression "iVar6 < 1000" (identifier "iVar6") (< "<") (number_literal "1000")))) (; ";")) (expression_statement "puVar7 = puVar7 + 4;" (assignment_expression "puVar7 = puVar7 + 4" (identifier "puVar7") (= "=") (binary_expression "puVar7 + 4" (identifier "puVar7") (+ "+") (number_literal "4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar3)" (( "(") (identifier "bVar3") () ")")) (; ";")) (if_statement "if (999 < iVar6) {\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }" (if "if") (parenthesized_expression "(999 < iVar6)" (( "(") (binary_expression "999 < iVar6" (number_literal "999") (< "<") (identifier "iVar6")) () ")")) (compound_statement "{\n        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");\n        return bVar3;\n      }" ({ "{") (expression_statement "pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");" (call_expression "pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi")" (identifier "pr2ws") (argument_list "("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi")" (( "(") (string_literal ""%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n"" (" """) (string_content "%s: where is sentinel for sg_lib_scsi_status_sense_arr ??") (escape_sequence "\n") (" """)) (, ",") (string_literal ""sg_nvme_status2scsi"" (" """) (string_content "sg_nvme_status2scsi") (" """)) () ")"))) (; ";")) (return_statement "return bVar3;" (return "return") (identifier "bVar3") (; ";")) (} "}"))) (} "}")))) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" (identifier "bVar3") (= "=") (false "false")) (; ";")) (if_statement "if (*(int *)(puVar5 + 2) < iVar6) {\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }" (if "if") (parenthesized_expression "(*(int *)(puVar5 + 2) < iVar6)" (( "(") (binary_expression "*(int *)(puVar5 + 2) < iVar6" (pointer_expression "*(int *)(puVar5 + 2)" (* "*") (cast_expression "(int *)(puVar5 + 2)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar5 + 2)" (( "(") (binary_expression "puVar5 + 2" (identifier "puVar5") (+ "+") (number_literal "2")) () ")")))) (< "<") (identifier "iVar6")) () ")")) (compound_statement "{\n      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;\n      if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }\n      if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }\n      if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }\n      bVar3 = true;\n      if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }\n    }" ({ "{") (expression_statement "puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;" (assignment_expression "puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4" (identifier "puVar1") (= "=") (binary_expression "PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4" (identifier "PTR_sg_lib_scsi_status_sense_arr_00138f60") (+ "+") (binary_expression "(long)*(int *)(puVar5 + 2) * 4" (cast_expression "(long)*(int *)(puVar5 + 2)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (pointer_expression "*(int *)(puVar5 + 2)" (* "*") (cast_expression "(int *)(puVar5 + 2)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar5 + 2)" (( "(") (binary_expression "puVar5 + 2" (identifier "puVar5") (+ "+") (number_literal "2")) () ")"))))) (* "*") (number_literal "4")))) (; ";")) (if_statement "if (param_2 != (undefined1 *)0x0) {\n        *param_2 = *puVar1;\n      }" (if "if") (parenthesized_expression "(param_2 != (undefined1 *)0x0)" (( "(") (binary_expression "param_2 != (undefined1 *)0x0" (identifier "param_2") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        *param_2 = *puVar1;\n      }" ({ "{") (expression_statement "*param_2 = *puVar1;" (assignment_expression "*param_2 = *puVar1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) (; ";")) (} "}"))) (if_statement "if (param_3 != (undefined1 *)0x0) {\n        *param_3 = puVar1[1];\n      }" (if "if") (parenthesized_expression "(param_3 != (undefined1 *)0x0)" (( "(") (binary_expression "param_3 != (undefined1 *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        *param_3 = puVar1[1];\n      }" ({ "{") (expression_statement "*param_3 = puVar1[1];" (assignment_expression "*param_3 = puVar1[1]" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (} "}"))) (if_statement "if (param_4 != (undefined1 *)0x0) {\n        *param_4 = puVar1[2];\n      }" (if "if") (parenthesized_expression "(param_4 != (undefined1 *)0x0)" (( "(") (binary_expression "param_4 != (undefined1 *)0x0" (identifier "param_4") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        *param_4 = puVar1[2];\n      }" ({ "{") (expression_statement "*param_4 = puVar1[2];" (assignment_expression "*param_4 = puVar1[2]" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}"))) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" (identifier "bVar3") (= "=") (true "true")) (; ";")) (if_statement "if (param_5 != (undefined1 *)0x0) {\n        *param_5 = puVar1[3];\n      }" (if "if") (parenthesized_expression "(param_5 != (undefined1 *)0x0)" (( "(") (binary_expression "param_5 != (undefined1 *)0x0" (identifier "param_5") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        *param_5 = puVar1[3];\n      }" ({ "{") (expression_statement "*param_5 = puVar1[3];" (assignment_expression "*param_5 = puVar1[3]" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]"))) (; ";")) (} "}"))) (} "}"))) (} "}")))) (return_statement "return bVar3;" (return "return") (identifier "bVar3") (; ";")) (} "}")))

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

type_1 function_1(uint16_t var_2,uint8_t *var_10,uint8_t *var_11,uint8_t *var_12,
                         uint8_t *var_13)

{
  uint8_t *puVar1;
  long var_5;
  type_1 _Var3;
  bool bVar4;
  type_2 *var_4;
  type_2 *var_8;
  int var_3;
  type_3 *var_7;
  
  if (*(long *)(var_1 + 8) == 0) {
    _Var3 = false;
  }
  else {
    var_8 = (type_2 *)var_1;
    if ((var_2 & 0x3ff) != *(type_2 *)var_1) {
      var_3 = 0;
      var_4 = (type_2 *)var_1;
      do {
        var_3 = var_3 + 1;
        var_8 = var_4 + 8;
        var_5 = *(long *)(var_4 + 0xc);
        bVar4 = var_3 < 1000 && var_5 != 0;
        if (999 < var_3 || var_5 == 0) {
          if (999 < var_3) {
            var_6("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","sg_nvme_status2scsi")
            ;
            return bVar4;
          }
          if (var_5 == 0) {
            return bVar4;
          }
          break;
        }
        var_4 = var_8;
      } while ((var_2 & 0x3ff) != *var_8);
    }
    if (var_9[1] == -1) {
      var_3 = 0;
    }
    else {
      var_3 = 0;
      var_7 = var_9;
      do {
        var_3 = var_3 + 1;
        bVar4 = var_7[5] != -1 && var_3 < 1000;
        var_7 = var_7 + 4;
      } while (bVar4);
      if (999 < var_3) {
        var_6("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","sg_nvme_status2scsi");
        return bVar4;
      }
    }
    _Var3 = false;
    if (*(int *)(var_8 + 2) < var_3) {
      puVar1 = var_9 + (long)*(int *)(var_8 + 2) * 4;
      if (var_10 != (uint8_t *)0x0) {
        *var_10 = *puVar1;
      }
      if (var_11 != (uint8_t *)0x0) {
        *var_11 = puVar1[1];
      }
      if (var_12 != (uint8_t *)0x0) {
        *var_12 = puVar1[2];
      }
      _Var3 = true;
      if (var_13 != (uint8_t *)0x0) {
        *var_13 = puVar1[3];
      }
    }
  }
  return _Var3;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (false)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (number_literal) right: (identifier)) 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 (string_literal (string_content) (escape_sequence)) (string_literal (string_content))))) (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))) (break_statement))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (pointer_expression argument: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (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 (string_literal (string_content) (escape_sequence)) (string_literal (string_content))))) (return_statement (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (false))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (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)))))) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (true))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal))))))))))) (return_statement (identifier)))))

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

bool MASKED(ushort param_1,undefined1 *param_2,undefined1 *param_3,undefined1 *param_4,
                        undefined1 *param_5)

{
  undefined1 *puVar1;
  long lVar2;
  bool bVar3;
  ushort *puVar4;
  ushort *puVar5;
  int iVar6;
  undefined *puVar7;
  
  if (*(long *)(PTR_sg_lib_nvme_cmd_status_arr_00138fc0 + 8) == 0) {
    bVar3 = false;
  }
  else {
    puVar5 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;
    if ((param_1 & 0x3ff) != *(ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0) {
      iVar6 = 0;
      puVar4 = (ushort *)PTR_sg_lib_nvme_cmd_status_arr_00138fc0;
      do {
        iVar6 = iVar6 + 1;
        puVar5 = puVar4 + 8;
        lVar2 = *(long *)(puVar4 + 0xc);
        bVar3 = iVar6 < 1000 && lVar2 != 0;
        if (999 < iVar6 || lVar2 == 0) {
          if (999 < iVar6) {
            pr2ws("%s: where is sentinel for sg_lib_nvme_cmd_status_arr ??\n","MASKED")
            ;
            return bVar3;
          }
          if (lVar2 == 0) {
            return bVar3;
          }
          break;
        }
        puVar4 = puVar5;
      } while ((param_1 & 0x3ff) != *puVar5);
    }
    if (PTR_sg_lib_scsi_status_sense_arr_00138f60[1] == -1) {
      iVar6 = 0;
    }
    else {
      iVar6 = 0;
      puVar7 = PTR_sg_lib_scsi_status_sense_arr_00138f60;
      do {
        iVar6 = iVar6 + 1;
        bVar3 = puVar7[5] != -1 && iVar6 < 1000;
        puVar7 = puVar7 + 4;
      } while (bVar3);
      if (999 < iVar6) {
        pr2ws("%s: where is sentinel for sg_lib_scsi_status_sense_arr ??\n","MASKED");
        return bVar3;
      }
    }
    bVar3 = false;
    if (*(int *)(puVar5 + 2) < iVar6) {
      puVar1 = PTR_sg_lib_scsi_status_sense_arr_00138f60 + (long)*(int *)(puVar5 + 2) * 4;
      if (param_2 != (undefined1 *)0x0) {
        *param_2 = *puVar1;
      }
      if (param_3 != (undefined1 *)0x0) {
        *param_3 = puVar1[1];
      }
      if (param_4 != (undefined1 *)0x0) {
        *param_4 = puVar1[2];
      }
      bVar3 = true;
      if (param_5 != (undefined1 *)0x0) {
        *param_5 = puVar1[3];
      }
    }
  }
  return bVar3;
}

