#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*/ cdb;

/* Variables and functions */
int /*<<< orphan*/ SG_DXFER_FROM_DEV;
int /*<<< orphan*/ print_sense_data(unsigned char *, unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int scsi_io(int, unsigned char *, int, int /*<<< orphan*/, unsigned char *,
            unsigned int *, unsigned char *, unsigned int *);
int scsi_persistent_reserve_in_read_reservation(int fd) {
  unsigned char cdb[] = {0x5e, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  unsigned int data_size = 0x00ff;
  unsigned char data[data_size];
  unsigned int sense_len = 32;
  unsigned char sense[sense_len];
  unsigned char service_action = 1;
  int res;
  unsigned long prgeneration, additional_length;
  cdb[1] = service_action;
  cdb[7] = (data_size >> 8) & 0xff;
  cdb[8] = data_size & 0xff;
  printf("PERSISTENT RESERVE IN: READ RESERVATION\n");
  res = scsi_io(fd, cdb, sizeof(cdb), SG_DXFER_FROM_DEV, data, &data_size,
                sense, &sense_len);
  if (res) {
    printf("SCSI_IO failed\n");
    return -1;
  }
  if (sense_len) {
    print_sense_data(sense, sense_len);
    return -1;
  }
  prgeneration = data[0];
  prgeneration <<= 8;
  prgeneration |= data[1];
  prgeneration <<= 8;
  prgeneration |= data[2];
  prgeneration <<= 8;
  prgeneration |= data[3];
  printf("PRGeneration:%lu\n", prgeneration);
  additional_length = data[4];
  additional_length <<= 8;
  additional_length |= data[5];
  additional_length <<= 8;
  additional_length |= data[6];
  additional_length <<= 8;
  additional_length |= data[7];
  printf("Additional Length:%lu\n", additional_length);
  if (additional_length == 16) {
    printf("Key:%02x%02x%02x%02x%02x%02x%02x%02x\n", data[8], data[9], data[10],
           data[11], data[12], data[13], data[14], data[15]);
    printf("Scope:%xh Type:%xh\n", data[21] >> 4, data[21] & 0x0f);
  }
  return 0;
}


x86 assembly (clang, -O0):
<scsi_persistent_reserve_in_read_reservation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x8(%rbp)
mov    0xec6(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0xff,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
movl   $0x20,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
movb   $0x1,-0x41(%rbp)
mov    -0x41(%rbp),%al
mov    %al,-0x17(%rbp)
mov    -0x1c(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x11(%rbp)
mov    -0x1c(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x10(%rbp)
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x70(%rbp),%r8
mov    -0x68(%rbp),%r10
mov    -0x8(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    0x2dfd(%rip),%rax
mov    (%rax),%ecx
mov    $0xa,%edx
lea    -0x1c(%rbp),%r9
lea    -0x34(%rbp),%rax
sub    $0x10,%rsp
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <scsi_io@plt>
add    $0x10,%rsp
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
je     123e <scsi_persistent_reserve_in_read_reservation+0x10e>
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    13b6 <scsi_persistent_reserve_in_read_reservation+0x286>
cmpl   $0x0,-0x34(%rbp)
je     1267 <scsi_persistent_reserve_in_read_reservation+0x137>
mov    -0x68(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1050 <print_sense_data@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    13b6 <scsi_persistent_reserve_in_read_reservation+0x286>
mov    -0x70(%rbp),%rax
movzbl (%rax),%ecx
mov    %rcx,-0x50(%rbp)
mov    -0x50(%rbp),%rcx
shl    $0x8,%rcx
mov    %rcx,-0x50(%rbp)
movzbl 0x1(%rax),%ecx
or     -0x50(%rbp),%rcx
mov    %rcx,-0x50(%rbp)
mov    -0x50(%rbp),%rcx
shl    $0x8,%rcx
mov    %rcx,-0x50(%rbp)
movzbl 0x2(%rax),%ecx
or     -0x50(%rbp),%rcx
mov    %rcx,-0x50(%rbp)
mov    -0x50(%rbp),%rcx
shl    $0x8,%rcx
mov    %rcx,-0x50(%rbp)
movzbl 0x3(%rax),%eax
or     -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xd7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x70(%rbp),%rax
movzbl 0x4(%rax),%ecx
mov    %rcx,-0x58(%rbp)
mov    -0x58(%rbp),%rcx
shl    $0x8,%rcx
mov    %rcx,-0x58(%rbp)
movzbl 0x5(%rax),%ecx
or     -0x58(%rbp),%rcx
mov    %rcx,-0x58(%rbp)
mov    -0x58(%rbp),%rcx
shl    $0x8,%rcx
mov    %rcx,-0x58(%rbp)
movzbl 0x6(%rax),%ecx
or     -0x58(%rbp),%rcx
mov    %rcx,-0x58(%rbp)
mov    -0x58(%rbp),%rcx
shl    $0x8,%rcx
mov    %rcx,-0x58(%rbp)
movzbl 0x7(%rax),%eax
or     -0x58(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rsi
lea    0xd2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x10,-0x58(%rbp)
jne    13a8 <scsi_persistent_reserve_in_read_reservation+0x278>
mov    -0x70(%rbp),%rax
movzbl 0x8(%rax),%esi
movzbl 0x9(%rax),%edx
movzbl 0xa(%rax),%ecx
movzbl 0xb(%rax),%r8d
movzbl 0xc(%rax),%r9d
movzbl 0xd(%rax),%r11d
movzbl 0xe(%rax),%r10d
movzbl 0xf(%rax),%eax
lea    0xd00(%rip),%rdi
sub    $0x20,%rsp
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
mov    -0x70(%rbp),%rax
movzbl 0x15(%rax),%esi
sar    $0x4,%esi
movzbl 0x15(%rax),%edx
and    $0xf,%edx
lea    0xcf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scsi_persistent_reserve_in_read_reservation>:
push   %rbp
push   %r14
push   %rbx
sub    $0x140,%rsp
mov    %edi,%ebx
mov    %rsp,%r14
movzwl 0xeb1(%rip),%eax
mov    %ax,0x18(%rsp)
mov    0xe9d(%rip),%rax
mov    %rax,0x10(%rsp)
movl   $0xff,0x1c(%rsp)
movl   $0x20,0xc(%rsp)
movb   $0x1,0x11(%rsp)
movw   $0xff00,0x17(%rsp)
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%ecx
lea    0xc(%rsp),%rax
lea    0x20(%rsp),%rbp
lea    0x10(%rsp),%rsi
lea    0x40(%rsp),%r8
lea    0x1c(%rsp),%r9
mov    %ebx,%edi
mov    $0xa,%edx
push   %rax
push   %rbp
call   1050 <scsi_io@plt>
add    $0x10,%rsp
test   %eax,%eax
je     11de <scsi_persistent_reserve_in_read_reservation+0x9e>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ebp
jmp    129b <scsi_persistent_reserve_in_read_reservation+0x15b>
mov    0xc(%rsp),%esi
test   %esi,%esi
je     11fa <scsi_persistent_reserve_in_read_reservation+0xba>
lea    0x20(%rsp),%rdi
call   1060 <print_sense_data@plt>
mov    $0xffffffff,%ebp
jmp    129b <scsi_persistent_reserve_in_read_reservation+0x15b>
mov    0x40(%rsp),%esi
shl    $0x20,%rsi
bswap  %rsi
lea    0xdfe(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x44(%rsp),%ebx
shl    $0x20,%rbx
bswap  %rbx
lea    0xdf5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x10,%rbx
jne    129b <scsi_persistent_reserve_in_read_reservation+0x15b>
movzbl 0x48(%rsp),%esi
movzbl 0x49(%rsp),%edx
movzbl 0x4a(%rsp),%ecx
movzbl 0x4b(%rsp),%r8d
movzbl 0x4c(%rsp),%r9d
movzbl 0x4d(%rsp),%r10d
movzbl 0x4e(%rsp),%r11d
movzbl 0x4f(%rsp),%ebx
sub    $0x8,%rsp
lea    0xdc5(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
push   %rbx
push   %r11
push   %r10
call   1040 <printf@plt>
add    $0x20,%rsp
movzbl 0x55(%rsp),%edx
mov    %edx,%esi
shr    $0x4,%esi
and    $0xf,%edx
lea    0xdc5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rsp
mov    %ebp,%eax
add    $0x140,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.scsi_persistent_reserve_in_read_reservation.cdb = <{ i8, [9 x i8] }> <{ i8 94, [9 x i8] zeroinitializer }>
@.str = [41 x i8] c"PERSISTENT RESERVE IN: READ RESERVATION\0A\00"
@SG_DXFER_FROM_DEV = global i32 0
@.str.1 = [16 x i8] c"SCSI_IO failed\0A\00"
@.str.2 = [18 x i8] c"PRGeneration:%lu\0A\00"
@.str.3 = [23 x i8] c"Additional Length:%lu\0A\00"
@.str.4 = [38 x i8] c"Key:%02x%02x%02x%02x%02x%02x%02x%02x\0A\00"
@.str.5 = [20 x i8] c"Scope:%xh Type:%xh\0A\00"
define i32 @scsi_persistent_reserve_in_read_reservation(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10 x i8]
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i64
%10 = alloca i8
%11 = alloca i32
%12 = alloca i64
%13 = alloca i64
%14 = alloca i32
store i32 %0, i32* %3
%15 = bitcast [10 x i8]* %4 to i8*
store i32 255, i32* %5
%16 = load i32, i32* %5
%17 = zext i32 %16 to i64
%18 = call i8* @llvm.stacksave()
store i8* %18, i8** %6
%19 = alloca i8, i64 %17
store i64 %17, i64* %7
store i32 32, i32* %8
%20 = load i32, i32* %8
%21 = zext i32 %20 to i64
%22 = alloca i8, i64 %21
store i64 %21, i64* %9
store i8 1, i8* %10
%23 = load i8, i8* %10
%24 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 1
store i8 %23, i8* %24
%25 = load i32, i32* %5
%26 = lshr i32 %25, 8
%27 = and i32 %26, 255
%28 = trunc i32 %27 to i8
%29 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 7
store i8 %28, i8* %29
%30 = load i32, i32* %5
%31 = and i32 %30, 255
%32 = trunc i32 %31 to i8
%33 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 8
store i8 %32, i8* %33
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%35 = load i32, i32* %3
%36 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%37 = load i32, i32* @SG_DXFER_FROM_DEV
%38 = call i32 @scsi_io(i32 %35, i8* %36, i32 10, i32 %37, i8* %19, i32* %5, i8* %22, i32* %8)
store i32 %38, i32* %11
%39 = load i32, i32* %11
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %1
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %2
store i32 1, i32* %14
br label %140
43: ; preds = %1
%44 = load i32, i32* %8
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %43
%47 = load i32, i32* %8
%48 = call i32 @print_sense_data(i8* %22, i32 %47)
store i32 -1, i32* %2
store i32 1, i32* %14
br label %140
49: ; preds = %43
%50 = getelementptr inbounds i8, i8* %19, i64 0
%51 = load i8, i8* %50
%52 = zext i8 %51 to i64
store i64 %52, i64* %12
%53 = load i64, i64* %12
%54 = shl i64 %53, 8
store i64 %54, i64* %12
%55 = getelementptr inbounds i8, i8* %19, i64 1
%56 = load i8, i8* %55
%57 = zext i8 %56 to i64
%58 = load i64, i64* %12
%59 = or i64 %58, %57
store i64 %59, i64* %12
%60 = load i64, i64* %12
%61 = shl i64 %60, 8
store i64 %61, i64* %12
%62 = getelementptr inbounds i8, i8* %19, i64 2
%63 = load i8, i8* %62
%64 = zext i8 %63 to i64
%65 = load i64, i64* %12
%66 = or i64 %65, %64
store i64 %66, i64* %12
%67 = load i64, i64* %12
%68 = shl i64 %67, 8
store i64 %68, i64* %12
%69 = getelementptr inbounds i8, i8* %19, i64 3
%70 = load i8, i8* %69
%71 = zext i8 %70 to i64
%72 = load i64, i64* %12
%73 = or i64 %72, %71
store i64 %73, i64* %12
%74 = load i64, i64* %12
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i64 %74)
%76 = getelementptr inbounds i8, i8* %19, i64 4
%77 = load i8, i8* %76
%78 = zext i8 %77 to i64
store i64 %78, i64* %13
%79 = load i64, i64* %13
%80 = shl i64 %79, 8
store i64 %80, i64* %13
%81 = getelementptr inbounds i8, i8* %19, i64 5
%82 = load i8, i8* %81
%83 = zext i8 %82 to i64
%84 = load i64, i64* %13
%85 = or i64 %84, %83
store i64 %85, i64* %13
%86 = load i64, i64* %13
%87 = shl i64 %86, 8
store i64 %87, i64* %13
%88 = getelementptr inbounds i8, i8* %19, i64 6
%89 = load i8, i8* %88
%90 = zext i8 %89 to i64
%91 = load i64, i64* %13
%92 = or i64 %91, %90
store i64 %92, i64* %13
%93 = load i64, i64* %13
%94 = shl i64 %93, 8
store i64 %94, i64* %13
%95 = getelementptr inbounds i8, i8* %19, i64 7
%96 = load i8, i8* %95
%97 = zext i8 %96 to i64
%98 = load i64, i64* %13
%99 = or i64 %98, %97
store i64 %99, i64* %13
%100 = load i64, i64* %13
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i64 %100)
%102 = load i64, i64* %13
%103 = icmp eq i64 %102, 16
br i1 %103, label %104, label %139
104: ; preds = %49
%105 = getelementptr inbounds i8, i8* %19, i64 8
%106 = load i8, i8* %105
%107 = zext i8 %106 to i32
%108 = getelementptr inbounds i8, i8* %19, i64 9
%109 = load i8, i8* %108
%110 = zext i8 %109 to i32
%111 = getelementptr inbounds i8, i8* %19, i64 10
%112 = load i8, i8* %111
%113 = zext i8 %112 to i32
%114 = getelementptr inbounds i8, i8* %19, i64 11
%115 = load i8, i8* %114
%116 = zext i8 %115 to i32
%117 = getelementptr inbounds i8, i8* %19, i64 12
%118 = load i8, i8* %117
%119 = zext i8 %118 to i32
%120 = getelementptr inbounds i8, i8* %19, i64 13
%121 = load i8, i8* %120
%122 = zext i8 %121 to i32
%123 = getelementptr inbounds i8, i8* %19, i64 14
%124 = load i8, i8* %123
%125 = zext i8 %124 to i32
%126 = getelementptr inbounds i8, i8* %19, i64 15
%127 = load i8, i8* %126
%128 = zext i8 %127 to i32
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %107, i32 %110, i32 %113, i32 %116, i32 %119, i32 %122, i32 %125, i32 %128)
%130 = getelementptr inbounds i8, i8* %19, i64 21
%131 = load i8, i8* %130
%132 = zext i8 %131 to i32
%133 = ashr i32 %132, 4
%134 = getelementptr inbounds i8, i8* %19, i64 21
%135 = load i8, i8* %134
%136 = zext i8 %135 to i32
%137 = and i32 %136, 15
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %133, i32 %137)
br label %139
139: ; preds = %104, %49
store i32 0, i32* %2
store i32 1, i32* %14
br label %140
140: ; preds = %139, %46, %41
%141 = load i8*, i8** %6
%142 = load i32, i32* %2
ret i32 %142
}

LLVM IR (-O2):
@__const.scsi_persistent_reserve_in_read_reservation.cdb = <{ i8, [9 x i8] }> <{ i8 94, [9 x i8] zeroinitializer }>
@SG_DXFER_FROM_DEV = global i32 0
@.str.2 = [18 x i8] c"PRGeneration:%lu\0A\00"
@.str.3 = [23 x i8] c"Additional Length:%lu\0A\00"
@.str.4 = [38 x i8] c"Key:%02x%02x%02x%02x%02x%02x%02x%02x\0A\00"
@.str.5 = [20 x i8] c"Scope:%xh Type:%xh\0A\00"
@str = [40 x i8] c"PERSISTENT RESERVE IN: READ RESERVATION\00"
@str.6 = [15 x i8] c"SCSI_IO failed\00"
define i32 @scsi_persistent_reserve_in_read_reservation(i32 %0) {
%2 = alloca [10 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = bitcast i32* %3 to i8*
store i32 255, i32* %3
%7 = tail call i8* @llvm.stacksave()
%8 = alloca [255 x i8]
%9 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 0
%10 = bitcast i32* %4 to i8*
store i32 32, i32* %4
%11 = alloca [32 x i8]
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 1
store i8 1, i8* %13
%14 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 7
store i8 0, i8* %14
%15 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 8
store i8 -1, i8* %15
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%17 = load i32, i32* @SG_DXFER_FROM_DEV
%18 = call i32 @scsi_io(i32 %0, i8* %5, i32 10, i32 %17, i8* %9, i32* %3, i8* %12, i32* %4)
%19 = icmp eq i32 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %1
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.6, i64 0, i64 0))
br label %98
22: ; preds = %1
%23 = load i32, i32* %4
%24 = icmp eq i32 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %22
%26 = call i32 @print_sense_data(i8* %12, i32 %23)
br label %98
27: ; preds = %22
%28 = load i8, i8* %9
%29 = zext i8 %28 to i64
%30 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 1
%31 = load i8, i8* %30
%32 = zext i8 %31 to i64
%33 = shl nuw nsw i64 %29, 16
%34 = shl nuw nsw i64 %32, 8
%35 = or i64 %34, %33
%36 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 2
%37 = load i8, i8* %36
%38 = zext i8 %37 to i64
%39 = or i64 %35, %38
%40 = shl nuw nsw i64 %39, 8
%41 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 3
%42 = load i8, i8* %41
%43 = zext i8 %42 to i64
%44 = or i64 %40, %43
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i64 %44)
%46 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 4
%47 = load i8, i8* %46
%48 = zext i8 %47 to i64
%49 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 5
%50 = load i8, i8* %49
%51 = zext i8 %50 to i64
%52 = shl nuw nsw i64 %48, 16
%53 = shl nuw nsw i64 %51, 8
%54 = or i64 %53, %52
%55 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 6
%56 = load i8, i8* %55
%57 = zext i8 %56 to i64
%58 = or i64 %54, %57
%59 = shl nuw nsw i64 %58, 8
%60 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 7
%61 = load i8, i8* %60
%62 = zext i8 %61 to i64
%63 = or i64 %59, %62
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i64 %63)
%65 = icmp eq i64 %63, 16
br i1 %65, label %66, label %98
66: ; preds = %27
%67 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 8
%68 = load i8, i8* %67
%69 = zext i8 %68 to i32
%70 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 9
%71 = load i8, i8* %70
%72 = zext i8 %71 to i32
%73 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 10
%74 = load i8, i8* %73
%75 = zext i8 %74 to i32
%76 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 11
%77 = load i8, i8* %76
%78 = zext i8 %77 to i32
%79 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 12
%80 = load i8, i8* %79
%81 = zext i8 %80 to i32
%82 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 13
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 14
%86 = load i8, i8* %85
%87 = zext i8 %86 to i32
%88 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 15
%89 = load i8, i8* %88
%90 = zext i8 %89 to i32
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %69, i32 %72, i32 %75, i32 %78, i32 %81, i32 %84, i32 %87, i32 %90)
%92 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 21
%93 = load i8, i8* %92
%94 = zext i8 %93 to i32
%95 = lshr i32 %94, 4
%96 = and i32 %94, 15
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %95, i32 %96)
br label %98
98: ; preds = %27, %66, %25, %20
%99 = phi i32 [ -1, %20 ], [ -1, %25 ], [ 0, %66 ], [ 0, %27 ]
ret i32 %99
}