#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*/ *);
unsigned char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  FILE *fd_in, *fd_out;
  unsigned char byt;
  char name[16], *p;
  unsigned short length = 0;
  if (argc != 3) {
    fprintf(stderr,
            "usage: %s infile.raw outfile.h\nThe raw file is expected to "
            "contain raw audio data (8bits 8KHz).\n",
            argv[0]);
    return 1;
  }
  fd_in = fopen(argv[1], "r");
  if (!fd_in) {
    fprintf(stderr, "failed to open %s\n", argv[1]);
    return 1;
  }
  fd_out = fopen(argv[2], "w");
  if (!fd_out) {
    fclose(fd_in);
    fprintf(stderr, "failed to open %s\n", argv[2]);
    return 1;
  }
  printf("Converting %s into %s...\n", argv[1], argv[2]);
  for (byt = 0, p = argv[2]; *p && *p != '.' && byt < 16; byt++, p++) {
    name[byt] = *p;
  }
  name[byt] = 0;
  fprintf(fd_out, "/* converted from %s */\n", argv[1]);
  fprintf(fd_out, "const unsigned char %s[] PROGMEM = { ", name);
  while (!feof(fd_in)) {
    byt = fgetc(fd_in);
    fprintf(fd_out, "0x%x", byt);
    length++;
    if (!feof(fd_in))
      fprintf(fd_out, ", ");
  }
  fprintf(fd_out, " };\n");
  fprintf(fd_out, "const unsigned short %s_len = %d;\n", name, length);
  fclose(fd_in);
  fclose(fd_out);
  printf("done!\n");
  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)
movw   $0x0,-0x4a(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11b1 <main+0x51>
mov    0x2e53(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe62(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13f5 <main+0x295>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xea1(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1200 <main+0xa0>
mov    0x2e05(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe76(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13f5 <main+0x295>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe67(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1258 <main+0xf8>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2dad(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xe1e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13f5 <main+0x295>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x0,-0x21(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x4b(%rbp)
je     12bd <main+0x15d>
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2e,%ecx
mov    %al,-0x4b(%rbp)
je     12bd <main+0x15d>
movzbl -0x21(%rbp),%eax
cmp    $0x10,%eax
setl   %al
mov    %al,-0x4b(%rbp)
mov    -0x4b(%rbp),%al
test   $0x1,%al
jne    12cd <main+0x16d>
jmp    12f4 <main+0x194>
mov    -0x48(%rbp),%rax
mov    (%rax),%cl
movzbl -0x21(%rbp),%eax
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x21(%rbp),%al
add    $0x1,%al
mov    %al,-0x21(%rbp)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1286 <main+0x126>
movzbl -0x21(%rbp),%eax
movb   $0x0,-0x40(%rbp,%rax,1)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd82(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rdx
lea    0xd85(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    134b <main+0x1eb>
jmp    13a2 <main+0x242>
mov    -0x18(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x21(%rbp)
mov    -0x20(%rbp),%rdi
movzbl -0x21(%rbp),%edx
lea    0xd6b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x4a(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x4a(%rbp)
mov    -0x18(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%eax
jne    139d <main+0x23d>
mov    -0x20(%rbp),%rdi
lea    0xd40(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    132d <main+0x1cd>
mov    -0x20(%rbp),%rdi
lea    0xd2c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rdx
movzwl -0x4a(%rbp),%ecx
lea    0xd17(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r12
cmp    $0x3,%edi
jne    12be <main+0x13e>
mov    0x8(%r12),%rdi
lea    0xebd(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     12d5 <main+0x155>
mov    %rax,%rbx
mov    0x10(%r12),%rdi
lea    0xeb5(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     12e6 <main+0x166>
mov    %rax,%r14
mov    0x8(%r12),%rsi
mov    0x10(%r12),%rdx
lea    0xe95(%rip),%rdi
xor    %r15d,%r15d
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r12),%rcx
mov    (%rcx),%dl
xor    %eax,%eax
test   %dl,%dl
je     121b <main+0x9b>
nopw   0x0(%rax,%rax,1)
cmp    $0x2e,%dl
je     121b <main+0x9b>
cmp    $0xf,%rax
ja     121b <main+0x9b>
mov    %dl,(%rsp,%rax,1)
movzbl 0x1(%rcx,%rax,1),%edx
add    $0x1,%rax
test   %dl,%dl
jne    1200 <main+0x80>
movb   $0x0,(%rsp,%rax,1)
mov    0x8(%r12),%rdx
lea    0xe67(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xe6f(%rip),%rsi
mov    %rsp,%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %eax,%eax
jne    1323 <main+0x1a3>
lea    0xe71(%rip),%r15
lea    0xe6f(%rip),%r12
xor    %ebp,%ebp
jmp    1283 <main+0x103>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1080 <feof@plt>
add    $0x1,%ebp
test   %eax,%eax
jne    131f <main+0x19f>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
movzbl %al,%edx
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %eax,%eax
jne    1270 <main+0xf0>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r12,%rdi
mov    %r14,%rcx
call   10a0 <fwrite@plt>
jmp    1270 <main+0xf0>
mov    0x2d1b(%rip),%rax
movslq (%rax),%rdi
mov    (%r12),%rdx
lea    0xd2d(%rip),%rsi
jmp    1304 <main+0x184>
mov    0x2d04(%rip),%rax
movslq (%rax),%rdi
mov    0x8(%r12),%rdx
jmp    12fd <main+0x17d>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0x2ceb(%rip),%rax
movslq (%rax),%rdi
mov    0x10(%r12),%rdx
lea    0xd5f(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
movzwl %bp,%r15d
lea    0xdaf(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xd9b(%rip),%rsi
xor    %ebp,%ebp
mov    %rsp,%rdx
mov    %r14,%rdi
mov    %r15d,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
lea    0xd95(%rip),%rdi
call   1030 <puts@plt>
jmp    1310 <main+0x190>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [97 x i8] c"usage: %s infile.raw outfile.h\0AThe raw file is expected to contain raw audio data (8bits 8KHz).\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [19 x i8] c"failed to open %s\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [26 x i8] c"Converting %s into %s...\0A\00"
@.str.5 = [25 x i8] c"/* converted from %s */\0A\00"
@.str.6 = [38 x i8] c"const unsigned char %s[] PROGMEM = { \00"
@.str.7 = [5 x i8] c"0x%x\00"
@.str.8 = [3 x i8] c", \00"
@.str.9 = [5 x i8] c" };\0A\00"
@.str.10 = [35 x i8] c"const unsigned short %s_len = %d;\0A\00"
@.str.11 = [7 x i8] c"done!\0A\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 i8
%9 = alloca [16 x i8]
%10 = alloca i8*
%11 = alloca i16
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i16 0, i16* %11
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 3
br i1 %13, label %14, label %22
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0), i8* %20)
store i32 1, i32* %3
br label %138
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32* @fopen(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %26, i32** %6
%27 = load i32*, i32** %6
%28 = icmp ne i32* %27, null
br i1 %28, label %37, label %29
29: ; preds = %22
%30 = load i32, i32* @stderr
%31 = sext i32 %30 to i64
%32 = inttoptr i64 %31 to i32*
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i32 (i32*, i8*, ...) @fprintf(i32* %32, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %35)
store i32 1, i32* %3
br label %138
37: ; preds = %22
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = call i32* @fopen(i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %41, i32** %7
%42 = load i32*, i32** %7
%43 = icmp ne i32* %42, null
br i1 %43, label %54, label %44
44: ; preds = %37
%45 = load i32*, i32** %6
%46 = call i32 @fclose(i32* %45)
%47 = load i32, i32* @stderr
%48 = sext i32 %47 to i64
%49 = inttoptr i64 %48 to i32*
%50 = load i8**, i8*** %5
%51 = getelementptr inbounds i8*, i8** %50, i64 2
%52 = load i8*, i8** %51
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %49, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %52)
store i32 1, i32* %3
br label %138
54: ; preds = %37
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 1
%57 = load i8*, i8** %56
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 2
%60 = load i8*, i8** %59
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* %57, i8* %60)
store i8 0, i8* %8
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 2
%64 = load i8*, i8** %63
store i8* %64, i8** %10
br label %65
65: ; preds = %87, %54
%66 = load i8*, i8** %10
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = icmp ne i32 %68, 0
br i1 %69, label %70, label %79
70: ; preds = %65
%71 = load i8*, i8** %10
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp ne i32 %73, 46
br i1 %74, label %75, label %79
75: ; preds = %70
%76 = load i8, i8* %8
%77 = zext i8 %76 to i32
%78 = icmp slt i32 %77, 16
br label %79
79: ; preds = %75, %70, %65
%80 = phi i1 [ false, %70 ], [ false, %65 ], [ %78, %75 ]
br i1 %80, label %81, label %92
81: ; preds = %79
%82 = load i8*, i8** %10
%83 = load i8, i8* %82
%84 = load i8, i8* %8
%85 = zext i8 %84 to i64
%86 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 %85
store i8 %83, i8* %86
br label %87
87: ; preds = %81
%88 = load i8, i8* %8
%89 = add i8 %88, 1
store i8 %89, i8* %8
%90 = load i8*, i8** %10
%91 = getelementptr inbounds i8, i8* %90, i32 1
store i8* %91, i8** %10
br label %65
92: ; preds = %79
%93 = load i8, i8* %8
%94 = zext i8 %93 to i64
%95 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 %94
store i8 0, i8* %95
%96 = load i32*, i32** %7
%97 = load i8**, i8*** %5
%98 = getelementptr inbounds i8*, i8** %97, i64 1
%99 = load i8*, i8** %98
%100 = call i32 (i32*, i8*, ...) @fprintf(i32* %96, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i8* %99)
%101 = load i32*, i32** %7
%102 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%103 = call i32 (i32*, i8*, ...) @fprintf(i32* %101, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %102)
br label %104
104: ; preds = %124, %92
%105 = load i32*, i32** %6
%106 = call i32 @feof(i32* %105)
%107 = icmp ne i32 %106, 0
%108 = xor i1 %107, true
br i1 %108, label %109, label %125
109: ; preds = %104
%110 = load i32*, i32** %6
%111 = call zeroext i8 @fgetc(i32* %110)
store i8 %111, i8* %8
%112 = load i32*, i32** %7
%113 = load i8, i8* %8
%114 = zext i8 %113 to i32
%115 = call i32 (i32*, i8*, ...) @fprintf(i32* %112, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %114)
%116 = load i16, i16* %11
%117 = add i16 %116, 1
store i16 %117, i16* %11
%118 = load i32*, i32** %6
%119 = call i32 @feof(i32* %118)
%120 = icmp ne i32 %119, 0
br i1 %120, label %124, label %121
121: ; preds = %109
%122 = load i32*, i32** %7
%123 = call i32 (i32*, i8*, ...) @fprintf(i32* %122, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
br label %124
124: ; preds = %121, %109
br label %104
125: ; preds = %104
%126 = load i32*, i32** %7
%127 = call i32 (i32*, i8*, ...) @fprintf(i32* %126, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%128 = load i32*, i32** %7
%129 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%130 = load i16, i16* %11
%131 = zext i16 %130 to i32
%132 = call i32 (i32*, i8*, ...) @fprintf(i32* %128, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0), i8* %129, i32 %131)
%133 = load i32*, i32** %6
%134 = call i32 @fclose(i32* %133)
%135 = load i32*, i32** %7
%136 = call i32 @fclose(i32* %135)
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %3
br label %138
138: ; preds = %125, %44, %29, %14
%139 = load i32, i32* %3
ret i32 %139
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [97 x i8] c"usage: %s infile.raw outfile.h\0AThe raw file is expected to contain raw audio data (8bits 8KHz).\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [19 x i8] c"failed to open %s\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [26 x i8] c"Converting %s into %s...\0A\00"
@.str.5 = [25 x i8] c"/* converted from %s */\0A\00"
@.str.6 = [38 x i8] c"const unsigned char %s[] PROGMEM = { \00"
@.str.7 = [5 x i8] c"0x%x\00"
@.str.8 = [3 x i8] c", \00"
@.str.9 = [5 x i8] c" };\0A\00"
@.str.10 = [35 x i8] c"const unsigned short %s_len = %d;\0A\00"
@str = [6 x i8] c"done!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 3
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load i8*, i8** %1
%11 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %85
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32* @fopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %23
17: ; preds = %12
%18 = load i32, i32* @stderr
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i32*
%21 = load i8*, i8** %13
%22 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %21)
br label %85
23: ; preds = %12
%24 = getelementptr inbounds i8*, i8** %1, i64 2
%25 = load i8*, i8** %24
%26 = tail call i32* @fopen(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%27 = icmp eq i32* %26, null
br i1 %27, label %28, label %35
28: ; preds = %23
%29 = tail call i32 @fclose(i32* %15)
%30 = load i32, i32* @stderr
%31 = sext i32 %30 to i64
%32 = inttoptr i64 %31 to i32*
%33 = load i8*, i8** %24
%34 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %32, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %33)
br label %85
35: ; preds = %23
%36 = load i8*, i8** %13
%37 = load i8*, i8** %24
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* %36, i8* %37)
%39 = load i8*, i8** %24
%40 = load i8, i8* %39
%41 = icmp eq i8 %40, 0
br i1 %41, label %55, label %42
42: ; preds = %35, %49
%43 = phi i64 [ %51, %49 ], [ 0, %35 ]
%44 = phi i8 [ %53, %49 ], [ %40, %35 ]
%45 = phi i8* [ %52, %49 ], [ %39, %35 ]
%46 = icmp ne i8 %44, 46
%47 = icmp ult i64 %43, 16
%48 = select i1 %46, i1 %47, i1 false
br i1 %48, label %49, label %55
49: ; preds = %42
%50 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 %43
store i8 %44, i8* %50
%51 = add nuw nsw i64 %43, 1
%52 = getelementptr inbounds i8, i8* %45, i64 1
%53 = load i8, i8* %52
%54 = icmp eq i8 %53, 0
br i1 %54, label %55, label %42
55: ; preds = %42, %49, %35
%56 = phi i64 [ 0, %35 ], [ %43, %42 ], [ %51, %49 ]
%57 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 %56
store i8 0, i8* %57
%58 = load i8*, i8** %13
%59 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i8* %58)
%60 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %4)
%61 = call i32 @feof(i32* %15)
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %78
63: ; preds = %55, %73
%64 = phi i16 [ %68, %73 ], [ 0, %55 ]
%65 = call zeroext i8 @fgetc(i32* %15)
%66 = zext i8 %65 to i32
%67 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %66)
%68 = add i16 %64, 1
%69 = call i32 @feof(i32* %15)
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %73
71: ; preds = %63
%72 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i64 2, i64 1, i32* %26)
br label %73
73: ; preds = %71, %63
%74 = call i32 @feof(i32* %15)
%75 = icmp eq i32 %74, 0
br i1 %75, label %63, label %76
76: ; preds = %73
%77 = zext i16 %68 to i32
br label %78
78: ; preds = %76, %55
%79 = phi i32 [ 0, %55 ], [ %77, %76 ]
%80 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i64 4, i64 1, i32* %26)
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0), i8* %4, i32 %79)
%82 = call i32 @fclose(i32* %15)
%83 = call i32 @fclose(i32* %26)
%84 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
br label %85
85: ; preds = %78, %28, %17, %6
%86 = phi i32 [ 1, %6 ], [ 0, %78 ], [ 1, %28 ], [ 1, %17 ]
ret i32 %86
}