#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 /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (argc < 3) {
    printf("Usage : font_tool.exe <font(128x128x1bpp).png> <font.bin>\n");
    return -1;
  }
  unsigned char font[256 * 8];
  FILE *pFile;
  int i, j, k;
  pFile = fopen(argv[1], "rb");
  fseek(pFile, 0x43, SEEK_SET);
  for (k = 0; k < 16; k++) {
    for (j = 0; j < 8; j++) {
      for (i = 0; i < 16; i++) {
        fread(&font[i * 8 + j + k * 8 * 16], 1, 1, pFile);
      }
      fseek(pFile, 1, SEEK_CUR);
    }
  }
  fclose(pFile);
  pFile = fopen(argv[2], "wb");
  for (i = 0; i < 256 * 8; i += 8) {
    for (j = 7; j >= 0; j--) {
      k = (((font[i + 0] >> j) & 1) << 7) | (((font[i + 1] >> j) & 1) << 6) |
          (((font[i + 2] >> j) & 1) << 5) | (((font[i + 3] >> j) & 1) << 4) |
          (((font[i + 4] >> j) & 1) << 3) | (((font[i + 5] >> j) & 1) << 2) |
          (((font[i + 6] >> j) & 1) << 1) | (((font[i + 7] >> j) & 1) << 0);
      fwrite(&k, 1, 1, pFile);
    }
  }
  fclose(pFile);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x830,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    119b <main+0x3b>
lea    0xe76(%rip),%rdi
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    148f <main+0x32f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe91(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x818(%rbp)
mov    -0x818(%rbp),%rdi
mov    0x2e14(%rip),%rax
mov    (%rax),%edx
mov    $0x43,%esi
call   1060 <fseek@plt>
movl   $0x0,-0x824(%rbp)
cmpl   $0x10,-0x824(%rbp)
jge    12ac <main+0x14c>
movl   $0x0,-0x820(%rbp)
cmpl   $0x8,-0x820(%rbp)
jge    1293 <main+0x133>
movl   $0x0,-0x81c(%rbp)
cmpl   $0x10,-0x81c(%rbp)
jge    1265 <main+0x105>
mov    -0x81c(%rbp),%eax
shl    $0x3,%eax
add    -0x820(%rbp),%eax
mov    -0x824(%rbp),%ecx
shl    $0x3,%ecx
shl    $0x4,%ecx
add    %ecx,%eax
cltq
lea    -0x810(%rbp),%rdi
add    %rax,%rdi
mov    -0x818(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
mov    -0x81c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x81c(%rbp)
jmp    1208 <main+0xa8>
mov    -0x818(%rbp),%rdi
mov    0x2d75(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%esi
call   1060 <fseek@plt>
mov    -0x820(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x820(%rbp)
jmp    11f1 <main+0x91>
jmp    1298 <main+0x138>
mov    -0x824(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x824(%rbp)
jmp    11da <main+0x7a>
mov    -0x818(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xd77(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x818(%rbp)
movl   $0x0,-0x81c(%rbp)
cmpl   $0x800,-0x81c(%rbp)
jge    147c <main+0x31c>
movl   $0x7,-0x820(%rbp)
cmpl   $0x0,-0x820(%rbp)
jl     1463 <main+0x303>
mov    -0x81c(%rbp),%eax
add    $0x0,%eax
cltq
movzbl -0x810(%rbp,%rax,1),%eax
ff
mov    -0x820(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
shl    $0x7,%eax
mov    -0x81c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movzbl -0x810(%rbp,%rcx,1),%edx
ff
mov    -0x820(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0x1,%ecx
shl    $0x6,%ecx
or     %ecx,%eax
mov    -0x81c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movzbl -0x810(%rbp,%rcx,1),%edx
ff
mov    -0x820(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0x1,%ecx
shl    $0x5,%ecx
or     %ecx,%eax
mov    -0x81c(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movzbl -0x810(%rbp,%rcx,1),%edx
ff
mov    -0x820(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0x1,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    -0x81c(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movzbl -0x810(%rbp,%rcx,1),%edx
ff
mov    -0x820(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0x1,%ecx
shl    $0x3,%ecx
or     %ecx,%eax
mov    -0x81c(%rbp),%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movzbl -0x810(%rbp,%rcx,1),%edx
ff
mov    -0x820(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0x1,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    -0x81c(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movzbl -0x810(%rbp,%rcx,1),%edx
ff
mov    -0x820(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0x1,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    -0x81c(%rbp),%ecx
add    $0x7,%ecx
movslq %ecx,%rcx
movzbl -0x810(%rbp,%rcx,1),%edx
ff
mov    -0x820(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0x1,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0x824(%rbp)
mov    -0x818(%rbp),%rcx
lea    -0x824(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1080 <fwrite@plt>
mov    -0x820(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x820(%rbp)
jmp    12f7 <main+0x197>
jmp    1468 <main+0x308>
mov    -0x81c(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x81c(%rbp)
jmp    12dd <main+0x17d>
mov    -0x818(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x830,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x828,%rsp
cmp    $0x2,%edi
jg     118c <main+0x2c>
lea    0xe89(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
jmp    14e7 <main+0x387>
mov    %rsi,%r14
mov    0x8(%rsi),%rdi
lea    0xe66(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%r13
mov    0x2e2f(%rip),%rax
mov    (%rax),%edx
mov    %r13,%rdi
mov    $0x43,%esi
call   1070 <fseek@plt>
lea    0x20(%rsp),%rbp
xor    %r15d,%r15d
mov    0x2e21(%rip),%r12
nopw   0x0(%rax,%rax,1)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rbx,%rbp,1),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x8,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x10,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x18,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x20,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x28,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x30,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x38,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x40,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x48,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x50,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x58,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x60,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x68,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x70,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
lea    (%rbx,%rbp,1),%rdi
add    $0x78,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
mov    (%r12),%edx
mov    %r13,%rdi
mov    $0x1,%esi
call   1070 <fseek@plt>
add    $0x1,%rbx
cmp    $0x8,%rbx
jne    11e0 <main+0x80>
add    $0x1,%r15
sub    $0xffffffffffffff80,%rbp
cmp    $0x10,%r15
jne    11d0 <main+0x70>
mov    %r13,%rdi
call   1050 <fclose@plt>
mov    0x10(%r14),%rdi
lea    0xc43(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%r14
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movzbl 0x20(%rsp,%rcx,1),%eax
mov    %eax,0x14(%rsp)
mov    %rcx,%rax
or     $0x1,%rax
movzbl 0x20(%rsp,%rax,1),%eax
mov    %eax,0x10(%rsp)
mov    %rcx,%rax
or     $0x2,%rax
movzbl 0x20(%rsp,%rax,1),%eax
mov    %eax,0xc(%rsp)
mov    %rcx,%rax
or     $0x3,%rax
movzbl 0x20(%rsp,%rax,1),%eax
mov    %eax,0x8(%rsp)
mov    %rcx,%rax
or     $0x4,%rax
movzbl 0x20(%rsp,%rax,1),%r15d
mov    %rcx,%rax
or     $0x5,%rax
movzbl 0x20(%rsp,%rax,1),%r12d
mov    %rcx,%rax
or     $0x6,%rax
movzbl 0x20(%rsp,%rax,1),%r13d
mov    %rcx,0x18(%rsp)
mov    %rcx,%rax
or     $0x7,%rax
movzbl 0x20(%rsp,%rax,1),%ebx
mov    $0x7,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    0x14(%rsp),%eax
mov    %ebp,%ecx
shr    %cl,%eax
shl    $0x7,%eax
movzbl %al,%eax
mov    0x10(%rsp),%edx
shr    %cl,%edx
shl    $0x6,%edx
and    $0x40,%edx
mov    0xc(%rsp),%edi
shr    %cl,%edi
or     %eax,%edx
shl    $0x5,%edi
and    $0x20,%edi
or     %edx,%edi
mov    0x8(%rsp),%eax
shr    %cl,%eax
shl    $0x4,%eax
and    $0x10,%eax
mov    %r15d,%edx
shr    %cl,%edx
or     %edi,%eax
mov    %r12d,%edi
shr    %cl,%edi
and    $0x1,%edx
lea    (%rax,%rdx,8),%eax
and    $0x1,%edi
lea    (%rax,%rdi,4),%eax
mov    %r13d,%edx
shr    %cl,%edx
add    %edx,%edx
and    $0x2,%edx
mov    %ebx,%edi
shr    %cl,%edi
and    $0x1,%edi
or     %edx,%edi
or     %eax,%edi
movsbl %dil,%edi
mov    %r14,%rsi
call   1060 <fputc@plt>
add    $0xffffffff,%ebp
jb     1450 <main+0x2f0>
mov    0x18(%rsp),%rcx
lea    0x8(%rcx),%rax
cmp    $0x7f8,%rcx
mov    %rax,%rcx
jb     13d0 <main+0x270>
mov    %r14,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x828,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [59 x i8] c"Usage : font_tool.exe <font(128x128x1bpp).png> <font.bin>\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@SEEK_SET = global i32 0
@SEEK_CUR = global i32 0
@.str.2 = [3 x i8] c"wb\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2048 x i8]
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %175
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32* @fopen(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %19, i32** %7
%20 = load i32*, i32** %7
%21 = load i32, i32* @SEEK_SET
%22 = call i32 @fseek(i32* %20, i32 67, i32 %21)
store i32 0, i32* %10
br label %23
23: ; preds = %58, %15
%24 = load i32, i32* %10
%25 = icmp slt i32 %24, 16
br i1 %25, label %26, label %61
26: ; preds = %23
store i32 0, i32* %9
br label %27
27: ; preds = %54, %26
%28 = load i32, i32* %9
%29 = icmp slt i32 %28, 8
br i1 %29, label %30, label %57
30: ; preds = %27
store i32 0, i32* %8
br label %31
31: ; preds = %47, %30
%32 = load i32, i32* %8
%33 = icmp slt i32 %32, 16
br i1 %33, label %34, label %50
34: ; preds = %31
%35 = load i32, i32* %8
%36 = mul nsw i32 %35, 8
%37 = load i32, i32* %9
%38 = add nsw i32 %36, %37
%39 = load i32, i32* %10
%40 = mul nsw i32 %39, 8
%41 = mul nsw i32 %40, 16
%42 = add nsw i32 %38, %41
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [2048 x i8], [2048 x i8]* %6, i64 0, i64 %43
%45 = load i32*, i32** %7
%46 = call i32 @fread(i8* %44, i32 1, i32 1, i32* %45)
br label %47
47: ; preds = %34
%48 = load i32, i32* %8
%49 = add nsw i32 %48, 1
store i32 %49, i32* %8
br label %31
50: ; preds = %31
%51 = load i32*, i32** %7
%52 = load i32, i32* @SEEK_CUR
%53 = call i32 @fseek(i32* %51, i32 1, i32 %52)
br label %54
54: ; preds = %50
%55 = load i32, i32* %9
%56 = add nsw i32 %55, 1
store i32 %56, i32* %9
br label %27
57: ; preds = %27
br label %58
58: ; preds = %57
%59 = load i32, i32* %10
%60 = add nsw i32 %59, 1
store i32 %60, i32* %10
br label %23
61: ; preds = %23
%62 = load i32*, i32** %7
%63 = call i32 @fclose(i32* %62)
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 2
%66 = load i8*, i8** %65
%67 = call i32* @fopen(i8* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %67, i32** %7
store i32 0, i32* %8
br label %68
68: ; preds = %169, %61
%69 = load i32, i32* %8
%70 = icmp slt i32 %69, 2048
br i1 %70, label %71, label %172
71: ; preds = %68
store i32 7, i32* %9
br label %72
72: ; preds = %165, %71
%73 = load i32, i32* %9
%74 = icmp sge i32 %73, 0
br i1 %74, label %75, label %168
75: ; preds = %72
%76 = load i32, i32* %8
%77 = add nsw i32 %76, 0
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [2048 x i8], [2048 x i8]* %6, i64 0, i64 %78
%80 = load i8, i8* %79
%81 = zext i8 %80 to i32
%82 = load i32, i32* %9
%83 = ashr i32 %81, %82
%84 = and i32 %83, 1
%85 = shl i32 %84, 7
%86 = load i32, i32* %8
%87 = add nsw i32 %86, 1
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [2048 x i8], [2048 x i8]* %6, i64 0, i64 %88
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = load i32, i32* %9
%93 = ashr i32 %91, %92
%94 = and i32 %93, 1
%95 = shl i32 %94, 6
%96 = or i32 %85, %95
%97 = load i32, i32* %8
%98 = add nsw i32 %97, 2
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [2048 x i8], [2048 x i8]* %6, i64 0, i64 %99
%101 = load i8, i8* %100
%102 = zext i8 %101 to i32
%103 = load i32, i32* %9
%104 = ashr i32 %102, %103
%105 = and i32 %104, 1
%106 = shl i32 %105, 5
%107 = or i32 %96, %106
%108 = load i32, i32* %8
%109 = add nsw i32 %108, 3
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [2048 x i8], [2048 x i8]* %6, i64 0, i64 %110
%112 = load i8, i8* %111
%113 = zext i8 %112 to i32
%114 = load i32, i32* %9
%115 = ashr i32 %113, %114
%116 = and i32 %115, 1
%117 = shl i32 %116, 4
%118 = or i32 %107, %117
%119 = load i32, i32* %8
%120 = add nsw i32 %119, 4
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [2048 x i8], [2048 x i8]* %6, i64 0, i64 %121
%123 = load i8, i8* %122
%124 = zext i8 %123 to i32
%125 = load i32, i32* %9
%126 = ashr i32 %124, %125
%127 = and i32 %126, 1
%128 = shl i32 %127, 3
%129 = or i32 %118, %128
%130 = load i32, i32* %8
%131 = add nsw i32 %130, 5
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [2048 x i8], [2048 x i8]* %6, i64 0, i64 %132
%134 = load i8, i8* %133
%135 = zext i8 %134 to i32
%136 = load i32, i32* %9
%137 = ashr i32 %135, %136
%138 = and i32 %137, 1
%139 = shl i32 %138, 2
%140 = or i32 %129, %139
%141 = load i32, i32* %8
%142 = add nsw i32 %141, 6
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [2048 x i8], [2048 x i8]* %6, i64 0, i64 %143
%145 = load i8, i8* %144
%146 = zext i8 %145 to i32
%147 = load i32, i32* %9
%148 = ashr i32 %146, %147
%149 = and i32 %148, 1
%150 = shl i32 %149, 1
%151 = or i32 %140, %150
%152 = load i32, i32* %8
%153 = add nsw i32 %152, 7
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [2048 x i8], [2048 x i8]* %6, i64 0, i64 %154
%156 = load i8, i8* %155
%157 = zext i8 %156 to i32
%158 = load i32, i32* %9
%159 = ashr i32 %157, %158
%160 = and i32 %159, 1
%161 = shl i32 %160, 0
%162 = or i32 %151, %161
store i32 %162, i32* %10
%163 = load i32*, i32** %7
%164 = call i32 @fwrite(i32* %10, i32 1, i32 1, i32* %163)
br label %165
165: ; preds = %75
%166 = load i32, i32* %9
%167 = add nsw i32 %166, -1
store i32 %167, i32* %9
br label %72
168: ; preds = %72
br label %169
169: ; preds = %168
%170 = load i32, i32* %8
%171 = add nsw i32 %170, 8
store i32 %171, i32* %8
br label %68
172: ; preds = %68
%173 = load i32*, i32** %7
%174 = call i32 @fclose(i32* %173)
store i32 0, i32* %3
br label %175
175: ; preds = %172, %13
%176 = load i32, i32* %3
ret i32 %176
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"rb\00"
@SEEK_SET = global i32 0
@SEEK_CUR = global i32 0
@.str.2 = [3 x i8] c"wb\00"
@str = [58 x i8] c"Usage : font_tool.exe <font(128x128x1bpp).png> <font.bin>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2048 x i8]
%4 = icmp slt i32 %0, 3
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
br label %154
7: ; preds = %2
%8 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32* @fopen(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @SEEK_SET
%13 = tail call i32 @fseek(i32* %11, i32 67, i32 %12)
br label %14
14: ; preds = %7, %71
%15 = phi i64 [ 0, %7 ], [ %72, %71 ]
%16 = shl nsw i64 %15, 7
br label %17
17: ; preds = %14, %17
%18 = phi i64 [ 0, %14 ], [ %69, %17 ]
%19 = add nuw nsw i64 %18, %16
%20 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %19
%21 = call i32 @fread(i8* %20, i32 1, i32 1, i32* %11)
%22 = add nuw nsw i64 %19, 8
%23 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %22
%24 = call i32 @fread(i8* %23, i32 1, i32 1, i32* %11)
%25 = add nuw nsw i64 %19, 16
%26 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %25
%27 = call i32 @fread(i8* %26, i32 1, i32 1, i32* %11)
%28 = add nuw nsw i64 %19, 24
%29 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %28
%30 = call i32 @fread(i8* %29, i32 1, i32 1, i32* %11)
%31 = add nuw nsw i64 %19, 32
%32 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %31
%33 = call i32 @fread(i8* %32, i32 1, i32 1, i32* %11)
%34 = add nuw nsw i64 %19, 40
%35 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %34
%36 = call i32 @fread(i8* %35, i32 1, i32 1, i32* %11)
%37 = add nuw nsw i64 %19, 48
%38 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %37
%39 = call i32 @fread(i8* %38, i32 1, i32 1, i32* %11)
%40 = add nuw nsw i64 %19, 56
%41 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %40
%42 = call i32 @fread(i8* %41, i32 1, i32 1, i32* %11)
%43 = add nuw nsw i64 %19, 64
%44 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %43
%45 = call i32 @fread(i8* %44, i32 1, i32 1, i32* %11)
%46 = add nuw nsw i64 %19, 72
%47 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %46
%48 = call i32 @fread(i8* %47, i32 1, i32 1, i32* %11)
%49 = add nuw nsw i64 %19, 80
%50 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %49
%51 = call i32 @fread(i8* %50, i32 1, i32 1, i32* %11)
%52 = add nuw nsw i64 %19, 88
%53 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %52
%54 = call i32 @fread(i8* %53, i32 1, i32 1, i32* %11)
%55 = add nuw nsw i64 %19, 96
%56 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %55
%57 = call i32 @fread(i8* %56, i32 1, i32 1, i32* %11)
%58 = add nuw nsw i64 %19, 104
%59 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %58
%60 = call i32 @fread(i8* %59, i32 1, i32 1, i32* %11)
%61 = add nuw nsw i64 %19, 112
%62 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %61
%63 = call i32 @fread(i8* %62, i32 1, i32 1, i32* %11)
%64 = add nuw nsw i64 %19, 120
%65 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %64
%66 = call i32 @fread(i8* %65, i32 1, i32 1, i32* %11)
%67 = load i32, i32* @SEEK_CUR
%68 = tail call i32 @fseek(i32* %11, i32 1, i32 %67)
%69 = add nuw nsw i64 %18, 1
%70 = icmp eq i64 %69, 8
br i1 %70, label %71, label %17
71: ; preds = %17
%72 = add nuw nsw i64 %15, 1
%73 = icmp eq i64 %72, 16
br i1 %73, label %74, label %14
74: ; preds = %71
%75 = tail call i32 @fclose(i32* %11)
%76 = getelementptr inbounds i8*, i8** %1, i64 2
%77 = load i8*, i8** %76
%78 = tail call i32* @fopen(i8* %77, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %79
79: ; preds = %74, %149
%80 = phi i64 [ 0, %74 ], [ %150, %149 ]
%81 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %80
%82 = load i8, i8* %81
%83 = zext i8 %82 to i32
%84 = or i64 %80, 1
%85 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %84
%86 = load i8, i8* %85
%87 = zext i8 %86 to i32
%88 = or i64 %80, 2
%89 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %88
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = or i64 %80, 3
%93 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %92
%94 = load i8, i8* %93
%95 = zext i8 %94 to i32
%96 = or i64 %80, 4
%97 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %96
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = or i64 %80, 5
%101 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %100
%102 = load i8, i8* %101
%103 = zext i8 %102 to i32
%104 = or i64 %80, 6
%105 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %104
%106 = load i8, i8* %105
%107 = zext i8 %106 to i32
%108 = or i64 %80, 7
%109 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %108
%110 = load i8, i8* %109
%111 = zext i8 %110 to i32
br label %112
112: ; preds = %79, %112
%113 = phi i32 [ 7, %79 ], [ %147, %112 ]
%114 = lshr i32 %83, %113
%115 = shl nuw nsw i32 %114, 7
%116 = and i32 %115, 128
%117 = lshr i32 %87, %113
%118 = shl nuw nsw i32 %117, 6
%119 = and i32 %118, 64
%120 = or i32 %119, %116
%121 = lshr i32 %91, %113
%122 = shl nuw nsw i32 %121, 5
%123 = and i32 %122, 32
%124 = or i32 %120, %123
%125 = lshr i32 %95, %113
%126 = shl nuw nsw i32 %125, 4
%127 = and i32 %126, 16
%128 = or i32 %124, %127
%129 = lshr i32 %99, %113
%130 = shl nuw nsw i32 %129, 3
%131 = and i32 %130, 8
%132 = or i32 %128, %131
%133 = lshr i32 %103, %113
%134 = shl nuw nsw i32 %133, 2
%135 = and i32 %134, 4
%136 = or i32 %132, %135
%137 = lshr i32 %107, %113
%138 = shl nuw nsw i32 %137, 1
%139 = and i32 %138, 2
%140 = or i32 %136, %139
%141 = lshr i32 %111, %113
%142 = and i32 %141, 1
%143 = or i32 %140, %142
%144 = shl i32 %143, 24
%145 = ashr exact i32 %144, 24
%146 = tail call i32 @fputc(i32 %145, i32* %78)
%147 = add nsw i32 %113, -1
%148 = icmp eq i32 %113, 0
br i1 %148, label %149, label %112
149: ; preds = %112
%150 = add nuw nsw i64 %80, 8
%151 = icmp ult i64 %80, 2040
br i1 %151, label %79, label %152
152: ; preds = %149
%153 = tail call i32 @fclose(i32* %78)
br label %154
154: ; preds = %152, %5
%155 = phi i32 [ -1, %5 ], [ 0, %152 ]
ret i32 %155
}