#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 uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
size_t fread(int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ string2resname(char *);
int /*<<< orphan*/ strlen(char *);
int main(int argc, char **argv) {
  unsigned i, j;
  uint8_t buffer[16];
  size_t bytes_read;
  FILE *fin, *fout;
  for (i = 1; i < argc; ++i) {
    char foutname[strlen(argv[i]) + 5];
    char resname[strlen(argv[i]) + 5];
    strcpy(foutname, argv[i]);
    strcat(foutname, ".S");
    strcpy(resname, argv[i]);
    string2resname(resname);
    fin = fopen(argv[i], "r");
    if (fin == NULL) {
      fprintf(stderr, "could not open file '%s' for reading!\n", argv[i]);
      continue;
    }
    fout = fopen(foutname, "w");
    if (fout == NULL) {
      fprintf(stderr, "could not open file '%s' for writing!\n", foutname);
      fclose(fin);
      continue;
    }
    fprintf(fout,
            "; converted by bin2avrS %s -> %s\n"
            ".global %s \n%s:\n",
            argv[i], foutname, resname, resname);
    do {
      bytes_read = fread(buffer, 1, 16, fin);
      if (bytes_read == 0)
        break;
      fputs("\n .byte", fout);
      for (j = 0; j < bytes_read; ++j) {
        fprintf(fout, " 0x%2.2X", buffer[j]);
        if (j + 1 != bytes_read)
          fputc(',', fout);
      }
    } while (bytes_read == 16);
    fputc('\n', fout);
    fclose(fin);
    fclose(fout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1470 <main+0x2d0>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1070 <strlen@plt>
add    $0x5,%eax
mov    %rsp,%rcx
mov    %rcx,-0x80(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xa8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1070 <strlen@plt>
mov    -0xa8(%rbp),%rdi
add    $0x5,%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xa0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x90(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0xa8(%rbp),%rdi
lea    0xd9e(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0xa0(%rbp),%rdi
call   1040 <string2resname@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
lea    0xd67(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x70(%rbp)
cmpq   $0x0,-0x70(%rbp)
jne    12e2 <main+0x142>
mov    0x2d29(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,8),%rdx
lea    0xd39(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x4,-0x94(%rbp)
jmp    143e <main+0x29e>
mov    -0xa8(%rbp),%rdi
lea    0xd3c(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jne    133b <main+0x19b>
mov    -0xa8(%rbp),%rdx
mov    0x2cce(%rip),%rax
movslq (%rax),%rdi
lea    0xd12(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x70(%rbp),%rdi
call   1060 <fclose@plt>
movl   $0x4,-0x94(%rbp)
jmp    143e <main+0x29e>
mov    -0xa0(%rbp),%r9
mov    -0xa8(%rbp),%rcx
mov    -0x78(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edx
mov    (%rax,%rdx,8),%rdx
lea    0xcf6(%rip),%rsi
mov    %r9,%r8
mov    $0x0,%al
call   10a0 <fprintf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x70(%rbp),%rcx
mov    $0x1,%esi
mov    $0x10,%edx
call   1050 <fread@plt>
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
jne    1394 <main+0x1f4>
jmp    1414 <main+0x274>
mov    -0x78(%rbp),%rsi
lea    0xce8(%rip),%rdi
call   1080 <fputs@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x68(%rbp),%rax
jae    1404 <main+0x264>
mov    -0x78(%rbp),%rdi
mov    -0x18(%rbp),%eax
mov    -0x60(%rbp,%rax,4),%edx
lea    0xcc5(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
cmp    -0x68(%rbp),%rax
je     13f1 <main+0x251>
mov    -0x78(%rbp),%rsi
mov    $0x2c,%edi
call   1090 <fputc@plt>
jmp    13f6 <main+0x256>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    13ab <main+0x20b>
jmp    1409 <main+0x269>
cmpq   $0x10,-0x68(%rbp)
je     1369 <main+0x1c9>
mov    -0x78(%rbp),%rsi
mov    $0xa,%edi
call   1090 <fputc@plt>
mov    -0x70(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x78(%rbp),%rdi
call   1060 <fclose@plt>
movl   $0x0,-0x94(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,%rsp
mov    -0x94(%rbp),%eax
test   %eax,%eax
je     145d <main+0x2bd>
jmp    1458 <main+0x2b8>
jmp    1462 <main+0x2c2>
jmp    1462 <main+0x2c2>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c0 <main+0x20>
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
cmp    $0x2,%edi
jb     13c0 <main+0x220>
mov    %rsi,%r13
mov    %edi,%eax
mov    %rax,-0x48(%rbp)
mov    $0x1,%ebx
lea    0xec0(%rip),%r14
mov    %rsi,-0x30(%rbp)
jmp    1212 <main+0x72>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x2df9(%rip),%rax
movslq (%rax),%rdi
mov    0x0(%r13,%rbx,8),%rdx
lea    0xe0f(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,%rsp
add    $0x1,%rbx
cmp    -0x48(%rbp),%rbx
je     13c0 <main+0x220>
mov    0x0(%r13,%rbx,8),%rdi
call   1070 <strlen@plt>
mov    %rsp,-0x40(%rbp)
add    $0x5,%eax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
mov    0x0(%r13,%rbx,8),%rdi
call   1070 <strlen@plt>
add    $0x5,%eax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
mov    0x0(%r13,%rbx,8),%rsi
mov    %r15,%rdi
call   1030 <strcpy@plt>
mov    %r15,-0x50(%rbp)
mov    %r15,%rdi
lea    0xd93(%rip),%rsi
call   10b0 <strcat@plt>
mov    0x0(%r13,%rbx,8),%rsi
mov    %r12,%rdi
call   1030 <strcpy@plt>
mov    %r12,%rdi
call   1040 <string2resname@plt>
mov    0x0(%r13,%rbx,8),%rdi
lea    0xd70(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     11e0 <main+0x40>
mov    %rax,%r15
mov    %rbx,-0x38(%rbp)
mov    -0x50(%rbp),%rbx
mov    %rbx,%rdi
lea    0xd76(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1390 <main+0x1f0>
mov    %rax,%r13
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    %r13,%rdi
lea    0xd78(%rip),%rsi
mov    %rbx,%rcx
mov    %r12,%r8
mov    %r12,%r9
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    12f6 <main+0x156>
nop
cmp    $0x10,%r12
jne    1370 <main+0x1d0>
lea    -0x90(%rbp),%rdi
mov    $0x1,%esi
mov    $0x10,%edx
mov    %r15,%rcx
call   1050 <fread@plt>
test   %rax,%rax
je     1370 <main+0x1d0>
mov    %rax,%r12
mov    $0x7,%esi
mov    $0x1,%edx
lea    0xd5f(%rip),%rdi
mov    %r13,%rcx
call   10c0 <fwrite@plt>
xor    %ebx,%ebx
jmp    1345 <main+0x1a5>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    %rbx,%r12
jbe    12f0 <main+0x150>
mov    -0x90(%rbp,%rbx,4),%edx
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
add    $0x1,%ebx
cmp    %rbx,%r12
je     1340 <main+0x1a0>
mov    $0x2c,%edi
mov    %r13,%rsi
call   1080 <fputc@plt>
jmp    1340 <main+0x1a0>
mov    $0xa,%edi
mov    %r13,%rsi
call   1080 <fputc@plt>
mov    %r15,%rdi
call   1060 <fclose@plt>
mov    %r13,%rdi
jmp    13ae <main+0x20e>
nopw   0x0(%rax,%rax,1)
mov    0x2c49(%rip),%rax
movslq (%rax),%rdi
lea    0xc8d(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r15,%rdi
call   1060 <fclose@plt>
mov    -0x30(%rbp),%r13
mov    -0x38(%rbp),%rbx
jmp    11fd <main+0x5d>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c".S\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [39 x i8] c"could not open file '%s' for reading!\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [39 x i8] c"could not open file '%s' for writing!\0A\00"
@.str.5 = [50 x i8] c"; converted by bin2avrS %s -> %s\0A.global %s \0A%s:\0A\00"
@.str.6 = [8 x i8] c"\0A .byte\00"
@.str.7 = [9 x i8] c" 0x%2.2X\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 [16 x i32]
%9 = alloca i64
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i64
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %16
16: ; preds = %140, %2
%17 = load i32, i32* %6
%18 = load i32, i32* %4
%19 = icmp ult i32 %17, %18
br i1 %19, label %20, label %143
20: ; preds = %16
%21 = load i8**, i8*** %5
%22 = load i32, i32* %6
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds i8*, i8** %21, i64 %23
%25 = load i8*, i8** %24
%26 = call i32 @strlen(i8* %25)
%27 = add nsw i32 %26, 5
%28 = zext i32 %27 to i64
%29 = call i8* @llvm.stacksave()
store i8* %29, i8** %12
%30 = alloca i8, i64 %28
store i64 %28, i64* %13
%31 = load i8**, i8*** %5
%32 = load i32, i32* %6
%33 = zext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %31, i64 %33
%35 = load i8*, i8** %34
%36 = call i32 @strlen(i8* %35)
%37 = add nsw i32 %36, 5
%38 = zext i32 %37 to i64
%39 = alloca i8, i64 %38
store i64 %38, i64* %14
%40 = load i8**, i8*** %5
%41 = load i32, i32* %6
%42 = zext i32 %41 to i64
%43 = getelementptr inbounds i8*, i8** %40, i64 %42
%44 = load i8*, i8** %43
%45 = call i32 @strcpy(i8* %30, i8* %44)
%46 = call i32 @strcat(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%47 = load i8**, i8*** %5
%48 = load i32, i32* %6
%49 = zext i32 %48 to i64
%50 = getelementptr inbounds i8*, i8** %47, i64 %49
%51 = load i8*, i8** %50
%52 = call i32 @strcpy(i8* %39, i8* %51)
%53 = call i32 @string2resname(i8* %39)
%54 = load i8**, i8*** %5
%55 = load i32, i32* %6
%56 = zext i32 %55 to i64
%57 = getelementptr inbounds i8*, i8** %54, i64 %56
%58 = load i8*, i8** %57
%59 = call i32* @fopen(i8* %58, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %59, i32** %10
%60 = load i32*, i32** %10
%61 = icmp eq i32* %60, null
br i1 %61, label %62, label %72
62: ; preds = %20
%63 = load i32, i32* @stderr
%64 = sext i32 %63 to i64
%65 = inttoptr i64 %64 to i32*
%66 = load i8**, i8*** %5
%67 = load i32, i32* %6
%68 = zext i32 %67 to i64
%69 = getelementptr inbounds i8*, i8** %66, i64 %68
%70 = load i8*, i8** %69
%71 = call i32 (i32*, i8*, ...) @fprintf(i32* %65, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8* %70)
store i32 4, i32* %15
br label %136
72: ; preds = %20
%73 = call i32* @fopen(i8* %30, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %73, i32** %11
%74 = load i32*, i32** %11
%75 = icmp eq i32* %74, null
br i1 %75, label %76, label %83
76: ; preds = %72
%77 = load i32, i32* @stderr
%78 = sext i32 %77 to i64
%79 = inttoptr i64 %78 to i32*
%80 = call i32 (i32*, i8*, ...) @fprintf(i32* %79, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i8* %30)
%81 = load i32*, i32** %10
%82 = call i32 @fclose(i32* %81)
store i32 4, i32* %15
br label %136
83: ; preds = %72
%84 = load i32*, i32** %11
%85 = load i8**, i8*** %5
%86 = load i32, i32* %6
%87 = zext i32 %86 to i64
%88 = getelementptr inbounds i8*, i8** %85, i64 %87
%89 = load i8*, i8** %88
%90 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i8* %89, i8* %30, i8* %39, i8* %39)
br label %91
91: ; preds = %126, %83
%92 = getelementptr inbounds [16 x i32], [16 x i32]* %8, i64 0, i64 0
%93 = load i32*, i32** %10
%94 = call i64 @fread(i32* %92, i32 1, i32 16, i32* %93)
store i64 %94, i64* %9
%95 = load i64, i64* %9
%96 = icmp eq i64 %95, 0
br i1 %96, label %97, label %98
97: ; preds = %91
br label %129
98: ; preds = %91
%99 = load i32*, i32** %11
%100 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32* %99)
store i32 0, i32* %7
br label %101
101: ; preds = %122, %98
%102 = load i32, i32* %7
%103 = zext i32 %102 to i64
%104 = load i64, i64* %9
%105 = icmp ult i64 %103, %104
br i1 %105, label %106, label %125
106: ; preds = %101
%107 = load i32*, i32** %11
%108 = load i32, i32* %7
%109 = zext i32 %108 to i64
%110 = getelementptr inbounds [16 x i32], [16 x i32]* %8, i64 0, i64 %109
%111 = load i32, i32* %110
%112 = call i32 (i32*, i8*, ...) @fprintf(i32* %107, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %111)
%113 = load i32, i32* %7
%114 = add i32 %113, 1
%115 = zext i32 %114 to i64
%116 = load i64, i64* %9
%117 = icmp ne i64 %115, %116
br i1 %117, label %118, label %121
118: ; preds = %106
%119 = load i32*, i32** %11
%120 = call i32 @fputc(i8 signext 44, i32* %119)
br label %121
121: ; preds = %118, %106
br label %122
122: ; preds = %121
%123 = load i32, i32* %7
%124 = add i32 %123, 1
store i32 %124, i32* %7
br label %101
125: ; preds = %101
br label %126
126: ; preds = %125
%127 = load i64, i64* %9
%128 = icmp eq i64 %127, 16
br i1 %128, label %91, label %129
129: ; preds = %126, %97
%130 = load i32*, i32** %11
%131 = call i32 @fputc(i8 signext 10, i32* %130)
%132 = load i32*, i32** %10
%133 = call i32 @fclose(i32* %132)
%134 = load i32*, i32** %11
%135 = call i32 @fclose(i32* %134)
store i32 0, i32* %15
br label %136
136: ; preds = %129, %76, %62
%137 = load i8*, i8** %12
%138 = load i32, i32* %15
switch i32 %138, label %144 [
i32 0, label %139
i32 4, label %140
]
139: ; preds = %136
br label %140
140: ; preds = %139, %136
%141 = load i32, i32* %6
%142 = add i32 %141, 1
store i32 %142, i32* %6
br label %16
143: ; preds = %16
ret i32 0
144: ; preds = %136
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c".S\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [39 x i8] c"could not open file '%s' for reading!\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [39 x i8] c"could not open file '%s' for writing!\0A\00"
@.str.5 = [50 x i8] c"; converted by bin2avrS %s -> %s\0A.global %s \0A%s:\0A\00"
@.str.6 = [8 x i8] c"\0A .byte\00"
@.str.7 = [9 x i8] c" 0x%2.2X\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x i32]
%4 = bitcast [16 x i32]* %3 to i8*
%5 = icmp ugt i32 %0, 1
br i1 %5, label %6, label %76
6: ; preds = %2
%7 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 0
%8 = zext i32 %0 to i64
br label %9
9: ; preds = %6, %73
%10 = phi i64 [ 1, %6 ], [ %74, %73 ]
%11 = getelementptr inbounds i8*, i8** %1, i64 %10
%12 = load i8*, i8** %11
%13 = call i32 @strlen(i8* %12)
%14 = add nsw i32 %13, 5
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
%17 = alloca i8, i64 %15
%18 = load i8*, i8** %11
%19 = call i32 @strlen(i8* %18)
%20 = add nsw i32 %19, 5
%21 = zext i32 %20 to i64
%22 = alloca i8, i64 %21
%23 = load i8*, i8** %11
%24 = call i32 @strcpy(i8* %17, i8* %23)
%25 = call i32 @strcat(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%26 = load i8*, i8** %11
%27 = call i32 @strcpy(i8* %22, i8* %26)
%28 = call i32 @string2resname(i8* %22)
%29 = load i8*, i8** %11
%30 = call i32* @fopen(i8* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %38
32: ; preds = %9
%33 = load i32, i32* @stderr
%34 = sext i32 %33 to i64
%35 = inttoptr i64 %34 to i32*
%36 = load i8*, i8** %11
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %35, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8* %36)
br label %73
38: ; preds = %9
%39 = call i32* @fopen(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%40 = icmp eq i32* %39, null
br i1 %40, label %41, label %47
41: ; preds = %38
%42 = load i32, i32* @stderr
%43 = sext i32 %42 to i64
%44 = inttoptr i64 %43 to i32*
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i8* %17)
%46 = call i32 @fclose(i32* %30)
br label %73
47: ; preds = %38
%48 = load i8*, i8** %11
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %39, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i8* %48, i8* %17, i8* %22, i8* %22)
br label %50
50: ; preds = %67, %47
%51 = call i64 @fread(i32* %7, i32 1, i32 16, i32* %30)
%52 = icmp eq i64 %51, 0
br i1 %52, label %69, label %53
53: ; preds = %50
%54 = call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i64 7, i64 1, i32* %39)
br label %55
55: ; preds = %53, %65
%56 = phi i64 [ 0, %53 ], [ %61, %65 ]
%57 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %39, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %58)
%60 = add nuw nsw i64 %56, 1
%61 = and i64 %60, 4294967295
%62 = icmp eq i64 %51, %61
br i1 %62, label %65, label %63
63: ; preds = %55
%64 = call i32 @fputc(i8 signext 44, i32* %39)
br label %65
65: ; preds = %55, %63
%66 = icmp ugt i64 %51, %61
br i1 %66, label %55, label %67
67: ; preds = %65
%68 = icmp eq i64 %51, 16
br i1 %68, label %50, label %69
69: ; preds = %50, %67
%70 = call i32 @fputc(i8 signext 10, i32* %39)
%71 = call i32 @fclose(i32* %30)
%72 = call i32 @fclose(i32* %39)
br label %73
73: ; preds = %69, %41, %32
%74 = add nuw nsw i64 %10, 1
%75 = icmp eq i64 %74, %8
br i1 %75, label %76, label %9
76: ; preds = %73, %2
ret i32 0
}