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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int convertchar(unsigned int);
int /*<<< orphan*/ free(unsigned char *);
char lookupchar(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
long read_file(char *, unsigned char **);
int /*<<< orphan*/ sprintf(char *, char *, char);
int main(int argc, char *argv[]) {
  unsigned char *data;
  long len = read_file("sm64.split/bin/font_graphics.bin", &data);
  unsigned int r, c, hexchar;
  int convchar;
  unsigned int seg;
  unsigned int offset;
  char printchar;
  char printstr[8];
  for (c = 0; c < 4 - 1; c++) {
    printf("^  Hex  ^  A  ^  Index  ^  Seg Addr  ^  T  ");
  }
  printf("^\n");
  for (r = 0; r < 0x80 / 4; r++) {
    for (c = 1; c < 4; c++) {
      hexchar = r + (0x80 / 4) * c;
      convchar = convertchar(hexchar);
      if (convchar == -1) {
        seg = 0;
      } else {
        seg = (unsigned int)(((&data[0x7700 + 4 * convchar])[0] << 24) +
                             ((&data[0x7700 + 4 * convchar])[1] << 16) +
                             ((&data[0x7700 + 4 * convchar])[2] << 8) +
                             ((&data[0x7700 + 4 * convchar])[3]));
      }
      offset = 0xFFFFFF & seg;
      printchar = lookupchar(hexchar);
      if (printchar == '|' || printchar == '^') {
        sprintf(printstr, "%%%%%c%%%%", printchar);
      } else {
        sprintf(printstr, "%c", printchar);
      }
      printf("|  %02X  |  %s  | ", hexchar, printstr);
      if (seg == 0) {
        if (convchar == -1) {
          printf("  -  |  -  | ");
        } else {
          printf("  %02X  |  %08X  | ", convchar, seg);
        }
      } else {
        printf("  %02X  |  %08X  |  "
               "{{http://queueram.com/n64/sm64/textures/textures/"
               "font_graphics.0x%05X.png}}  ",
               convchar, seg, offset);
      }
    }
    printf("|\n");
  }
  free(data);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe83(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1070 <read_file@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x3,-0x28(%rbp)
jae    11b7 <main+0x57>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1191 <main+0x31>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x20,-0x24(%rbp)
jae    137f <main+0x21f>
movl   $0x1,-0x28(%rbp)
cmpl   $0x4,-0x28(%rbp)
jae    1363 <main+0x203>
mov    -0x24(%rbp),%eax
mov    -0x28(%rbp),%ecx
shl    $0x5,%ecx
add    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
call   1050 <convertchar@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0xffffffff,-0x30(%rbp)
jne    1216 <main+0xb6>
movl   $0x0,-0x34(%rbp)
jmp    1287 <main+0x127>
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x7700,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
shl    $0x18,%eax
mov    -0x18(%rbp),%rcx
mov    -0x30(%rbp),%edx
shl    $0x2,%edx
add    $0x7700,%edx
movslq %edx,%rdx
movzbl 0x1(%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%rcx
mov    -0x30(%rbp),%edx
shl    $0x2,%edx
add    $0x7700,%edx
movslq %edx,%rdx
movzbl 0x2(%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%rcx
mov    -0x30(%rbp),%edx
shl    $0x2,%edx
add    $0x7700,%edx
movslq %edx,%rdx
movzbl 0x3(%rcx,%rdx,1),%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
and    $0xffffff,%eax
mov    %eax,-0x38(%rbp)
mov    -0x2c(%rbp),%edi
call   1040 <lookupchar@plt>
mov    %al,-0x39(%rbp)
movsbl -0x39(%rbp),%eax
cmp    $0x7c,%eax
je     12b7 <main+0x157>
movsbl -0x39(%rbp),%eax
cmp    $0x5e,%eax
jne    12d0 <main+0x170>
lea    -0x41(%rbp),%rdi
lea    0xd8e(%rip),%rsi
movsbl -0x39(%rbp),%edx
call   1080 <sprintf@plt>
jmp    12e4 <main+0x184>
lea    -0x41(%rbp),%rdi
lea    0xd80(%rip),%rsi
movsbl -0x39(%rbp),%edx
call   1080 <sprintf@plt>
mov    -0x2c(%rbp),%esi
lea    -0x41(%rbp),%rdx
lea    0xd6c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x34(%rbp)
jne    1339 <main+0x1d9>
cmpl   $0xffffffff,-0x30(%rbp)
jne    1320 <main+0x1c0>
lea    0xd5d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1334 <main+0x1d4>
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1350 <main+0x1f0>
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
lea    0xd4a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1355 <main+0x1f5>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11dd <main+0x7d>
lea    0xd8b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11cc <main+0x6c>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xe7b(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1080 <read_file@plt>
lea    0xe8b(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf34(%rip),%rdi
call   1040 <puts@plt>
mov    $0x20,%r14d
lea    0x8(%rsp),%r15
lea    0xe86(%rip),%r12
jmp    1215 <main+0xa5>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%ecx
and    $0xffffff,%ecx
lea    0xe9e(%rip),%rdi
mov    %r13d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xeef(%rip),%rdi
call   1040 <puts@plt>
add    $0x1,%r14d
cmp    $0x40,%r14d
je     1451 <main+0x2e1>
mov    %r14d,%edi
call   1060 <convertchar@plt>
mov    %eax,%ebp
mov    $0x0,%ebx
cmp    $0xffffffff,%eax
je     123a <main+0xca>
mov    0x10(%rsp),%rax
movslq %ebp,%rcx
mov    0x7700(%rax,%rcx,4),%ebx
bswap  %ebx
mov    %r14d,%edi
call   1050 <lookupchar@plt>
cmp    $0x7c,%al
je     124a <main+0xda>
cmp    $0x5e,%al
jne    1260 <main+0xf0>
movsbl %al,%edx
mov    %r15,%rdi
lea    0xdf6(%rip),%rsi
call   1090 <sprintf@plt>
jmp    1269 <main+0xf9>
xchg   %ax,%ax
mov    %al,0x8(%rsp)
movb   $0x0,0x9(%rsp)
mov    %r12,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1070 <printf@plt>
test   %ebx,%ebx
je     12a0 <main+0x130>
mov    %ebx,%ecx
and    $0xffffff,%ecx
lea    0xe01(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    12d0 <main+0x160>
nopl   0x0(%rax)
cmp    $0xffffffff,%ebp
je     12b9 <main+0x149>
lea    0xdcd(%rip),%rdi
mov    %ebp,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    12d0 <main+0x160>
lea    0xdab(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
nopw   0x0(%rax,%rax,1)
lea    0x20(%r14),%ebp
mov    %ebp,%edi
call   1060 <convertchar@plt>
mov    %eax,%r13d
cmp    $0xffffffff,%eax
je     1300 <main+0x190>
mov    0x10(%rsp),%rax
movslq %r13d,%rcx
mov    0x7700(%rax,%rcx,4),%ebx
bswap  %ebx
jmp    1302 <main+0x192>
cs nopw 0x0(%rax,%rax,1)
xor    %ebx,%ebx
mov    %ebp,%edi
call   1050 <lookupchar@plt>
cmp    $0x7c,%al
je     1311 <main+0x1a1>
cmp    $0x5e,%al
jne    1330 <main+0x1c0>
movsbl %al,%edx
mov    %r15,%rdi
lea    0xd2f(%rip),%rsi
call   1090 <sprintf@plt>
jmp    1339 <main+0x1c9>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %al,0x8(%rsp)
movb   $0x0,0x9(%rsp)
mov    %r12,%rdi
mov    %ebp,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1070 <printf@plt>
test   %ebx,%ebx
je     1370 <main+0x200>
mov    %ebx,%ecx
and    $0xffffff,%ecx
lea    0xd32(%rip),%rdi
mov    %r13d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    13a0 <main+0x230>
nopl   0x0(%rax)
cmp    $0xffffffff,%r13d
je     138b <main+0x21b>
lea    0xcfc(%rip),%rdi
mov    %r13d,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    13a0 <main+0x230>
lea    0xcd9(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
nopl   0x0(%rax)
lea    0x40(%r14),%ebp
mov    %ebp,%edi
call   1060 <convertchar@plt>
mov    %eax,%r13d
cmp    $0xffffffff,%eax
je     13d0 <main+0x260>
mov    0x10(%rsp),%rax
movslq %r13d,%rcx
mov    0x7700(%rax,%rcx,4),%ebx
bswap  %ebx
jmp    13d2 <main+0x262>
cs nopw 0x0(%rax,%rax,1)
xor    %ebx,%ebx
mov    %ebp,%edi
call   1050 <lookupchar@plt>
cmp    $0x7c,%al
je     13e1 <main+0x271>
cmp    $0x5e,%al
jne    1400 <main+0x290>
movsbl %al,%edx
mov    %r15,%rdi
lea    0xc5f(%rip),%rsi
call   1090 <sprintf@plt>
jmp    1409 <main+0x299>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %al,0x8(%rsp)
movb   $0x0,0x9(%rsp)
mov    %r12,%rdi
mov    %ebp,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1070 <printf@plt>
test   %ebx,%ebx
jne    11e0 <main+0x70>
cmp    $0xffffffff,%r13d
je     143e <main+0x2ce>
lea    0xc4c(%rip),%rdi
mov    %r13d,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    11fb <main+0x8b>
lea    0xc26(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    11fb <main+0x8b>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"sm64.split/bin/font_graphics.bin\00"
@.str.1 = [44 x i8] c"^ Hex ^ A ^ Index ^ Seg Addr ^ T \00"
@.str.2 = [3 x i8] c"^\0A\00"
@.str.3 = [11 x i8] c"%%%%%c%%%%\00"
@.str.4 = [3 x i8] c"%c\00"
@.str.5 = [19 x i8] c"| %02X | %s | \00"
@.str.6 = [14 x i8] c" - | - | \00"
@.str.7 = [20 x i8] c" %02X | %08X | \00"
@.str.8 = [98 x i8] c" %02X | %08X | {{http://queueram.com/n64/sm64/textures/textures/font_graphics.0x%05X.png}} \00"
@.str.9 = [3 x i8] c"|\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8
%15 = alloca [8 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = call i64 @read_file(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8** %6)
store i64 %16, i64* %7
store i32 0, i32* %9
br label %17
17: ; preds = %22, %2
%18 = load i32, i32* %9
%19 = icmp ult i32 %18, 3
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %20
%23 = load i32, i32* %9
%24 = add i32 %23, 1
store i32 %24, i32* %9
br label %17
25: ; preds = %17
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %8
br label %27
27: ; preds = %134, %25
%28 = load i32, i32* %8
%29 = icmp ult i32 %28, 32
br i1 %29, label %30, label %137
30: ; preds = %27
store i32 1, i32* %9
br label %31
31: ; preds = %129, %30
%32 = load i32, i32* %9
%33 = icmp ult i32 %32, 4
br i1 %33, label %34, label %132
34: ; preds = %31
%35 = load i32, i32* %8
%36 = load i32, i32* %9
%37 = mul i32 32, %36
%38 = add i32 %35, %37
store i32 %38, i32* %10
%39 = load i32, i32* %10
%40 = call i32 @convertchar(i32 %39)
store i32 %40, i32* %11
%41 = load i32, i32* %11
%42 = icmp eq i32 %41, -1
br i1 %42, label %43, label %44
43: ; preds = %34
store i32 0, i32* %12
br label %87
44: ; preds = %34
%45 = load i8*, i8** %6
%46 = load i32, i32* %11
%47 = mul nsw i32 4, %46
%48 = add nsw i32 30464, %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %45, i64 %49
%51 = getelementptr inbounds i8, i8* %50, i64 0
%52 = load i8, i8* %51
%53 = zext i8 %52 to i32
%54 = shl i32 %53, 24
%55 = load i8*, i8** %6
%56 = load i32, i32* %11
%57 = mul nsw i32 4, %56
%58 = add nsw i32 30464, %57
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8, i8* %55, i64 %59
%61 = getelementptr inbounds i8, i8* %60, i64 1
%62 = load i8, i8* %61
%63 = zext i8 %62 to i32
%64 = shl i32 %63, 16
%65 = add nsw i32 %54, %64
%66 = load i8*, i8** %6
%67 = load i32, i32* %11
%68 = mul nsw i32 4, %67
%69 = add nsw i32 30464, %68
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %66, i64 %70
%72 = getelementptr inbounds i8, i8* %71, i64 2
%73 = load i8, i8* %72
%74 = zext i8 %73 to i32
%75 = shl i32 %74, 8
%76 = add nsw i32 %65, %75
%77 = load i8*, i8** %6
%78 = load i32, i32* %11
%79 = mul nsw i32 4, %78
%80 = add nsw i32 30464, %79
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %77, i64 %81
%83 = getelementptr inbounds i8, i8* %82, i64 3
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = add nsw i32 %76, %85
store i32 %86, i32* %12
br label %87
87: ; preds = %44, %43
%88 = load i32, i32* %12
%89 = and i32 16777215, %88
store i32 %89, i32* %13
%90 = load i32, i32* %10
%91 = call signext i8 @lookupchar(i32 %90)
store i8 %91, i8* %14
%92 = load i8, i8* %14
%93 = sext i8 %92 to i32
%94 = icmp eq i32 %93, 124
br i1 %94, label %99, label %95
95: ; preds = %87
%96 = load i8, i8* %14
%97 = sext i8 %96 to i32
%98 = icmp eq i32 %97, 94
br i1 %98, label %99, label %103
99: ; preds = %95, %87
%100 = getelementptr inbounds [8 x i8], [8 x i8]* %15, i64 0, i64 0
%101 = load i8, i8* %14
%102 = call i32 @sprintf(i8* %100, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8 signext %101)
br label %107
103: ; preds = %95
%104 = getelementptr inbounds [8 x i8], [8 x i8]* %15, i64 0, i64 0
%105 = load i8, i8* %14
%106 = call i32 @sprintf(i8* %104, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8 signext %105)
br label %107
107: ; preds = %103, %99
%108 = load i32, i32* %10
%109 = getelementptr inbounds [8 x i8], [8 x i8]* %15, i64 0, i64 0
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %108, i8* %109)
%111 = load i32, i32* %12
%112 = icmp eq i32 %111, 0
br i1 %112, label %113, label %123
113: ; preds = %107
%114 = load i32, i32* %11
%115 = icmp eq i32 %114, -1
br i1 %115, label %116, label %118
116: ; preds = %113
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
br label %122
118: ; preds = %113
%119 = load i32, i32* %11
%120 = load i32, i32* %12
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %119, i32 %120)
br label %122
122: ; preds = %118, %116
br label %128
123: ; preds = %107
%124 = load i32, i32* %11
%125 = load i32, i32* %12
%126 = load i32, i32* %13
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.8, i64 0, i64 0), i32 %124, i32 %125, i32 %126)
br label %128
128: ; preds = %123, %122
br label %129
129: ; preds = %128
%130 = load i32, i32* %9
%131 = add i32 %130, 1
store i32 %131, i32* %9
br label %31
132: ; preds = %31
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %134
134: ; preds = %132
%135 = load i32, i32* %8
%136 = add i32 %135, 1
store i32 %136, i32* %8
br label %27
137: ; preds = %27
%138 = load i8*, i8** %6
%139 = call i32 @free(i8* %138)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"sm64.split/bin/font_graphics.bin\00"
@.str.1 = [44 x i8] c"^ Hex ^ A ^ Index ^ Seg Addr ^ T \00"
@.str.3 = [11 x i8] c"%%%%%c%%%%\00"
@.str.5 = [19 x i8] c"| %02X | %s | \00"
@.str.6 = [14 x i8] c" - | - | \00"
@.str.7 = [20 x i8] c" %02X | %08X | \00"
@.str.8 = [98 x i8] c" %02X | %08X | {{http://queueram.com/n64/sm64/textures/textures/font_graphics.0x%05X.png}} \00"
@str = [2 x i8] c"^\00"
@str.10 = [2 x i8] c"|\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8*
%4 = alloca [8 x i8]
%5 = bitcast i8** %3 to i8*
%6 = call i64 @read_file(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8** %3)
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%12 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 1
br label %13
13: ; preds = %2, %146
%14 = phi i32 [ 0, %2 ], [ %148, %146 ]
%15 = add nuw nsw i32 %14, 32
%16 = call i32 @convertchar(i32 %15)
%17 = icmp eq i32 %16, -1
br i1 %17, label %41, label %18
18: ; preds = %13
%19 = load i8*, i8** %3
%20 = shl nsw i32 %16, 2
%21 = add nsw i32 %20, 30464
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %19, i64 %22
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = shl nuw i32 %25, 24
%27 = getelementptr inbounds i8, i8* %23, i64 1
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = shl nuw nsw i32 %29, 16
%31 = or i32 %30, %26
%32 = getelementptr inbounds i8, i8* %23, i64 2
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = shl nuw nsw i32 %34, 8
%36 = or i32 %31, %35
%37 = getelementptr inbounds i8, i8* %23, i64 3
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = or i32 %36, %39
br label %41
41: ; preds = %13, %18
%42 = phi i32 [ %40, %18 ], [ 0, %13 ]
%43 = and i32 %42, 16777215
%44 = call signext i8 @lookupchar(i32 %15)
switch i8 %44, label %47 [
i8 124, label %45
i8 94, label %45
]
45: ; preds = %41, %41
%46 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8 signext %44)
br label %48
47: ; preds = %41
store i8 %44, i8* %7
store i8 0, i8* %12
br label %48
48: ; preds = %47, %45
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %15, i8* %7)
%50 = icmp eq i32 %42, 0
br i1 %50, label %51, label %56
51: ; preds = %48
br i1 %17, label %52, label %54
52: ; preds = %51
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
br label %58
54: ; preds = %51
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %16, i32 0)
br label %58
56: ; preds = %48
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([98 x i8], [98 x i8]* @.str.8, i64 0, i64 0), i32 %16, i32 %42, i32 %43)
br label %58
58: ; preds = %56, %54, %52
%59 = add nuw nsw i32 %14, 64
%60 = call i32 @convertchar(i32 %59)
%61 = icmp eq i32 %60, -1
br i1 %61, label %85, label %62
62: ; preds = %58
%63 = load i8*, i8** %3
%64 = shl nsw i32 %60, 2
%65 = add nsw i32 %64, 30464
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i8, i8* %63, i64 %66
%68 = load i8, i8* %67
%69 = zext i8 %68 to i32
%70 = shl nuw i32 %69, 24
%71 = getelementptr inbounds i8, i8* %67, i64 1
%72 = load i8, i8* %71
%73 = zext i8 %72 to i32
%74 = shl nuw nsw i32 %73, 16
%75 = or i32 %74, %70
%76 = getelementptr inbounds i8, i8* %67, i64 2
%77 = load i8, i8* %76
%78 = zext i8 %77 to i32
%79 = shl nuw nsw i32 %78, 8
%80 = or i32 %75, %79
%81 = getelementptr inbounds i8, i8* %67, i64 3
%82 = load i8, i8* %81
%83 = zext i8 %82 to i32
%84 = or i32 %80, %83
br label %85
85: ; preds = %62, %58
%86 = phi i32 [ %84, %62 ], [ 0, %58 ]
%87 = and i32 %86, 16777215
%88 = call signext i8 @lookupchar(i32 %59)
switch i8 %88, label %91 [
i8 124, label %89
i8 94, label %89
]
89: ; preds = %85, %85
%90 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8 signext %88)
br label %92
91: ; preds = %85
store i8 %88, i8* %7
store i8 0, i8* %12
br label %92
92: ; preds = %91, %89
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %59, i8* %7)
%94 = icmp eq i32 %86, 0
br i1 %94, label %97, label %95
95: ; preds = %92
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([98 x i8], [98 x i8]* @.str.8, i64 0, i64 0), i32 %60, i32 %86, i32 %87)
br label %102
97: ; preds = %92
br i1 %61, label %100, label %98
98: ; preds = %97
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %60, i32 0)
br label %102
100: ; preds = %97
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
br label %102
102: ; preds = %100, %98, %95
%103 = add nuw nsw i32 %14, 96
%104 = call i32 @convertchar(i32 %103)
%105 = icmp eq i32 %104, -1
br i1 %105, label %129, label %106
106: ; preds = %102
%107 = load i8*, i8** %3
%108 = shl nsw i32 %104, 2
%109 = add nsw i32 %108, 30464
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i8, i8* %107, i64 %110
%112 = load i8, i8* %111
%113 = zext i8 %112 to i32
%114 = shl nuw i32 %113, 24
%115 = getelementptr inbounds i8, i8* %111, i64 1
%116 = load i8, i8* %115
%117 = zext i8 %116 to i32
%118 = shl nuw nsw i32 %117, 16
%119 = or i32 %118, %114
%120 = getelementptr inbounds i8, i8* %111, i64 2
%121 = load i8, i8* %120
%122 = zext i8 %121 to i32
%123 = shl nuw nsw i32 %122, 8
%124 = or i32 %119, %123
%125 = getelementptr inbounds i8, i8* %111, i64 3
%126 = load i8, i8* %125
%127 = zext i8 %126 to i32
%128 = or i32 %124, %127
br label %129
129: ; preds = %106, %102
%130 = phi i32 [ %128, %106 ], [ 0, %102 ]
%131 = and i32 %130, 16777215
%132 = call signext i8 @lookupchar(i32 %103)
switch i8 %132, label %135 [
i8 124, label %133
i8 94, label %133
]
133: ; preds = %129, %129
%134 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8 signext %132)
br label %136
135: ; preds = %129
store i8 %132, i8* %7
store i8 0, i8* %12
br label %136
136: ; preds = %135, %133
%137 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %103, i8* %7)
%138 = icmp eq i32 %130, 0
br i1 %138, label %141, label %139
139: ; preds = %136
%140 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([98 x i8], [98 x i8]* @.str.8, i64 0, i64 0), i32 %104, i32 %130, i32 %131)
br label %146
141: ; preds = %136
br i1 %105, label %144, label %142
142: ; preds = %141
%143 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %104, i32 0)
br label %146
144: ; preds = %141
%145 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
br label %146
146: ; preds = %144, %142, %139
%147 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
%148 = add nuw nsw i32 %14, 1
%149 = icmp eq i32 %148, 32
br i1 %149, label %150, label %13
150: ; preds = %146
%151 = load i8*, i8** %3
%152 = call i32 @free(i8* %151)
ret i32 0
}