#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 */
struct stat {
  long st_size;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fread(unsigned char *, int, long, int /*<<< orphan*/ *);
int /*<<< orphan*/ fstat(int /*<<< orphan*/, struct stat *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  const char *src_name;
  const char *dst_name;
  FILE *fi, *fo;
  struct stat st;
  long length;
  static unsigned char data[65536];
  int i, j;
  const char *pat;
  if (argc != 4) {
    fprintf(stderr, "Usage: tf2hex input_file output_file suffix\n");
    return -1;
  }
  src_name = argv[1];
  dst_name = argv[2];
  pat = argv[3];
  fi = fopen(src_name, "rb");
  if (fi == NULL) {
    fprintf(stderr, "Unable to open input file.\n");
    return -1;
  }
  fstat(fileno(fi), &st);
  length = st.st_size;
  fread(data, sizeof(char), length, fi);
  fprintf(stdout, "Read %ld bytes.\n", length);
  fclose(fi);
  fo = fopen(dst_name, "wt");
  if (fo == NULL) {
    fprintf(stderr, "Unable to open output file.\n");
    return -1;
  }
  fprintf(fo, "static unsigned char romDump%s[] = {\n", pat);
  for (i = 0; i < length; i += 8) {
    for (j = 0; (j < 8) && (i + j < length); j++) {
      fprintf(fo, "0x%02x, ", data[i + j]);
    }
    fprintf(fo, "\n");
  }
  fprintf(fo, "};\nstatic unsigned int romDumpSize%s = %ld;\n", pat, length);
  fclose(fo);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     11a4 <main+0x44>
mov    0x2e59(%rip),%rax
movslq (%rax),%rdi
lea    0xe6f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1389 <main+0x229>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe5a(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    120b <main+0xab>
mov    0x2df2(%rip),%rax
movslq (%rax),%rdi
lea    0xe38(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1389 <main+0x229>
mov    -0x28(%rbp),%rdi
call   1060 <fileno@plt>
mov    %eax,%edi
lea    -0x38(%rbp),%rsi
call   1080 <fstat@plt>
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0x2e2a(%rip),%rdi
mov    $0x1,%esi
call   1030 <fread@plt>
mov    0x2d91(%rip),%rax
movslq (%rax),%rdi
mov    -0x40(%rbp),%rdx
lea    0xdf7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x20(%rbp),%rdi
lea    0xded(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    12a8 <main+0x148>
mov    0x2d55(%rip),%rax
movslq (%rax),%rdi
lea    0xdcb(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1389 <main+0x229>
mov    -0x30(%rbp),%rdi
mov    -0x50(%rbp),%rdx
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x44(%rbp)
movslq -0x44(%rbp),%rax
cmp    -0x40(%rbp),%rax
jge    135f <main+0x1ff>
movl   $0x0,-0x48(%rbp)
xor    %eax,%eax
cmpl   $0x8,-0x48(%rbp)
mov    %al,-0x51(%rbp)
jge    12fb <main+0x19b>
mov    -0x44(%rbp),%eax
add    -0x48(%rbp),%eax
cltq
cmp    -0x40(%rbp),%rax
setl   %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
test   $0x1,%al
jne    130b <main+0x1ab>
jmp    133f <main+0x1df>
mov    -0x30(%rbp),%rdi
mov    -0x44(%rbp),%eax
add    -0x48(%rbp),%eax
movslq %eax,%rcx
lea    0x2d41(%rip),%rax
movzbl (%rax,%rcx,1),%edx
lea    0xd79(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12da <main+0x17a>
mov    -0x30(%rbp),%rdi
lea    0xd00(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x44(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x44(%rbp)
jmp    12c5 <main+0x165>
mov    -0x30(%rbp),%rdi
mov    -0x50(%rbp),%rdx
mov    -0x40(%rbp),%rcx
lea    0xd3a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
cmp    $0x4,%edi
jne    1368 <main+0x1e8>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%r12
mov    0x18(%rsi),%r14
lea    0xe83(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     13a3 <main+0x223>
mov    %rax,%rbp
mov    %rax,%rdi
call   1070 <fileno@plt>
lea    0x10(%rsp),%rsi
mov    %eax,%edi
call   10a0 <fstat@plt>
mov    0x10(%rsp),%rbx
lea    0x2e95(%rip),%r15
mov    %r15,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
mov    %rbp,%rcx
call   1030 <fread@plt>
mov    0x2de3(%rip),%rax
movslq (%rax),%rdi
lea    0xe4d(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1040 <fclose@plt>
lea    0xe45(%rip),%rsi
mov    %r12,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     13bb <main+0x23b>
mov    %rax,%rbp
lea    0xe4a(%rip),%rsi
xor    %r12d,%r12d
mov    %rax,%rdi
mov    %r14,0x8(%rsp)
mov    %r14,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %rbx,%rbx
jle    1380 <main+0x200>
mov    $0x7,%r14d
lea    0xe45(%rip),%r13
jmp    1281 <main+0x101>
mov    $0xa,%edi
mov    %rbp,%rsi
call   1050 <fputc@plt>
lea    0x8(%r14),%rax
add    $0x1,%r14
cmp    %r14,%rbx
mov    %rax,%r14
jle    1380 <main+0x200>
movzbl -0x7(%r14,%r15,1),%edx
mov    %rbp,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    -0x6(%r14),%rax
cmp    %rax,%rbx
jle    1260 <main+0xe0>
movzbl -0x6(%r14,%r15,1),%edx
mov    %rbp,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    -0x5(%r14),%rax
cmp    %rax,%rbx
jle    1260 <main+0xe0>
movzbl -0x5(%r14,%r15,1),%edx
mov    %rbp,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    -0x4(%r14),%rax
cmp    %rax,%rbx
jle    1260 <main+0xe0>
movzbl -0x4(%r14,%r15,1),%edx
mov    %rbp,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    -0x3(%r14),%rax
cmp    %rax,%rbx
jle    1260 <main+0xe0>
movzbl -0x3(%r14,%r15,1),%edx
mov    %rbp,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    -0x2(%r14),%rax
cmp    %rax,%rbx
jle    1260 <main+0xe0>
movzbl -0x2(%r14,%r15,1),%edx
mov    %rbp,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    -0x1(%r14),%rax
cmp    %rax,%rbx
jle    1260 <main+0xe0>
movzbl -0x1(%r14,%r15,1),%edx
mov    %rbp,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
cmp    %r14,%rbx
jle    1260 <main+0xe0>
movzbl (%r14,%r15,1),%edx
mov    %rbp,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1260 <main+0xe0>
mov    0x2c71(%rip),%rax
movslq (%rax),%rcx
lea    0xc87(%rip),%rdi
mov    $0x2c,%esi
jmp    13d1 <main+0x251>
lea    0xd25(%rip),%rsi
mov    %rbp,%rdi
mov    0x8(%rsp),%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1040 <fclose@plt>
jmp    13e1 <main+0x261>
mov    0x2c36(%rip),%rax
movslq (%rax),%rcx
lea    0xc7c(%rip),%rdi
mov    $0x1b,%esi
jmp    13d1 <main+0x251>
mov    0x2c1e(%rip),%rax
movslq (%rax),%rcx
lea    0xc94(%rip),%rdi
mov    $0x1c,%esi
mov    $0x1,%edx
call   1090 <fwrite@plt>
mov    $0xffffffff,%r12d
mov    %r12d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
@main.data = internal global [65536 x i8] zeroinitializer
@stderr = global i32 0
@.str = [45 x i8] c"Usage: tf2hex input_file output_file suffix\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [28 x i8] c"Unable to open input file.\0A\00"
@stdout = global i32 0
@.str.3 = [17 x i8] c"Read %ld bytes.\0A\00"
@.str.4 = [3 x i8] c"wt\00"
@.str.5 = [29 x i8] c"Unable to open output file.\0A\00"
@.str.6 = [38 x i8] c"static unsigned char romDump%s[] = {\0A\00"
@.str.7 = [9 x i8] c"0x%02x, \00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [45 x i8] c"};\0Astatic unsigned int romDumpSize%s = %ld;\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca %struct.stat
%11 = alloca i64
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 4
br i1 %16, label %17, label %22
17: ; preds = %2
%18 = load i32, i32* @stderr
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i32*
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %114
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
store i8* %25, i8** %6
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 2
%28 = load i8*, i8** %27
store i8* %28, i8** %7
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 3
%31 = load i8*, i8** %30
store i8* %31, i8** %14
%32 = load i8*, i8** %6
%33 = call i32* @fopen(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %33, i32** %8
%34 = load i32*, i32** %8
%35 = icmp eq i32* %34, null
br i1 %35, label %36, label %41
36: ; preds = %22
%37 = load i32, i32* @stderr
%38 = sext i32 %37 to i64
%39 = inttoptr i64 %38 to i32*
%40 = call i32 (i32*, i8*, ...) @fprintf(i32* %39, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %3
br label %114
41: ; preds = %22
%42 = load i32*, i32** %8
%43 = call i32 @fileno(i32* %42)
%44 = call i32 @fstat(i32 %43, %struct.stat* %10)
%45 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%46 = load i64, i64* %45
store i64 %46, i64* %11
%47 = load i64, i64* %11
%48 = load i32*, i32** %8
%49 = call i32 @fread(i8* getelementptr inbounds ([65536 x i8], [65536 x i8]* @main.data, i64 0, i64 0), i32 1, i64 %47, i32* %48)
%50 = load i32, i32* @stdout
%51 = sext i32 %50 to i64
%52 = inttoptr i64 %51 to i32*
%53 = load i64, i64* %11
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i64 %53)
%55 = load i32*, i32** %8
%56 = call i32 @fclose(i32* %55)
%57 = load i8*, i8** %7
%58 = call i32* @fopen(i8* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %58, i32** %9
%59 = load i32*, i32** %9
%60 = icmp eq i32* %59, null
br i1 %60, label %61, label %66
61: ; preds = %41
%62 = load i32, i32* @stderr
%63 = sext i32 %62 to i64
%64 = inttoptr i64 %63 to i32*
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
store i32 -1, i32* %3
br label %114
66: ; preds = %41
%67 = load i32*, i32** %9
%68 = load i8*, i8** %14
%69 = call i32 (i32*, i8*, ...) @fprintf(i32* %67, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %68)
store i32 0, i32* %12
br label %70
70: ; preds = %104, %66
%71 = load i32, i32* %12
%72 = sext i32 %71 to i64
%73 = load i64, i64* %11
%74 = icmp slt i64 %72, %73
br i1 %74, label %75, label %107
75: ; preds = %70
store i32 0, i32* %13
br label %76
76: ; preds = %98, %75
%77 = load i32, i32* %13
%78 = icmp slt i32 %77, 8
br i1 %78, label %79, label %86
79: ; preds = %76
%80 = load i32, i32* %12
%81 = load i32, i32* %13
%82 = add nsw i32 %80, %81
%83 = sext i32 %82 to i64
%84 = load i64, i64* %11
%85 = icmp slt i64 %83, %84
br label %86
86: ; preds = %79, %76
%87 = phi i1 [ false, %76 ], [ %85, %79 ]
br i1 %87, label %88, label %101
88: ; preds = %86
%89 = load i32*, i32** %9
%90 = load i32, i32* %12
%91 = load i32, i32* %13
%92 = add nsw i32 %90, %91
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [65536 x i8], [65536 x i8]* @main.data, i64 0, i64 %93
%95 = load i8, i8* %94
%96 = zext i8 %95 to i32
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %89, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %96)
br label %98
98: ; preds = %88
%99 = load i32, i32* %13
%100 = add nsw i32 %99, 1
store i32 %100, i32* %13
br label %76
101: ; preds = %86
%102 = load i32*, i32** %9
%103 = call i32 (i32*, i8*, ...) @fprintf(i32* %102, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %104
104: ; preds = %101
%105 = load i32, i32* %12
%106 = add nsw i32 %105, 8
store i32 %106, i32* %12
br label %70
107: ; preds = %70
%108 = load i32*, i32** %9
%109 = load i8*, i8** %14
%110 = load i64, i64* %11
%111 = call i32 (i32*, i8*, ...) @fprintf(i32* %108, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0), i8* %109, i64 %110)
%112 = load i32*, i32** %9
%113 = call i32 @fclose(i32* %112)
store i32 0, i32* %3
br label %114
114: ; preds = %107, %61, %36, %17
%115 = load i32, i32* %3
ret i32 %115
}

LLVM IR (-O2):
%struct.stat = type { i64 }
@main.data = internal global [65536 x i8] zeroinitializer
@stderr = global i32 0
@.str = [45 x i8] c"Usage: tf2hex input_file output_file suffix\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [28 x i8] c"Unable to open input file.\0A\00"
@stdout = global i32 0
@.str.3 = [17 x i8] c"Read %ld bytes.\0A\00"
@.str.4 = [3 x i8] c"wt\00"
@.str.5 = [29 x i8] c"Unable to open output file.\0A\00"
@.str.6 = [38 x i8] c"static unsigned char romDump%s[] = {\0A\00"
@.str.7 = [9 x i8] c"0x%02x, \00"
@.str.9 = [45 x i8] c"};\0Astatic unsigned int romDumpSize%s = %ld;\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = icmp eq i32 %0, 4
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i64 44, i64 1, i32* %9)
br label %108
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = getelementptr inbounds i8*, i8** %1, i64 3
%17 = load i8*, i8** %16
%18 = tail call i32* @fopen(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp eq i32* %18, null
br i1 %19, label %20, label %25
20: ; preds = %11
%21 = load i32, i32* @stderr
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i32*
%24 = tail call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 27, i64 1, i32* %23)
br label %108
25: ; preds = %11
%26 = tail call i32 @fileno(i32* %18)
%27 = call i32 @fstat(i32 %26, %struct.stat* %3)
%28 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%29 = load i64, i64* %28
%30 = tail call i32 @fread(i8* getelementptr inbounds ([65536 x i8], [65536 x i8]* @main.data, i64 0, i64 0), i32 1, i64 %29, i32* %18)
%31 = load i32, i32* @stdout
%32 = sext i32 %31 to i64
%33 = inttoptr i64 %32 to i32*
%34 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i64 %29)
%35 = tail call i32 @fclose(i32* %18)
%36 = tail call i32* @fopen(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%37 = icmp eq i32* %36, null
br i1 %37, label %38, label %43
38: ; preds = %25
%39 = load i32, i32* @stderr
%40 = sext i32 %39 to i64
%41 = inttoptr i64 %40 to i32*
%42 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i64 28, i64 1, i32* %41)
br label %108
43: ; preds = %25
%44 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %17)
%45 = icmp sgt i64 %29, 0
br i1 %45, label %46, label %105
46: ; preds = %43, %101
%47 = phi i64 [ %103, %101 ], [ 0, %43 ]
%48 = getelementptr inbounds [65536 x i8], [65536 x i8]* @main.data, i64 0, i64 %47
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %50)
%52 = or i64 %47, 1
%53 = icmp sgt i64 %29, %52
br i1 %53, label %54, label %101
54: ; preds = %46
%55 = getelementptr inbounds [65536 x i8], [65536 x i8]* @main.data, i64 0, i64 %52
%56 = load i8, i8* %55
%57 = zext i8 %56 to i32
%58 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %57)
%59 = or i64 %47, 2
%60 = icmp sgt i64 %29, %59
br i1 %60, label %61, label %101
61: ; preds = %54
%62 = getelementptr inbounds [65536 x i8], [65536 x i8]* @main.data, i64 0, i64 %59
%63 = load i8, i8* %62
%64 = zext i8 %63 to i32
%65 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %64)
%66 = or i64 %47, 3
%67 = icmp sgt i64 %29, %66
br i1 %67, label %68, label %101
68: ; preds = %61
%69 = getelementptr inbounds [65536 x i8], [65536 x i8]* @main.data, i64 0, i64 %66
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %71)
%73 = or i64 %47, 4
%74 = icmp sgt i64 %29, %73
br i1 %74, label %75, label %101
75: ; preds = %68
%76 = getelementptr inbounds [65536 x i8], [65536 x i8]* @main.data, i64 0, i64 %73
%77 = load i8, i8* %76
%78 = zext i8 %77 to i32
%79 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %78)
%80 = or i64 %47, 5
%81 = icmp sgt i64 %29, %80
br i1 %81, label %82, label %101
82: ; preds = %75
%83 = getelementptr inbounds [65536 x i8], [65536 x i8]* @main.data, i64 0, i64 %80
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %85)
%87 = or i64 %47, 6
%88 = icmp sgt i64 %29, %87
br i1 %88, label %89, label %101
89: ; preds = %82
%90 = getelementptr inbounds [65536 x i8], [65536 x i8]* @main.data, i64 0, i64 %87
%91 = load i8, i8* %90
%92 = zext i8 %91 to i32
%93 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %92)
%94 = or i64 %47, 7
%95 = icmp sgt i64 %29, %94
br i1 %95, label %96, label %101
96: ; preds = %89
%97 = getelementptr inbounds [65536 x i8], [65536 x i8]* @main.data, i64 0, i64 %94
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %99)
br label %101
101: ; preds = %96, %89, %82, %75, %68, %61, %54, %46
%102 = tail call i32 @fputc(i32 10, i32* %36)
%103 = add nuw i64 %47, 8
%104 = icmp sgt i64 %29, %103
br i1 %104, label %46, label %105
105: ; preds = %101, %43
%106 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0), i8* %17, i64 %29)
%107 = tail call i32 @fclose(i32* %36)
br label %108
108: ; preds = %105, %38, %20, %6
%109 = phi i32 [ -1, %6 ], [ -1, %20 ], [ -1, %38 ], [ 0, %105 ]
ret i32 %109
}