#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fileopen(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(unsigned char *);
unsigned char *malloc(int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ stdout;
int hexdump(char *filepath) {
  int n = 0, total = 0;
  FILE *fp = fileopen(filepath);
  unsigned char *inbuf = malloc(16);
  while (!feof(fp)) {
    memset(inbuf, 0, 16);
    n = fread(inbuf, 1, 16, fp);
    if (n > 0) {
      int i = 0;
      fprintf(stdout, "%06x: ", total);
      for (i = 0; i < n; i++) {
        fprintf(stdout, "%02x", inbuf[i]);
        if ((i + 1) % 8 == 0) {
          fprintf(stdout, "  ");
        } else {
          fprintf(stdout, " ");
        }
      }
      for (; i < 16; i++) {
        fprintf(stdout, "--");
        if ((i + 1) % 8 == 0) {
          fprintf(stdout, "  ");
        } else {
          fprintf(stdout, " ");
        }
      }
      for (i = 0; i < n; i++) {
        if (inbuf[i] <= 0x1f || inbuf[i] == 0x7f) {
          fprintf(stdout, ".");
        } else if (inbuf[i] >= 0x80) {
          fprintf(stdout, "~");
        } else {
          fprintf(stdout, "%c", inbuf[i]);
        }
      }
      for (i = 0; i < (16 - n); i++) {
        fprintf(stdout, " ");
      }
      fprintf(stdout, "\n");
      total = total + n;
    }
  }
  fclose(fp);
  free(inbuf);
  return 1;
}


x86 assembly (clang, -O0):
<hexdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   10a0 <fileopen@plt>
mov    %rax,-0x18(%rbp)
mov    $0x10,%edi
call   1090 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1080 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11d3 <hexdump+0x53>
jmp    1469 <hexdump+0x2e9>
mov    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1060 <memset@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x10,%edx
call   1040 <fread@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1464 <hexdump+0x2e4>
movl   $0x0,-0x24(%rbp)
mov    0x2dcb(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%edx
lea    0xddf(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12bb <hexdump+0x13b>
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
lea    0xdb0(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1291 <hexdump+0x111>
mov    0x2d64(%rip),%rax
mov    (%rax),%edi
lea    0xd87(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    12a8 <hexdump+0x128>
mov    0x2d48(%rip),%rax
mov    (%rax),%edi
lea    0xd6c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    12ad <hexdump+0x12d>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    122f <hexdump+0xaf>
jmp    12c0 <hexdump+0x140>
cmpl   $0x10,-0x24(%rbp)
jge    133e <hexdump+0x1be>
mov    0x2d0f(%rip),%rax
mov    (%rax),%edi
lea    0xd35(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1314 <hexdump+0x194>
mov    0x2ce1(%rip),%rax
mov    (%rax),%edi
lea    0xd04(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    132b <hexdump+0x1ab>
mov    0x2cc5(%rip),%rax
mov    (%rax),%edi
lea    0xce9(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1330 <hexdump+0x1b0>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12c0 <hexdump+0x140>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1405 <hexdump+0x285>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x1f,%eax
jle    137b <hexdump+0x1fb>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x7f,%eax
jne    1397 <hexdump+0x217>
mov    0x2c5e(%rip),%rax
mov    (%rax),%edi
lea    0xc87(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13f2 <hexdump+0x272>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x80,%eax
jl     13ca <hexdump+0x24a>
mov    0x2c2b(%rip),%rax
mov    (%rax),%edi
lea    0xc56(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13ed <hexdump+0x26d>
mov    0x2c0f(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
lea    0xc30(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13f2 <hexdump+0x272>
jmp    13f7 <hexdump+0x277>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1345 <hexdump+0x1c5>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x10,%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    1444 <hexdump+0x2c4>
mov    0x2bba(%rip),%rax
mov    (%rax),%edi
lea    0xbde(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    140c <hexdump+0x28c>
mov    0x2b95(%rip),%rax
mov    (%rax),%edi
lea    0xbc5(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    11b5 <hexdump+0x35>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
call   10a0 <fileopen@plt>
mov    %rax,%r12
mov    $0x10,%edi
call   1090 <malloc@plt>
mov    %rax,%r15
mov    %r12,%rdi
call   1080 <feof@plt>
test   %eax,%eax
je     11d3 <hexdump+0x53>
mov    %r12,%rdi
call   1050 <fclose@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    $0x1,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2e06(%rip),%r13
xor    %ebx,%ebx
mov    %r12,0x18(%rsp)
mov    %r15,0x10(%rsp)
jmp    1219 <hexdump+0x99>
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13),%edi
lea    0xe1e(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x4(%rsp),%ebx
add    %ebp,%ebx
mov    0x18(%rsp),%r12
mov    %r12,%rdi
call   1080 <feof@plt>
test   %eax,%eax
jne    11af <hexdump+0x2f>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1060 <memset@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x10,%edx
mov    %r12,%rcx
call   1040 <fread@plt>
test   %eax,%eax
jle    120d <hexdump+0x8d>
mov    %eax,%r14d
mov    0x0(%r13),%edi
lea    0xdb1(%rip),%rsi
mov    %ebx,0x4(%rsp)
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r14,0x8(%rsp)
mov    %r14d,%r12d
lea    0xda1(%rip),%r14
mov    %r12,0x20(%rsp)
neg    %r12
mov    $0xffffffff,%ebp
mov    $0x1,%ebx
nopl   (%rax)
mov    0x0(%r13),%edi
movzbl -0x1(%r15,%rbx,1),%edx
lea    0xd76(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
test   $0x7,%bl
mov    0x0(%r13),%edi
lea    0xd67(%rip),%rsi
cmove  %r14,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x1,%ebp
lea    (%r12,%rbx,1),%rax
add    $0x1,%rax
add    $0x1,%rbx
cmp    $0x1,%rax
jne    1280 <hexdump+0x100>
cmp    $0xf,%ebp
mov    %r14,%r15
lea    0xd3a(%rip),%r14
lea    0xd35(%rip),%r12
jae    1336 <hexdump+0x1b6>
mov    0x8(%rsp),%rax
cmp    $0x10,%eax
mov    $0xf,%ebx
cmovae %eax,%ebx
neg    %ebx
lea    0x1(%rax),%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13),%edi
mov    %r12,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
test   $0x7,%bpl
mov    0x0(%r13),%edi
mov    %r14,%rsi
cmove  %r15,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x2,%eax
jne    1300 <hexdump+0x180>
xor    %r12d,%r12d
mov    0x10(%rsp),%r15
lea    0xccd(%rip),%rbx
mov    0x20(%rsp),%rbp
jmp    1367 <hexdump+0x1e7>
nopl   0x0(%rax)
mov    0x0(%r13),%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x1,%r12
cmp    %r12,%rbp
je     13a0 <hexdump+0x220>
movzbl (%r15,%r12,1),%edx
cmp    $0x20,%edx
jb     1350 <hexdump+0x1d0>
cmp    $0x7f,%dl
je     1350 <hexdump+0x1d0>
mov    0x0(%r13),%edi
test   %dl,%dl
js     138e <hexdump+0x20e>
lea    0xc91(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    135e <hexdump+0x1de>
lea    0xc7f(%rip),%rsi
jmp    1357 <hexdump+0x1d7>
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rbp
cmp    $0xf,%ebp
jg     11f0 <hexdump+0x70>
mov    $0x10,%ebx
sub    %ebp,%ebx
cmp    $0x2,%ebx
mov    $0x1,%eax
cmovl  %eax,%ebx
mov    0x0(%r13),%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0xffffffff,%ebx
jne    13c0 <hexdump+0x240>
jmp    11f0 <hexdump+0x70>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [7 x i8] c"%06x: \00"
@.str.1 = [5 x i8] c"%02x\00"
@.str.2 = [3 x i8] c" \00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [3 x i8] c"--\00"
@.str.5 = [2 x i8] c".\00"
@.str.6 = [2 x i8] c"~\00"
@.str.7 = [3 x i8] c"%c\00"
@.str.8 = [2 x i8] c"\0A\00"
define i32 @hexdump(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
%8 = load i8*, i8** %2
%9 = call i32* @fileopen(i8* %8)
store i32* %9, i32** %5
%10 = call i8* @malloc(i32 16)
store i8* %10, i8** %6
br label %11
11: ; preds = %143, %1
%12 = load i32*, i32** %5
%13 = call i32 @feof(i32* %12)
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
br i1 %15, label %16, label %144
16: ; preds = %11
%17 = load i8*, i8** %6
%18 = call i32 @memset(i8* %17, i32 0, i32 16)
%19 = load i8*, i8** %6
%20 = load i32*, i32** %5
%21 = call i32 @fread(i8* %19, i32 1, i32 16, i32* %20)
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = icmp sgt i32 %22, 0
br i1 %23, label %24, label %143
24: ; preds = %16
store i32 0, i32* %7
%25 = load i32, i32* @stdout
%26 = load i32, i32* %4
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %26)
store i32 0, i32* %7
br label %28
28: ; preds = %52, %24
%29 = load i32, i32* %7
%30 = load i32, i32* %3
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %55
32: ; preds = %28
%33 = load i32, i32* @stdout
%34 = load i8*, i8** %6
%35 = load i32, i32* %7
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8, i8* %34, i64 %36
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %7
%42 = add nsw i32 %41, 1
%43 = srem i32 %42, 8
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %48
45: ; preds = %32
%46 = load i32, i32* @stdout
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %51
48: ; preds = %32
%49 = load i32, i32* @stdout
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %51
51: ; preds = %48, %45
br label %52
52: ; preds = %51
%53 = load i32, i32* %7
%54 = add nsw i32 %53, 1
store i32 %54, i32* %7
br label %28
55: ; preds = %28
br label %56
56: ; preds = %73, %55
%57 = load i32, i32* %7
%58 = icmp slt i32 %57, 16
br i1 %58, label %59, label %76
59: ; preds = %56
%60 = load i32, i32* @stdout
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%62 = load i32, i32* %7
%63 = add nsw i32 %62, 1
%64 = srem i32 %63, 8
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %69
66: ; preds = %59
%67 = load i32, i32* @stdout
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %72
69: ; preds = %59
%70 = load i32, i32* @stdout
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %72
72: ; preds = %69, %66
br label %73
73: ; preds = %72
%74 = load i32, i32* %7
%75 = add nsw i32 %74, 1
store i32 %75, i32* %7
br label %56
76: ; preds = %56
store i32 0, i32* %7
br label %77
77: ; preds = %122, %76
%78 = load i32, i32* %7
%79 = load i32, i32* %3
%80 = icmp slt i32 %78, %79
br i1 %80, label %81, label %125
81: ; preds = %77
%82 = load i8*, i8** %6
%83 = load i32, i32* %7
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8, i8* %82, i64 %84
%86 = load i8, i8* %85
%87 = zext i8 %86 to i32
%88 = icmp sle i32 %87, 31
br i1 %88, label %97, label %89
89: ; preds = %81
%90 = load i8*, i8** %6
%91 = load i32, i32* %7
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i8, i8* %90, i64 %92
%94 = load i8, i8* %93
%95 = zext i8 %94 to i32
%96 = icmp eq i32 %95, 127
br i1 %96, label %97, label %100
97: ; preds = %89, %81
%98 = load i32, i32* @stdout
%99 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %121
100: ; preds = %89
%101 = load i8*, i8** %6
%102 = load i32, i32* %7
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i8, i8* %101, i64 %103
%105 = load i8, i8* %104
%106 = zext i8 %105 to i32
%107 = icmp sge i32 %106, 128
br i1 %107, label %108, label %111
108: ; preds = %100
%109 = load i32, i32* @stdout
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %120
111: ; preds = %100
%112 = load i32, i32* @stdout
%113 = load i8*, i8** %6
%114 = load i32, i32* %7
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i8, i8* %113, i64 %115
%117 = load i8, i8* %116
%118 = zext i8 %117 to i32
%119 = call i32 (i32, i8*, ...) @fprintf(i32 %112, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %118)
br label %120
120: ; preds = %111, %108
br label %121
121: ; preds = %120, %97
br label %122
122: ; preds = %121
%123 = load i32, i32* %7
%124 = add nsw i32 %123, 1
store i32 %124, i32* %7
br label %77
125: ; preds = %77
store i32 0, i32* %7
br label %126
126: ; preds = %134, %125
%127 = load i32, i32* %7
%128 = load i32, i32* %3
%129 = sub nsw i32 16, %128
%130 = icmp slt i32 %127, %129
br i1 %130, label %131, label %137
131: ; preds = %126
%132 = load i32, i32* @stdout
%133 = call i32 (i32, i8*, ...) @fprintf(i32 %132, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %134
134: ; preds = %131
%135 = load i32, i32* %7
%136 = add nsw i32 %135, 1
store i32 %136, i32* %7
br label %126
137: ; preds = %126
%138 = load i32, i32* @stdout
%139 = call i32 (i32, i8*, ...) @fprintf(i32 %138, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%140 = load i32, i32* %4
%141 = load i32, i32* %3
%142 = add nsw i32 %140, %141
store i32 %142, i32* %4
br label %143
143: ; preds = %137, %16
br label %11
144: ; preds = %11
%145 = load i32*, i32** %5
%146 = call i32 @fclose(i32* %145)
%147 = load i8*, i8** %6
%148 = call i32 @free(i8* %147)
ret i32 1
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [7 x i8] c"%06x: \00"
@.str.1 = [5 x i8] c"%02x\00"
@.str.2 = [3 x i8] c" \00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [3 x i8] c"--\00"
@.str.5 = [2 x i8] c".\00"
@.str.6 = [2 x i8] c"~\00"
@.str.7 = [3 x i8] c"%c\00"
@.str.8 = [2 x i8] c"\0A\00"
define i32 @hexdump(i8* %0) {
%2 = tail call i32* @fileopen(i8* %0)
%3 = tail call dereferenceable_or_null(16) i8* @malloc(i32 16)
%4 = tail call i32 @feof(i32* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %86
6: ; preds = %1, %82
%7 = phi i32 [ %83, %82 ], [ 0, %1 ]
%8 = tail call i32 @memset(i8* %3, i32 0, i32 16)
%9 = tail call i32 @fread(i8* %3, i32 1, i32 16, i32* %2)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %82
11: ; preds = %6
%12 = load i32, i32* @stdout
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7)
%14 = zext i32 %9 to i64
br label %21
15: ; preds = %21
%16 = trunc i64 %22 to i32
%17 = icmp ult i32 %16, 15
br i1 %17, label %19, label %18
18: ; preds = %35, %15
br label %51
19: ; preds = %15
%20 = call i32 @llvm.umax.i32(i32 %9, i32 15)
br label %35
21: ; preds = %11, %21
%22 = phi i64 [ 0, %11 ], [ %28, %21 ]
%23 = load i32, i32* @stdout
%24 = getelementptr inbounds i8, i8* %3, i64 %22
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = add nuw nsw i64 %22, 1
%29 = and i64 %28, 7
%30 = icmp eq i64 %29, 0
%31 = load i32, i32* @stdout
%32 = select i1 %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0)
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* %32)
%34 = icmp eq i64 %28, %14
br i1 %34, label %15, label %21
35: ; preds = %19, %35
%36 = phi i32 [ %39, %35 ], [ %9, %19 ]
%37 = load i32, i32* @stdout
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%39 = add nuw i32 %36, 1
%40 = and i32 %39, 7
%41 = icmp eq i32 %40, 0
%42 = load i32, i32* @stdout
%43 = select i1 %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0)
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* %43)
%45 = icmp eq i32 %36, %20
br i1 %45, label %18, label %35
46: ; preds = %69
%47 = icmp slt i32 %9, 16
br i1 %47, label %48, label %78
48: ; preds = %46
%49 = sub i32 16, %9
%50 = call i32 @llvm.smax.i32(i32 %49, i32 1)
br label %72
51: ; preds = %18, %69
%52 = phi i64 [ %70, %69 ], [ 0, %18 ]
%53 = getelementptr inbounds i8, i8* %3, i64 %52
%54 = load i8, i8* %53
%55 = zext i8 %54 to i32
%56 = icmp ult i8 %54, 32
%57 = icmp eq i8 %54, 127
%58 = or i1 %56, %57
br i1 %58, label %59, label %62
59: ; preds = %51
%60 = load i32, i32* @stdout
%61 = tail call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %69
62: ; preds = %51
%63 = icmp slt i8 %54, 0
%64 = load i32, i32* @stdout
br i1 %63, label %65, label %67
65: ; preds = %62
%66 = tail call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %69
67: ; preds = %62
%68 = tail call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %55)
br label %69
69: ; preds = %59, %67, %65
%70 = add nuw nsw i64 %52, 1
%71 = icmp eq i64 %70, %14
br i1 %71, label %46, label %51
72: ; preds = %48, %72
%73 = phi i32 [ %76, %72 ], [ 0, %48 ]
%74 = load i32, i32* @stdout
%75 = tail call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%76 = add nuw nsw i32 %73, 1
%77 = icmp eq i32 %76, %50
br i1 %77, label %78, label %72
78: ; preds = %72, %46
%79 = load i32, i32* @stdout
%80 = tail call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%81 = add nsw i32 %9, %7
br label %82
82: ; preds = %78, %6
%83 = phi i32 [ %81, %78 ], [ %7, %6 ]
%84 = tail call i32 @feof(i32* %2)
%85 = icmp eq i32 %84, 0
br i1 %85, label %6, label %86
86: ; preds = %82, %1
%87 = tail call i32 @fclose(i32* %2)
%88 = tail call i32 @free(i8* %3)
ret i32 1
}