#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 {
  unsigned char st_size;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int fread(unsigned char *, int, unsigned char, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(unsigned char *);
unsigned char *malloc(unsigned char);
scalar_t__ stat(char *, struct stat *);
int /*<<< orphan*/ *stderr;
char *strerror(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int ret = 0;
  FILE *in = NULL;
  FILE *out = NULL;
  struct stat st;
  unsigned char *buf = NULL;
  int i, n;
  if (stat(argv[1], &st) < 0) {
    fprintf(stderr, "stat '%s' error: %s\n", argv[1], strerror(errno));
    return 1;
  }
  in = fopen(argv[1], "rb");
  if (in == NULL) {
    fprintf(stderr, "open '%s' error: %s\n", argv[1], strerror(errno));
    return 2;
  }
  out = fopen(argv[2], "w");
  if (out == NULL) {
    fprintf(stderr, "open '%s' error: %s\n", argv[2], strerror(errno));
    ret = 3;
    goto done;
  }
  buf = malloc(st.st_size);
  if (buf == NULL) {
    fprintf(stderr, "malloc '%lu' bytes error", st.st_size);
    ret = 4;
    goto done;
  }
  n = fread(buf, 1, st.st_size, in);
  for (i = 0; i < n; ++i) {
    if (i % 16 == 0) {
      fprintf(out, "\n");
    }
    if (buf[i] < 16) {
      fprintf(out, "0x0%x, ", buf[i]);
    } else {
      fprintf(out, "0x%x, ", buf[i]);
    }
  }
  fflush(out);
done:
  if (in != NULL)
    fclose(in);
  if (out != NULL)
    fclose(out);
  if (buf != NULL)
    free(buf);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x30(%rbp),%rsi
call   1070 <stat@plt>
cmp    $0x0,%rax
jge    122d <main+0x9d>
mov    0x2df9(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x48(%rbp)
mov    0x2dd7(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rdx
mov    %rax,%rcx
lea    0xde6(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1455 <main+0x2c5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdd9(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    129d <main+0x10d>
mov    0x2d89(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x58(%rbp)
mov    0x2d67(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x60(%rbp),%rdi
mov    -0x58(%rbp),%rdx
mov    %rax,%rcx
lea    0xd8e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1455 <main+0x2c5>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xd81(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    130d <main+0x17d>
mov    0x2d19(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x68(%rbp)
mov    0x2cf7(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x70(%rbp),%rdi
mov    -0x68(%rbp),%rdx
mov    %rax,%rcx
lea    0xd1e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x3,-0x14(%rbp)
jmp    1413 <main+0x283>
movzbl -0x30(%rbp),%edi
call   1080 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    134d <main+0x1bd>
mov    0x2cb4(%rip),%rax
mov    (%rax),%rdi
movzbl -0x30(%rbp),%edx
lea    0xcf5(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x4,-0x14(%rbp)
jmp    1413 <main+0x283>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%al
mov    -0x20(%rbp),%rcx
mov    $0x1,%esi
movzbl %al,%edx
call   1040 <fread@plt>
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    140a <main+0x27a>
mov    -0x3c(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    13a1 <main+0x211>
mov    -0x28(%rbp),%rdi
lea    0xc91(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x10,%eax
jge    13d9 <main+0x249>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
lea    0xc7b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    13f7 <main+0x267>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
lea    0xc60(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    13fc <main+0x26c>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    136f <main+0x1df>
mov    -0x28(%rbp),%rdi
call   1090 <fflush@plt>
cmpq   $0x0,-0x20(%rbp)
je     1427 <main+0x297>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
cmpq   $0x0,-0x28(%rbp)
je     143b <main+0x2ab>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
cmpq   $0x0,-0x38(%rbp)
je     144f <main+0x2bf>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0x8(%rsp),%rsi
call   1080 <stat@plt>
test   %rax,%rax
js     128b <main+0xeb>
mov    0x8(%rbx),%rdi
lea    0xe42(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     12c8 <main+0x128>
mov    %rax,%rbp
mov    0x10(%rbx),%rdi
lea    0xe3e(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     132b <main+0x18b>
mov    %rax,%r12
movzbl 0x8(%rsp),%ebx
mov    %ebx,%edi
call   1090 <malloc@plt>
test   %rax,%rax
je     136d <main+0x1cd>
mov    %rax,%r15
mov    %rax,%rdi
mov    $0x1,%esi
mov    %ebx,%edx
mov    %rbp,0x10(%rsp)
mov    %rbp,%rcx
call   1040 <fread@plt>
test   %eax,%eax
jle    1305 <main+0x165>
mov    %eax,%ebx
lea    0xe08(%rip),%r13
lea    0xe09(%rip),%rbp
xor    %r14d,%r14d
jmp    1276 <main+0xd6>
nopl   0x0(%rax)
movzbl (%r15,%r14,1),%edx
cmp    $0x10,%edx
mov    %rbp,%rsi
cmovb  %r13,%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x1,%r14
cmp    %r14,%rbx
je     1305 <main+0x165>
test   $0xf,%r14b
jne    1250 <main+0xb0>
mov    $0xa,%edi
mov    %r12,%rsi
call   1060 <fputc@plt>
jmp    1250 <main+0xb0>
mov    0x2d4e(%rip),%rax
mov    (%rax),%r14
mov    0x8(%rbx),%rbx
mov    0x2d38(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd52(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%eax
jmp    139c <main+0x1fc>
mov    0x2d11(%rip),%rax
mov    (%rax),%r14
mov    0x8(%rbx),%rbx
mov    0x2cfb(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd2d(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x2,%eax
jmp    139c <main+0x1fc>
mov    %r12,%rdi
call   10a0 <fflush@plt>
mov    0x10(%rsp),%rdi
call   1050 <fclose@plt>
mov    %r12,%rdi
call   1050 <fclose@plt>
mov    %r15,%rdi
call   1030 <free@plt>
xor    %eax,%eax
jmp    139c <main+0x1fc>
mov    0x2cae(%rip),%rax
mov    (%rax),%r15
mov    0x10(%rbx),%rbx
mov    0x2c98(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xcca(%rip),%rsi
mov    %r15,%rdi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
mov    $0x3,%eax
jmp    139c <main+0x1fc>
mov    0x2c6c(%rip),%rax
mov    (%rax),%rdi
lea    0xcb1(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
mov    %r12,%rdi
call   1050 <fclose@plt>
mov    $0x4,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i8 }
@stderr = global i32* null
@.str = [21 x i8] c"stat '%s' error: %s\0A\00"
@errno = global i32 0
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [21 x i8] c"open '%s' error: %s\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [25 x i8] c"malloc '%lu' bytes error\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [8 x i8] c"0x0%x, \00"
@.str.7 = [7 x i8] c"0x%x, \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 %struct.stat
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32* null, i32** %7
store i32* null, i32** %8
store i8* null, i8** %10
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i64 @stat(i8* %15, %struct.stat* %9)
%17 = icmp slt i64 %16, 0
br i1 %17, label %18, label %26
18: ; preds = %2
%19 = load i32*, i32** @stderr
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = load i32, i32* @errno
%24 = call i8* @strerror(i32 %23)
%25 = call i32 (i32*, i8*, ...) @fprintf(i32* %19, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %22, i8* %24)
store i32 1, i32* %3
br label %138
26: ; preds = %2
%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 ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %30, i32** %7
%31 = load i32*, i32** %7
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %41
33: ; preds = %26
%34 = load i32*, i32** @stderr
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = load i32, i32* @errno
%39 = call i8* @strerror(i32 %38)
%40 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %37, i8* %39)
store i32 2, i32* %3
br label %138
41: ; preds = %26
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 2
%44 = load i8*, i8** %43
%45 = call i32* @fopen(i8* %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %45, i32** %8
%46 = load i32*, i32** %8
%47 = icmp eq i32* %46, null
br i1 %47, label %48, label %56
48: ; preds = %41
%49 = load i32*, i32** @stderr
%50 = load i8**, i8*** %5
%51 = getelementptr inbounds i8*, i8** %50, i64 2
%52 = load i8*, i8** %51
%53 = load i32, i32* @errno
%54 = call i8* @strerror(i32 %53)
%55 = call i32 (i32*, i8*, ...) @fprintf(i32* %49, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %52, i8* %54)
store i32 3, i32* %6
br label %118
56: ; preds = %41
%57 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%58 = load i8, i8* %57
%59 = call i8* @malloc(i8 zeroext %58)
store i8* %59, i8** %10
%60 = load i8*, i8** %10
%61 = icmp eq i8* %60, null
br i1 %61, label %62, label %68
62: ; preds = %56
%63 = load i32*, i32** @stderr
%64 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%65 = load i8, i8* %64
%66 = zext i8 %65 to i32
%67 = call i32 (i32*, i8*, ...) @fprintf(i32* %63, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %66)
store i32 4, i32* %6
br label %118
68: ; preds = %56
%69 = load i8*, i8** %10
%70 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%71 = load i8, i8* %70
%72 = load i32*, i32** %7
%73 = call i32 @fread(i8* %69, i32 1, i8 zeroext %71, i32* %72)
store i32 %73, i32* %12
store i32 0, i32* %11
br label %74
74: ; preds = %112, %68
%75 = load i32, i32* %11
%76 = load i32, i32* %12
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %115
78: ; preds = %74
%79 = load i32, i32* %11
%80 = srem i32 %79, 16
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %85
82: ; preds = %78
%83 = load i32*, i32** %8
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %83, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %85
85: ; preds = %82, %78
%86 = load i8*, i8** %10
%87 = load i32, i32* %11
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8, i8* %86, i64 %88
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = icmp slt i32 %91, 16
br i1 %92, label %93, label %102
93: ; preds = %85
%94 = load i32*, i32** %8
%95 = load i8*, i8** %10
%96 = load i32, i32* %11
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i8, i8* %95, i64 %97
%99 = load i8, i8* %98
%100 = zext i8 %99 to i32
%101 = call i32 (i32*, i8*, ...) @fprintf(i32* %94, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 %100)
br label %111
102: ; preds = %85
%103 = load i32*, i32** %8
%104 = load i8*, i8** %10
%105 = load i32, i32* %11
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i8, i8* %104, i64 %106
%108 = load i8, i8* %107
%109 = zext i8 %108 to i32
%110 = call i32 (i32*, i8*, ...) @fprintf(i32* %103, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %109)
br label %111
111: ; preds = %102, %93
br label %112
112: ; preds = %111
%113 = load i32, i32* %11
%114 = add nsw i32 %113, 1
store i32 %114, i32* %11
br label %74
115: ; preds = %74
%116 = load i32*, i32** %8
%117 = call i32 @fflush(i32* %116)
br label %118
118: ; preds = %115, %62, %48
%119 = load i32*, i32** %7
%120 = icmp ne i32* %119, null
br i1 %120, label %121, label %124
121: ; preds = %118
%122 = load i32*, i32** %7
%123 = call i32 @fclose(i32* %122)
br label %124
124: ; preds = %121, %118
%125 = load i32*, i32** %8
%126 = icmp ne i32* %125, null
br i1 %126, label %127, label %130
127: ; preds = %124
%128 = load i32*, i32** %8
%129 = call i32 @fclose(i32* %128)
br label %130
130: ; preds = %127, %124
%131 = load i8*, i8** %10
%132 = icmp ne i8* %131, null
br i1 %132, label %133, label %136
133: ; preds = %130
%134 = load i8*, i8** %10
%135 = call i32 @free(i8* %134)
br label %136
136: ; preds = %133, %130
%137 = load i32, i32* %6
store i32 %137, i32* %3
br label %138
138: ; preds = %136, %33, %18
%139 = load i32, i32* %3
ret i32 %139
}

LLVM IR (-O2):
%struct.stat = type { i8 }
@stderr = global i32* null
@.str = [21 x i8] c"stat '%s' error: %s\0A\00"
@errno = global i32 0
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [21 x i8] c"open '%s' error: %s\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [25 x i8] c"malloc '%lu' bytes error\00"
@.str.6 = [8 x i8] c"0x0%x, \00"
@.str.7 = [7 x i8] c"0x%x, \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i64 @stat(i8* %6, %struct.stat* %3)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i32*, i32** @stderr
%11 = load i8*, i8** %5
%12 = load i32, i32* @errno
%13 = call i8* @strerror(i32 %12)
%14 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %13)
br label %72
15: ; preds = %2
%16 = load i8*, i8** %5
%17 = call i32* @fopen(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %25
19: ; preds = %15
%20 = load i32*, i32** @stderr
%21 = load i8*, i8** %5
%22 = load i32, i32* @errno
%23 = call i8* @strerror(i32 %22)
%24 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %21, i8* %23)
br label %72
25: ; preds = %15
%26 = getelementptr inbounds i8*, i8** %1, i64 2
%27 = load i8*, i8** %26
%28 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%29 = icmp eq i32* %28, null
br i1 %29, label %30, label %37
30: ; preds = %25
%31 = load i32*, i32** @stderr
%32 = load i8*, i8** %26
%33 = load i32, i32* @errno
%34 = call i8* @strerror(i32 %33)
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %32, i8* %34)
%36 = call i32 @fclose(i32* %17)
br label %72
37: ; preds = %25
%38 = load i8, i8* %4
%39 = call i8* @malloc(i8 zeroext %38)
%40 = icmp eq i8* %39, null
br i1 %40, label %41, label %47
41: ; preds = %37
%42 = load i32*, i32** @stderr
%43 = zext i8 %38 to i32
%44 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %43)
%45 = call i32 @fclose(i32* %17)
%46 = call i32 @fclose(i32* %28)
br label %72
47: ; preds = %37
%48 = call i32 @fread(i8* %39, i32 1, i8 zeroext %38, i32* %17)
%49 = icmp sgt i32 %48, 0
br i1 %49, label %50, label %67
50: ; preds = %47
%51 = zext i32 %48 to i64
br label %52
52: ; preds = %50, %58
%53 = phi i64 [ 0, %50 ], [ %65, %58 ]
%54 = and i64 %53, 15
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %52
%57 = call i32 @fputc(i32 10, i32* %28)
br label %58
58: ; preds = %56, %52
%59 = getelementptr inbounds i8, i8* %39, i64 %53
%60 = load i8, i8* %59
%61 = zext i8 %60 to i32
%62 = icmp ult i8 %60, 16
%63 = select i1 %62, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0)
%64 = call i32 (i32*, i8*, ...) @fprintf(i32* %28, i8* %63, i32 %61)
%65 = add nuw nsw i64 %53, 1
%66 = icmp eq i64 %65, %51
br i1 %66, label %67, label %52
67: ; preds = %58, %47
%68 = call i32 @fflush(i32* %28)
%69 = call i32 @fclose(i32* %17)
%70 = call i32 @fclose(i32* %28)
%71 = call i32 @free(i8* %39)
br label %72
72: ; preds = %41, %30, %67, %19, %9
%73 = phi i32 [ 1, %9 ], [ 2, %19 ], [ 0, %67 ], [ 3, %30 ], [ 4, %41 ]
ret i32 %73
}