#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 int /*<<< orphan*/ str;

/* Variables and functions */
int /*<<< orphan*/ dStrHex(char const *, int, int);
int /*<<< orphan*/ get_pcb_str(int, char *, int);
int /*<<< orphan*/ printf(char *, ...);
void show_mchanger_diag_data_page(unsigned char *resp, int len, int show_pcb) {
  int num, pl, pc, pcb;
  unsigned int v;
  unsigned char *ucp;
  char str[128];
  printf("Media changer diagnostics data page (smc-3) [0x16]\n");
  num = len - 4;
  ucp = &resp[0] + 4;
  while (num > 3) {
    pc = (ucp[0] << 8) | ucp[1];
    pcb = ucp[2];
    pl = ucp[3] + 4;
    printf("  Parameter code: %d\n", pc);
    printf("    Repeat: %d\n", !!(ucp[5] & 0x80));
    printf("    Sense key: 0x%x\n", ucp[5] & 0xf);
    printf("    Additional sense code: 0x%x\n", ucp[6]);
    printf("    Additional sense code qualifier: 0x%x\n", ucp[7]);
    v = (ucp[8] << 24) + (ucp[9] << 16) + (ucp[10] << 8) + ucp[11];
    printf("    Vendor specific code qualifier: 0x%x\n", v);
    v = (ucp[12] << 24) + (ucp[13] << 16) + (ucp[14] << 8) + ucp[15];
    printf("    Product revision level: %u\n", v);
    v = (ucp[16] << 24) + (ucp[17] << 16) + (ucp[18] << 8) + ucp[19];
    printf("    Number of moves: %u\n", v);
    v = (ucp[20] << 24) + (ucp[21] << 16) + (ucp[22] << 8) + ucp[23];
    printf("    Number of pick: %u\n", v);
    v = (ucp[24] << 24) + (ucp[25] << 16) + (ucp[26] << 8) + ucp[27];
    printf("    Number of pick retries: %u\n", v);
    v = (ucp[28] << 24) + (ucp[29] << 16) + (ucp[30] << 8) + ucp[31];
    printf("    Number of places: %u\n", v);
    v = (ucp[32] << 24) + (ucp[33] << 16) + (ucp[34] << 8) + ucp[35];
    printf("    Number of place retries: %u\n", v);
    v = (ucp[36] << 24) + (ucp[37] << 16) + (ucp[38] << 8) + ucp[39];
    printf("    Number of determined volume identifiers: %u\n", v);
    v = (ucp[40] << 24) + (ucp[41] << 16) + (ucp[42] << 8) + ucp[43];
    printf("    Number of unreadable volume identifiers: %u\n", v);
    printf("    Operation code: 0x%x\n", ucp[44]);
    printf("    Service action: 0x%x\n", ucp[45] & 0xf);
    printf("    Media changer error type: 0x%x\n", ucp[46]);
    printf("    MTAV: %d\n", !!(ucp[47] & 0x8));
    printf("    IAV: %d\n", !!(ucp[47] & 0x4));
    printf("    LSAV: %d\n", !!(ucp[47] & 0x2));
    printf("    DAV: %d\n", !!(ucp[47] & 0x1));
    v = (ucp[48] << 8) + ucp[49];
    printf("    Medium transport address: 0x%x\n", v);
    v = (ucp[50] << 8) + ucp[51];
    printf("    Intial address: 0x%x\n", v);
    v = (ucp[52] << 8) + ucp[53];
    printf("    Last successful address: 0x%x\n", v);
    v = (ucp[54] << 8) + ucp[55];
    printf("    Destination address: 0x%x\n", v);
    if (pl > 91) {
      printf("    Volume tag information:\n");
      dStrHex((const char *)(ucp + 56), 36, 0);
    }
    if (pl > 99) {
      printf("    Timestamp origin: 0x%x\n", ucp[92] & 0xf);
      printf("    Timestamp:\n");
      dStrHex((const char *)(ucp + 94), 6, 1);
    }
    if (show_pcb) {
      get_pcb_str(pcb, str, sizeof(str));
      printf("\n        <%s>\n", str);
    }
    num -= pl;
    ucp += pl;
  }
}


x86 assembly (clang, -O0):
<show_mchanger_diag_data_page>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
sub    $0x4,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x3,-0x14(%rbp)
jle    16ce <show_mchanger_diag_data_page+0x59e>
mov    -0x30(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x30(%rbp),%rax
movzbl 0x2(%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x30(%rbp),%rax
movzbl 0x3(%rax),%eax
add    $0x4,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x5(%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x5(%rax),%esi
and    $0xf,%esi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x6(%rax),%esi
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x7(%rax),%esi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x8(%rax),%eax
shl    $0x18,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x9(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0xa(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0xb(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0xc(%rax),%eax
shl    $0x18,%eax
mov    -0x30(%rbp),%rcx
movzbl 0xd(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0xe(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0xf(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x10(%rax),%eax
shl    $0x18,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x11(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x12(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x13(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x14(%rax),%eax
shl    $0x18,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x15(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x16(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x17(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x18(%rax),%eax
shl    $0x18,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x19(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x1a(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x1b(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x1c(%rax),%eax
shl    $0x18,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x1d(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x1e(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x1f(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x20(%rax),%eax
shl    $0x18,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x21(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x22(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x23(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xd80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x24(%rax),%eax
shl    $0x18,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x25(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x26(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x27(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x28(%rax),%eax
shl    $0x18,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x29(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x2a(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x2b(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xd4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x2c(%rax),%esi
lea    0xd67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x2d(%rax),%esi
and    $0xf,%esi
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x2e(%rax),%esi
lea    0xd6c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x2f(%rax),%eax
and    $0x8,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x2f(%rax),%eax
and    $0x4,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x2f(%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd33(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x2f(%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd19(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x30(%rax),%eax
shl    $0x8,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x31(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xcfd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x32(%rax),%eax
shl    $0x8,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x33(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x34(%rax),%eax
shl    $0x8,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x35(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
movzbl 0x36(%rax),%eax
shl    $0x8,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x37(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xce3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x5b,-0x18(%rbp)
jle    1632 <show_mchanger_diag_data_page+0x502>
lea    0xcea(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rdi
add    $0x38,%rdi
mov    $0x24,%esi
xor    %edx,%edx
call   1030 <dStrHex@plt>
cmpl   $0x63,-0x18(%rbp)
jle    167a <show_mchanger_diag_data_page+0x54a>
mov    -0x30(%rbp),%rax
movzbl 0x5c(%rax),%esi
and    $0xf,%esi
lea    0xcd0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcde(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rdi
add    $0x5e,%rdi
mov    $0x6,%esi
mov    $0x1,%edx
call   1030 <dStrHex@plt>
cmpl   $0x0,-0x10(%rbp)
je     16ad <show_mchanger_diag_data_page+0x57d>
mov    -0x20(%rbp),%edi
lea    -0xb0(%rbp),%rsi
mov    $0x80,%edx
call   1050 <get_pcb_str@plt>
lea    -0xb0(%rbp),%rsi
lea    0xca4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
jmp    1168 <show_mchanger_diag_data_page+0x38>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_mchanger_diag_data_page>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0x1198(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x8,%ebp
jl     1428 <show_mchanger_diag_data_page+0x2e8>
add    $0xfffffffc,%ebp
add    $0x4,%rbx
mov    %rsp,%r12
jmp    118f <show_mchanger_diag_data_page+0x4f>
nopw   0x0(%rax,%rax,1)
sub    %r15d,%ebp
add    %r15,%rbx
cmp    $0x3,%ebp
jle    1428 <show_mchanger_diag_data_page+0x2e8>
movzwl (%rbx),%esi
shl    $0x10,%esi
bswap  %esi
movzbl 0x2(%rbx),%r13d
movzbl 0x3(%rbx),%r15d
lea    0xe58(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x5(%rbx),%esi
shr    $0x7,%esi
lea    0xe59(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x5(%rbx),%esi
and    $0xf,%esi
lea    0xe54(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x6(%rbx),%esi
lea    0xe57(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x7(%rbx),%esi
lea    0xe66(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rbx),%esi
bswap  %esi
lea    0xe7e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rbx),%esi
bswap  %esi
lea    0xe95(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rbx),%esi
bswap  %esi
lea    0xea2(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rbx),%esi
bswap  %esi
lea    0xea8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%rbx),%esi
bswap  %esi
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%rbx),%esi
bswap  %esi
lea    0xeba(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%rbx),%esi
bswap  %esi
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x24(%rbx),%esi
bswap  %esi
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x28(%rbx),%esi
bswap  %esi
lea    0xeed(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x2c(%rbx),%esi
lea    0xf0c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x2d(%rbx),%esi
and    $0xf,%esi
lea    0xf11(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x2e(%rbx),%esi
lea    0xf19(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x2f(%rbx),%esi
shr    $0x3,%esi
and    $0x1,%esi
lea    0xf25(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x2f(%rbx),%esi
shr    $0x2,%esi
and    $0x1,%esi
lea    0xf1b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x2f(%rbx),%esi
shr    %esi
and    $0x1,%esi
lea    0xf11(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl 0x2f(%rbx),%esi
and    $0x1,%esi
lea    0xf0a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzwl 0x30(%rbx),%esi
shl    $0x10,%esi
bswap  %esi
lea    0xf00(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzwl 0x32(%rbx),%esi
shl    $0x10,%esi
bswap  %esi
lea    0xf0d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzwl 0x34(%rbx),%esi
shl    $0x10,%esi
bswap  %esi
lea    0xf10(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzwl 0x36(%rbx),%esi
shl    $0x10,%esi
bswap  %esi
lea    0xf1c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x58,%r15
jb     13f5 <show_mchanger_diag_data_page+0x2b5>
lea    0xf94(%rip),%rdi
call   1030 <puts@plt>
lea    0x38(%rbx),%rdi
mov    $0x24,%esi
xor    %edx,%edx
call   1040 <dStrHex@plt>
cmp    $0x60,%r15b
jb     13f5 <show_mchanger_diag_data_page+0x2b5>
movzbl 0x5c(%rbx),%esi
and    $0xf,%esi
lea    0xefe(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf4e(%rip),%rdi
call   1030 <puts@plt>
lea    0x5e(%rbx),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
call   1040 <dStrHex@plt>
add    $0x4,%r15
test   %r14d,%r14d
je     1180 <show_mchanger_diag_data_page+0x40>
mov    %r13d,%edi
mov    %r12,%rsi
mov    $0x80,%edx
call   1060 <get_pcb_str@plt>
lea    0xed0(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1180 <show_mchanger_diag_data_page+0x40>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [52 x i8] c"Media changer diagnostics data page (smc-3) [0x16]\0A\00"
@.str.1 = [22 x i8] c" Parameter code: %d\0A\00"
@.str.2 = [16 x i8] c" Repeat: %d\0A\00"
@.str.3 = [21 x i8] c" Sense key: 0x%x\0A\00"
@.str.4 = [33 x i8] c" Additional sense code: 0x%x\0A\00"
@.str.5 = [43 x i8] c" Additional sense code qualifier: 0x%x\0A\00"
@.str.6 = [42 x i8] c" Vendor specific code qualifier: 0x%x\0A\00"
@.str.7 = [32 x i8] c" Product revision level: %u\0A\00"
@.str.8 = [25 x i8] c" Number of moves: %u\0A\00"
@.str.9 = [24 x i8] c" Number of pick: %u\0A\00"
@.str.10 = [32 x i8] c" Number of pick retries: %u\0A\00"
@.str.11 = [26 x i8] c" Number of places: %u\0A\00"
@.str.12 = [33 x i8] c" Number of place retries: %u\0A\00"
@.str.13 = [49 x i8] c" Number of determined volume identifiers: %u\0A\00"
@.str.14 = [49 x i8] c" Number of unreadable volume identifiers: %u\0A\00"
@.str.15 = [26 x i8] c" Operation code: 0x%x\0A\00"
@.str.16 = [26 x i8] c" Service action: 0x%x\0A\00"
@.str.17 = [36 x i8] c" Media changer error type: 0x%x\0A\00"
@.str.18 = [14 x i8] c" MTAV: %d\0A\00"
@.str.19 = [13 x i8] c" IAV: %d\0A\00"
@.str.20 = [14 x i8] c" LSAV: %d\0A\00"
@.str.21 = [13 x i8] c" DAV: %d\0A\00"
@.str.22 = [36 x i8] c" Medium transport address: 0x%x\0A\00"
@.str.23 = [26 x i8] c" Intial address: 0x%x\0A\00"
@.str.24 = [35 x i8] c" Last successful address: 0x%x\0A\00"
@.str.25 = [31 x i8] c" Destination address: 0x%x\0A\00"
@.str.26 = [29 x i8] c" Volume tag information:\0A\00"
@.str.27 = [28 x i8] c" Timestamp origin: 0x%x\0A\00"
@.str.28 = [16 x i8] c" Timestamp:\0A\00"
@.str.29 = [15 x i8] c"\0A <%s>\0A\00"
define void @show_mchanger_diag_data_page(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca [128 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, 4
store i32 %16, i32* %7
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = getelementptr inbounds i8, i8* %18, i64 4
store i8* %19, i8** %12
br label %20
20: ; preds = %421, %3
%21 = load i32, i32* %7
%22 = icmp sgt i32 %21, 3
br i1 %22, label %23, label %429
23: ; preds = %20
%24 = load i8*, i8** %12
%25 = getelementptr inbounds i8, i8* %24, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = shl i32 %27, 8
%29 = load i8*, i8** %12
%30 = getelementptr inbounds i8, i8* %29, i64 1
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = or i32 %28, %32
store i32 %33, i32* %9
%34 = load i8*, i8** %12
%35 = getelementptr inbounds i8, i8* %34, i64 2
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
store i32 %37, i32* %10
%38 = load i8*, i8** %12
%39 = getelementptr inbounds i8, i8* %38, i64 3
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = add nsw i32 %41, 4
store i32 %42, i32* %8
%43 = load i32, i32* %9
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%45 = load i8*, i8** %12
%46 = getelementptr inbounds i8, i8* %45, i64 5
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = and i32 %48, 128
%50 = icmp ne i32 %49, 0
%51 = xor i1 %50, true
%52 = xor i1 %51, true
%53 = zext i1 %52 to i32
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %53)
%55 = load i8*, i8** %12
%56 = getelementptr inbounds i8, i8* %55, i64 5
%57 = load i8, i8* %56
%58 = zext i8 %57 to i32
%59 = and i32 %58, 15
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %59)
%61 = load i8*, i8** %12
%62 = getelementptr inbounds i8, i8* %61, i64 6
%63 = load i8, i8* %62
%64 = zext i8 %63 to i32
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %64)
%66 = load i8*, i8** %12
%67 = getelementptr inbounds i8, i8* %66, i64 7
%68 = load i8, i8* %67
%69 = zext i8 %68 to i32
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i32 %69)
%71 = load i8*, i8** %12
%72 = getelementptr inbounds i8, i8* %71, i64 8
%73 = load i8, i8* %72
%74 = zext i8 %73 to i32
%75 = shl i32 %74, 24
%76 = load i8*, i8** %12
%77 = getelementptr inbounds i8, i8* %76, i64 9
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = shl i32 %79, 16
%81 = add nsw i32 %75, %80
%82 = load i8*, i8** %12
%83 = getelementptr inbounds i8, i8* %82, i64 10
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = shl i32 %85, 8
%87 = add nsw i32 %81, %86
%88 = load i8*, i8** %12
%89 = getelementptr inbounds i8, i8* %88, i64 11
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = add nsw i32 %87, %91
store i32 %92, i32* %11
%93 = load i32, i32* %11
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i32 %93)
%95 = load i8*, i8** %12
%96 = getelementptr inbounds i8, i8* %95, i64 12
%97 = load i8, i8* %96
%98 = zext i8 %97 to i32
%99 = shl i32 %98, 24
%100 = load i8*, i8** %12
%101 = getelementptr inbounds i8, i8* %100, i64 13
%102 = load i8, i8* %101
%103 = zext i8 %102 to i32
%104 = shl i32 %103, 16
%105 = add nsw i32 %99, %104
%106 = load i8*, i8** %12
%107 = getelementptr inbounds i8, i8* %106, i64 14
%108 = load i8, i8* %107
%109 = zext i8 %108 to i32
%110 = shl i32 %109, 8
%111 = add nsw i32 %105, %110
%112 = load i8*, i8** %12
%113 = getelementptr inbounds i8, i8* %112, i64 15
%114 = load i8, i8* %113
%115 = zext i8 %114 to i32
%116 = add nsw i32 %111, %115
store i32 %116, i32* %11
%117 = load i32, i32* %11
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i32 %117)
%119 = load i8*, i8** %12
%120 = getelementptr inbounds i8, i8* %119, i64 16
%121 = load i8, i8* %120
%122 = zext i8 %121 to i32
%123 = shl i32 %122, 24
%124 = load i8*, i8** %12
%125 = getelementptr inbounds i8, i8* %124, i64 17
%126 = load i8, i8* %125
%127 = zext i8 %126 to i32
%128 = shl i32 %127, 16
%129 = add nsw i32 %123, %128
%130 = load i8*, i8** %12
%131 = getelementptr inbounds i8, i8* %130, i64 18
%132 = load i8, i8* %131
%133 = zext i8 %132 to i32
%134 = shl i32 %133, 8
%135 = add nsw i32 %129, %134
%136 = load i8*, i8** %12
%137 = getelementptr inbounds i8, i8* %136, i64 19
%138 = load i8, i8* %137
%139 = zext i8 %138 to i32
%140 = add nsw i32 %135, %139
store i32 %140, i32* %11
%141 = load i32, i32* %11
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i32 %141)
%143 = load i8*, i8** %12
%144 = getelementptr inbounds i8, i8* %143, i64 20
%145 = load i8, i8* %144
%146 = zext i8 %145 to i32
%147 = shl i32 %146, 24
%148 = load i8*, i8** %12
%149 = getelementptr inbounds i8, i8* %148, i64 21
%150 = load i8, i8* %149
%151 = zext i8 %150 to i32
%152 = shl i32 %151, 16
%153 = add nsw i32 %147, %152
%154 = load i8*, i8** %12
%155 = getelementptr inbounds i8, i8* %154, i64 22
%156 = load i8, i8* %155
%157 = zext i8 %156 to i32
%158 = shl i32 %157, 8
%159 = add nsw i32 %153, %158
%160 = load i8*, i8** %12
%161 = getelementptr inbounds i8, i8* %160, i64 23
%162 = load i8, i8* %161
%163 = zext i8 %162 to i32
%164 = add nsw i32 %159, %163
store i32 %164, i32* %11
%165 = load i32, i32* %11
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 %165)
%167 = load i8*, i8** %12
%168 = getelementptr inbounds i8, i8* %167, i64 24
%169 = load i8, i8* %168
%170 = zext i8 %169 to i32
%171 = shl i32 %170, 24
%172 = load i8*, i8** %12
%173 = getelementptr inbounds i8, i8* %172, i64 25
%174 = load i8, i8* %173
%175 = zext i8 %174 to i32
%176 = shl i32 %175, 16
%177 = add nsw i32 %171, %176
%178 = load i8*, i8** %12
%179 = getelementptr inbounds i8, i8* %178, i64 26
%180 = load i8, i8* %179
%181 = zext i8 %180 to i32
%182 = shl i32 %181, 8
%183 = add nsw i32 %177, %182
%184 = load i8*, i8** %12
%185 = getelementptr inbounds i8, i8* %184, i64 27
%186 = load i8, i8* %185
%187 = zext i8 %186 to i32
%188 = add nsw i32 %183, %187
store i32 %188, i32* %11
%189 = load i32, i32* %11
%190 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %189)
%191 = load i8*, i8** %12
%192 = getelementptr inbounds i8, i8* %191, i64 28
%193 = load i8, i8* %192
%194 = zext i8 %193 to i32
%195 = shl i32 %194, 24
%196 = load i8*, i8** %12
%197 = getelementptr inbounds i8, i8* %196, i64 29
%198 = load i8, i8* %197
%199 = zext i8 %198 to i32
%200 = shl i32 %199, 16
%201 = add nsw i32 %195, %200
%202 = load i8*, i8** %12
%203 = getelementptr inbounds i8, i8* %202, i64 30
%204 = load i8, i8* %203
%205 = zext i8 %204 to i32
%206 = shl i32 %205, 8
%207 = add nsw i32 %201, %206
%208 = load i8*, i8** %12
%209 = getelementptr inbounds i8, i8* %208, i64 31
%210 = load i8, i8* %209
%211 = zext i8 %210 to i32
%212 = add nsw i32 %207, %211
store i32 %212, i32* %11
%213 = load i32, i32* %11
%214 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i32 %213)
%215 = load i8*, i8** %12
%216 = getelementptr inbounds i8, i8* %215, i64 32
%217 = load i8, i8* %216
%218 = zext i8 %217 to i32
%219 = shl i32 %218, 24
%220 = load i8*, i8** %12
%221 = getelementptr inbounds i8, i8* %220, i64 33
%222 = load i8, i8* %221
%223 = zext i8 %222 to i32
%224 = shl i32 %223, 16
%225 = add nsw i32 %219, %224
%226 = load i8*, i8** %12
%227 = getelementptr inbounds i8, i8* %226, i64 34
%228 = load i8, i8* %227
%229 = zext i8 %228 to i32
%230 = shl i32 %229, 8
%231 = add nsw i32 %225, %230
%232 = load i8*, i8** %12
%233 = getelementptr inbounds i8, i8* %232, i64 35
%234 = load i8, i8* %233
%235 = zext i8 %234 to i32
%236 = add nsw i32 %231, %235
store i32 %236, i32* %11
%237 = load i32, i32* %11
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0), i32 %237)
%239 = load i8*, i8** %12
%240 = getelementptr inbounds i8, i8* %239, i64 36
%241 = load i8, i8* %240
%242 = zext i8 %241 to i32
%243 = shl i32 %242, 24
%244 = load i8*, i8** %12
%245 = getelementptr inbounds i8, i8* %244, i64 37
%246 = load i8, i8* %245
%247 = zext i8 %246 to i32
%248 = shl i32 %247, 16
%249 = add nsw i32 %243, %248
%250 = load i8*, i8** %12
%251 = getelementptr inbounds i8, i8* %250, i64 38
%252 = load i8, i8* %251
%253 = zext i8 %252 to i32
%254 = shl i32 %253, 8
%255 = add nsw i32 %249, %254
%256 = load i8*, i8** %12
%257 = getelementptr inbounds i8, i8* %256, i64 39
%258 = load i8, i8* %257
%259 = zext i8 %258 to i32
%260 = add nsw i32 %255, %259
store i32 %260, i32* %11
%261 = load i32, i32* %11
%262 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.13, i64 0, i64 0), i32 %261)
%263 = load i8*, i8** %12
%264 = getelementptr inbounds i8, i8* %263, i64 40
%265 = load i8, i8* %264
%266 = zext i8 %265 to i32
%267 = shl i32 %266, 24
%268 = load i8*, i8** %12
%269 = getelementptr inbounds i8, i8* %268, i64 41
%270 = load i8, i8* %269
%271 = zext i8 %270 to i32
%272 = shl i32 %271, 16
%273 = add nsw i32 %267, %272
%274 = load i8*, i8** %12
%275 = getelementptr inbounds i8, i8* %274, i64 42
%276 = load i8, i8* %275
%277 = zext i8 %276 to i32
%278 = shl i32 %277, 8
%279 = add nsw i32 %273, %278
%280 = load i8*, i8** %12
%281 = getelementptr inbounds i8, i8* %280, i64 43
%282 = load i8, i8* %281
%283 = zext i8 %282 to i32
%284 = add nsw i32 %279, %283
store i32 %284, i32* %11
%285 = load i32, i32* %11
%286 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0), i32 %285)
%287 = load i8*, i8** %12
%288 = getelementptr inbounds i8, i8* %287, i64 44
%289 = load i8, i8* %288
%290 = zext i8 %289 to i32
%291 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0), i32 %290)
%292 = load i8*, i8** %12
%293 = getelementptr inbounds i8, i8* %292, i64 45
%294 = load i8, i8* %293
%295 = zext i8 %294 to i32
%296 = and i32 %295, 15
%297 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i32 %296)
%298 = load i8*, i8** %12
%299 = getelementptr inbounds i8, i8* %298, i64 46
%300 = load i8, i8* %299
%301 = zext i8 %300 to i32
%302 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.17, i64 0, i64 0), i32 %301)
%303 = load i8*, i8** %12
%304 = getelementptr inbounds i8, i8* %303, i64 47
%305 = load i8, i8* %304
%306 = zext i8 %305 to i32
%307 = and i32 %306, 8
%308 = icmp ne i32 %307, 0
%309 = xor i1 %308, true
%310 = xor i1 %309, true
%311 = zext i1 %310 to i32
%312 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0), i32 %311)
%313 = load i8*, i8** %12
%314 = getelementptr inbounds i8, i8* %313, i64 47
%315 = load i8, i8* %314
%316 = zext i8 %315 to i32
%317 = and i32 %316, 4
%318 = icmp ne i32 %317, 0
%319 = xor i1 %318, true
%320 = xor i1 %319, true
%321 = zext i1 %320 to i32
%322 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i32 %321)
%323 = load i8*, i8** %12
%324 = getelementptr inbounds i8, i8* %323, i64 47
%325 = load i8, i8* %324
%326 = zext i8 %325 to i32
%327 = and i32 %326, 2
%328 = icmp ne i32 %327, 0
%329 = xor i1 %328, true
%330 = xor i1 %329, true
%331 = zext i1 %330 to i32
%332 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.20, i64 0, i64 0), i32 %331)
%333 = load i8*, i8** %12
%334 = getelementptr inbounds i8, i8* %333, i64 47
%335 = load i8, i8* %334
%336 = zext i8 %335 to i32
%337 = and i32 %336, 1
%338 = icmp ne i32 %337, 0
%339 = xor i1 %338, true
%340 = xor i1 %339, true
%341 = zext i1 %340 to i32
%342 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0), i32 %341)
%343 = load i8*, i8** %12
%344 = getelementptr inbounds i8, i8* %343, i64 48
%345 = load i8, i8* %344
%346 = zext i8 %345 to i32
%347 = shl i32 %346, 8
%348 = load i8*, i8** %12
%349 = getelementptr inbounds i8, i8* %348, i64 49
%350 = load i8, i8* %349
%351 = zext i8 %350 to i32
%352 = add nsw i32 %347, %351
store i32 %352, i32* %11
%353 = load i32, i32* %11
%354 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.22, i64 0, i64 0), i32 %353)
%355 = load i8*, i8** %12
%356 = getelementptr inbounds i8, i8* %355, i64 50
%357 = load i8, i8* %356
%358 = zext i8 %357 to i32
%359 = shl i32 %358, 8
%360 = load i8*, i8** %12
%361 = getelementptr inbounds i8, i8* %360, i64 51
%362 = load i8, i8* %361
%363 = zext i8 %362 to i32
%364 = add nsw i32 %359, %363
store i32 %364, i32* %11
%365 = load i32, i32* %11
%366 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.23, i64 0, i64 0), i32 %365)
%367 = load i8*, i8** %12
%368 = getelementptr inbounds i8, i8* %367, i64 52
%369 = load i8, i8* %368
%370 = zext i8 %369 to i32
%371 = shl i32 %370, 8
%372 = load i8*, i8** %12
%373 = getelementptr inbounds i8, i8* %372, i64 53
%374 = load i8, i8* %373
%375 = zext i8 %374 to i32
%376 = add nsw i32 %371, %375
store i32 %376, i32* %11
%377 = load i32, i32* %11
%378 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0), i32 %377)
%379 = load i8*, i8** %12
%380 = getelementptr inbounds i8, i8* %379, i64 54
%381 = load i8, i8* %380
%382 = zext i8 %381 to i32
%383 = shl i32 %382, 8
%384 = load i8*, i8** %12
%385 = getelementptr inbounds i8, i8* %384, i64 55
%386 = load i8, i8* %385
%387 = zext i8 %386 to i32
%388 = add nsw i32 %383, %387
store i32 %388, i32* %11
%389 = load i32, i32* %11
%390 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.25, i64 0, i64 0), i32 %389)
%391 = load i32, i32* %8
%392 = icmp sgt i32 %391, 91
br i1 %392, label %393, label %398
393: ; preds = %23
%394 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.26, i64 0, i64 0))
%395 = load i8*, i8** %12
%396 = getelementptr inbounds i8, i8* %395, i64 56
%397 = call i32 @dStrHex(i8* %396, i32 36, i32 0)
br label %398
398: ; preds = %393, %23
%399 = load i32, i32* %8
%400 = icmp sgt i32 %399, 99
br i1 %400, label %401, label %412
401: ; preds = %398
%402 = load i8*, i8** %12
%403 = getelementptr inbounds i8, i8* %402, i64 92
%404 = load i8, i8* %403
%405 = zext i8 %404 to i32
%406 = and i32 %405, 15
%407 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.27, i64 0, i64 0), i32 %406)
%408 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.28, i64 0, i64 0))
%409 = load i8*, i8** %12
%410 = getelementptr inbounds i8, i8* %409, i64 94
%411 = call i32 @dStrHex(i8* %410, i32 6, i32 1)
br label %412
412: ; preds = %401, %398
%413 = load i32, i32* %6
%414 = icmp ne i32 %413, 0
br i1 %414, label %415, label %421
415: ; preds = %412
%416 = load i32, i32* %10
%417 = getelementptr inbounds [128 x i8], [128 x i8]* %13, i64 0, i64 0
%418 = call i32 @get_pcb_str(i32 %416, i8* %417, i32 128)
%419 = getelementptr inbounds [128 x i8], [128 x i8]* %13, i64 0, i64 0
%420 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.29, i64 0, i64 0), i8* %419)
br label %421
421: ; preds = %415, %412
%422 = load i32, i32* %8
%423 = load i32, i32* %7
%424 = sub nsw i32 %423, %422
store i32 %424, i32* %7
%425 = load i32, i32* %8
%426 = load i8*, i8** %12
%427 = sext i32 %425 to i64
%428 = getelementptr inbounds i8, i8* %426, i64 %427
store i8* %428, i8** %12
br label %20
429: ; preds = %20
ret void
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c" Parameter code: %d\0A\00"
@.str.2 = [16 x i8] c" Repeat: %d\0A\00"
@.str.3 = [21 x i8] c" Sense key: 0x%x\0A\00"
@.str.4 = [33 x i8] c" Additional sense code: 0x%x\0A\00"
@.str.5 = [43 x i8] c" Additional sense code qualifier: 0x%x\0A\00"
@.str.6 = [42 x i8] c" Vendor specific code qualifier: 0x%x\0A\00"
@.str.7 = [32 x i8] c" Product revision level: %u\0A\00"
@.str.8 = [25 x i8] c" Number of moves: %u\0A\00"
@.str.9 = [24 x i8] c" Number of pick: %u\0A\00"
@.str.10 = [32 x i8] c" Number of pick retries: %u\0A\00"
@.str.11 = [26 x i8] c" Number of places: %u\0A\00"
@.str.12 = [33 x i8] c" Number of place retries: %u\0A\00"
@.str.13 = [49 x i8] c" Number of determined volume identifiers: %u\0A\00"
@.str.14 = [49 x i8] c" Number of unreadable volume identifiers: %u\0A\00"
@.str.15 = [26 x i8] c" Operation code: 0x%x\0A\00"
@.str.16 = [26 x i8] c" Service action: 0x%x\0A\00"
@.str.17 = [36 x i8] c" Media changer error type: 0x%x\0A\00"
@.str.18 = [14 x i8] c" MTAV: %d\0A\00"
@.str.19 = [13 x i8] c" IAV: %d\0A\00"
@.str.20 = [14 x i8] c" LSAV: %d\0A\00"
@.str.21 = [13 x i8] c" DAV: %d\0A\00"
@.str.22 = [36 x i8] c" Medium transport address: 0x%x\0A\00"
@.str.23 = [26 x i8] c" Intial address: 0x%x\0A\00"
@.str.24 = [35 x i8] c" Last successful address: 0x%x\0A\00"
@.str.25 = [31 x i8] c" Destination address: 0x%x\0A\00"
@.str.27 = [28 x i8] c" Timestamp origin: 0x%x\0A\00"
@.str.29 = [15 x i8] c"\0A <%s>\0A\00"
@str = [51 x i8] c"Media changer diagnostics data page (smc-3) [0x16]\00"
@str.30 = [15 x i8] c" Timestamp:\00"
@str.31 = [28 x i8] c" Volume tag information:\00"
define void @show_mchanger_diag_data_page(i8* %0, i32 %1, i32 %2) {
%4 = alloca [128 x i8]
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%7 = icmp sgt i32 %1, 7
br i1 %7, label %8, label %311
8: ; preds = %3
%9 = add nsw i32 %1, -4
%10 = getelementptr inbounds i8, i8* %0, i64 4
%11 = icmp eq i32 %2, 0
br label %12
12: ; preds = %8, %306
%13 = phi i8* [ %10, %8 ], [ %309, %306 ]
%14 = phi i32 [ %9, %8 ], [ %307, %306 ]
%15 = load i8, i8* %13
%16 = zext i8 %15 to i32
%17 = shl nuw nsw i32 %16, 8
%18 = getelementptr inbounds i8, i8* %13, i64 1
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = or i32 %17, %20
%22 = getelementptr inbounds i8, i8* %13, i64 2
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = getelementptr inbounds i8, i8* %13, i64 3
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = add nuw nsw i32 %27, 4
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %21)
%30 = getelementptr inbounds i8, i8* %13, i64 5
%31 = load i8, i8* %30
%32 = lshr i8 %31, 7
%33 = zext i8 %32 to i32
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %33)
%35 = load i8, i8* %30
%36 = and i8 %35, 15
%37 = zext i8 %36 to i32
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds i8, i8* %13, i64 6
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds i8, i8* %13, i64 7
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i32 %45)
%47 = getelementptr inbounds i8, i8* %13, i64 8
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = shl nuw i32 %49, 24
%51 = getelementptr inbounds i8, i8* %13, i64 9
%52 = load i8, i8* %51
%53 = zext i8 %52 to i32
%54 = shl nuw nsw i32 %53, 16
%55 = or i32 %54, %50
%56 = getelementptr inbounds i8, i8* %13, i64 10
%57 = load i8, i8* %56
%58 = zext i8 %57 to i32
%59 = shl nuw nsw i32 %58, 8
%60 = or i32 %55, %59
%61 = getelementptr inbounds i8, i8* %13, i64 11
%62 = load i8, i8* %61
%63 = zext i8 %62 to i32
%64 = or i32 %60, %63
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i32 %64)
%66 = getelementptr inbounds i8, i8* %13, i64 12
%67 = load i8, i8* %66
%68 = zext i8 %67 to i32
%69 = shl nuw i32 %68, 24
%70 = getelementptr inbounds i8, i8* %13, i64 13
%71 = load i8, i8* %70
%72 = zext i8 %71 to i32
%73 = shl nuw nsw i32 %72, 16
%74 = or i32 %73, %69
%75 = getelementptr inbounds i8, i8* %13, i64 14
%76 = load i8, i8* %75
%77 = zext i8 %76 to i32
%78 = shl nuw nsw i32 %77, 8
%79 = or i32 %74, %78
%80 = getelementptr inbounds i8, i8* %13, i64 15
%81 = load i8, i8* %80
%82 = zext i8 %81 to i32
%83 = or i32 %79, %82
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i32 %83)
%85 = getelementptr inbounds i8, i8* %13, i64 16
%86 = load i8, i8* %85
%87 = zext i8 %86 to i32
%88 = shl nuw i32 %87, 24
%89 = getelementptr inbounds i8, i8* %13, i64 17
%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* %13, i64 18
%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* %13, i64 19
%100 = load i8, i8* %99
%101 = zext i8 %100 to i32
%102 = or i32 %98, %101
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i32 %102)
%104 = getelementptr inbounds i8, i8* %13, i64 20
%105 = load i8, i8* %104
%106 = zext i8 %105 to i32
%107 = shl nuw i32 %106, 24
%108 = getelementptr inbounds i8, i8* %13, i64 21
%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* %13, i64 22
%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* %13, i64 23
%119 = load i8, i8* %118
%120 = zext i8 %119 to i32
%121 = or i32 %117, %120
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 %121)
%123 = getelementptr inbounds i8, i8* %13, i64 24
%124 = load i8, i8* %123
%125 = zext i8 %124 to i32
%126 = shl nuw i32 %125, 24
%127 = getelementptr inbounds i8, i8* %13, i64 25
%128 = load i8, i8* %127
%129 = zext i8 %128 to i32
%130 = shl nuw nsw i32 %129, 16
%131 = or i32 %130, %126
%132 = getelementptr inbounds i8, i8* %13, i64 26
%133 = load i8, i8* %132
%134 = zext i8 %133 to i32
%135 = shl nuw nsw i32 %134, 8
%136 = or i32 %131, %135
%137 = getelementptr inbounds i8, i8* %13, i64 27
%138 = load i8, i8* %137
%139 = zext i8 %138 to i32
%140 = or i32 %136, %139
%141 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %140)
%142 = getelementptr inbounds i8, i8* %13, i64 28
%143 = load i8, i8* %142
%144 = zext i8 %143 to i32
%145 = shl nuw i32 %144, 24
%146 = getelementptr inbounds i8, i8* %13, i64 29
%147 = load i8, i8* %146
%148 = zext i8 %147 to i32
%149 = shl nuw nsw i32 %148, 16
%150 = or i32 %149, %145
%151 = getelementptr inbounds i8, i8* %13, i64 30
%152 = load i8, i8* %151
%153 = zext i8 %152 to i32
%154 = shl nuw nsw i32 %153, 8
%155 = or i32 %150, %154
%156 = getelementptr inbounds i8, i8* %13, i64 31
%157 = load i8, i8* %156
%158 = zext i8 %157 to i32
%159 = or i32 %155, %158
%160 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i32 %159)
%161 = getelementptr inbounds i8, i8* %13, i64 32
%162 = load i8, i8* %161
%163 = zext i8 %162 to i32
%164 = shl nuw i32 %163, 24
%165 = getelementptr inbounds i8, i8* %13, i64 33
%166 = load i8, i8* %165
%167 = zext i8 %166 to i32
%168 = shl nuw nsw i32 %167, 16
%169 = or i32 %168, %164
%170 = getelementptr inbounds i8, i8* %13, i64 34
%171 = load i8, i8* %170
%172 = zext i8 %171 to i32
%173 = shl nuw nsw i32 %172, 8
%174 = or i32 %169, %173
%175 = getelementptr inbounds i8, i8* %13, i64 35
%176 = load i8, i8* %175
%177 = zext i8 %176 to i32
%178 = or i32 %174, %177
%179 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0), i32 %178)
%180 = getelementptr inbounds i8, i8* %13, i64 36
%181 = load i8, i8* %180
%182 = zext i8 %181 to i32
%183 = shl nuw i32 %182, 24
%184 = getelementptr inbounds i8, i8* %13, i64 37
%185 = load i8, i8* %184
%186 = zext i8 %185 to i32
%187 = shl nuw nsw i32 %186, 16
%188 = or i32 %187, %183
%189 = getelementptr inbounds i8, i8* %13, i64 38
%190 = load i8, i8* %189
%191 = zext i8 %190 to i32
%192 = shl nuw nsw i32 %191, 8
%193 = or i32 %188, %192
%194 = getelementptr inbounds i8, i8* %13, i64 39
%195 = load i8, i8* %194
%196 = zext i8 %195 to i32
%197 = or i32 %193, %196
%198 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.13, i64 0, i64 0), i32 %197)
%199 = getelementptr inbounds i8, i8* %13, i64 40
%200 = load i8, i8* %199
%201 = zext i8 %200 to i32
%202 = shl nuw i32 %201, 24
%203 = getelementptr inbounds i8, i8* %13, i64 41
%204 = load i8, i8* %203
%205 = zext i8 %204 to i32
%206 = shl nuw nsw i32 %205, 16
%207 = or i32 %206, %202
%208 = getelementptr inbounds i8, i8* %13, i64 42
%209 = load i8, i8* %208
%210 = zext i8 %209 to i32
%211 = shl nuw nsw i32 %210, 8
%212 = or i32 %207, %211
%213 = getelementptr inbounds i8, i8* %13, i64 43
%214 = load i8, i8* %213
%215 = zext i8 %214 to i32
%216 = or i32 %212, %215
%217 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0), i32 %216)
%218 = getelementptr inbounds i8, i8* %13, i64 44
%219 = load i8, i8* %218
%220 = zext i8 %219 to i32
%221 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0), i32 %220)
%222 = getelementptr inbounds i8, i8* %13, i64 45
%223 = load i8, i8* %222
%224 = and i8 %223, 15
%225 = zext i8 %224 to i32
%226 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i32 %225)
%227 = getelementptr inbounds i8, i8* %13, i64 46
%228 = load i8, i8* %227
%229 = zext i8 %228 to i32
%230 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.17, i64 0, i64 0), i32 %229)
%231 = getelementptr inbounds i8, i8* %13, i64 47
%232 = load i8, i8* %231
%233 = lshr i8 %232, 3
%234 = and i8 %233, 1
%235 = zext i8 %234 to i32
%236 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0), i32 %235)
%237 = load i8, i8* %231
%238 = lshr i8 %237, 2
%239 = and i8 %238, 1
%240 = zext i8 %239 to i32
%241 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i32 %240)
%242 = load i8, i8* %231
%243 = lshr i8 %242, 1
%244 = and i8 %243, 1
%245 = zext i8 %244 to i32
%246 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.20, i64 0, i64 0), i32 %245)
%247 = load i8, i8* %231
%248 = and i8 %247, 1
%249 = zext i8 %248 to i32
%250 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0), i32 %249)
%251 = getelementptr inbounds i8, i8* %13, i64 48
%252 = load i8, i8* %251
%253 = zext i8 %252 to i32
%254 = shl nuw nsw i32 %253, 8
%255 = getelementptr inbounds i8, i8* %13, i64 49
%256 = load i8, i8* %255
%257 = zext i8 %256 to i32
%258 = or i32 %254, %257
%259 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.22, i64 0, i64 0), i32 %258)
%260 = getelementptr inbounds i8, i8* %13, i64 50
%261 = load i8, i8* %260
%262 = zext i8 %261 to i32
%263 = shl nuw nsw i32 %262, 8
%264 = getelementptr inbounds i8, i8* %13, i64 51
%265 = load i8, i8* %264
%266 = zext i8 %265 to i32
%267 = or i32 %263, %266
%268 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.23, i64 0, i64 0), i32 %267)
%269 = getelementptr inbounds i8, i8* %13, i64 52
%270 = load i8, i8* %269
%271 = zext i8 %270 to i32
%272 = shl nuw nsw i32 %271, 8
%273 = getelementptr inbounds i8, i8* %13, i64 53
%274 = load i8, i8* %273
%275 = zext i8 %274 to i32
%276 = or i32 %272, %275
%277 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0), i32 %276)
%278 = getelementptr inbounds i8, i8* %13, i64 54
%279 = load i8, i8* %278
%280 = zext i8 %279 to i32
%281 = shl nuw nsw i32 %280, 8
%282 = getelementptr inbounds i8, i8* %13, i64 55
%283 = load i8, i8* %282
%284 = zext i8 %283 to i32
%285 = or i32 %281, %284
%286 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.25, i64 0, i64 0), i32 %285)
%287 = icmp ugt i8 %26, 87
br i1 %287, label %288, label %302
288: ; preds = %12
%289 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.31, i64 0, i64 0))
%290 = getelementptr inbounds i8, i8* %13, i64 56
%291 = call i32 @dStrHex(i8* %290, i32 36, i32 0)
%292 = icmp ugt i8 %26, 95
br i1 %292, label %293, label %302
293: ; preds = %288
%294 = getelementptr inbounds i8, i8* %13, i64 92
%295 = load i8, i8* %294
%296 = and i8 %295, 15
%297 = zext i8 %296 to i32
%298 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.27, i64 0, i64 0), i32 %297)
%299 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.30, i64 0, i64 0))
%300 = getelementptr inbounds i8, i8* %13, i64 94
%301 = call i32 @dStrHex(i8* %300, i32 6, i32 1)
br label %302
302: ; preds = %12, %293, %288
br i1 %11, label %306, label %303
303: ; preds = %302
%304 = call i32 @get_pcb_str(i32 %24, i8* %5, i32 128)
%305 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.29, i64 0, i64 0), i8* %5)
br label %306
306: ; preds = %303, %302
%307 = sub nsw i32 %14, %28
%308 = zext i32 %28 to i64
%309 = getelementptr inbounds i8, i8* %13, i64 %308
%310 = icmp sgt i32 %307, 3
br i1 %310, label %12, label %311
311: ; preds = %306, %3
ret void
}