
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

char * sg_decode_transportid_str(char *lip,uint8_t *bp,int bplen,_Bool only_one,int blen,char *b)

{
  byte bVar1;
  char *leadin;
  int iVar2;
  uint uVar3;
  uint cp_max_len;
  uint8_t *b_str;
  char *pcVar4;
  uint uVar5;
  int iVar6;
  char *pcVar7;
  int iVar8;
  uint uVar9;
  char *pcVar10;
  uint uVar11;
  
  if ((b != (char *)0x0) && (0 < blen)) {
    if (blen == 1) {
      *b = '\0';
    }
    else {
      leadin = "";
      if (lip != (char *)0x0) {
        leadin = lip;
      }
      if (0 < bplen) {
        iVar6 = 0;
        do {
          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {
            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,
                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)
            ;
          }
          else {
            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);
          }
          iVar6 = iVar6 + iVar2;
          bVar1 = *bp >> 6;
          uVar9 = 0x18;
          if (bplen < 0x19) {
            uVar9 = bplen;
          }
          uVar5 = *bp & 0xf;
          uVar3 = (uint)bVar1;
          cp_max_len = blen - iVar6;
          pcVar7 = b + iVar6;
          switch(uVar5) {
          case 0:
            pcVar10 = "%s  FCP-2 World Wide Name:\n";
            goto LAB_0001a412;
          case 1:
            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",
                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |
                                                  *(ushort *)(bp + 2) >> 8));
            iVar6 = iVar6 + iVar2;
            iVar2 = blen - iVar6;
            pcVar7 = b + iVar6;
            if (bVar1 != 0) {
              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);
              iVar6 = iVar6 + iVar2;
              iVar2 = blen - iVar6;
              pcVar7 = b + iVar6;
            }
            iVar8 = 0x18;
            iVar2 = sg_scnpr(pcVar7,iVar2,
                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,
                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));
            iVar6 = iVar6 + iVar2;
            goto LAB_0001a168;
          case 2:
            pcVar10 = "%s  SSA (transport id not defined):\n";
            break;
          case 3:
            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";
LAB_0001a412:
            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);
            iVar6 = iVar6 + iVar2;
            pcVar7 = b + iVar6;
            iVar2 = blen - iVar6;
            if (bVar1 != 0) {
              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);
              iVar6 = iVar6 + iVar2;
              pcVar7 = b + iVar6;
              iVar2 = blen - iVar6;
            }
            uVar9 = 8;
            b_str = bp + 8;
            goto LAB_0001a1eb;
          case 4:
            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);
            iVar6 = iVar6 + iVar2;
            pcVar7 = b + iVar6;
            iVar2 = blen - iVar6;
            if (bVar1 != 0) {
              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);
              iVar6 = iVar6 + iVar2;
              pcVar7 = b + iVar6;
              iVar2 = blen - iVar6;
            }
            uVar9 = 0x10;
            b_str = bp + 8;
            goto LAB_0001a1eb;
          case 5:
            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);
            iVar6 = iVar6 + iVar2;
            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);
            if (bVar1 == 0) {
              pcVar7 = "name: %.*s\n";
LAB_0001a582:
              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);
              iVar6 = iVar6 + iVar2;
            }
            else {
              if (bVar1 == 1) {
                pcVar7 = "world wide unique port id: %.*s\n";
                goto LAB_0001a582;
              }
              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);
              iVar6 = iVar6 + iVar2;
              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);
              iVar6 = iVar6 + iVar2;
            }
            if (uVar9 < 0x14) {
              uVar9 = 0x14;
            }
            iVar8 = uVar9 + 4;
            goto LAB_0001a168;
          case 6:
            uVar9 = *(uint *)(bp + 8);
            uVar5 = *(uint *)(bp + 4);
            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;
            iVar8 = 0x18;
            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,
                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |
                             uVar9 << 0x18,uVar5);
            iVar6 = iVar6 + iVar2;
            if (bVar1 != 0) {
              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,
                               uVar3,uVar5);
              iVar6 = iVar6 + iVar2;
            }
            goto LAB_0001a168;
          case 7:
            pcVar10 = "%s  ADT:\n";
            break;
          case 8:
            pcVar10 = "%s  ATAPI:\n";
            break;
          case 9:
            pcVar10 = "%s  UAS:\n";
            break;
          case 10:
            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);
            iVar6 = iVar6 + iVar2;
            cp_max_len = blen - iVar6;
            pcVar7 = b + iVar6;
            if (bVar1 == 0) {
              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);
              pcVar10 = "Routing ID: 0x%x\n";
              goto LAB_0001a150;
            }
            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);
            iVar6 = iVar6 + iVar2;
            goto LAB_0001a1cf;
          case 0xb:
            pcVar10 = "%s  PCIE:\n";
            break;
          default:
            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";
            uVar11 = uVar3;
            goto LAB_0001a1c5;
          case 0xf:
            pcVar10 = "%s  No specified protocol\n";
            pcVar4 = leadin;
LAB_0001a150:
            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);
            iVar8 = 0x18;
            iVar6 = iVar6 + iVar2;
            goto LAB_0001a168;
          }
          uVar11 = cp_max_len;
          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);
          iVar6 = iVar6 + iVar2;
          pcVar10 = "%s  TPID format: %d\n";
          cp_max_len = blen - iVar6;
          pcVar7 = b + iVar6;
          uVar5 = uVar3;
LAB_0001a1c5:
          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);
          iVar6 = iVar6 + iVar2;
LAB_0001a1cf:
          pcVar7 = b + iVar6;
          iVar2 = blen - iVar6;
          b_str = bp;
LAB_0001a1eb:
          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);
          iVar8 = 0x18;
          iVar6 = iVar6 + iVar2;
LAB_0001a168:
          bplen = bplen - iVar8;
          bp = bp + iVar8;
          if (bplen < 1) {
            return b;
          }
          if (only_one) {
            return b;
          }
        } while( true );
      }
    }
  }
  return b;
}



undefined1 * __regparm2
sg_decode_transportid_str
          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,
          int param_6,undefined1 *param_7)

{
  int iVar1;
  undefined1 *puVar2;
  int unaff_EBX;
  int unaff_retaddr;
  
  entry(param_2,0x1a019);
  if ((param_7 != (undefined1 *)0x0) && (0 < param_6)) {
    if (param_6 == 1) {
      *param_7 = 0;
    }
    else {
      iVar1 = unaff_EBX + 0x169bc;
      if (unaff_retaddr != 0) {
        iVar1 = unaff_retaddr;
      }
      if (0 < (int)param_4) {
        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {
          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);
        }
        else {
          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);
        }
                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */
                    /* WARNING: Treating indirect jump as call */
        puVar2 = (undefined1 *)
                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +
                           unaff_EBX + 0x2ed6f))();
        return puVar2;
      }
    }
  }
  return param_7;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00017820
ADD EBX,0x2ed6f
SUB ESP,0x2c
MOVZX EAX,byte ptr [ESP + 0x4c]
MOV EBP,dword ptr [ESP + 0x54]
MOV EDI,dword ptr [ESP + 0x48]
MOV byte ptr [ESP + 0x17],AL
TEST EBP,EBP
JZ 0x0001a117
MOV ESI,dword ptr [ESP + 0x50]
TEST ESI,ESI
JLE 0x0001a117
CMP dword ptr [ESP + 0x50],0x1
JZ 0x0001a110
MOV ECX,dword ptr [ESP + 0x40]
LEA EAX,[EBX + 0xfffe7c4d]
MOV EBP,EDI
TEST ECX,ECX
CMOVNZ EAX,dword ptr [ESP + 0x40]
XOR ESI,ESI
MOV dword ptr [ESP + 0x40],EAX
LEA EAX,[EBX + 0xfffe81f4]
MOV dword ptr [ESP + 0x18],EAX
LEA EAX,[EBX + 0xfffe74ee]
MOV dword ptr [ESP + 0x1c],EAX
TEST EDI,EDI
JLE 0x0001a117
LEA ESI,[ESI]
NOP
MOV EDX,dword ptr [ESP + 0x50]
MOV EAX,dword ptr [ESP + 0x54]
SUB EDX,ESI
ADD EAX,ESI
CMP EBP,0x17
JLE 0x0001a0a9
TEST EBP,0x3
JZ 0x0001a128
SUB ESP,0xc
PUSH dword ptr [ESP + 0x5c]
PUSH dword ptr [ESP + 0x50]
PUSH dword ptr [ESP + 0x2c]
PUSH EDX
PUSH EAX
CALL 0x000175e0
ADD ESP,0x20
ADD ESI,EAX
MOV EAX,dword ptr [ESP + 0x44]
MOV EDI,0x18
MOVZX EDX,byte ptr [EAX]
MOV EAX,EDX
SHR AL,0x6
CMP EBP,0x18
CMOVLE EDI,EBP
MOV byte ptr [ESP + 0x16],AL
AND EDX,0xf
MOVZX EAX,AL
MOV dword ptr [ESP + 0xc],EAX
MOV ECX,dword ptr [EBX + EDX*0x4 + 0xfffe9320]
MOV EAX,dword ptr [ESP + 0x50]
MOV dword ptr [ESP + 0x10],EDI
MOV EDI,dword ptr [ESP + 0x54]
ADD ECX,EBX
SUB EAX,ESI
MOV dword ptr [ESP + 0x8],EAX
ADD EDI,ESI
JMP ECX
MOV EAX,dword ptr [ESP + 0x54]
MOV byte ptr [EAX],0x0
MOV EAX,dword ptr [ESP + 0x54]
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
PUSH dword ptr [ESP + 0x40]
PUSH dword ptr [ESP + 0x20]
PUSH EDX
PUSH EAX
CALL 0x000175e0
ADD ESP,0x10
ADD ESI,EAX
JMP 0x0001a0c4
(translation_unit "undefined1 * __regparm2\nsg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)\n\n{\n  int iVar1;\n  undefined1 *puVar2;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x1a019);\n  if ((param_7 != (undefined1 *)0x0) && (0 < param_6)) {\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }\n  return param_7;\n}\n\n" (ERROR "undefined1 * __regparm2\nsg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" (binary_expression "undefined1 * __regparm2\nsg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" identifier * (ERROR "__regparm2" identifier) (call_expression "sg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" identifier (argument_list "(undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" ( identifier (ERROR "param_1" identifier) , identifier (ERROR "param_2" identifier) , (binary_expression "byte *param_3" identifier * identifier) , (ERROR "uint" identifier) identifier , identifier (ERROR "param_5" identifier) , (ERROR "int" identifier) identifier , (binary_expression "undefined1 *param_7" identifier * identifier) ))))) (compound_statement "{\n  int iVar1;\n  undefined1 *puVar2;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x1a019);\n  if ((param_7 != (undefined1 *)0x0) && (0 < param_6)) {\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }\n  return param_7;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (expression_statement "entry(param_2,0x1a019);" (call_expression "entry(param_2,0x1a019)" identifier (argument_list "(param_2,0x1a019)" ( identifier , number_literal ))) ;) (if_statement "if ((param_7 != (undefined1 *)0x0) && (0 < param_6)) {\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }" if (parenthesized_expression "((param_7 != (undefined1 *)0x0) && (0 < param_6))" ( (binary_expression "(param_7 != (undefined1 *)0x0) && (0 < param_6)" (parenthesized_expression "(param_7 != (undefined1 *)0x0)" ( (binary_expression "param_7 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(0 < param_6)" ( (binary_expression "0 < param_6" number_literal < identifier) ))) )) (compound_statement "{\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }" { (if_statement "if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }" if (parenthesized_expression "(param_6 == 1)" ( (binary_expression "param_6 == 1" identifier == number_literal) )) (compound_statement "{\n      *param_7 = 0;\n    }" { (expression_statement "*param_7 = 0;" (assignment_expression "*param_7 = 0" (pointer_expression "*param_7" * identifier) = number_literal) ;) }) (else_clause "else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }" else (compound_statement "{\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }" { (expression_statement "iVar1 = unaff_EBX + 0x169bc;" (assignment_expression "iVar1 = unaff_EBX + 0x169bc" identifier = (binary_expression "unaff_EBX + 0x169bc" identifier + number_literal)) ;) (if_statement "if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }" if (parenthesized_expression "(unaff_retaddr != 0)" ( (binary_expression "unaff_retaddr != 0" identifier != number_literal) )) (compound_statement "{\n        iVar1 = unaff_retaddr;\n      }" { (expression_statement "iVar1 = unaff_retaddr;" (assignment_expression "iVar1 = unaff_retaddr" identifier = identifier) ;) })) (if_statement "if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }" if (parenthesized_expression "(0 < (int)param_4)" ( (binary_expression "0 < (int)param_4" number_literal < (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }" { (if_statement "if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }" if (parenthesized_expression "(((int)param_4 < 0x18) || ((param_4 & 3) != 0))" ( (binary_expression "((int)param_4 < 0x18) || ((param_4 & 3) != 0)" (parenthesized_expression "((int)param_4 < 0x18)" ( (binary_expression "(int)param_4 < 0x18" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "((param_4 & 3) != 0)" ( (binary_expression "(param_4 & 3) != 0" (parenthesized_expression "(param_4 & 3)" ( (binary_expression "param_4 & 3" identifier & number_literal) )) != number_literal) ))) )) (compound_statement "{\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }" { (expression_statement "sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);" (call_expression "sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6)" identifier (argument_list "(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6)" ( identifier , identifier , (binary_expression "unaff_EBX + 0x16f63" identifier + number_literal) , identifier , identifier ))) ;) }) (else_clause "else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }" else (compound_statement "{\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }" { (expression_statement "sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);" (call_expression "sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1)" identifier (argument_list "(param_7,param_6,unaff_EBX + 0x1625d,iVar1)" ( identifier , identifier , (binary_expression "unaff_EBX + 0x1625d" identifier + number_literal) , identifier ))) ;) }))) comment comment (expression_statement "puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();" (assignment_expression "puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))()" identifier = (cast_expression "(undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))()" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))()" (parenthesized_expression "(*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))" ( (pointer_expression "*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f)" * (cast_expression "(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f)" ( (binary_expression "*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f" (binary_expression "*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX" (pointer_expression "*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4)" * (cast_expression "(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4)" ( (binary_expression "unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4" (binary_expression "unaff_EBX + 0x1808f" identifier + number_literal) + (binary_expression "(*param_3 & 0xf) * 4" (parenthesized_expression "(*param_3 & 0xf)" ( (binary_expression "*param_3 & 0xf" (pointer_expression "*param_3" * identifier) & number_literal) )) * number_literal)) )))) + identifier) + number_literal) )))) )) (argument_list "()" ( ))))) ;) (return_statement "return puVar2;" return identifier ;) })) }))) })) (return_statement "return param_7;" return identifier ;) }))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * sg_decode_transportid_str(char *lip,uint8_t *bp,int bplen,_Bool only_one,int blen,char *b)\n\n{\n  byte bVar1;\n  char *leadin;\n  int iVar2;\n  uint uVar3;\n  uint cp_max_len;\n  uint8_t *b_str;\n  char *pcVar4;\n  uint uVar5;\n  int iVar6;\n  char *pcVar7;\n  int iVar8;\n  uint uVar9;\n  char *pcVar10;\n  uint uVar11;\n  \n  if ((b != (char *)0x0) && (0 < blen)) {\n    if (blen == 1) {\n      *b = '\0';\n    }\n    else {\n      leadin = "";\n      if (lip != (char *)0x0) {\n        leadin = lip;\n      }\n      if (0 < bplen) {\n        iVar6 = 0;\n        do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );\n      }\n    }\n  }\n  return b;\n}\n\n" comment (function_definition "char * sg_decode_transportid_str(char *lip,uint8_t *bp,int bplen,_Bool only_one,int blen,char *b)\n\n{\n  byte bVar1;\n  char *leadin;\n  int iVar2;\n  uint uVar3;\n  uint cp_max_len;\n  uint8_t *b_str;\n  char *pcVar4;\n  uint uVar5;\n  int iVar6;\n  char *pcVar7;\n  int iVar8;\n  uint uVar9;\n  char *pcVar10;\n  uint uVar11;\n  \n  if ((b != (char *)0x0) && (0 < blen)) {\n    if (blen == 1) {\n      *b = '\0';\n    }\n    else {\n      leadin = "";\n      if (lip != (char *)0x0) {\n        leadin = lip;\n      }\n      if (0 < bplen) {\n        iVar6 = 0;\n        do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );\n      }\n    }\n  }\n  return b;\n}" primitive_type (pointer_declarator "* sg_decode_transportid_str(char *lip,uint8_t *bp,int bplen,_Bool only_one,int blen,char *b)" * (function_declarator "sg_decode_transportid_str(char *lip,uint8_t *bp,int bplen,_Bool only_one,int blen,char *b)" identifier (parameter_list "(char *lip,uint8_t *bp,int bplen,_Bool only_one,int blen,char *b)" ( (parameter_declaration "char *lip" primitive_type (pointer_declarator "*lip" * identifier)) , (parameter_declaration "uint8_t *bp" primitive_type (pointer_declarator "*bp" * identifier)) , (parameter_declaration "int bplen" primitive_type identifier) , (parameter_declaration "_Bool only_one" type_identifier identifier) , (parameter_declaration "int blen" primitive_type identifier) , (parameter_declaration "char *b" primitive_type (pointer_declarator "*b" * identifier)) )))) (compound_statement "{\n  byte bVar1;\n  char *leadin;\n  int iVar2;\n  uint uVar3;\n  uint cp_max_len;\n  uint8_t *b_str;\n  char *pcVar4;\n  uint uVar5;\n  int iVar6;\n  char *pcVar7;\n  int iVar8;\n  uint uVar9;\n  char *pcVar10;\n  uint uVar11;\n  \n  if ((b != (char *)0x0) && (0 < blen)) {\n    if (blen == 1) {\n      *b = '\0';\n    }\n    else {\n      leadin = "";\n      if (lip != (char *)0x0) {\n        leadin = lip;\n      }\n      if (0 < bplen) {\n        iVar6 = 0;\n        do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );\n      }\n    }\n  }\n  return b;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char *leadin;" primitive_type (pointer_declarator "*leadin" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint cp_max_len;" type_identifier identifier ;) (declaration "uint8_t *b_str;" primitive_type (pointer_declarator "*b_str" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "uint uVar9;" type_identifier identifier ;) (declaration "char *pcVar10;" primitive_type (pointer_declarator "*pcVar10" * identifier) ;) (declaration "uint uVar11;" type_identifier identifier ;) (if_statement "if ((b != (char *)0x0) && (0 < blen)) {\n    if (blen == 1) {\n      *b = '\0';\n    }\n    else {\n      leadin = "";\n      if (lip != (char *)0x0) {\n        leadin = lip;\n      }\n      if (0 < bplen) {\n        iVar6 = 0;\n        do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );\n      }\n    }\n  }" if (parenthesized_expression "((b != (char *)0x0) && (0 < blen))" ( (binary_expression "(b != (char *)0x0) && (0 < blen)" (parenthesized_expression "(b != (char *)0x0)" ( (binary_expression "b != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(0 < blen)" ( (binary_expression "0 < blen" number_literal < identifier) ))) )) (compound_statement "{\n    if (blen == 1) {\n      *b = '\0';\n    }\n    else {\n      leadin = "";\n      if (lip != (char *)0x0) {\n        leadin = lip;\n      }\n      if (0 < bplen) {\n        iVar6 = 0;\n        do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );\n      }\n    }\n  }" { (if_statement "if (blen == 1) {\n      *b = '\0';\n    }\n    else {\n      leadin = "";\n      if (lip != (char *)0x0) {\n        leadin = lip;\n      }\n      if (0 < bplen) {\n        iVar6 = 0;\n        do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );\n      }\n    }" if (parenthesized_expression "(blen == 1)" ( (binary_expression "blen == 1" identifier == number_literal) )) (compound_statement "{\n      *b = '\0';\n    }" { (expression_statement "*b = '\0';" (assignment_expression "*b = '\0'" (pointer_expression "*b" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) }) (else_clause "else {\n      leadin = "";\n      if (lip != (char *)0x0) {\n        leadin = lip;\n      }\n      if (0 < bplen) {\n        iVar6 = 0;\n        do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );\n      }\n    }" else (compound_statement "{\n      leadin = "";\n      if (lip != (char *)0x0) {\n        leadin = lip;\n      }\n      if (0 < bplen) {\n        iVar6 = 0;\n        do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );\n      }\n    }" { (expression_statement "leadin = "";" (assignment_expression "leadin = """ identifier = (string_literal """" " ")) ;) (if_statement "if (lip != (char *)0x0) {\n        leadin = lip;\n      }" if (parenthesized_expression "(lip != (char *)0x0)" ( (binary_expression "lip != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        leadin = lip;\n      }" { (expression_statement "leadin = lip;" (assignment_expression "leadin = lip" identifier = identifier) ;) })) (if_statement "if (0 < bplen) {\n        iVar6 = 0;\n        do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );\n      }" if (parenthesized_expression "(0 < bplen)" ( (binary_expression "0 < bplen" number_literal < identifier) )) (compound_statement "{\n        iVar6 = 0;\n        do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );\n      }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (do_statement "do {\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        } while( true );" do (compound_statement "{\n          if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }\n          iVar6 = iVar6 + iVar2;\n          bVar1 = *bp >> 6;\n          uVar9 = 0x18;\n          if (bplen < 0x19) {\n            uVar9 = bplen;\n          }\n          uVar5 = *bp & 0xf;\n          uVar3 = (uint)bVar1;\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }\n          uVar11 = cp_max_len;\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n          iVar6 = iVar6 + iVar2;\n          pcVar10 = "%s  TPID format: %d\n";\n          cp_max_len = blen - iVar6;\n          pcVar7 = b + iVar6;\n          uVar5 = uVar3;\nLAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);\n          iVar6 = iVar6 + iVar2;\nLAB_0001a1cf:\n          pcVar7 = b + iVar6;\n          iVar2 = blen - iVar6;\n          b_str = bp;\nLAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);\n          iVar8 = 0x18;\n          iVar6 = iVar6 + iVar2;\nLAB_0001a168:\n          bplen = bplen - iVar8;\n          bp = bp + iVar8;\n          if (bplen < 1) {\n            return b;\n          }\n          if (only_one) {\n            return b;\n          }\n        }" { (if_statement "if ((bplen < 0x18) || ((bplen & 3U) != 0)) {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }\n          else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }" if (parenthesized_expression "((bplen < 0x18) || ((bplen & 3U) != 0))" ( (binary_expression "(bplen < 0x18) || ((bplen & 3U) != 0)" (parenthesized_expression "(bplen < 0x18)" ( (binary_expression "bplen < 0x18" identifier < number_literal) )) || (parenthesized_expression "((bplen & 3U) != 0)" ( (binary_expression "(bplen & 3U) != 0" (parenthesized_expression "(bplen & 3U)" ( (binary_expression "bplen & 3U" identifier & number_literal) )) != number_literal) ))) )) (compound_statement "{\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;\n          }" { (expression_statement "iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)\n            ;" (assignment_expression "iVar2 = sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)" identifier = (call_expression "sg_scnpr(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)" identifier (argument_list "(b + iVar6,blen - iVar6,\n                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,blen)" ( (binary_expression "b + iVar6" identifier + identifier) , (binary_expression "blen - iVar6" identifier - identifier) , (string_literal ""%sTransport Id short or not multiple of 4 [length=%d]:\n"" " string_content escape_sequence ") , identifier , identifier )))) ;) }) (else_clause "else {\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }" else (compound_statement "{\n            iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);\n          }" { (expression_statement "iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin);" (assignment_expression "iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin)" identifier = (call_expression "sg_scnpr(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin)" identifier (argument_list "(b + iVar6,blen - iVar6,"%sTransport Id of initiator:\n",leadin)" ( (binary_expression "b + iVar6" identifier + identifier) , (binary_expression "blen - iVar6" identifier - identifier) , (string_literal ""%sTransport Id of initiator:\n"" " string_content escape_sequence ") , identifier )))) ;) }))) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "bVar1 = *bp >> 6;" (assignment_expression "bVar1 = *bp >> 6" identifier = (binary_expression "*bp >> 6" (pointer_expression "*bp" * identifier) >> number_literal)) ;) (expression_statement "uVar9 = 0x18;" (assignment_expression "uVar9 = 0x18" identifier = number_literal) ;) (if_statement "if (bplen < 0x19) {\n            uVar9 = bplen;\n          }" if (parenthesized_expression "(bplen < 0x19)" ( (binary_expression "bplen < 0x19" identifier < number_literal) )) (compound_statement "{\n            uVar9 = bplen;\n          }" { (expression_statement "uVar9 = bplen;" (assignment_expression "uVar9 = bplen" identifier = identifier) ;) })) (expression_statement "uVar5 = *bp & 0xf;" (assignment_expression "uVar5 = *bp & 0xf" identifier = (binary_expression "*bp & 0xf" (pointer_expression "*bp" * identifier) & number_literal)) ;) (expression_statement "uVar3 = (uint)bVar1;" (assignment_expression "uVar3 = (uint)bVar1" identifier = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "cp_max_len = blen - iVar6;" (assignment_expression "cp_max_len = blen - iVar6" identifier = (binary_expression "blen - iVar6" identifier - identifier)) ;) (expression_statement "pcVar7 = b + iVar6;" (assignment_expression "pcVar7 = b + iVar6" identifier = (binary_expression "b + iVar6" identifier + identifier)) ;) (switch_statement "switch(uVar5) {\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }" switch (parenthesized_expression "(uVar5)" ( identifier )) (compound_statement "{\n          case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;\n          case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;\n          case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;\n          case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;\n          case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;\n          case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;\n          case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;\n          case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;\n          case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;\n          case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;\n          default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;\n          case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;\n          }" { (case_statement "case 0:\n            pcVar10 = "%s  FCP-2 World Wide Name:\n";\n            goto LAB_0001a412;" case number_literal : (expression_statement "pcVar10 = "%s  FCP-2 World Wide Name:\n";" (assignment_expression "pcVar10 = "%s  FCP-2 World Wide Name:\n"" identifier = (string_literal ""%s  FCP-2 World Wide Name:\n"" " string_content escape_sequence ")) ;) (goto_statement "goto LAB_0001a412;" goto statement_identifier ;)) (case_statement "case 1:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));\n            iVar6 = iVar6 + iVar2;\n            iVar2 = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;" case number_literal : (expression_statement "iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8));" (assignment_expression "iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8))" identifier = (call_expression "sg_scnpr(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8))" identifier (argument_list "(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",\n                             leadin,(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8))" ( identifier , identifier , (string_literal ""%s  Parallel SCSI initiator SCSI address: 0x%x\n"" " string_content escape_sequence ") , identifier , (call_expression "(uint)(ushort)(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8)" (call_expression "(uint)(ushort)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(ushort)" ( identifier ))) (argument_list "(*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8)" ( (binary_expression "*(ushort *)(bp + 2) << 8 |\n                                                  *(ushort *)(bp + 2) >> 8" (binary_expression "*(ushort *)(bp + 2) << 8" (pointer_expression "*(ushort *)(bp + 2)" * (cast_expression "(ushort *)(bp + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bp + 2)" ( (binary_expression "bp + 2" identifier + number_literal) )))) << number_literal) | (binary_expression "*(ushort *)(bp + 2) >> 8" (pointer_expression "*(ushort *)(bp + 2)" * (cast_expression "(ushort *)(bp + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bp + 2)" ( (binary_expression "bp + 2" identifier + number_literal) )))) >> number_literal)) ))) )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "iVar2 = blen - iVar6;" (assignment_expression "iVar2 = blen - iVar6" identifier = (binary_expression "blen - iVar6" identifier - identifier)) ;) (expression_statement "pcVar7 = b + iVar6;" (assignment_expression "pcVar7 = b + iVar6" identifier = (binary_expression "b + iVar6" identifier + identifier)) ;) (if_statement "if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }" if (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = blen - iVar6;\n              pcVar7 = b + iVar6;\n            }" { (expression_statement "iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3)" identifier = (call_expression "sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3)" identifier (argument_list "(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3)" ( identifier , identifier , (string_literal ""%s  [Unexpected TPID format: %d]\n"" " string_content escape_sequence ") , identifier , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "iVar2 = blen - iVar6;" (assignment_expression "iVar2 = blen - iVar6" identifier = (binary_expression "blen - iVar6" identifier - identifier)) ;) (expression_statement "pcVar7 = b + iVar6;" (assignment_expression "pcVar7 = b + iVar6" identifier = (binary_expression "b + iVar6" identifier + identifier)) ;) })) (expression_statement "iVar8 = 0x18;" (assignment_expression "iVar8 = 0x18" identifier = number_literal) ;) (expression_statement "iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8));" (assignment_expression "iVar2 = sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8))" identifier = (call_expression "sg_scnpr(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8))" identifier (argument_list "(pcVar7,iVar2,\n                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,\n                             (uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8))" ( identifier , identifier , (string_literal ""%s  relative port number (of corresponding target): 0x%x\n"" " string_content escape_sequence ") , identifier , (call_expression "(uint)(ushort)(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8)" (call_expression "(uint)(ushort)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(ushort)" ( identifier ))) (argument_list "(*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8)" ( (binary_expression "*(ushort *)(bp + 6) << 8 | *(ushort *)(bp + 6) >> 8" (binary_expression "*(ushort *)(bp + 6) << 8" (pointer_expression "*(ushort *)(bp + 6)" * (cast_expression "(ushort *)(bp + 6)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bp + 6)" ( (binary_expression "bp + 6" identifier + number_literal) )))) << number_literal) | (binary_expression "*(ushort *)(bp + 6) >> 8" (pointer_expression "*(ushort *)(bp + 6)" * (cast_expression "(ushort *)(bp + 6)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bp + 6)" ( (binary_expression "bp + 6" identifier + number_literal) )))) >> number_literal)) ))) )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (goto_statement "goto LAB_0001a168;" goto statement_identifier ;)) (case_statement "case 2:\n            pcVar10 = "%s  SSA (transport id not defined):\n";\n            break;" case number_literal : (expression_statement "pcVar10 = "%s  SSA (transport id not defined):\n";" (assignment_expression "pcVar10 = "%s  SSA (transport id not defined):\n"" identifier = (string_literal ""%s  SSA (transport id not defined):\n"" " string_content escape_sequence ")) ;) (break_statement "break;" break ;)) (case_statement "case 3:\n            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";\nLAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 8;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;" case number_literal : (expression_statement "pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";" (assignment_expression "pcVar10 = "%s  IEEE 1394 EUI-64 name:\n"" identifier = (string_literal ""%s  IEEE 1394 EUI-64 name:\n"" " string_content escape_sequence ")) ;) (labeled_statement "LAB_0001a412:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);" statement_identifier : (expression_statement "iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin)" identifier = (call_expression "sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin)" identifier (argument_list "(pcVar7,cp_max_len,pcVar10,leadin)" ( identifier , identifier , identifier , identifier )))) ;)) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "pcVar7 = b + iVar6;" (assignment_expression "pcVar7 = b + iVar6" identifier = (binary_expression "b + iVar6" identifier + identifier)) ;) (expression_statement "iVar2 = blen - iVar6;" (assignment_expression "iVar2 = blen - iVar6" identifier = (binary_expression "blen - iVar6" identifier - identifier)) ;) (if_statement "if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }" if (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }" { (expression_statement "iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3)" identifier = (call_expression "sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3)" identifier (argument_list "(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3)" ( identifier , identifier , (string_literal ""%s  [Unexpected TPID format: %d]\n"" " string_content escape_sequence ") , identifier , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "pcVar7 = b + iVar6;" (assignment_expression "pcVar7 = b + iVar6" identifier = (binary_expression "b + iVar6" identifier + identifier)) ;) (expression_statement "iVar2 = blen - iVar6;" (assignment_expression "iVar2 = blen - iVar6" identifier = (binary_expression "blen - iVar6" identifier - identifier)) ;) })) (expression_statement "uVar9 = 8;" (assignment_expression "uVar9 = 8" identifier = number_literal) ;) (expression_statement "b_str = bp + 8;" (assignment_expression "b_str = bp + 8" identifier = (binary_expression "bp + 8" identifier + number_literal)) ;) (goto_statement "goto LAB_0001a1eb;" goto statement_identifier ;)) (case_statement "case 4:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);\n            iVar6 = iVar6 + iVar2;\n            pcVar7 = b + iVar6;\n            iVar2 = blen - iVar6;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }\n            uVar9 = 0x10;\n            b_str = bp + 8;\n            goto LAB_0001a1eb;" case number_literal : (expression_statement "iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin)" identifier = (call_expression "sg_scnpr(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin)" identifier (argument_list "(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin)" ( identifier , identifier , (string_literal ""%s  RDMA initiator port identifier:\n"" " string_content escape_sequence ") , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "pcVar7 = b + iVar6;" (assignment_expression "pcVar7 = b + iVar6" identifier = (binary_expression "b + iVar6" identifier + identifier)) ;) (expression_statement "iVar2 = blen - iVar6;" (assignment_expression "iVar2 = blen - iVar6" identifier = (binary_expression "blen - iVar6" identifier - identifier)) ;) (if_statement "if (bVar1 != 0) {\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }" if (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n              iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);\n              iVar6 = iVar6 + iVar2;\n              pcVar7 = b + iVar6;\n              iVar2 = blen - iVar6;\n            }" { (expression_statement "iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3)" identifier = (call_expression "sg_scnpr(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3)" identifier (argument_list "(pcVar7,iVar2,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3)" ( identifier , identifier , (string_literal ""%s  [Unexpected TPID format: %d]\n"" " string_content escape_sequence ") , identifier , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "pcVar7 = b + iVar6;" (assignment_expression "pcVar7 = b + iVar6" identifier = (binary_expression "b + iVar6" identifier + identifier)) ;) (expression_statement "iVar2 = blen - iVar6;" (assignment_expression "iVar2 = blen - iVar6" identifier = (binary_expression "blen - iVar6" identifier - identifier)) ;) })) (expression_statement "uVar9 = 0x10;" (assignment_expression "uVar9 = 0x10" identifier = number_literal) ;) (expression_statement "b_str = bp + 8;" (assignment_expression "b_str = bp + 8" identifier = (binary_expression "bp + 8" identifier + number_literal)) ;) (goto_statement "goto LAB_0001a1eb;" goto statement_identifier ;)) (case_statement "case 5:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);\n            iVar6 = iVar6 + iVar2;\n            uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n            if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }\n            if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }\n            iVar8 = uVar9 + 4;\n            goto LAB_0001a168;" case number_literal : (expression_statement "iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin)" identifier = (call_expression "sg_scnpr(pcVar7,cp_max_len,"%s  iSCSI ",leadin)" identifier (argument_list "(pcVar7,cp_max_len,"%s  iSCSI ",leadin)" ( identifier , identifier , (string_literal ""%s  iSCSI "" " string_content ") , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);" (assignment_expression "uVar9 = (uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8)" identifier = (call_expression "(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8)" (call_expression "(uint)(ushort)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(ushort)" ( identifier ))) (argument_list "(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8)" ( (binary_expression "*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8" (binary_expression "*(ushort *)(bp + 2) << 8" (pointer_expression "*(ushort *)(bp + 2)" * (cast_expression "(ushort *)(bp + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bp + 2)" ( (binary_expression "bp + 2" identifier + number_literal) )))) << number_literal) | (binary_expression "*(ushort *)(bp + 2) >> 8" (pointer_expression "*(ushort *)(bp + 2)" * (cast_expression "(ushort *)(bp + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bp + 2)" ( (binary_expression "bp + 2" identifier + number_literal) )))) >> number_literal)) )))) ;) (if_statement "if (bVar1 == 0) {\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }\n            else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (compound_statement "{\n              pcVar7 = "name: %.*s\n";\nLAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);\n              iVar6 = iVar6 + iVar2;\n            }" { (expression_statement "pcVar7 = "name: %.*s\n";" (assignment_expression "pcVar7 = "name: %.*s\n"" identifier = (string_literal ""name: %.*s\n"" " string_content escape_sequence ")) ;) (labeled_statement "LAB_0001a582:\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);" statement_identifier : (expression_statement "iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4);" (assignment_expression "iVar2 = sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4)" identifier = (call_expression "sg_scnpr(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4)" identifier (argument_list "(b + iVar6,blen - iVar6,pcVar7,uVar9,bp + 4)" ( (binary_expression "b + iVar6" identifier + identifier) , (binary_expression "blen - iVar6" identifier - identifier) , identifier , identifier , (binary_expression "bp + 4" identifier + number_literal) )))) ;)) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) }) (else_clause "else {\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }" else (compound_statement "{\n              if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);\n              iVar6 = iVar6 + iVar2;\n              iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);\n              iVar6 = iVar6 + iVar2;\n            }" { (if_statement "if (bVar1 == 1) {\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }" if (parenthesized_expression "(bVar1 == 1)" ( (binary_expression "bVar1 == 1" identifier == number_literal) )) (compound_statement "{\n                pcVar7 = "world wide unique port id: %.*s\n";\n                goto LAB_0001a582;\n              }" { (expression_statement "pcVar7 = "world wide unique port id: %.*s\n";" (assignment_expression "pcVar7 = "world wide unique port id: %.*s\n"" identifier = (string_literal ""world wide unique port id: %.*s\n"" " string_content escape_sequence ")) ;) (goto_statement "goto LAB_0001a582;" goto statement_identifier ;) })) (expression_statement "iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3);" (assignment_expression "iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3)" identifier = (call_expression "sg_scnpr(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3)" identifier (argument_list "(b + iVar6,blen - iVar6,"  [Unexpected TPID format: %d]\n",uVar3)" ( (binary_expression "b + iVar6" identifier + identifier) , (binary_expression "blen - iVar6" identifier - identifier) , (string_literal ""  [Unexpected TPID format: %d]\n"" " string_content escape_sequence ") , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6);" (assignment_expression "iVar2 = hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6)" identifier = (call_expression "hex2str(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6)" identifier (argument_list "(bp,uVar9 + 4,leadin,0,blen - iVar6,b + iVar6)" ( identifier , (binary_expression "uVar9 + 4" identifier + number_literal) , identifier , number_literal , (binary_expression "blen - iVar6" identifier - identifier) , (binary_expression "b + iVar6" identifier + identifier) )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) }))) (if_statement "if (uVar9 < 0x14) {\n              uVar9 = 0x14;\n            }" if (parenthesized_expression "(uVar9 < 0x14)" ( (binary_expression "uVar9 < 0x14" identifier < number_literal) )) (compound_statement "{\n              uVar9 = 0x14;\n            }" { (expression_statement "uVar9 = 0x14;" (assignment_expression "uVar9 = 0x14" identifier = number_literal) ;) })) (expression_statement "iVar8 = uVar9 + 4;" (assignment_expression "iVar8 = uVar9 + 4" identifier = (binary_expression "uVar9 + 4" identifier + number_literal)) ;) (goto_statement "goto LAB_0001a168;" goto statement_identifier ;)) (case_statement "case 6:\n            uVar9 = *(uint *)(bp + 8);\n            uVar5 = *(uint *)(bp + 4);\n            uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n            iVar8 = 0x18;\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);\n            iVar6 = iVar6 + iVar2;\n            if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }\n            goto LAB_0001a168;" case number_literal : (expression_statement "uVar9 = *(uint *)(bp + 8);" (assignment_expression "uVar9 = *(uint *)(bp + 8)" identifier = (pointer_expression "*(uint *)(bp + 8)" * (cast_expression "(uint *)(bp + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bp + 8)" ( (binary_expression "bp + 8" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = *(uint *)(bp + 4);" (assignment_expression "uVar5 = *(uint *)(bp + 4)" identifier = (pointer_expression "*(uint *)(bp + 4)" * (cast_expression "(uint *)(bp + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bp + 4)" ( (binary_expression "bp + 4" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;" (assignment_expression "uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18" identifier = (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18" (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8" (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8" (binary_expression "uVar5 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar5 & 0xff0000) >> 8" (parenthesized_expression "(uVar5 & 0xff0000)" ( (binary_expression "uVar5 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar5 & 0xff00) << 8" (parenthesized_expression "(uVar5 & 0xff00)" ( (binary_expression "uVar5 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar5 << 0x18" identifier << number_literal))) ;) (expression_statement "iVar8 = 0x18;" (assignment_expression "iVar8 = 0x18" identifier = number_literal) ;) (expression_statement "iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5)" identifier = (call_expression "sg_scnpr(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5)" identifier (argument_list "(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,\n                             uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18,uVar5)" ( identifier , identifier , (string_literal ""%s  SAS address: 0x%llx\n"" " string_content escape_sequence ") , identifier , (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 |\n                             uVar9 << 0x18" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8" (binary_expression "uVar9 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar9 & 0xff0000) >> 8" (parenthesized_expression "(uVar9 & 0xff0000)" ( (binary_expression "uVar9 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar9 & 0xff00) << 8" (parenthesized_expression "(uVar9 & 0xff00)" ( (binary_expression "uVar9 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar9 << 0x18" identifier << number_literal)) , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (if_statement "if (bVar1 != 0) {\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }" if (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n              iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);\n              iVar6 = iVar6 + iVar2;\n            }" { (expression_statement "iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5);" (assignment_expression "iVar2 = sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5)" identifier = (call_expression "sg_scnpr(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5)" identifier (argument_list "(b + iVar6,blen - iVar6,"%s  [Unexpected TPID format: %d]\n",leadin,\n                               uVar3,uVar5)" ( (binary_expression "b + iVar6" identifier + identifier) , (binary_expression "blen - iVar6" identifier - identifier) , (string_literal ""%s  [Unexpected TPID format: %d]\n"" " string_content escape_sequence ") , identifier , identifier , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) })) (goto_statement "goto LAB_0001a168;" goto statement_identifier ;)) (case_statement "case 7:\n            pcVar10 = "%s  ADT:\n";\n            break;" case number_literal : (expression_statement "pcVar10 = "%s  ADT:\n";" (assignment_expression "pcVar10 = "%s  ADT:\n"" identifier = (string_literal ""%s  ADT:\n"" " string_content escape_sequence ")) ;) (break_statement "break;" break ;)) (case_statement "case 8:\n            pcVar10 = "%s  ATAPI:\n";\n            break;" case number_literal : (expression_statement "pcVar10 = "%s  ATAPI:\n";" (assignment_expression "pcVar10 = "%s  ATAPI:\n"" identifier = (string_literal ""%s  ATAPI:\n"" " string_content escape_sequence ")) ;) (break_statement "break;" break ;)) (case_statement "case 9:\n            pcVar10 = "%s  UAS:\n";\n            break;" case number_literal : (expression_statement "pcVar10 = "%s  UAS:\n";" (assignment_expression "pcVar10 = "%s  UAS:\n"" identifier = (string_literal ""%s  UAS:\n"" " string_content escape_sequence ")) ;) (break_statement "break;" break ;)) (case_statement "case 10:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);\n            iVar6 = iVar6 + iVar2;\n            cp_max_len = blen - iVar6;\n            pcVar7 = b + iVar6;\n            if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a1cf;" case number_literal : (expression_statement "iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin)" identifier = (call_expression "sg_scnpr(pcVar7,cp_max_len,"%s  SOP ",leadin)" identifier (argument_list "(pcVar7,cp_max_len,"%s  SOP ",leadin)" ( identifier , identifier , (string_literal ""%s  SOP "" " string_content ") , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "cp_max_len = blen - iVar6;" (assignment_expression "cp_max_len = blen - iVar6" identifier = (binary_expression "blen - iVar6" identifier - identifier)) ;) (expression_statement "pcVar7 = b + iVar6;" (assignment_expression "pcVar7 = b + iVar6" identifier = (binary_expression "b + iVar6" identifier + identifier)) ;) (if_statement "if (bVar1 == 0) {\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (compound_statement "{\n              pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);\n              pcVar10 = "Routing ID: 0x%x\n";\n              goto LAB_0001a150;\n            }" { (expression_statement "pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8);" (assignment_expression "pcVar4 = (char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8)" identifier = (cast_expression "(char *)(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(uint)(ushort)(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8)" (call_expression "(uint)(ushort)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(ushort)" ( identifier ))) (argument_list "(*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8)" ( (binary_expression "*(ushort *)(bp + 2) << 8 | *(ushort *)(bp + 2) >> 8" (binary_expression "*(ushort *)(bp + 2) << 8" (pointer_expression "*(ushort *)(bp + 2)" * (cast_expression "(ushort *)(bp + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bp + 2)" ( (binary_expression "bp + 2" identifier + number_literal) )))) << number_literal) | (binary_expression "*(ushort *)(bp + 2) >> 8" (pointer_expression "*(ushort *)(bp + 2)" * (cast_expression "(ushort *)(bp + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bp + 2)" ( (binary_expression "bp + 2" identifier + number_literal) )))) >> number_literal)) ))))) ;) (expression_statement "pcVar10 = "Routing ID: 0x%x\n";" (assignment_expression "pcVar10 = "Routing ID: 0x%x\n"" identifier = (string_literal ""Routing ID: 0x%x\n"" " string_content escape_sequence ")) ;) (goto_statement "goto LAB_0001a150;" goto statement_identifier ;) })) (expression_statement "iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3)" identifier = (call_expression "sg_scnpr(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3)" identifier (argument_list "(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3)" ( identifier , identifier , (string_literal ""  [Unexpected TPID format: %d]\n"" " string_content escape_sequence ") , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (goto_statement "goto LAB_0001a1cf;" goto statement_identifier ;)) (case_statement "case 0xb:\n            pcVar10 = "%s  PCIE:\n";\n            break;" case number_literal : (expression_statement "pcVar10 = "%s  PCIE:\n";" (assignment_expression "pcVar10 = "%s  PCIE:\n"" identifier = (string_literal ""%s  PCIE:\n"" " string_content escape_sequence ")) ;) (break_statement "break;" break ;)) (case_statement "default:\n            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";\n            uVar11 = uVar3;\n            goto LAB_0001a1c5;" default : (expression_statement "pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";" (assignment_expression "pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n"" identifier = (string_literal ""%s  unknown protocol id=0x%x  TPID format=%d\n"" " string_content escape_sequence ")) ;) (expression_statement "uVar11 = uVar3;" (assignment_expression "uVar11 = uVar3" identifier = identifier) ;) (goto_statement "goto LAB_0001a1c5;" goto statement_identifier ;)) (case_statement "case 0xf:\n            pcVar10 = "%s  No specified protocol\n";\n            pcVar4 = leadin;\nLAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);\n            iVar8 = 0x18;\n            iVar6 = iVar6 + iVar2;\n            goto LAB_0001a168;" case number_literal : (expression_statement "pcVar10 = "%s  No specified protocol\n";" (assignment_expression "pcVar10 = "%s  No specified protocol\n"" identifier = (string_literal ""%s  No specified protocol\n"" " string_content escape_sequence ")) ;) (expression_statement "pcVar4 = leadin;" (assignment_expression "pcVar4 = leadin" identifier = identifier) ;) (labeled_statement "LAB_0001a150:\n            iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);" statement_identifier : (expression_statement "iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4)" identifier = (call_expression "sg_scnpr(pcVar7,cp_max_len,pcVar10,pcVar4)" identifier (argument_list "(pcVar7,cp_max_len,pcVar10,pcVar4)" ( identifier , identifier , identifier , identifier )))) ;)) (expression_statement "iVar8 = 0x18;" (assignment_expression "iVar8 = 0x18" identifier = number_literal) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (goto_statement "goto LAB_0001a168;" goto statement_identifier ;)) })) (expression_statement "uVar11 = cp_max_len;" (assignment_expression "uVar11 = cp_max_len" identifier = identifier) ;) (expression_statement "iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin)" identifier = (call_expression "sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin)" identifier (argument_list "(pcVar7,cp_max_len,pcVar10,leadin)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (expression_statement "pcVar10 = "%s  TPID format: %d\n";" (assignment_expression "pcVar10 = "%s  TPID format: %d\n"" identifier = (string_literal ""%s  TPID format: %d\n"" " string_content escape_sequence ")) ;) (expression_statement "cp_max_len = blen - iVar6;" (assignment_expression "cp_max_len = blen - iVar6" identifier = (binary_expression "blen - iVar6" identifier - identifier)) ;) (expression_statement "pcVar7 = b + iVar6;" (assignment_expression "pcVar7 = b + iVar6" identifier = (binary_expression "b + iVar6" identifier + identifier)) ;) (expression_statement "uVar5 = uVar3;" (assignment_expression "uVar5 = uVar3" identifier = identifier) ;) (labeled_statement "LAB_0001a1c5:\n          iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);" statement_identifier : (expression_statement "iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11);" (assignment_expression "iVar2 = sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11)" identifier = (call_expression "sg_scnpr(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11)" identifier (argument_list "(pcVar7,cp_max_len,pcVar10,leadin,uVar5,uVar11)" ( identifier , identifier , identifier , identifier , identifier , identifier )))) ;)) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (labeled_statement "LAB_0001a1cf:\n          pcVar7 = b + iVar6;" statement_identifier : (expression_statement "pcVar7 = b + iVar6;" (assignment_expression "pcVar7 = b + iVar6" identifier = (binary_expression "b + iVar6" identifier + identifier)) ;)) (expression_statement "iVar2 = blen - iVar6;" (assignment_expression "iVar2 = blen - iVar6" identifier = (binary_expression "blen - iVar6" identifier - identifier)) ;) (expression_statement "b_str = bp;" (assignment_expression "b_str = bp" identifier = identifier) ;) (labeled_statement "LAB_0001a1eb:\n          iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);" statement_identifier : (expression_statement "iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7);" (assignment_expression "iVar2 = hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7)" identifier = (call_expression "hex2str(b_str,uVar9,leadin,1,iVar2,pcVar7)" identifier (argument_list "(b_str,uVar9,leadin,1,iVar2,pcVar7)" ( identifier , identifier , identifier , number_literal , identifier , identifier )))) ;)) (expression_statement "iVar8 = 0x18;" (assignment_expression "iVar8 = 0x18" identifier = number_literal) ;) (expression_statement "iVar6 = iVar6 + iVar2;" (assignment_expression "iVar6 = iVar6 + iVar2" identifier = (binary_expression "iVar6 + iVar2" identifier + identifier)) ;) (labeled_statement "LAB_0001a168:\n          bplen = bplen - iVar8;" statement_identifier : (expression_statement "bplen = bplen - iVar8;" (assignment_expression "bplen = bplen - iVar8" identifier = (binary_expression "bplen - iVar8" identifier - identifier)) ;)) (expression_statement "bp = bp + iVar8;" (assignment_expression "bp = bp + iVar8" identifier = (binary_expression "bp + iVar8" identifier + identifier)) ;) (if_statement "if (bplen < 1) {\n            return b;\n          }" if (parenthesized_expression "(bplen < 1)" ( (binary_expression "bplen < 1" identifier < number_literal) )) (compound_statement "{\n            return b;\n          }" { (return_statement "return b;" return identifier ;) })) (if_statement "if (only_one) {\n            return b;\n          }" if (parenthesized_expression "(only_one)" ( identifier )) (compound_statement "{\n            return b;\n          }" { (return_statement "return b;" return identifier ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })) }))) })) (return_statement "return b;" return identifier ;) })))
(translation_unit "undefined1 * __regparm2\nsg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)\n\n{\n  int iVar1;\n  undefined1 *puVar2;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x1a019);\n  if ((param_7 != (undefined1 *)0x0) && (0 < param_6)) {\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }\n  return param_7;\n}\n\n" (ERROR "undefined1 * __regparm2\nsg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" (binary_expression "undefined1 * __regparm2\nsg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" identifier * (ERROR "__regparm2" identifier) (call_expression "sg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" identifier (argument_list "(undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" ( identifier (ERROR "param_1" identifier) , identifier (ERROR "param_2" identifier) , (binary_expression "byte *param_3" identifier * identifier) , (ERROR "uint" identifier) identifier , identifier (ERROR "param_5" identifier) , (ERROR "int" identifier) identifier , (binary_expression "undefined1 *param_7" identifier * identifier) ))))) (compound_statement "{\n  int iVar1;\n  undefined1 *puVar2;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x1a019);\n  if ((param_7 != (undefined1 *)0x0) && (0 < param_6)) {\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }\n  return param_7;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (expression_statement "entry(param_2,0x1a019);" (call_expression "entry(param_2,0x1a019)" identifier (argument_list "(param_2,0x1a019)" ( identifier , number_literal ))) ;) (if_statement "if ((param_7 != (undefined1 *)0x0) && (0 < param_6)) {\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }" if (parenthesized_expression "((param_7 != (undefined1 *)0x0) && (0 < param_6))" ( (binary_expression "(param_7 != (undefined1 *)0x0) && (0 < param_6)" (parenthesized_expression "(param_7 != (undefined1 *)0x0)" ( (binary_expression "param_7 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(0 < param_6)" ( (binary_expression "0 < param_6" number_literal < identifier) ))) )) (compound_statement "{\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }" { (if_statement "if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }" if (parenthesized_expression "(param_6 == 1)" ( (binary_expression "param_6 == 1" identifier == number_literal) )) (compound_statement "{\n      *param_7 = 0;\n    }" { (expression_statement "*param_7 = 0;" (assignment_expression "*param_7 = 0" (pointer_expression "*param_7" * identifier) = number_literal) ;) }) (else_clause "else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }" else (compound_statement "{\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }" { (expression_statement "iVar1 = unaff_EBX + 0x169bc;" (assignment_expression "iVar1 = unaff_EBX + 0x169bc" identifier = (binary_expression "unaff_EBX + 0x169bc" identifier + number_literal)) ;) (if_statement "if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }" if (parenthesized_expression "(unaff_retaddr != 0)" ( (binary_expression "unaff_retaddr != 0" identifier != number_literal) )) (compound_statement "{\n        iVar1 = unaff_retaddr;\n      }" { (expression_statement "iVar1 = unaff_retaddr;" (assignment_expression "iVar1 = unaff_retaddr" identifier = identifier) ;) })) (if_statement "if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }" if (parenthesized_expression "(0 < (int)param_4)" ( (binary_expression "0 < (int)param_4" number_literal < (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }" { (if_statement "if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }" if (parenthesized_expression "(((int)param_4 < 0x18) || ((param_4 & 3) != 0))" ( (binary_expression "((int)param_4 < 0x18) || ((param_4 & 3) != 0)" (parenthesized_expression "((int)param_4 < 0x18)" ( (binary_expression "(int)param_4 < 0x18" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "((param_4 & 3) != 0)" ( (binary_expression "(param_4 & 3) != 0" (parenthesized_expression "(param_4 & 3)" ( (binary_expression "param_4 & 3" identifier & number_literal) )) != number_literal) ))) )) (compound_statement "{\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }" { (expression_statement "sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);" (call_expression "sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6)" identifier (argument_list "(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6)" ( identifier , identifier , (binary_expression "unaff_EBX + 0x16f63" identifier + number_literal) , identifier , identifier ))) ;) }) (else_clause "else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }" else (compound_statement "{\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }" { (expression_statement "sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);" (call_expression "sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1)" identifier (argument_list "(param_7,param_6,unaff_EBX + 0x1625d,iVar1)" ( identifier , identifier , (binary_expression "unaff_EBX + 0x1625d" identifier + number_literal) , identifier ))) ;) }))) (expression_statement "puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();" (assignment_expression "puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))()" identifier = (cast_expression "(undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))()" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))()" (parenthesized_expression "(*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))" ( (pointer_expression "*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f)" * (cast_expression "(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f)" ( (binary_expression "*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f" (binary_expression "*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX" (pointer_expression "*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4)" * (cast_expression "(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4)" ( (binary_expression "unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4" (binary_expression "unaff_EBX + 0x1808f" identifier + number_literal) + (binary_expression "(*param_3 & 0xf) * 4" (parenthesized_expression "(*param_3 & 0xf)" ( (binary_expression "*param_3 & 0xf" (pointer_expression "*param_3" * identifier) & number_literal) )) * number_literal)) )))) + identifier) + number_literal) )))) )) (argument_list "()" ( ))))) ;) (return_statement "return puVar2;" return identifier ;) })) }))) })) (return_statement "return param_7;" return identifier ;) }))
(translation_unit (ERROR (binary_expression IDENT * (ERROR IDENT) (call_expression IDENT (argument_list ( IDENT (ERROR IDENT) , IDENT (ERROR IDENT) , (binary_expression IDENT * IDENT) , (ERROR IDENT) IDENT , IDENT (ERROR IDENT) , (ERROR IDENT) IDENT , (binary_expression IDENT * IDENT) ))))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) || (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) , IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) & LIT) )) * LIT)) )))) + IDENT) + LIT) )))) )) (argument_list ( ))))) ;) (return_statement return IDENT ;) })) }))) })) (return_statement return IDENT ;) }))
(ERROR "undefined1 * __regparm2\nsg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" (binary_expression "undefined1 * __regparm2\nsg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" (identifier "undefined1") (* "*") (ERROR "__regparm2" (identifier "__regparm2")) (call_expression "sg_decode_transportid_str\n          (undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" (identifier "sg_decode_transportid_str") (argument_list "(undefined4 param_1,undefined4 param_2,byte *param_3,uint param_4,undefined4 param_5,\n          int param_6,undefined1 *param_7)" (( "(") (identifier "undefined4") (ERROR "param_1" (identifier "param_1")) (, ",") (identifier "undefined4") (ERROR "param_2" (identifier "param_2")) (, ",") (binary_expression "byte *param_3" (identifier "byte") (* "*") (identifier "param_3")) (, ",") (ERROR "uint" (identifier "uint")) (identifier "param_4") (, ",") (identifier "undefined4") (ERROR "param_5" (identifier "param_5")) (, ",") (ERROR "int" (identifier "int")) (identifier "param_6") (, ",") (binary_expression "undefined1 *param_7" (identifier "undefined1") (* "*") (identifier "param_7")) () ")"))))) (compound_statement "{\n  int iVar1;\n  undefined1 *puVar2;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x1a019);\n  if ((param_7 != (undefined1 *)0x0) && (0 < param_6)) {\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }\n  return param_7;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "int unaff_retaddr;" (primitive_type "int") (identifier "unaff_retaddr") (; ";")) (expression_statement "entry(param_2,0x1a019);" (call_expression "entry(param_2,0x1a019)" (identifier "entry") (argument_list "(param_2,0x1a019)" (( "(") (identifier "param_2") (, ",") (number_literal "0x1a019") () ")"))) (; ";")) (if_statement "if ((param_7 != (undefined1 *)0x0) && (0 < param_6)) {\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }" (if "if") (parenthesized_expression "((param_7 != (undefined1 *)0x0) && (0 < param_6))" (( "(") (binary_expression "(param_7 != (undefined1 *)0x0) && (0 < param_6)" (parenthesized_expression "(param_7 != (undefined1 *)0x0)" (( "(") (binary_expression "param_7 != (undefined1 *)0x0" (identifier "param_7") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(0 < param_6)" (( "(") (binary_expression "0 < param_6" (number_literal "0") (< "<") (identifier "param_6")) () ")"))) () ")")) (compound_statement "{\n    if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }\n  }" ({ "{") (if_statement "if (param_6 == 1) {\n      *param_7 = 0;\n    }\n    else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }" (if "if") (parenthesized_expression "(param_6 == 1)" (( "(") (binary_expression "param_6 == 1" (identifier "param_6") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      *param_7 = 0;\n    }" ({ "{") (expression_statement "*param_7 = 0;" (assignment_expression "*param_7 = 0" (pointer_expression "*param_7" (* "*") (identifier "param_7")) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }" (else "else") (compound_statement "{\n      iVar1 = unaff_EBX + 0x169bc;\n      if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }\n      if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }\n    }" ({ "{") (expression_statement "iVar1 = unaff_EBX + 0x169bc;" (assignment_expression "iVar1 = unaff_EBX + 0x169bc" (identifier "iVar1") (= "=") (binary_expression "unaff_EBX + 0x169bc" (identifier "unaff_EBX") (+ "+") (number_literal "0x169bc"))) (; ";")) (if_statement "if (unaff_retaddr != 0) {\n        iVar1 = unaff_retaddr;\n      }" (if "if") (parenthesized_expression "(unaff_retaddr != 0)" (( "(") (binary_expression "unaff_retaddr != 0" (identifier "unaff_retaddr") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        iVar1 = unaff_retaddr;\n      }" ({ "{") (expression_statement "iVar1 = unaff_retaddr;" (assignment_expression "iVar1 = unaff_retaddr" (identifier "iVar1") (= "=") (identifier "unaff_retaddr")) (; ";")) (} "}"))) (if_statement "if (0 < (int)param_4) {\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }" (if "if") (parenthesized_expression "(0 < (int)param_4)" (( "(") (binary_expression "0 < (int)param_4" (number_literal "0") (< "<") (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4"))) () ")")) (compound_statement "{\n        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }\n                    \n                    \n        puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();\n        return puVar2;\n      }" ({ "{") (if_statement "if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }\n        else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }" (if "if") (parenthesized_expression "(((int)param_4 < 0x18) || ((param_4 & 3) != 0))" (( "(") (binary_expression "((int)param_4 < 0x18) || ((param_4 & 3) != 0)" (parenthesized_expression "((int)param_4 < 0x18)" (( "(") (binary_expression "(int)param_4 < 0x18" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (< "<") (number_literal "0x18")) () ")")) (|| "||") (parenthesized_expression "((param_4 & 3) != 0)" (( "(") (binary_expression "(param_4 & 3) != 0" (parenthesized_expression "(param_4 & 3)" (( "(") (binary_expression "param_4 & 3" (identifier "param_4") (& "&") (number_literal "3")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);\n        }" ({ "{") (expression_statement "sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);" (call_expression "sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6)" (identifier "sg_scnpr") (argument_list "(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6)" (( "(") (identifier "param_7") (, ",") (identifier "param_6") (, ",") (binary_expression "unaff_EBX + 0x16f63" (identifier "unaff_EBX") (+ "+") (number_literal "0x16f63")) (, ",") (identifier "iVar1") (, ",") (identifier "param_6") () ")"))) (; ";")) (} "}")) (else_clause "else {\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }" (else "else") (compound_statement "{\n          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);\n        }" ({ "{") (expression_statement "sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);" (call_expression "sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1)" (identifier "sg_scnpr") (argument_list "(param_7,param_6,unaff_EBX + 0x1625d,iVar1)" (( "(") (identifier "param_7") (, ",") (identifier "param_6") (, ",") (binary_expression "unaff_EBX + 0x1625d" (identifier "unaff_EBX") (+ "+") (number_literal "0x1625d")) (, ",") (identifier "iVar1") () ")"))) (; ";")) (} "}")))) (expression_statement "puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))();" (assignment_expression "puVar2 = (undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))()" (identifier "puVar2") (= "=") (cast_expression "(undefined1 *)\n                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))()" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))()" (parenthesized_expression "(*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f))" (( "(") (pointer_expression "*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f)" (* "*") (cast_expression "(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f)" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f)" (( "(") (binary_expression "*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX + 0x2ed6f" (binary_expression "*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +\n                           unaff_EBX" (pointer_expression "*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4)" (* "*") (cast_expression "(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4)" (( "(") (binary_expression "unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4" (binary_expression "unaff_EBX + 0x1808f" (identifier "unaff_EBX") (+ "+") (number_literal "0x1808f")) (+ "+") (binary_expression "(*param_3 & 0xf) * 4" (parenthesized_expression "(*param_3 & 0xf)" (( "(") (binary_expression "*param_3 & 0xf" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (& "&") (number_literal "0xf")) () ")")) (* "*") (number_literal "4"))) () ")")))) (+ "+") (identifier "unaff_EBX")) (+ "+") (number_literal "0x2ed6f")) () ")")))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (return_statement "return puVar2;" (return "return") (identifier "puVar2") (; ";")) (} "}"))) (} "}")))) (} "}"))) (return_statement "return param_7;" (return "return") (identifier "param_7") (; ";")) (} "}"))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

char * function_1(char *var_3,uint8_t *var_8,int var_4,type_1 only_one,int var_2,char *var_1)

{
  type_2 var_9;
  char *leadin;
  int var_7;
  type_3 uVar3;
  type_3 cp_max_len;
  uint8_t *b_str;
  char *pcVar4;
  type_3 var_12;
  int var_6;
  char *pcVar7;
  int var_13;
  type_3 var_11;
  char *pcVar10;
  type_3 uVar11;
  
  if ((var_1 != (char *)0x0) && (0 < var_2)) {
    if (var_2 == 1) {
      *var_1 = '\0';
    }
    else {
      leadin = "";
      if (var_3 != (char *)0x0) {
        leadin = var_3;
      }
      if (0 < var_4) {
        var_6 = 0;
        do {
          if ((var_4 < 0x18) || ((var_4 & 3U) != 0)) {
            var_7 = var_5(var_1 + var_6,var_2 - var_6,
                             "%sTransport Id short or not multiple of 4 [length=%d]:\n",leadin,var_2)
            ;
          }
          else {
            var_7 = var_5(var_1 + var_6,var_2 - var_6,"%sTransport Id of initiator:\n",leadin);
          }
          var_6 = var_6 + var_7;
          var_9 = *var_8 >> 6;
          var_11 = 0x18;
          if (var_4 < 0x19) {
            var_11 = var_4;
          }
          var_12 = *var_8 & 0xf;
          uVar3 = (type_3)var_9;
          cp_max_len = var_2 - var_6;
          pcVar7 = var_1 + var_6;
          switch(var_12) {
          case 0:
            pcVar10 = "%s  FCP-2 World Wide Name:\n";
            goto LAB_0001a412;
          case 1:
            var_7 = var_5(pcVar7,cp_max_len,"%s  Parallel SCSI initiator SCSI address: 0x%x\n",
                             leadin,(type_3)(type_4)(*(type_4 *)(var_8 + 2) << 8 |
                                                  *(type_4 *)(var_8 + 2) >> 8));
            var_6 = var_6 + var_7;
            var_7 = var_2 - var_6;
            pcVar7 = var_1 + var_6;
            if (var_9 != 0) {
              var_7 = var_5(pcVar7,var_7,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);
              var_6 = var_6 + var_7;
              var_7 = var_2 - var_6;
              pcVar7 = var_1 + var_6;
            }
            var_13 = 0x18;
            var_7 = var_5(pcVar7,var_7,
                             "%s  relative port number (of corresponding target): 0x%x\n",leadin,
                             (type_3)(type_4)(*(type_4 *)(var_8 + 6) << 8 | *(type_4 *)(var_8 + 6) >> 8));
            var_6 = var_6 + var_7;
            goto LAB_0001a168;
          case 2:
            pcVar10 = "%s  SSA (transport id not defined):\n";
            break;
          case 3:
            pcVar10 = "%s  IEEE 1394 EUI-64 name:\n";
LAB_0001a412:
            var_7 = var_5(pcVar7,cp_max_len,pcVar10,leadin);
            var_6 = var_6 + var_7;
            pcVar7 = var_1 + var_6;
            var_7 = var_2 - var_6;
            if (var_9 != 0) {
              var_7 = var_5(pcVar7,var_7,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);
              var_6 = var_6 + var_7;
              pcVar7 = var_1 + var_6;
              var_7 = var_2 - var_6;
            }
            var_11 = 8;
            b_str = var_8 + 8;
            goto LAB_0001a1eb;
          case 4:
            var_7 = var_5(pcVar7,cp_max_len,"%s  RDMA initiator port identifier:\n",leadin);
            var_6 = var_6 + var_7;
            pcVar7 = var_1 + var_6;
            var_7 = var_2 - var_6;
            if (var_9 != 0) {
              var_7 = var_5(pcVar7,var_7,"%s  [Unexpected TPID format: %d]\n",leadin,uVar3);
              var_6 = var_6 + var_7;
              pcVar7 = var_1 + var_6;
              var_7 = var_2 - var_6;
            }
            var_11 = 0x10;
            b_str = var_8 + 8;
            goto LAB_0001a1eb;
          case 5:
            var_7 = var_5(pcVar7,cp_max_len,"%s  iSCSI ",leadin);
            var_6 = var_6 + var_7;
            var_11 = (type_3)(type_4)(*(type_4 *)(var_8 + 2) << 8 | *(type_4 *)(var_8 + 2) >> 8);
            if (var_9 == 0) {
              pcVar7 = "name: %.*s\n";
LAB_0001a582:
              var_7 = var_5(var_1 + var_6,var_2 - var_6,pcVar7,var_11,var_8 + 4);
              var_6 = var_6 + var_7;
            }
            else {
              if (var_9 == 1) {
                pcVar7 = "world wide unique port id: %.*s\n";
                goto LAB_0001a582;
              }
              var_7 = var_5(var_1 + var_6,var_2 - var_6,"  [Unexpected TPID format: %d]\n",uVar3);
              var_6 = var_6 + var_7;
              var_7 = var_10(var_8,var_11 + 4,leadin,0,var_2 - var_6,var_1 + var_6);
              var_6 = var_6 + var_7;
            }
            if (var_11 < 0x14) {
              var_11 = 0x14;
            }
            var_13 = var_11 + 4;
            goto LAB_0001a168;
          case 6:
            var_11 = *(type_3 *)(var_8 + 8);
            var_12 = *(type_3 *)(var_8 + 4);
            var_12 = var_12 >> 0x18 | (var_12 & 0xff0000) >> 8 | (var_12 & 0xff00) << 8 | var_12 << 0x18;
            var_13 = 0x18;
            var_7 = var_5(pcVar7,cp_max_len,"%s  SAS address: 0x%llx\n",leadin,
                             var_11 >> 0x18 | (var_11 & 0xff0000) >> 8 | (var_11 & 0xff00) << 8 |
                             var_11 << 0x18,var_12);
            var_6 = var_6 + var_7;
            if (var_9 != 0) {
              var_7 = var_5(var_1 + var_6,var_2 - var_6,"%s  [Unexpected TPID format: %d]\n",leadin,
                               uVar3,var_12);
              var_6 = var_6 + var_7;
            }
            goto LAB_0001a168;
          case 7:
            pcVar10 = "%s  ADT:\n";
            break;
          case 8:
            pcVar10 = "%s  ATAPI:\n";
            break;
          case 9:
            pcVar10 = "%s  UAS:\n";
            break;
          case 10:
            var_7 = var_5(pcVar7,cp_max_len,"%s  SOP ",leadin);
            var_6 = var_6 + var_7;
            cp_max_len = var_2 - var_6;
            pcVar7 = var_1 + var_6;
            if (var_9 == 0) {
              pcVar4 = (char *)(type_3)(type_4)(*(type_4 *)(var_8 + 2) << 8 | *(type_4 *)(var_8 + 2) >> 8);
              pcVar10 = "Routing ID: 0x%x\n";
              goto LAB_0001a150;
            }
            var_7 = var_5(pcVar7,cp_max_len,"  [Unexpected TPID format: %d]\n",uVar3);
            var_6 = var_6 + var_7;
            goto LAB_0001a1cf;
          case 0xb:
            pcVar10 = "%s  PCIE:\n";
            break;
          default:
            pcVar10 = "%s  unknown protocol id=0x%x  TPID format=%d\n";
            uVar11 = uVar3;
            goto LAB_0001a1c5;
          case 0xf:
            pcVar10 = "%s  No specified protocol\n";
            pcVar4 = leadin;
LAB_0001a150:
            var_7 = var_5(pcVar7,cp_max_len,pcVar10,pcVar4);
            var_13 = 0x18;
            var_6 = var_6 + var_7;
            goto LAB_0001a168;
          }
          uVar11 = cp_max_len;
          var_7 = var_5(pcVar7,cp_max_len,pcVar10,leadin);
          var_6 = var_6 + var_7;
          pcVar10 = "%s  TPID format: %d\n";
          cp_max_len = var_2 - var_6;
          pcVar7 = var_1 + var_6;
          var_12 = uVar3;
LAB_0001a1c5:
          var_7 = var_5(pcVar7,cp_max_len,pcVar10,leadin,var_12,uVar11);
          var_6 = var_6 + var_7;
LAB_0001a1cf:
          pcVar7 = var_1 + var_6;
          var_7 = var_2 - var_6;
          b_str = var_8;
LAB_0001a1eb:
          var_7 = var_10(b_str,var_11,leadin,1,var_7,pcVar7);
          var_13 = 0x18;
          var_6 = var_6 + var_7;
LAB_0001a168:
          var_4 = var_4 - var_13;
          var_8 = var_8 + var_13;
          if (var_4 < 1) {
            return var_1;
          }
          if (only_one) {
            return var_1;
          }
        } while( true );
      }
    }
  }
  return var_1;
}


(translation_unit (ERROR (binary_expression left: (identifier) (ERROR (identifier)) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (ERROR (identifier)) (identifier) (ERROR (identifier)) (binary_expression left: (identifier) right: (identifier)) (ERROR (identifier)) (identifier) (identifier) (ERROR (identifier)) (ERROR (identifier)) (identifier) (binary_expression left: (identifier) right: (identifier)))))) (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal)) (identifier) (identifier))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal)) (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) right: (number_literal)))))) right: (identifier)) right: (number_literal)))))) arguments: (argument_list))))) (return_statement (identifier))))))))) (return_statement (identifier))))

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

{
  int iVar1;
  undefined1 *puVar2;
  int unaff_EBX;
  int unaff_retaddr;
  
  entry(param_2,0x1a019);
  if ((param_7 != (undefined1 *)0x0) && (0 < param_6)) {
    if (param_6 == 1) {
      *param_7 = 0;
    }
    else {
      iVar1 = unaff_EBX + 0x169bc;
      if (unaff_retaddr != 0) {
        iVar1 = unaff_retaddr;
      }
      if (0 < (int)param_4) {
        if (((int)param_4 < 0x18) || ((param_4 & 3) != 0)) {
          sg_scnpr(param_7,param_6,unaff_EBX + 0x16f63,iVar1,param_6);
        }
        else {
          sg_scnpr(param_7,param_6,unaff_EBX + 0x1625d,iVar1);
        }
                    /* WARNING: Could not recover jumptable at 0x0001a106. Too many branches */
                    /* WARNING: Treating indirect jump as call */
        puVar2 = (undefined1 *)
                 (*(code *)(*(int *)(unaff_EBX + 0x1808f + (*param_3 & 0xf) * 4) +
                           unaff_EBX + 0x2ed6f))();
        return puVar2;
      }
    }
  }
  return param_7;
}

