#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ dStrHex(char const *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stderr;
void decode_b0_vpd(unsigned char *buff, int len, int do_hex, int pdt) {
  unsigned int u;
  if (do_hex) {
    dStrHex((const char *)buff, len, 0);
    return;
  }
  switch (pdt) {
  case 0:
  case 4:
  case 7:
    if (len < 16) {
      fprintf(stderr,
              "Block limits VPD page length too "
              "short=%d\n",
              len);
      return;
    }
    u = (buff[6] << 8) | buff[7];
    printf("  Optimal transfer length granularity: %u blocks\n", u);
    u = (buff[8] << 24) | (buff[9] << 16) | (buff[10] << 8) | buff[11];
    printf("  Maximum transfer length: %u blocks\n", u);
    u = (buff[12] << 24) | (buff[13] << 16) | (buff[14] << 8) | buff[15];
    printf("  Optimal transfer length: %u blocks\n", u);
    if (len > 19) {
      u = (buff[16] << 24) | (buff[17] << 16) | (buff[18] << 8) | buff[19];
      printf("  Maximum prefetch, xdread, xdwrite transfer length: "
             "%u blocks\n",
             u);
    }
    if (len > 27) {
      u = ((unsigned int)buff[20] << 24) | (buff[21] << 16) | (buff[22] << 8) |
          buff[23];
      printf("  Maximum unmap LBA count: %u\n", u);
      u = ((unsigned int)buff[24] << 24) | (buff[25] << 16) | (buff[26] << 8) |
          buff[27];
      printf("  Maximum unmap block descriptor count: %u\n", u);
    }
    if (len > 35) {
      u = ((unsigned int)buff[28] << 24) | (buff[29] << 16) | (buff[30] << 8) |
          buff[31];
      printf("  Optimal unmap granularity: %u\n", u);
      printf("  Unmap granularity alignment valid: %u\n", !!(buff[32] & 0x80));
      u = ((unsigned int)(buff[32] & 0x7f) << 24) | (buff[33] << 16) |
          (buff[34] << 8) | buff[35];
      printf("  Unmap granularity alignment: %u\n", u);
    }
    break;
  case 1:
  case 8:
    printf("  WORM=%d\n", !!(buff[4] & 0x1));
    break;
  case 0x11:
  default:
    printf("  Unable to decode pdt=0x%x, in hex:\n", pdt);
    dStrHex((const char *)buff, len, 0);
    break;
  }
}


x86 assembly (clang, -O0):
<decode_b0_vpd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1162 <decode_b0_vpd+0x32>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <dStrHex@plt>
jmp    147a <decode_b0_vpd+0x34a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
test   %eax,%eax
je     11ca <decode_b0_vpd+0x9a>
jmp    1175 <decode_b0_vpd+0x45>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
je     142d <decode_b0_vpd+0x2fd>
jmp    1186 <decode_b0_vpd+0x56>
mov    -0x1c(%rbp),%eax
sub    $0x4,%eax
je     11ca <decode_b0_vpd+0x9a>
jmp    1197 <decode_b0_vpd+0x67>
mov    -0x1c(%rbp),%eax
sub    $0x7,%eax
je     11ca <decode_b0_vpd+0x9a>
jmp    11a8 <decode_b0_vpd+0x78>
mov    -0x1c(%rbp),%eax
sub    $0x8,%eax
je     142d <decode_b0_vpd+0x2fd>
jmp    11b9 <decode_b0_vpd+0x89>
mov    -0x1c(%rbp),%eax
sub    $0x11,%eax
je     1458 <decode_b0_vpd+0x328>
jmp    145d <decode_b0_vpd+0x32d>
cmpl   $0x10,-0xc(%rbp)
jge    11f1 <decode_b0_vpd+0xc1>
mov    0x2e05(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
lea    0xe19(%rip),%rsi
call   1050 <fprintf@plt>
jmp    147a <decode_b0_vpd+0x34a>
mov    -0x8(%rbp),%rax
movzbl 0x6(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x7(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe18(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x8(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x9(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xa(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xb(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe09(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movzbl 0xc(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xd(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xe(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xf(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xdee(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x13,-0xc(%rbp)
jle    12e5 <decode_b0_vpd+0x1b5>
mov    -0x8(%rbp),%rax
movzbl 0x10(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x11(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x12(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x13(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xdc9(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x1b,-0xc(%rbp)
jle    1371 <decode_b0_vpd+0x241>
mov    -0x8(%rbp),%rax
movzbl 0x14(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x15(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x16(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x17(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xdbe(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x18(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x19(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1a(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1b(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xd9c(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x23,-0xc(%rbp)
jle    1428 <decode_b0_vpd+0x2f8>
mov    -0x8(%rbp),%rax
movzbl 0x1c(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1d(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1e(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1f(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xd7d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x20(%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd76(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x20(%rax),%eax
and    $0x7f,%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x21(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x22(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x23(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xd5b(%rip),%rdi
call   1040 <printf@plt>
jmp    147a <decode_b0_vpd+0x34a>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd53(%rip),%rdi
call   1040 <printf@plt>
jmp    147a <decode_b0_vpd+0x34a>
jmp    145d <decode_b0_vpd+0x32d>
mov    -0x14(%rbp),%esi
lea    0xd45(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <dStrHex@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_b0_vpd>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
test   %edx,%edx
je     114e <decode_b0_vpd+0x1e>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <dStrHex@plt>
cmp    $0x8,%ecx
ja     1280 <decode_b0_vpd+0x150>
mov    $0x91,%eax
bt     %ecx,%eax
jae    1183 <decode_b0_vpd+0x53>
cmp    $0xf,%ebp
jg     11aa <decode_b0_vpd+0x7a>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
lea    0xe8a(%rip),%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <fprintf@plt>
mov    $0x102,%eax
bt     %ecx,%eax
jae    1280 <decode_b0_vpd+0x150>
movzbl 0x4(%rbx),%esi
and    $0x1,%esi
lea    0x1002(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>
movzwl 0x6(%rbx),%esi
shl    $0x10,%esi
bswap  %esi
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
mov    0x8(%rbx),%esi
bswap  %esi
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rbx),%esi
bswap  %esi
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
cmp    $0x14,%ebp
jb     1279 <decode_b0_vpd+0x149>
mov    0x10(%rbx),%esi
bswap  %esi
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
cmp    $0x1c,%ebp
jb     1279 <decode_b0_vpd+0x149>
mov    0x14(%rbx),%esi
bswap  %esi
lea    0xedd(%rip),%rdi
call   1040 <printf@plt>
mov    0x18(%rbx),%esi
bswap  %esi
lea    0xeeb(%rip),%rdi
call   1040 <printf@plt>
cmp    $0x24,%ebp
jb     1279 <decode_b0_vpd+0x149>
mov    0x1c(%rbx),%esi
bswap  %esi
lea    0xf01(%rip),%rdi
call   1040 <printf@plt>
movzbl 0x20(%rbx),%esi
shr    $0x7,%esi
lea    0xf0f(%rip),%rdi
call   1040 <printf@plt>
movzbl 0x20(%rbx),%eax
and    $0x7f,%eax
shl    $0x18,%eax
movzbl 0x21(%rbx),%ecx
shl    $0x10,%ecx
or     %eax,%ecx
movzbl 0x22(%rbx),%eax
shl    $0x8,%eax
or     %ecx,%eax
movzbl 0x23(%rbx),%esi
or     %eax,%esi
lea    0xf0a(%rip),%rdi
jmp    119f <decode_b0_vpd+0x6f>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xf25(%rip),%rdi
mov    %ecx,%esi
call   1040 <printf@plt>
jmp    113c <decode_b0_vpd+0xc>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"Block limits VPD page length too short=%d\0A\00"
@.str.1 = [50 x i8] c" Optimal transfer length granularity: %u blocks\0A\00"
@.str.2 = [38 x i8] c" Maximum transfer length: %u blocks\0A\00"
@.str.3 = [38 x i8] c" Optimal transfer length: %u blocks\0A\00"
@.str.4 = [64 x i8] c" Maximum prefetch, xdread, xdwrite transfer length: %u blocks\0A\00"
@.str.5 = [31 x i8] c" Maximum unmap LBA count: %u\0A\00"
@.str.6 = [44 x i8] c" Maximum unmap block descriptor count: %u\0A\00"
@.str.7 = [33 x i8] c" Optimal unmap granularity: %u\0A\00"
@.str.8 = [41 x i8] c" Unmap granularity alignment valid: %u\0A\00"
@.str.9 = [35 x i8] c" Unmap granularity alignment: %u\0A\00"
@.str.10 = [11 x i8] c" WORM=%d\0A\00"
@.str.11 = [38 x i8] c" Unable to decode pdt=0x%x, in hex:\0A\00"
define void @decode_b0_vpd(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %7
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %4
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = call i32 @dStrHex(i8* %13, i32 %14, i32 0)
br label %247
16: ; preds = %4
%17 = load i32, i32* %8
switch i32 %17, label %241 [
i32 0, label %18
i32 4, label %18
i32 7, label %18
i32 1, label %229
i32 8, label %229
i32 17, label %240
]
18: ; preds = %16, %16, %16
%19 = load i32, i32* %6
%20 = icmp slt i32 %19, 16
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = load i32, i32* @stderr
%23 = load i32, i32* %6
%24 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %23)
br label %247
25: ; preds = %18
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i64 6
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = shl i32 %29, 8
%31 = load i8*, i8** %5
%32 = getelementptr inbounds i8, i8* %31, i64 7
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = or i32 %30, %34
store i32 %35, i32* %9
%36 = load i32, i32* %9
%37 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i32 %36)
%38 = load i8*, i8** %5
%39 = getelementptr inbounds i8, i8* %38, i64 8
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = shl i32 %41, 24
%43 = load i8*, i8** %5
%44 = getelementptr inbounds i8, i8* %43, i64 9
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = shl i32 %46, 16
%48 = or i32 %42, %47
%49 = load i8*, i8** %5
%50 = getelementptr inbounds i8, i8* %49, i64 10
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = shl i32 %52, 8
%54 = or i32 %48, %53
%55 = load i8*, i8** %5
%56 = getelementptr inbounds i8, i8* %55, i64 11
%57 = load i8, i8* %56
%58 = zext i8 %57 to i32
%59 = or i32 %54, %58
store i32 %59, i32* %9
%60 = load i32, i32* %9
%61 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %60)
%62 = load i8*, i8** %5
%63 = getelementptr inbounds i8, i8* %62, i64 12
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = shl i32 %65, 24
%67 = load i8*, i8** %5
%68 = getelementptr inbounds i8, i8* %67, i64 13
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = shl i32 %70, 16
%72 = or i32 %66, %71
%73 = load i8*, i8** %5
%74 = getelementptr inbounds i8, i8* %73, i64 14
%75 = load i8, i8* %74
%76 = zext i8 %75 to i32
%77 = shl i32 %76, 8
%78 = or i32 %72, %77
%79 = load i8*, i8** %5
%80 = getelementptr inbounds i8, i8* %79, i64 15
%81 = load i8, i8* %80
%82 = zext i8 %81 to i32
%83 = or i32 %78, %82
store i32 %83, i32* %9
%84 = load i32, i32* %9
%85 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 %84)
%86 = load i32, i32* %6
%87 = icmp sgt i32 %86, 19
br i1 %87, label %88, label %113
88: ; preds = %25
%89 = load i8*, i8** %5
%90 = getelementptr inbounds i8, i8* %89, i64 16
%91 = load i8, i8* %90
%92 = zext i8 %91 to i32
%93 = shl i32 %92, 24
%94 = load i8*, i8** %5
%95 = getelementptr inbounds i8, i8* %94, i64 17
%96 = load i8, i8* %95
%97 = zext i8 %96 to i32
%98 = shl i32 %97, 16
%99 = or i32 %93, %98
%100 = load i8*, i8** %5
%101 = getelementptr inbounds i8, i8* %100, i64 18
%102 = load i8, i8* %101
%103 = zext i8 %102 to i32
%104 = shl i32 %103, 8
%105 = or i32 %99, %104
%106 = load i8*, i8** %5
%107 = getelementptr inbounds i8, i8* %106, i64 19
%108 = load i8, i8* %107
%109 = zext i8 %108 to i32
%110 = or i32 %105, %109
store i32 %110, i32* %9
%111 = load i32, i32* %9
%112 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.4, i64 0, i64 0), i32 %111)
br label %113
113: ; preds = %88, %25
%114 = load i32, i32* %6
%115 = icmp sgt i32 %114, 27
br i1 %115, label %116, label %165
116: ; preds = %113
%117 = load i8*, i8** %5
%118 = getelementptr inbounds i8, i8* %117, i64 20
%119 = load i8, i8* %118
%120 = zext i8 %119 to i32
%121 = shl i32 %120, 24
%122 = load i8*, i8** %5
%123 = getelementptr inbounds i8, i8* %122, i64 21
%124 = load i8, i8* %123
%125 = zext i8 %124 to i32
%126 = shl i32 %125, 16
%127 = or i32 %121, %126
%128 = load i8*, i8** %5
%129 = getelementptr inbounds i8, i8* %128, i64 22
%130 = load i8, i8* %129
%131 = zext i8 %130 to i32
%132 = shl i32 %131, 8
%133 = or i32 %127, %132
%134 = load i8*, i8** %5
%135 = getelementptr inbounds i8, i8* %134, i64 23
%136 = load i8, i8* %135
%137 = zext i8 %136 to i32
%138 = or i32 %133, %137
store i32 %138, i32* %9
%139 = load i32, i32* %9
%140 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i32 %139)
%141 = load i8*, i8** %5
%142 = getelementptr inbounds i8, i8* %141, i64 24
%143 = load i8, i8* %142
%144 = zext i8 %143 to i32
%145 = shl i32 %144, 24
%146 = load i8*, i8** %5
%147 = getelementptr inbounds i8, i8* %146, i64 25
%148 = load i8, i8* %147
%149 = zext i8 %148 to i32
%150 = shl i32 %149, 16
%151 = or i32 %145, %150
%152 = load i8*, i8** %5
%153 = getelementptr inbounds i8, i8* %152, i64 26
%154 = load i8, i8* %153
%155 = zext i8 %154 to i32
%156 = shl i32 %155, 8
%157 = or i32 %151, %156
%158 = load i8*, i8** %5
%159 = getelementptr inbounds i8, i8* %158, i64 27
%160 = load i8, i8* %159
%161 = zext i8 %160 to i32
%162 = or i32 %157, %161
store i32 %162, i32* %9
%163 = load i32, i32* %9
%164 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), i32 %163)
br label %165
165: ; preds = %116, %113
%166 = load i32, i32* %6
%167 = icmp sgt i32 %166, 35
br i1 %167, label %168, label %228
168: ; preds = %165
%169 = load i8*, i8** %5
%170 = getelementptr inbounds i8, i8* %169, i64 28
%171 = load i8, i8* %170
%172 = zext i8 %171 to i32
%173 = shl i32 %172, 24
%174 = load i8*, i8** %5
%175 = getelementptr inbounds i8, i8* %174, i64 29
%176 = load i8, i8* %175
%177 = zext i8 %176 to i32
%178 = shl i32 %177, 16
%179 = or i32 %173, %178
%180 = load i8*, i8** %5
%181 = getelementptr inbounds i8, i8* %180, i64 30
%182 = load i8, i8* %181
%183 = zext i8 %182 to i32
%184 = shl i32 %183, 8
%185 = or i32 %179, %184
%186 = load i8*, i8** %5
%187 = getelementptr inbounds i8, i8* %186, i64 31
%188 = load i8, i8* %187
%189 = zext i8 %188 to i32
%190 = or i32 %185, %189
store i32 %190, i32* %9
%191 = load i32, i32* %9
%192 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i32 %191)
%193 = load i8*, i8** %5
%194 = getelementptr inbounds i8, i8* %193, i64 32
%195 = load i8, i8* %194
%196 = zext i8 %195 to i32
%197 = and i32 %196, 128
%198 = icmp ne i32 %197, 0
%199 = xor i1 %198, true
%200 = xor i1 %199, true
%201 = zext i1 %200 to i32
%202 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), i32 %201)
%203 = load i8*, i8** %5
%204 = getelementptr inbounds i8, i8* %203, i64 32
%205 = load i8, i8* %204
%206 = zext i8 %205 to i32
%207 = and i32 %206, 127
%208 = shl i32 %207, 24
%209 = load i8*, i8** %5
%210 = getelementptr inbounds i8, i8* %209, i64 33
%211 = load i8, i8* %210
%212 = zext i8 %211 to i32
%213 = shl i32 %212, 16
%214 = or i32 %208, %213
%215 = load i8*, i8** %5
%216 = getelementptr inbounds i8, i8* %215, i64 34
%217 = load i8, i8* %216
%218 = zext i8 %217 to i32
%219 = shl i32 %218, 8
%220 = or i32 %214, %219
%221 = load i8*, i8** %5
%222 = getelementptr inbounds i8, i8* %221, i64 35
%223 = load i8, i8* %222
%224 = zext i8 %223 to i32
%225 = or i32 %220, %224
store i32 %225, i32* %9
%226 = load i32, i32* %9
%227 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i32 %226)
br label %228
228: ; preds = %168, %165
br label %247
229: ; preds = %16, %16
%230 = load i8*, i8** %5
%231 = getelementptr inbounds i8, i8* %230, i64 4
%232 = load i8, i8* %231
%233 = zext i8 %232 to i32
%234 = and i32 %233, 1
%235 = icmp ne i32 %234, 0
%236 = xor i1 %235, true
%237 = xor i1 %236, true
%238 = zext i1 %237 to i32
%239 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %238)
br label %247
240: ; preds = %16
br label %241
241: ; preds = %16, %240
%242 = load i32, i32* %8
%243 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), i32 %242)
%244 = load i8*, i8** %5
%245 = load i32, i32* %6
%246 = call i32 @dStrHex(i8* %244, i32 %245, i32 0)
br label %247
247: ; preds = %12, %21, %241, %229, %228
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"Block limits VPD page length too short=%d\0A\00"
@.str.1 = [50 x i8] c" Optimal transfer length granularity: %u blocks\0A\00"
@.str.2 = [38 x i8] c" Maximum transfer length: %u blocks\0A\00"
@.str.3 = [38 x i8] c" Optimal transfer length: %u blocks\0A\00"
@.str.4 = [64 x i8] c" Maximum prefetch, xdread, xdwrite transfer length: %u blocks\0A\00"
@.str.5 = [31 x i8] c" Maximum unmap LBA count: %u\0A\00"
@.str.6 = [44 x i8] c" Maximum unmap block descriptor count: %u\0A\00"
@.str.7 = [33 x i8] c" Optimal unmap granularity: %u\0A\00"
@.str.8 = [41 x i8] c" Unmap granularity alignment valid: %u\0A\00"
@.str.9 = [35 x i8] c" Unmap granularity alignment: %u\0A\00"
@.str.10 = [11 x i8] c" WORM=%d\0A\00"
@.str.11 = [38 x i8] c" Unable to decode pdt=0x%x, in hex:\0A\00"
define void @decode_b0_vpd(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %2, 0
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @dStrHex(i8* %0, i32 %1, i32 0)
br label %177
8: ; preds = %4
switch i32 %3, label %174 [
i32 0, label %9
i32 4, label %9
i32 7, label %9
i32 1, label %168
i32 8, label %168
]
9: ; preds = %8, %8, %8
%10 = icmp slt i32 %1, 16
br i1 %10, label %11, label %14
11: ; preds = %9
%12 = load i32, i32* @stderr
%13 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %177
14: ; preds = %9
%15 = getelementptr inbounds i8, i8* %0, i64 6
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl nuw nsw i32 %17, 8
%19 = getelementptr inbounds i8, i8* %0, i64 7
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = or i32 %18, %21
%23 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds i8, i8* %0, i64 8
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = shl nuw i32 %26, 24
%28 = getelementptr inbounds i8, i8* %0, i64 9
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = shl nuw nsw i32 %30, 16
%32 = or i32 %31, %27
%33 = getelementptr inbounds i8, i8* %0, i64 10
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = shl nuw nsw i32 %35, 8
%37 = or i32 %32, %36
%38 = getelementptr inbounds i8, i8* %0, i64 11
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = or i32 %37, %40
%42 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds i8, i8* %0, i64 12
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = shl nuw i32 %45, 24
%47 = getelementptr inbounds i8, i8* %0, i64 13
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = shl nuw nsw i32 %49, 16
%51 = or i32 %50, %46
%52 = getelementptr inbounds i8, i8* %0, i64 14
%53 = load i8, i8* %52
%54 = zext i8 %53 to i32
%55 = shl nuw nsw i32 %54, 8
%56 = or i32 %51, %55
%57 = getelementptr inbounds i8, i8* %0, i64 15
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = or i32 %56, %59
%61 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 %60)
%62 = icmp ugt i32 %1, 19
br i1 %62, label %63, label %177
63: ; preds = %14
%64 = getelementptr inbounds i8, i8* %0, i64 16
%65 = load i8, i8* %64
%66 = zext i8 %65 to i32
%67 = shl nuw i32 %66, 24
%68 = getelementptr inbounds i8, i8* %0, i64 17
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = shl nuw nsw i32 %70, 16
%72 = or i32 %71, %67
%73 = getelementptr inbounds i8, i8* %0, i64 18
%74 = load i8, i8* %73
%75 = zext i8 %74 to i32
%76 = shl nuw nsw i32 %75, 8
%77 = or i32 %72, %76
%78 = getelementptr inbounds i8, i8* %0, i64 19
%79 = load i8, i8* %78
%80 = zext i8 %79 to i32
%81 = or i32 %77, %80
%82 = tail call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.4, i64 0, i64 0), i32 %81)
%83 = icmp ugt i32 %1, 27
br i1 %83, label %84, label %177
84: ; preds = %63
%85 = getelementptr inbounds i8, i8* %0, i64 20
%86 = load i8, i8* %85
%87 = zext i8 %86 to i32
%88 = shl nuw i32 %87, 24
%89 = getelementptr inbounds i8, i8* %0, i64 21
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = shl nuw nsw i32 %91, 16
%93 = or i32 %92, %88
%94 = getelementptr inbounds i8, i8* %0, i64 22
%95 = load i8, i8* %94
%96 = zext i8 %95 to i32
%97 = shl nuw nsw i32 %96, 8
%98 = or i32 %93, %97
%99 = getelementptr inbounds i8, i8* %0, i64 23
%100 = load i8, i8* %99
%101 = zext i8 %100 to i32
%102 = or i32 %98, %101
%103 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i32 %102)
%104 = getelementptr inbounds i8, i8* %0, i64 24
%105 = load i8, i8* %104
%106 = zext i8 %105 to i32
%107 = shl nuw i32 %106, 24
%108 = getelementptr inbounds i8, i8* %0, i64 25
%109 = load i8, i8* %108
%110 = zext i8 %109 to i32
%111 = shl nuw nsw i32 %110, 16
%112 = or i32 %111, %107
%113 = getelementptr inbounds i8, i8* %0, i64 26
%114 = load i8, i8* %113
%115 = zext i8 %114 to i32
%116 = shl nuw nsw i32 %115, 8
%117 = or i32 %112, %116
%118 = getelementptr inbounds i8, i8* %0, i64 27
%119 = load i8, i8* %118
%120 = zext i8 %119 to i32
%121 = or i32 %117, %120
%122 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), i32 %121)
%123 = icmp ugt i32 %1, 35
br i1 %123, label %124, label %177
124: ; preds = %84
%125 = getelementptr inbounds i8, i8* %0, i64 28
%126 = load i8, i8* %125
%127 = zext i8 %126 to i32
%128 = shl nuw i32 %127, 24
%129 = getelementptr inbounds i8, i8* %0, i64 29
%130 = load i8, i8* %129
%131 = zext i8 %130 to i32
%132 = shl nuw nsw i32 %131, 16
%133 = or i32 %132, %128
%134 = getelementptr inbounds i8, i8* %0, i64 30
%135 = load i8, i8* %134
%136 = zext i8 %135 to i32
%137 = shl nuw nsw i32 %136, 8
%138 = or i32 %133, %137
%139 = getelementptr inbounds i8, i8* %0, i64 31
%140 = load i8, i8* %139
%141 = zext i8 %140 to i32
%142 = or i32 %138, %141
%143 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i32 %142)
%144 = getelementptr inbounds i8, i8* %0, i64 32
%145 = load i8, i8* %144
%146 = lshr i8 %145, 7
%147 = zext i8 %146 to i32
%148 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), i32 %147)
%149 = load i8, i8* %144
%150 = and i8 %149, 127
%151 = zext i8 %150 to i32
%152 = shl nuw nsw i32 %151, 24
%153 = getelementptr inbounds i8, i8* %0, i64 33
%154 = load i8, i8* %153
%155 = zext i8 %154 to i32
%156 = shl nuw nsw i32 %155, 16
%157 = or i32 %152, %156
%158 = getelementptr inbounds i8, i8* %0, i64 34
%159 = load i8, i8* %158
%160 = zext i8 %159 to i32
%161 = shl nuw nsw i32 %160, 8
%162 = or i32 %157, %161
%163 = getelementptr inbounds i8, i8* %0, i64 35
%164 = load i8, i8* %163
%165 = zext i8 %164 to i32
%166 = or i32 %162, %165
%167 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i32 %166)
br label %177
168: ; preds = %8, %8
%169 = getelementptr inbounds i8, i8* %0, i64 4
%170 = load i8, i8* %169
%171 = and i8 %170, 1
%172 = zext i8 %171 to i32
%173 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %172)
br label %177
174: ; preds = %8
%175 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), i32 %3)
%176 = tail call i32 @dStrHex(i8* %0, i32 %1, i32 0)
br label %177
177: ; preds = %14, %63, %168, %174, %124, %84, %11, %6
ret void
}