#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 */
typedef unsigned char time_t;

/* Variables and functions */
char *ctime(unsigned char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned char, ...);
int /*<<< orphan*/ memcpy(char *, unsigned char *, int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
int /*<<< orphan*/ stderr;
void decode_rdac_vpd_c8(unsigned char *buff, int len) {
  int i;
  time_t tstamp;
  char *c;
  char label[61];
  int label_len;
  char uuid[33];
  int uuid_len;
  if (len < 0xab) {
    fprintf(stderr,
            "Extended Device Identification VPD page length too "
            "short=%d\n",
            len);
    return;
  }
  if (buff[4] != 'e' && buff[5] != 'd' && buff[6] != 'i') {
    fprintf(stderr,
            "Invalid page identifier %c%c%c%c, decoding "
            "not possible.\n",
            buff[4], buff[5], buff[6], buff[7]);
    return;
  }
  uuid_len = buff[11];
  for (i = 0, c = uuid; i < uuid_len; i++) {
    sprintf(c, "%02x", buff[12 + i]);
    c += 2;
  }
  printf("  Volume Unique Identifier: %s\n", uuid);
  tstamp = (buff[24] << 24) + (buff[25] << 16) + (buff[26] << 8) + buff[27];
  printf("    Creation Number: %d, Timestamp: %s", (buff[22] << 8) + buff[23],
         ctime(&tstamp));
  memset(label, 0, 61);
  label_len = buff[28];
  memcpy(label, &buff[29], label_len);
  printf("  Volume User Label: %s\n", label);
  uuid_len = buff[89];
  for (i = 0, c = uuid; i < uuid_len; i++) {
    sprintf(c, "%02x", buff[90 + i]);
    c += 2;
  }
  printf("  Storage Array Unique Identifier: %s\n", uuid);
  memset(label, 0, 61);
  label_len = buff[106];
  memcpy(label, &buff[107], label_len);
  printf("  Storage Array User Label: %s\n", label);
  for (i = 0, c = uuid; i < 8; i++) {
    sprintf(c, "%02x", buff[167 + i]);
    c += 2;
  }
  printf("  Logical Unit Number: %s\n", uuid);
  return;
}


x86 assembly (clang, -O0):
<decode_rdac_vpd_c8>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xab,-0xc(%rbp)
jge    11a1 <decode_rdac_vpd_c8+0x41>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%eax
lea    0xe6e(%rip),%rsi
movzbl %al,%edx
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    1470 <decode_rdac_vpd_c8+0x310>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%eax
cmp    $0x65,%eax
je     1214 <decode_rdac_vpd_c8+0xb4>
mov    -0x8(%rbp),%rax
movzbl 0x5(%rax),%eax
cmp    $0x64,%eax
je     1214 <decode_rdac_vpd_c8+0xb4>
mov    -0x8(%rbp),%rax
movzbl 0x6(%rax),%eax
cmp    $0x69,%eax
je     1214 <decode_rdac_vpd_c8+0xb4>
mov    0x2e05(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%al
mov    -0x8(%rbp),%rcx
movzbl 0x5(%rcx),%ecx
mov    -0x8(%rbp),%rdx
movzbl 0x6(%rdx),%r8d
mov    -0x8(%rbp),%rdx
movzbl 0x7(%rdx),%r9d
lea    0xe38(%rip),%rsi
movzbl %al,%edx
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    1470 <decode_rdac_vpd_c8+0x310>
mov    -0x8(%rbp),%rax
movzbl 0xb(%rax),%eax
mov    %eax,-0x94(%rbp)
movl   $0x0,-0x10(%rbp)
lea    -0x90(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x94(%rbp),%eax
jge    127e <decode_rdac_vpd_c8+0x11e>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0xc,%ecx
movslq %ecx,%rcx
lea    0xe1c(%rip),%rsi
movzbl (%rax,%rcx,1),%edx
call   1080 <sprintf@plt>
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1234 <decode_rdac_vpd_c8+0xd4>
lea    -0x90(%rbp),%rsi
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
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
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1a(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1b(%rcx),%ecx
add    %ecx,%eax
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x16(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x17(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x98(%rbp)
lea    -0x11(%rbp),%rdi
call   1030 <ctime@plt>
mov    -0x98(%rbp),%esi
mov    %rax,%rdx
lea    0xda3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x3d,%edx
call   1050 <memset@plt>
mov    -0x8(%rbp),%rax
movzbl 0x1c(%rax),%eax
mov    %eax,-0x64(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1d,%rsi
mov    -0x64(%rbp),%edx
call   1070 <memcpy@plt>
lea    -0x60(%rbp),%rsi
lea    0xd89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x59(%rax),%eax
mov    %eax,-0x94(%rbp)
movl   $0x0,-0x10(%rbp)
lea    -0x90(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x94(%rbp),%eax
jge    13ab <decode_rdac_vpd_c8+0x24b>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x5a,%ecx
movslq %ecx,%rcx
lea    0xcef(%rip),%rsi
movzbl (%rax,%rcx,1),%edx
call   1080 <sprintf@plt>
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1361 <decode_rdac_vpd_c8+0x201>
lea    -0x90(%rbp),%rsi
lea    0xd23(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x3d,%edx
call   1050 <memset@plt>
mov    -0x8(%rbp),%rax
movzbl 0x6a(%rax),%eax
mov    %eax,-0x64(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x6b,%rsi
mov    -0x64(%rbp),%edx
call   1070 <memcpy@plt>
lea    -0x60(%rbp),%rsi
lea    0xd09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x10(%rbp)
lea    -0x90(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    145b <decode_rdac_vpd_c8+0x2fb>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0xa7,%ecx
movslq %ecx,%rcx
lea    0xc3f(%rip),%rsi
movzbl (%rax,%rcx,1),%edx
call   1080 <sprintf@plt>
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1413 <decode_rdac_vpd_c8+0x2b3>
lea    -0x90(%rbp),%rsi
lea    0xcba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_rdac_vpd_c8>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x80,%rsp
cmp    $0xaa,%esi
jg     11a1 <decode_rdac_vpd_c8+0x41>
mov    0x2e62(%rip),%rax
mov    (%rax),%edi
movzbl %sil,%edx
lea    0xe75(%rip),%rsi
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <fprintf@plt>
mov    %rdi,%r15
mov    0x4(%rdi),%al
cmp    $0x65,%al
je     11c4 <decode_rdac_vpd_c8+0x64>
movzbl 0x5(%r15),%ecx
cmp    $0x64,%ecx
je     11c4 <decode_rdac_vpd_c8+0x64>
movzbl 0x6(%r15),%r8d
cmp    $0x69,%r8d
jne    13c8 <decode_rdac_vpd_c8+0x268>
movzbl 0xb(%r15),%r12d
test   %r12,%r12
je     11fe <decode_rdac_vpd_c8+0x9e>
lea    0x10(%rsp),%rbx
xor    %ebp,%ebp
lea    0xe9b(%rip),%r14
nopl   0x0(%rax)
movzbl 0xc(%r15,%rbp,1),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1080 <sprintf@plt>
add    $0x2,%rbx
add    $0x1,%rbp
cmp    %rbp,%r12
jne    11e0 <decode_rdac_vpd_c8+0x80>
lea    0xe77(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1b(%r15),%al
mov    %al,0xf(%rsp)
movzwl 0x16(%r15),%ebp
shl    $0x10,%ebp
bswap  %ebp
lea    0xf(%rsp),%rdi
call   1030 <ctime@plt>
lea    0xe65(%rip),%rdi
mov    %ebp,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x40(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x3d,%edx
call   1050 <memset@plt>
movzbl 0x1c(%r15),%edx
lea    0x1d(%r15),%rsi
mov    %rbp,%rdi
call   1070 <memcpy@plt>
lea    0xe54(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x59(%r15),%r12d
test   %r12,%r12
je     12ae <decode_rdac_vpd_c8+0x14e>
xor    %ebp,%ebp
lea    0xdeb(%rip),%r14
nopl   0x0(%rax)
movzbl 0x5a(%r15,%rbp,1),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1080 <sprintf@plt>
add    $0x2,%rbx
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1290 <decode_rdac_vpd_c8+0x130>
lea    0xe27(%rip),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x3d,%edx
call   1050 <memset@plt>
movzbl 0x6a(%r15),%edx
lea    0x6b(%r15),%rsi
mov    %rbx,%rdi
call   1070 <memcpy@plt>
lea    0xe13(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0xa7(%r15),%edx
lea    0xd6e(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1080 <sprintf@plt>
lea    0x12(%rsp),%rdi
movzbl 0xa8(%r15),%edx
mov    %rbx,%rsi
call   1080 <sprintf@plt>
lea    0x14(%rsp),%rdi
movzbl 0xa9(%r15),%edx
mov    %rbx,%rsi
call   1080 <sprintf@plt>
lea    0x16(%rsp),%rdi
movzbl 0xaa(%r15),%edx
mov    %rbx,%rsi
call   1080 <sprintf@plt>
lea    0x18(%rsp),%rdi
movzbl 0xab(%r15),%edx
mov    %rbx,%rsi
call   1080 <sprintf@plt>
lea    0x1a(%rsp),%rdi
movzbl 0xac(%r15),%edx
mov    %rbx,%rsi
call   1080 <sprintf@plt>
lea    0x1c(%rsp),%rdi
movzbl 0xad(%r15),%edx
mov    %rbx,%rsi
call   1080 <sprintf@plt>
lea    0x1e(%rsp),%rdi
movzbl 0xae(%r15),%edx
mov    %rbx,%rsi
call   1080 <sprintf@plt>
lea    0xd75(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c11(%rip),%rdx
mov    (%rdx),%edi
movzbl 0x7(%r15),%r9d
movzbl %al,%edx
lea    0xc5d(%rip),%rsi
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [61 x i8] c"Extended Device Identification VPD page length too short=%d\0A\00"
@.str.1 = [58 x i8] c"Invalid page identifier %c%c%c%c, decoding not possible.\0A\00"
@.str.2 = [5 x i8] c"%02x\00"
@.str.3 = [32 x i8] c" Volume Unique Identifier: %s\0A\00"
@.str.4 = [39 x i8] c" Creation Number: %d, Timestamp: %s\00"
@.str.5 = [25 x i8] c" Volume User Label: %s\0A\00"
@.str.6 = [39 x i8] c" Storage Array Unique Identifier: %s\0A\00"
@.str.7 = [32 x i8] c" Storage Array User Label: %s\0A\00"
@.str.8 = [27 x i8] c" Logical Unit Number: %s\0A\00"
define void @decode_rdac_vpd_c8(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8*
%8 = alloca [61 x i8]
%9 = alloca i32
%10 = alloca [33 x i8]
%11 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 171
br i1 %13, label %14, label %19
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = load i32, i32* %4
%17 = trunc i32 %16 to i8
%18 = call i32 (i32, i8*, i8, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8 zeroext %17)
br label %190
19: ; preds = %2
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 4
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = icmp ne i32 %23, 101
br i1 %24, label %25, label %55
25: ; preds = %19
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 5
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = icmp ne i32 %29, 100
br i1 %30, label %31, label %55
31: ; preds = %25
%32 = load i8*, i8** %3
%33 = getelementptr inbounds i8, i8* %32, i64 6
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = icmp ne i32 %35, 105
br i1 %36, label %37, label %55
37: ; preds = %31
%38 = load i32, i32* @stderr
%39 = load i8*, i8** %3
%40 = getelementptr inbounds i8, i8* %39, i64 4
%41 = load i8, i8* %40
%42 = load i8*, i8** %3
%43 = getelementptr inbounds i8, i8* %42, i64 5
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8*, i8** %3
%47 = getelementptr inbounds i8, i8* %46, i64 6
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = load i8*, i8** %3
%51 = getelementptr inbounds i8, i8* %50, i64 7
%52 = load i8, i8* %51
%53 = zext i8 %52 to i32
%54 = call i32 (i32, i8*, i8, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %41, i32 %45, i32 %49, i32 %53)
br label %190
55: ; preds = %31, %25, %19
%56 = load i8*, i8** %3
%57 = getelementptr inbounds i8, i8* %56, i64 11
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
store i32 %59, i32* %11
store i32 0, i32* %5
%60 = getelementptr inbounds [33 x i8], [33 x i8]* %10, i64 0, i64 0
store i8* %60, i8** %7
br label %61
61: ; preds = %76, %55
%62 = load i32, i32* %5
%63 = load i32, i32* %11
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %79
65: ; preds = %61
%66 = load i8*, i8** %7
%67 = load i8*, i8** %3
%68 = load i32, i32* %5
%69 = add nsw i32 12, %68
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %67, i64 %70
%72 = load i8, i8* %71
%73 = call i32 @sprintf(i8* %66, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %72)
%74 = load i8*, i8** %7
%75 = getelementptr inbounds i8, i8* %74, i64 2
store i8* %75, i8** %7
br label %76
76: ; preds = %65
%77 = load i32, i32* %5
%78 = add nsw i32 %77, 1
store i32 %78, i32* %5
br label %61
79: ; preds = %61
%80 = getelementptr inbounds [33 x i8], [33 x i8]* %10, i64 0, i64 0
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %80)
%82 = load i8*, i8** %3
%83 = getelementptr inbounds i8, i8* %82, i64 24
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = shl i32 %85, 24
%87 = load i8*, i8** %3
%88 = getelementptr inbounds i8, i8* %87, i64 25
%89 = load i8, i8* %88
%90 = zext i8 %89 to i32
%91 = shl i32 %90, 16
%92 = add nsw i32 %86, %91
%93 = load i8*, i8** %3
%94 = getelementptr inbounds i8, i8* %93, i64 26
%95 = load i8, i8* %94
%96 = zext i8 %95 to i32
%97 = shl i32 %96, 8
%98 = add nsw i32 %92, %97
%99 = load i8*, i8** %3
%100 = getelementptr inbounds i8, i8* %99, i64 27
%101 = load i8, i8* %100
%102 = zext i8 %101 to i32
%103 = add nsw i32 %98, %102
%104 = trunc i32 %103 to i8
store i8 %104, i8* %6
%105 = load i8*, i8** %3
%106 = getelementptr inbounds i8, i8* %105, i64 22
%107 = load i8, i8* %106
%108 = zext i8 %107 to i32
%109 = shl i32 %108, 8
%110 = load i8*, i8** %3
%111 = getelementptr inbounds i8, i8* %110, i64 23
%112 = load i8, i8* %111
%113 = zext i8 %112 to i32
%114 = add nsw i32 %109, %113
%115 = call i8* @ctime(i8* %6)
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %114, i8* %115)
%117 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%118 = call i32 @memset(i8* %117, i32 0, i32 61)
%119 = load i8*, i8** %3
%120 = getelementptr inbounds i8, i8* %119, i64 28
%121 = load i8, i8* %120
%122 = zext i8 %121 to i32
store i32 %122, i32* %9
%123 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%124 = load i8*, i8** %3
%125 = getelementptr inbounds i8, i8* %124, i64 29
%126 = load i32, i32* %9
%127 = call i32 @memcpy(i8* %123, i8* %125, i32 %126)
%128 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i8* %128)
%130 = load i8*, i8** %3
%131 = getelementptr inbounds i8, i8* %130, i64 89
%132 = load i8, i8* %131
%133 = zext i8 %132 to i32
store i32 %133, i32* %11
store i32 0, i32* %5
%134 = getelementptr inbounds [33 x i8], [33 x i8]* %10, i64 0, i64 0
store i8* %134, i8** %7
br label %135
135: ; preds = %150, %79
%136 = load i32, i32* %5
%137 = load i32, i32* %11
%138 = icmp slt i32 %136, %137
br i1 %138, label %139, label %153
139: ; preds = %135
%140 = load i8*, i8** %7
%141 = load i8*, i8** %3
%142 = load i32, i32* %5
%143 = add nsw i32 90, %142
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds i8, i8* %141, i64 %144
%146 = load i8, i8* %145
%147 = call i32 @sprintf(i8* %140, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %146)
%148 = load i8*, i8** %7
%149 = getelementptr inbounds i8, i8* %148, i64 2
store i8* %149, i8** %7
br label %150
150: ; preds = %139
%151 = load i32, i32* %5
%152 = add nsw i32 %151, 1
store i32 %152, i32* %5
br label %135
153: ; preds = %135
%154 = getelementptr inbounds [33 x i8], [33 x i8]* %10, i64 0, i64 0
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), i8* %154)
%156 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%157 = call i32 @memset(i8* %156, i32 0, i32 61)
%158 = load i8*, i8** %3
%159 = getelementptr inbounds i8, i8* %158, i64 106
%160 = load i8, i8* %159
%161 = zext i8 %160 to i32
store i32 %161, i32* %9
%162 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%163 = load i8*, i8** %3
%164 = getelementptr inbounds i8, i8* %163, i64 107
%165 = load i32, i32* %9
%166 = call i32 @memcpy(i8* %162, i8* %164, i32 %165)
%167 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i8* %167)
store i32 0, i32* %5
%169 = getelementptr inbounds [33 x i8], [33 x i8]* %10, i64 0, i64 0
store i8* %169, i8** %7
br label %170
170: ; preds = %184, %153
%171 = load i32, i32* %5
%172 = icmp slt i32 %171, 8
br i1 %172, label %173, label %187
173: ; preds = %170
%174 = load i8*, i8** %7
%175 = load i8*, i8** %3
%176 = load i32, i32* %5
%177 = add nsw i32 167, %176
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds i8, i8* %175, i64 %178
%180 = load i8, i8* %179
%181 = call i32 @sprintf(i8* %174, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %180)
%182 = load i8*, i8** %7
%183 = getelementptr inbounds i8, i8* %182, i64 2
store i8* %183, i8** %7
br label %184
184: ; preds = %173
%185 = load i32, i32* %5
%186 = add nsw i32 %185, 1
store i32 %186, i32* %5
br label %170
187: ; preds = %170
%188 = getelementptr inbounds [33 x i8], [33 x i8]* %10, i64 0, i64 0
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* %188)
br label %190
190: ; preds = %187, %37, %14
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [61 x i8] c"Extended Device Identification VPD page length too short=%d\0A\00"
@.str.1 = [58 x i8] c"Invalid page identifier %c%c%c%c, decoding not possible.\0A\00"
@.str.2 = [5 x i8] c"%02x\00"
@.str.3 = [32 x i8] c" Volume Unique Identifier: %s\0A\00"
@.str.4 = [39 x i8] c" Creation Number: %d, Timestamp: %s\00"
@.str.5 = [25 x i8] c" Volume User Label: %s\0A\00"
@.str.6 = [39 x i8] c" Storage Array Unique Identifier: %s\0A\00"
@.str.7 = [32 x i8] c" Storage Array User Label: %s\0A\00"
@.str.8 = [27 x i8] c" Logical Unit Number: %s\0A\00"
define void @decode_rdac_vpd_c8(i8* %0, i32 %1) {
%3 = alloca i8
%4 = alloca [61 x i8]
%5 = alloca [33 x i8]
%6 = getelementptr inbounds [61 x i8], [61 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [33 x i8], [33 x i8]* %5, i64 0, i64 0
%8 = icmp slt i32 %1, 171
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = trunc i32 %1 to i8
%12 = tail call i32 (i32, i8*, i8, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8 zeroext %11)
br label %126
13: ; preds = %2
%14 = getelementptr inbounds i8, i8* %0, i64 4
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 101
br i1 %16, label %33, label %17
17: ; preds = %13
%18 = getelementptr inbounds i8, i8* %0, i64 5
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = icmp eq i8 %19, 100
br i1 %21, label %33, label %22
22: ; preds = %17
%23 = getelementptr inbounds i8, i8* %0, i64 6
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 105
br i1 %25, label %33, label %26
26: ; preds = %22
%27 = zext i8 %24 to i32
%28 = load i32, i32* @stderr
%29 = getelementptr inbounds i8, i8* %0, i64 7
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = tail call i32 (i32, i8*, i8, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %15, i32 %20, i32 %27, i32 %31)
br label %126
33: ; preds = %22, %17, %13
%34 = getelementptr inbounds i8, i8* %0, i64 11
%35 = load i8, i8* %34
%36 = icmp eq i8 %35, 0
br i1 %36, label %49, label %37
37: ; preds = %33
%38 = zext i8 %35 to i64
br label %39
39: ; preds = %37, %39
%40 = phi i64 [ 0, %37 ], [ %47, %39 ]
%41 = phi i8* [ %7, %37 ], [ %46, %39 ]
%42 = add nuw nsw i64 %40, 12
%43 = getelementptr inbounds i8, i8* %0, i64 %42
%44 = load i8, i8* %43
%45 = call i32 @sprintf(i8* dereferenceable(1) %41, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %44)
%46 = getelementptr inbounds i8, i8* %41, i64 2
%47 = add nuw nsw i64 %40, 1
%48 = icmp eq i64 %47, %38
br i1 %48, label %49, label %39
49: ; preds = %39, %33
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%51 = getelementptr inbounds i8, i8* %0, i64 27
%52 = load i8, i8* %51
store i8 %52, i8* %3
%53 = getelementptr inbounds i8, i8* %0, i64 22
%54 = load i8, i8* %53
%55 = zext i8 %54 to i32
%56 = shl nuw nsw i32 %55, 8
%57 = getelementptr inbounds i8, i8* %0, i64 23
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = or i32 %56, %59
%61 = call i8* @ctime(i8* %3)
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %60, i8* %61)
%63 = call i32 @memset(i8* %6, i32 0, i32 61)
%64 = getelementptr inbounds i8, i8* %0, i64 28
%65 = load i8, i8* %64
%66 = zext i8 %65 to i32
%67 = getelementptr inbounds i8, i8* %0, i64 29
%68 = call i32 @memcpy(i8* %6, i8* %67, i32 %66)
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i8* %6)
%70 = getelementptr inbounds i8, i8* %0, i64 89
%71 = load i8, i8* %70
%72 = icmp eq i8 %71, 0
br i1 %72, label %85, label %73
73: ; preds = %49
%74 = zext i8 %71 to i64
br label %75
75: ; preds = %73, %75
%76 = phi i64 [ 0, %73 ], [ %83, %75 ]
%77 = phi i8* [ %7, %73 ], [ %82, %75 ]
%78 = add nuw nsw i64 %76, 90
%79 = getelementptr inbounds i8, i8* %0, i64 %78
%80 = load i8, i8* %79
%81 = call i32 @sprintf(i8* dereferenceable(1) %77, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %80)
%82 = getelementptr inbounds i8, i8* %77, i64 2
%83 = add nuw nsw i64 %76, 1
%84 = icmp eq i64 %83, %74
br i1 %84, label %85, label %75
85: ; preds = %75, %49
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), i8* %7)
%87 = call i32 @memset(i8* %6, i32 0, i32 61)
%88 = getelementptr inbounds i8, i8* %0, i64 106
%89 = load i8, i8* %88
%90 = zext i8 %89 to i32
%91 = getelementptr inbounds i8, i8* %0, i64 107
%92 = call i32 @memcpy(i8* %6, i8* %91, i32 %90)
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i8* %6)
%94 = getelementptr inbounds i8, i8* %0, i64 167
%95 = load i8, i8* %94
%96 = call i32 @sprintf(i8* dereferenceable(1) %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %95)
%97 = getelementptr inbounds [33 x i8], [33 x i8]* %5, i64 0, i64 2
%98 = getelementptr inbounds i8, i8* %0, i64 168
%99 = load i8, i8* %98
%100 = call i32 @sprintf(i8* dereferenceable(1) %97, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %99)
%101 = getelementptr inbounds [33 x i8], [33 x i8]* %5, i64 0, i64 4
%102 = getelementptr inbounds i8, i8* %0, i64 169
%103 = load i8, i8* %102
%104 = call i32 @sprintf(i8* dereferenceable(1) %101, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %103)
%105 = getelementptr inbounds [33 x i8], [33 x i8]* %5, i64 0, i64 6
%106 = getelementptr inbounds i8, i8* %0, i64 170
%107 = load i8, i8* %106
%108 = call i32 @sprintf(i8* dereferenceable(1) %105, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %107)
%109 = getelementptr inbounds [33 x i8], [33 x i8]* %5, i64 0, i64 8
%110 = getelementptr inbounds i8, i8* %0, i64 171
%111 = load i8, i8* %110
%112 = call i32 @sprintf(i8* dereferenceable(1) %109, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %111)
%113 = getelementptr inbounds [33 x i8], [33 x i8]* %5, i64 0, i64 10
%114 = getelementptr inbounds i8, i8* %0, i64 172
%115 = load i8, i8* %114
%116 = call i32 @sprintf(i8* dereferenceable(1) %113, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %115)
%117 = getelementptr inbounds [33 x i8], [33 x i8]* %5, i64 0, i64 12
%118 = getelementptr inbounds i8, i8* %0, i64 173
%119 = load i8, i8* %118
%120 = call i32 @sprintf(i8* dereferenceable(1) %117, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %119)
%121 = getelementptr inbounds [33 x i8], [33 x i8]* %5, i64 0, i64 14
%122 = getelementptr inbounds i8, i8* %0, i64 174
%123 = load i8, i8* %122
%124 = call i32 @sprintf(i8* dereferenceable(1) %121, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %123)
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* %7)
br label %126
126: ; preds = %85, %26, %9
ret void
}