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

/* Variables and functions */
int Convert(int);
int /*<<< orphan*/ Decode(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int fread(int *, int, int, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int c, count, start, first, little_endian, *instruction;
  FILE *f;
  printf("CS3339 MIPS Disassembler\n");
  if (argc != 2) {
    fprintf(stderr, "usage: %s mips_executable\n", argv[0]);
    exit(-1);
  }
  if (sizeof(int) != 4) {
    fprintf(stderr, "error: need 4-byte integers\n");
    exit(-1);
  }
  count = 1;
  little_endian = *((char *)&count);
  f = fopen(argv[1], "r+b");
  if (f == NULL) {
    fprintf(stderr, "error: could not open file %s\n", argv[1]);
    exit(-1);
  }
  c = fread(&count, 4, 1, f);
  if (c != 1) {
    fprintf(stderr, "error: could not read count from file %s\n", argv[1]);
    exit(-1);
  }
  if (little_endian) {
    count = Convert(count);
  }
  c = fread(&start, 4, 1, f);
  if (c != 1) {
    fprintf(stderr, "error: could not read start from file %s\n", argv[1]);
    exit(-1);
  }
  if (little_endian) {
    start = Convert(start);
  }
  instruction = (int *)(malloc(count * 4));
  if (instruction == NULL) {
    fprintf(stderr, "error: out of memory\n");
    exit(-1);
  }
  c = fread(instruction, 4, count, f);
  if (c != count) {
    fprintf(stderr, "error: could not read instructions from file %s\n",
            argv[1]);
    exit(-1);
  }
  fclose(f);
  if (little_endian) {
    for (c = 0; c < count; c++) {
      instruction[c] = Convert(instruction[c]);
    }
  }
  for (c = 0; c < count; c++) {
    Decode(start + c * 4, instruction[c]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe53(%rip),%rdi
call   1060 <printf@plt>
cmpl   $0x2,-0x8(%rbp)
je     11e4 <main+0x54>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe47(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
movl   $0x1,-0x18(%rbp)
movsbl -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe34(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    123e <main+0xae>
mov    0x2dc4(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe0c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x38(%rbp),%rcx
lea    -0x18(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
je     128b <main+0xfb>
mov    0x2d77(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdde(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
cmpl   $0x0,-0x24(%rbp)
je     12a0 <main+0x110>
mov    -0x18(%rbp),%edi
call   1040 <Convert@plt>
mov    %eax,-0x18(%rbp)
mov    -0x38(%rbp),%rcx
lea    -0x1c(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
je     12ed <main+0x15d>
mov    0x2d15(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xda6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
cmpl   $0x0,-0x24(%rbp)
je     1302 <main+0x172>
mov    -0x1c(%rbp),%edi
call   1040 <Convert@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%edi
shl    $0x2,%edi
call   1080 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    133d <main+0x1ad>
mov    0x2cbd(%rip),%rax
mov    (%rax),%edi
lea    0xd80(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    -0x38(%rbp),%rcx
mov    $0x4,%esi
call   1030 <fread@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
je     138a <main+0x1fa>
mov    0x2c78(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd49(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x38(%rbp),%rdi
call   1050 <fclose@plt>
cmpl   $0x0,-0x24(%rbp)
je     13e0 <main+0x250>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    13db <main+0x24b>
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1040 <Convert@plt>
mov    %eax,%edx
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13a4 <main+0x214>
jmp    13e0 <main+0x250>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    141c <main+0x28c>
mov    -0x1c(%rbp),%edi
mov    -0x14(%rbp),%eax
shl    $0x2,%eax
add    %eax,%edi
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1090 <Decode@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13e7 <main+0x257>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebx
lea    0xf32(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x2,%ebx
jne    12d6 <main+0x146>
movl   $0x1,(%rsp)
mov    0x8(%r14),%rdi
lea    0xe54(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     12eb <main+0x15b>
mov    %rax,%r12
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1040 <fread@plt>
cmp    $0x1,%eax
jne    1301 <main+0x171>
mov    (%rsp),%edi
call   1050 <Convert@plt>
mov    %eax,%r15d
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1040 <fread@plt>
cmp    $0x1,%eax
jne    1317 <main+0x187>
mov    0x4(%rsp),%edi
call   1050 <Convert@plt>
mov    %eax,%r13d
lea    0x0(,%r15,4),%edi
call   1080 <malloc@plt>
test   %rax,%rax
je     132d <main+0x19d>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x4,%esi
mov    %r15d,%edx
mov    %r12,%rcx
call   1040 <fread@plt>
cmp    %r15d,%eax
jne    134e <main+0x1be>
mov    %r12,%rdi
call   1060 <fclose@plt>
test   %r15d,%r15d
jle    12c5 <main+0x135>
mov    %r15d,%r12d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rbx,%rbp,4),%edi
call   1050 <Convert@plt>
mov    %eax,(%rbx,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1280 <main+0xf0>
test   %r15d,%r15d
jle    12c5 <main+0x135>
mov    %r13d,%r14d
shl    $0x2,%r12
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx,%rbp,1),%esi
lea    (%r14,%rbp,1),%edi
call   1090 <Decode@plt>
add    $0x4,%rbp
cmp    %rbp,%r12
jne    12b0 <main+0x120>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2d03(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xd17(%rip),%rsi
jmp    1362 <main+0x1d2>
mov    0x2cee(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r14),%rdx
lea    0xd20(%rip),%rsi
jmp    1362 <main+0x1d2>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r14),%rdx
lea    0xd29(%rip),%rsi
jmp    1362 <main+0x1d2>
mov    0x2cc2(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r14),%rdx
lea    0xd3d(%rip),%rsi
jmp    1362 <main+0x1d2>
mov    0x2cac(%rip),%rax
mov    (%rax),%edi
lea    0xd55(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    0x2c8b(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r14),%rdx
lea    0xd46(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"CS3339 MIPS Disassembler\0A\00"
@stderr = global i32 0
@.str.1 = [27 x i8] c"usage: %s mips_executable\0A\00"
@.str.2 = [4 x i8] c"r+b\00"
@.str.3 = [31 x i8] c"error: could not open file %s\0A\00"
@.str.4 = [42 x i8] c"error: could not read count from file %s\0A\00"
@.str.5 = [42 x i8] c"error: could not read start from file %s\0A\00"
@.str.6 = [22 x i8] c"error: out of memory\0A\00"
@.str.7 = [49 x i8] c"error: could not read instructions from file %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 2
br i1 %15, label %16, label %23
16: ; preds = %2
%17 = load i32, i32* @stderr
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %20)
%22 = call i32 @exit(i32 -1)
unreachable
23: ; preds = %2
store i32 1, i32* %7
%24 = bitcast i32* %7 to i8*
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
store i32 %26, i32* %10
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i32* @fopen(i8* %29, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i32* %30, i32** %12
%31 = load i32*, i32** %12
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %40
33: ; preds = %23
%34 = load i32, i32* @stderr
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* %37)
%39 = call i32 @exit(i32 -1)
unreachable
40: ; preds = %23
%41 = load i32*, i32** %12
%42 = call i32 @fread(i32* %7, i32 4, i32 1, i32* %41)
store i32 %42, i32* %6
%43 = load i32, i32* %6
%44 = icmp ne i32 %43, 1
br i1 %44, label %45, label %52
45: ; preds = %40
%46 = load i32, i32* @stderr
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 1
%49 = load i8*, i8** %48
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0), i8* %49)
%51 = call i32 @exit(i32 -1)
unreachable
52: ; preds = %40
%53 = load i32, i32* %10
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %58
55: ; preds = %52
%56 = load i32, i32* %7
%57 = call i32 @Convert(i32 %56)
store i32 %57, i32* %7
br label %58
58: ; preds = %55, %52
%59 = load i32*, i32** %12
%60 = call i32 @fread(i32* %8, i32 4, i32 1, i32* %59)
store i32 %60, i32* %6
%61 = load i32, i32* %6
%62 = icmp ne i32 %61, 1
br i1 %62, label %63, label %70
63: ; preds = %58
%64 = load i32, i32* @stderr
%65 = load i8**, i8*** %5
%66 = getelementptr inbounds i8*, i8** %65, i64 1
%67 = load i8*, i8** %66
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i8* %67)
%69 = call i32 @exit(i32 -1)
unreachable
70: ; preds = %58
%71 = load i32, i32* %10
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %70
%74 = load i32, i32* %8
%75 = call i32 @Convert(i32 %74)
store i32 %75, i32* %8
br label %76
76: ; preds = %73, %70
%77 = load i32, i32* %7
%78 = mul nsw i32 %77, 4
%79 = call i64 @malloc(i32 %78)
%80 = inttoptr i64 %79 to i32*
store i32* %80, i32** %11
%81 = load i32*, i32** %11
%82 = icmp eq i32* %81, null
br i1 %82, label %83, label %87
83: ; preds = %76
%84 = load i32, i32* @stderr
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%86 = call i32 @exit(i32 -1)
unreachable
87: ; preds = %76
%88 = load i32*, i32** %11
%89 = load i32, i32* %7
%90 = load i32*, i32** %12
%91 = call i32 @fread(i32* %88, i32 4, i32 %89, i32* %90)
store i32 %91, i32* %6
%92 = load i32, i32* %6
%93 = load i32, i32* %7
%94 = icmp ne i32 %92, %93
br i1 %94, label %95, label %102
95: ; preds = %87
%96 = load i32, i32* @stderr
%97 = load i8**, i8*** %5
%98 = getelementptr inbounds i8*, i8** %97, i64 1
%99 = load i8*, i8** %98
%100 = call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0), i8* %99)
%101 = call i32 @exit(i32 -1)
unreachable
102: ; preds = %87
%103 = load i32*, i32** %12
%104 = call i32 @fclose(i32* %103)
%105 = load i32, i32* %10
%106 = icmp ne i32 %105, 0
br i1 %106, label %107, label %127
107: ; preds = %102
store i32 0, i32* %6
br label %108
108: ; preds = %123, %107
%109 = load i32, i32* %6
%110 = load i32, i32* %7
%111 = icmp slt i32 %109, %110
br i1 %111, label %112, label %126
112: ; preds = %108
%113 = load i32*, i32** %11
%114 = load i32, i32* %6
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i32, i32* %113, i64 %115
%117 = load i32, i32* %116
%118 = call i32 @Convert(i32 %117)
%119 = load i32*, i32** %11
%120 = load i32, i32* %6
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds i32, i32* %119, i64 %121
store i32 %118, i32* %122
br label %123
123: ; preds = %112
%124 = load i32, i32* %6
%125 = add nsw i32 %124, 1
store i32 %125, i32* %6
br label %108
126: ; preds = %108
br label %127
127: ; preds = %126, %102
store i32 0, i32* %6
br label %128
128: ; preds = %143, %127
%129 = load i32, i32* %6
%130 = load i32, i32* %7
%131 = icmp slt i32 %129, %130
br i1 %131, label %132, label %146
132: ; preds = %128
%133 = load i32, i32* %8
%134 = load i32, i32* %6
%135 = mul nsw i32 %134, 4
%136 = add nsw i32 %133, %135
%137 = load i32*, i32** %11
%138 = load i32, i32* %6
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds i32, i32* %137, i64 %139
%141 = load i32, i32* %140
%142 = call i32 @Decode(i32 %136, i32 %141)
br label %143
143: ; preds = %132
%144 = load i32, i32* %6
%145 = add nsw i32 %144, 1
store i32 %145, i32* %6
br label %128
146: ; preds = %128
%147 = load i32, i32* %3
ret i32 %147
}

LLVM IR (-O2):
@stderr = global i32 0
@.str.1 = [27 x i8] c"usage: %s mips_executable\0A\00"
@.str.2 = [4 x i8] c"r+b\00"
@.str.3 = [31 x i8] c"error: could not open file %s\0A\00"
@.str.4 = [42 x i8] c"error: could not read count from file %s\0A\00"
@.str.5 = [42 x i8] c"error: could not read start from file %s\0A\00"
@.str.6 = [22 x i8] c"error: out of memory\0A\00"
@.str.7 = [49 x i8] c"error: could not read instructions from file %s\0A\00"
@str = [25 x i8] c"CS3339 MIPS Disassembler\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%8 = icmp eq i32 %0, 2
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %1
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = tail call i32 @exit(i32 -1)
unreachable
14: ; preds = %2
store i32 1, i32* %3
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i32* @fopen(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %24
19: ; preds = %14
%20 = load i32, i32* @stderr
%21 = load i8*, i8** %15
%22 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* %21)
%23 = tail call i32 @exit(i32 -1)
unreachable
24: ; preds = %14
%25 = call i32 @fread(i32* %3, i32 4, i32 1, i32* %17)
%26 = icmp eq i32 %25, 1
br i1 %26, label %32, label %27
27: ; preds = %24
%28 = load i32, i32* @stderr
%29 = load i8*, i8** %15
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0), i8* %29)
%31 = tail call i32 @exit(i32 -1)
unreachable
32: ; preds = %24
%33 = load i32, i32* %3
%34 = tail call i32 @Convert(i32 %33)
%35 = call i32 @fread(i32* %4, i32 4, i32 1, i32* %17)
%36 = icmp eq i32 %35, 1
br i1 %36, label %42, label %37
37: ; preds = %32
%38 = load i32, i32* @stderr
%39 = load i8*, i8** %15
%40 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i8* %39)
%41 = tail call i32 @exit(i32 -1)
unreachable
42: ; preds = %32
%43 = load i32, i32* %4
%44 = tail call i32 @Convert(i32 %43)
%45 = shl nsw i32 %34, 2
%46 = tail call i64 @malloc(i32 %45)
%47 = inttoptr i64 %46 to i32*
%48 = icmp eq i64 %46, 0
br i1 %48, label %49, label %53
49: ; preds = %42
%50 = load i32, i32* @stderr
%51 = tail call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%52 = tail call i32 @exit(i32 -1)
unreachable
53: ; preds = %42
%54 = tail call i32 @fread(i32* %47, i32 4, i32 %34, i32* %17)
%55 = icmp eq i32 %54, %34
br i1 %55, label %61, label %56
56: ; preds = %53
%57 = load i32, i32* @stderr
%58 = load i8*, i8** %15
%59 = tail call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0), i8* %58)
%60 = tail call i32 @exit(i32 -1)
unreachable
61: ; preds = %53
%62 = tail call i32 @fclose(i32* %17)
%63 = icmp sgt i32 %34, 0
br i1 %63, label %64, label %86
64: ; preds = %61
%65 = zext i32 %34 to i64
br label %69
66: ; preds = %69
br i1 %63, label %67, label %86
67: ; preds = %66
%68 = zext i32 %34 to i64
br label %76
69: ; preds = %64, %69
%70 = phi i64 [ 0, %64 ], [ %74, %69 ]
%71 = getelementptr inbounds i32, i32* %47, i64 %70
%72 = load i32, i32* %71
%73 = tail call i32 @Convert(i32 %72)
store i32 %73, i32* %71
%74 = add nuw nsw i64 %70, 1
%75 = icmp eq i64 %74, %65
br i1 %75, label %66, label %69
76: ; preds = %67, %76
%77 = phi i64 [ 0, %67 ], [ %84, %76 ]
%78 = getelementptr inbounds i32, i32* %47, i64 %77
%79 = load i32, i32* %78
%80 = trunc i64 %77 to i32
%81 = shl i32 %80, 2
%82 = add i32 %81, %44
%83 = tail call i32 @Decode(i32 %82, i32 %79)
%84 = add nuw nsw i64 %77, 1
%85 = icmp eq i64 %84, %68
br i1 %85, label %86, label %76
86: ; preds = %76, %61, %66
ret i32 0
}