#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*/ SEEK_END;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
unsigned char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
size_t ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strnident(int /*<<< orphan*/, char *);
int main(int argc, char **argv) {
  FILE *fin;
  size_t filelen;
  int linelen;
  int arg;
  if (argc < 2) {
    fputs("bin2s - convert binary files to assembly language\n"
          "typical usage: bin2s foo.bin bar.bin baz.bin > foo.s\n",
          stderr);
    return 1;
  }
  for (arg = 1; arg < argc; arg++) {
    fin = fopen(argv[arg], "rb");
    if (!fin) {
      fputs("bin2s: could not open ", stderr);
      perror(argv[arg]);
      return 1;
    }
    fseek(fin, 0, SEEK_END);
    filelen = ftell(fin);
    rewind(fin);
    if (filelen == 0) {
      fclose(fin);
      fprintf(stderr, "bin2s: warning: skipping empty file %s\n", argv[arg]);
      continue;
    }
    fputs("/* Generated by BIN2S - please don't edit directly */\n"
          ".section .rodata\n"
          ".balign 4\n"
          ".global ",
          stdout);
    strnident(stdout, argv[arg]);
    fputs("_len\n", stdout);
    strnident(stdout, argv[arg]);
    printf("_len: .int %lu\n.global ", (unsigned long)filelen);
    strnident(stdout, argv[arg]);
    fputs("\n", stdout);
    strnident(stdout, argv[arg]);
    fputs(":\n.byte ", stdout);
    linelen = 0;
    while (filelen > 0) {
      unsigned char c = fgetc(fin);
      printf("%3u", (unsigned int)c);
      filelen--;
      if (filelen) {
        if (++linelen >= 16) {
          linelen = 0;
          fputs("\n.byte ", stdout);
        } else {
          fputc(',', stdout);
        }
      }
    }
    fputc('\n', stdout);
    fclose(fin);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1201 <main+0x41>
mov    0x2df1(%rip),%rax
mov    (%rax),%esi
lea    0xe10(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x4(%rbp)
jmp    1465 <main+0x2a5>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    145e <main+0x29e>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe41(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    126d <main+0xad>
mov    0x2d96(%rip),%rax
mov    (%rax),%esi
lea    0xe20(%rip),%rdi
call   1060 <fputs@plt>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10e0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1465 <main+0x2a5>
mov    -0x18(%rbp),%rdi
mov    0x2d70(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10c0 <fseek@plt>
mov    -0x18(%rbp),%rdi
call   10b0 <ftell@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <rewind@plt>
cmpq   $0x0,-0x20(%rbp)
jne    12d1 <main+0x111>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2d26(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xdbb(%rip),%rsi
call   10a0 <fprintf@plt>
jmp    1450 <main+0x290>
mov    0x2cf8(%rip),%rax
mov    (%rax),%esi
lea    0xdc9(%rip),%rdi
call   1060 <fputs@plt>
mov    0x2ce3(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1090 <strnident@plt>
mov    0x2cc9(%rip),%rax
mov    (%rax),%esi
lea    0xdf4(%rip),%rdi
call   1060 <fputs@plt>
mov    0x2cb4(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1090 <strnident@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%esi
lea    0xdce(%rip),%rdi
call   1040 <printf@plt>
mov    0x2c88(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1090 <strnident@plt>
mov    0x2c6e(%rip),%rax
mov    (%rax),%esi
lea    0xd9d(%rip),%rdi
call   1060 <fputs@plt>
mov    0x2c59(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1090 <strnident@plt>
mov    0x2c3f(%rip),%rax
mov    (%rax),%esi
lea    0xd88(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x0,-0x24(%rbp)
cmpq   $0x0,-0x20(%rbp)
jbe    1434 <main+0x274>
mov    -0x18(%rbp),%rdi
call   1070 <fgetc@plt>
mov    %al,-0x29(%rbp)
movzbl -0x29(%rbp),%esi
lea    0xd63(%rip),%rdi
call   1040 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     142f <main+0x26f>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmp    $0x10,%eax
jl     1417 <main+0x257>
movl   $0x0,-0x24(%rbp)
mov    0x2bcc(%rip),%rax
mov    (%rax),%esi
lea    0xd16(%rip),%rdi
call   1060 <fputs@plt>
jmp    142a <main+0x26a>
mov    0x2bb2(%rip),%rax
mov    (%rax),%esi
mov    $0x2c,%edi
call   1080 <fputc@plt>
jmp    142f <main+0x26f>
jmp    13a6 <main+0x1e6>
mov    0x2b95(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1080 <fputc@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1208 <main+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%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    $0x2,%edi
jge    11f2 <main+0x32>
mov    0x2dfe(%rip),%rax
mov    (%rax),%esi
lea    0xe1d(%rip),%rdi
call   1060 <fputs@plt>
mov    $0x1,%eax
jmp    13a8 <main+0x1e8>
mov    %rsi,%rbx
mov    %edi,%eax
mov    %rax,0x10(%rsp)
mov    $0x1,%r14d
mov    0x2dc7(%rip),%rbp
lea    0xf1b(%rip),%r13
mov    %rsi,0x8(%rsp)
jmp    1249 <main+0x89>
nopw   0x0(%rax,%rax,1)
mov    0x0(%rbp),%esi
mov    $0xa,%edi
call   1080 <fputc@plt>
mov    %r15,%rdi
call   1030 <fclose@plt>
mov    0x8(%rsp),%rbx
add    $0x1,%r14
cmp    0x10(%rsp),%r14
je     13a6 <main+0x1e6>
mov    (%rbx,%r14,8),%rdi
lea    0xe14(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     13b7 <main+0x1f7>
mov    %rax,%r15
mov    0x2d7c(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   10c0 <fseek@plt>
mov    %r15,%rdi
call   10b0 <ftell@plt>
mov    %rax,%r12
mov    %r15,%rdi
call   1050 <rewind@plt>
test   %r12,%r12
je     1380 <main+0x1c0>
mov    0x0(%rbp),%esi
lea    0xe0c(%rip),%rdi
call   1060 <fputs@plt>
mov    0x0(%rbp),%edi
mov    (%rbx,%r14,8),%rsi
call   1090 <strnident@plt>
mov    0x0(%rbp),%esi
lea    0xe4b(%rip),%rdi
call   1060 <fputs@plt>
mov    0x0(%rbp),%edi
mov    (%rbx,%r14,8),%rsi
call   1090 <strnident@plt>
lea    0xe39(%rip),%rdi
mov    %r12d,%esi
call   1040 <printf@plt>
mov    0x0(%rbp),%edi
mov    (%rbx,%r14,8),%rsi
call   1090 <strnident@plt>
mov    0x0(%rbp),%esi
lea    0xe19(%rip),%rdi
call   1060 <fputs@plt>
mov    0x0(%rbp),%edi
mov    (%rbx,%r14,8),%rsi
call   1090 <strnident@plt>
mov    0x0(%rbp),%esi
lea    0xe18(%rip),%rdi
call   1060 <fputs@plt>
mov    %r15,%rdi
call   1070 <fgetc@plt>
movzbl %al,%esi
mov    %r13,%rdi
call   1040 <printf@plt>
add    $0xffffffffffffffff,%r12
je     1220 <main+0x60>
xor    %ebx,%ebx
jmp    135d <main+0x19d>
add    $0x1,%ebx
mov    0x0(%rbp),%esi
mov    $0x2c,%edi
call   1080 <fputc@plt>
mov    %r15,%rdi
call   1070 <fgetc@plt>
movzbl %al,%esi
mov    %r13,%rdi
call   1040 <printf@plt>
add    $0xffffffffffffffff,%r12
je     1220 <main+0x60>
cmp    $0xf,%ebx
jl     1330 <main+0x170>
mov    0x0(%rbp),%esi
lea    0xdb7(%rip),%rdi
call   1060 <fputs@plt>
xor    %ebx,%ebx
jmp    1340 <main+0x180>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
call   1030 <fclose@plt>
mov    0x2c49(%rip),%rax
mov    (%rax),%edi
mov    (%rbx,%r14,8),%rdx
lea    0xce6(%rip),%rsi
call   10a0 <fprintf@plt>
jmp    123a <main+0x7a>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c1a(%rip),%rax
mov    (%rax),%esi
lea    0xca4(%rip),%rdi
call   1060 <fputs@plt>
mov    (%rbx,%r14,8),%rdi
call   10e0 <perror@plt>
mov    $0x1,%eax
jmp    13a8 <main+0x1e8>

LLVM IR (-O0):
@.str = [104 x i8] c"bin2s - convert binary files to assembly language\0Atypical usage: bin2s foo.bin bar.bin baz.bin > foo.s\0A\00"
@stderr = global i32 0
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [23 x i8] c"bin2s: could not open \00"
@SEEK_END = global i32 0
@.str.3 = [40 x i8] c"bin2s: warning: skipping empty file %s\0A\00"
@.str.4 = [90 x i8] c"/* Generated by BIN2S - please don't edit directly */\0A.section .rodata\0A.balign 4\0A.global \00"
@stdout = global i32 0
@.str.5 = [6 x i8] c"_len\0A\00"
@.str.6 = [24 x i8] c"_len: .int %lu\0A.global \00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [9 x i8] c":\0A.byte \00"
@.str.9 = [4 x i8] c"%3u\00"
@.str.10 = [8 x i8] c"\0A.byte \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 2
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = call i32 @fputs(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str, i64 0, i64 0), i32 %14)
store i32 1, i32* %3
br label %133
16: ; preds = %2
store i32 1, i32* %9
br label %17
17: ; preds = %129, %16
%18 = load i32, i32* %9
%19 = load i32, i32* %4
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %132
21: ; preds = %17
%22 = load i8**, i8*** %5
%23 = load i32, i32* %9
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %22, i64 %24
%26 = load i8*, i8** %25
%27 = call i32* @fopen(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %27, i32** %6
%28 = load i32*, i32** %6
%29 = icmp ne i32* %28, null
br i1 %29, label %39, label %30
30: ; preds = %21
%31 = load i32, i32* @stderr
%32 = call i32 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %31)
%33 = load i8**, i8*** %5
%34 = load i32, i32* %9
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8*, i8** %33, i64 %35
%37 = load i8*, i8** %36
%38 = call i32 @perror(i8* %37)
store i32 1, i32* %3
br label %133
39: ; preds = %21
%40 = load i32*, i32** %6
%41 = load i32, i32* @SEEK_END
%42 = call i32 @fseek(i32* %40, i32 0, i32 %41)
%43 = load i32*, i32** %6
%44 = call i64 @ftell(i32* %43)
store i64 %44, i64* %7
%45 = load i32*, i32** %6
%46 = call i32 @rewind(i32* %45)
%47 = load i64, i64* %7
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %59
49: ; preds = %39
%50 = load i32*, i32** %6
%51 = call i32 @fclose(i32* %50)
%52 = load i32, i32* @stderr
%53 = load i8**, i8*** %5
%54 = load i32, i32* %9
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8*, i8** %53, i64 %55
%57 = load i8*, i8** %56
%58 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i8* %57)
br label %129
59: ; preds = %39
%60 = load i32, i32* @stdout
%61 = call i32 @fputs(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.4, i64 0, i64 0), i32 %60)
%62 = load i32, i32* @stdout
%63 = load i8**, i8*** %5
%64 = load i32, i32* %9
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8*, i8** %63, i64 %65
%67 = load i8*, i8** %66
%68 = call i32 @strnident(i32 %62, i8* %67)
%69 = load i32, i32* @stdout
%70 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %69)
%71 = load i32, i32* @stdout
%72 = load i8**, i8*** %5
%73 = load i32, i32* %9
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8*, i8** %72, i64 %74
%76 = load i8*, i8** %75
%77 = call i32 @strnident(i32 %71, i8* %76)
%78 = load i64, i64* %7
%79 = trunc i64 %78 to i32
%80 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %79)
%81 = load i32, i32* @stdout
%82 = load i8**, i8*** %5
%83 = load i32, i32* %9
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8*, i8** %82, i64 %84
%86 = load i8*, i8** %85
%87 = call i32 @strnident(i32 %81, i8* %86)
%88 = load i32, i32* @stdout
%89 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i32 %88)
%90 = load i32, i32* @stdout
%91 = load i8**, i8*** %5
%92 = load i32, i32* %9
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i8*, i8** %91, i64 %93
%95 = load i8*, i8** %94
%96 = call i32 @strnident(i32 %90, i8* %95)
%97 = load i32, i32* @stdout
%98 = call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %97)
store i32 0, i32* %8
br label %99
99: ; preds = %123, %59
%100 = load i64, i64* %7
%101 = icmp ugt i64 %100, 0
br i1 %101, label %102, label %124
102: ; preds = %99
%103 = load i32*, i32** %6
%104 = call zeroext i8 @fgetc(i32* %103)
store i8 %104, i8* %10
%105 = load i8, i8* %10
%106 = zext i8 %105 to i32
%107 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %106)
%108 = load i64, i64* %7
%109 = add i64 %108, -1
store i64 %109, i64* %7
%110 = load i64, i64* %7
%111 = icmp ne i64 %110, 0
br i1 %111, label %112, label %123
112: ; preds = %102
%113 = load i32, i32* %8
%114 = add nsw i32 %113, 1
store i32 %114, i32* %8
%115 = icmp sge i32 %114, 16
br i1 %115, label %116, label %119
116: ; preds = %112
store i32 0, i32* %8
%117 = load i32, i32* @stdout
%118 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %117)
br label %122
119: ; preds = %112
%120 = load i32, i32* @stdout
%121 = call i32 @fputc(i8 signext 44, i32 %120)
br label %122
122: ; preds = %119, %116
br label %123
123: ; preds = %122, %102
br label %99
124: ; preds = %99
%125 = load i32, i32* @stdout
%126 = call i32 @fputc(i8 signext 10, i32 %125)
%127 = load i32*, i32** %6
%128 = call i32 @fclose(i32* %127)
br label %129
129: ; preds = %124, %49
%130 = load i32, i32* %9
%131 = add nsw i32 %130, 1
store i32 %131, i32* %9
br label %17
132: ; preds = %17
store i32 0, i32* %3
br label %133
133: ; preds = %132, %30, %13
%134 = load i32, i32* %3
ret i32 %134
}

LLVM IR (-O2):
@.str = [104 x i8] c"bin2s - convert binary files to assembly language\0Atypical usage: bin2s foo.bin bar.bin baz.bin > foo.s\0A\00"
@stderr = global i32 0
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [23 x i8] c"bin2s: could not open \00"
@SEEK_END = global i32 0
@.str.3 = [40 x i8] c"bin2s: warning: skipping empty file %s\0A\00"
@.str.4 = [90 x i8] c"/* Generated by BIN2S - please don't edit directly */\0A.section .rodata\0A.balign 4\0A.global \00"
@stdout = global i32 0
@.str.5 = [6 x i8] c"_len\0A\00"
@.str.6 = [24 x i8] c"_len: .int %lu\0A.global \00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [9 x i8] c":\0A.byte \00"
@.str.9 = [4 x i8] c"%3u\00"
@.str.10 = [8 x i8] c"\0A.byte \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %9
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fputs(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %84
9: ; preds = %4, %81
%10 = phi i64 [ 1, %4 ], [ %82, %81 ]
%11 = getelementptr inbounds i8*, i8** %1, i64 %10
%12 = load i8*, i8** %11
%13 = tail call i32* @fopen(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %20
15: ; preds = %9
%16 = load i32, i32* @stderr
%17 = tail call i32 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = load i8*, i8** %11
%19 = tail call i32 @perror(i8* %18)
br label %84
20: ; preds = %9
%21 = load i32, i32* @SEEK_END
%22 = tail call i32 @fseek(i32* %13, i32 0, i32 %21)
%23 = tail call i64 @ftell(i32* %13)
%24 = tail call i32 @rewind(i32* %13)
%25 = icmp eq i64 %23, 0
br i1 %25, label %26, label %31
26: ; preds = %20
%27 = tail call i32 @fclose(i32* %13)
%28 = load i32, i32* @stderr
%29 = load i8*, i8** %11
%30 = tail call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i8* %29)
br label %81
31: ; preds = %20
%32 = load i32, i32* @stdout
%33 = tail call i32 @fputs(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.4, i64 0, i64 0), i32 %32)
%34 = load i32, i32* @stdout
%35 = load i8*, i8** %11
%36 = tail call i32 @strnident(i32 %34, i8* %35)
%37 = load i32, i32* @stdout
%38 = tail call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %37)
%39 = load i32, i32* @stdout
%40 = load i8*, i8** %11
%41 = tail call i32 @strnident(i32 %39, i8* %40)
%42 = trunc i64 %23 to i32
%43 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %42)
%44 = load i32, i32* @stdout
%45 = load i8*, i8** %11
%46 = tail call i32 @strnident(i32 %44, i8* %45)
%47 = load i32, i32* @stdout
%48 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i32 %47)
%49 = load i32, i32* @stdout
%50 = load i8*, i8** %11
%51 = tail call i32 @strnident(i32 %49, i8* %50)
%52 = load i32, i32* @stdout
%53 = tail call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %52)
%54 = tail call zeroext i8 @fgetc(i32* %13)
%55 = zext i8 %54 to i32
%56 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %55)
%57 = add i64 %23, -1
%58 = icmp eq i64 %57, 0
br i1 %58, label %77, label %59
59: ; preds = %31, %70
%60 = phi i64 [ %75, %70 ], [ %57, %31 ]
%61 = phi i32 [ %71, %70 ], [ 0, %31 ]
%62 = icmp sgt i32 %61, 14
br i1 %62, label %63, label %66
63: ; preds = %59
%64 = load i32, i32* @stdout
%65 = tail call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %64)
br label %70
66: ; preds = %59
%67 = add nsw i32 %61, 1
%68 = load i32, i32* @stdout
%69 = tail call i32 @fputc(i8 signext 44, i32 %68)
br label %70
70: ; preds = %63, %66
%71 = phi i32 [ 0, %63 ], [ %67, %66 ]
%72 = tail call zeroext i8 @fgetc(i32* %13)
%73 = zext i8 %72 to i32
%74 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %73)
%75 = add i64 %60, -1
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %59
77: ; preds = %70, %31
%78 = load i32, i32* @stdout
%79 = tail call i32 @fputc(i8 signext 10, i32 %78)
%80 = tail call i32 @fclose(i32* %13)
br label %81
81: ; preds = %77, %26
%82 = add nuw nsw i64 %10, 1
%83 = icmp eq i64 %82, %5
br i1 %83, label %84, label %9
84: ; preds = %81, %15, %6
%85 = phi i32 [ 1, %6 ], [ 1, %15 ], [ 0, %81 ]
ret i32 %85
}