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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ isdigit(char);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ stat(char *, struct stat *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *strrchr(char *, char);
char toupper(char);
int main(int argc, char *argv[]) {
  if (argc < 2)
    return 1;
  for (argc--; argc > 0; argc--) {
    FILE *in;
    FILE *out;
    char variable[1024], header_fn[1024], output_fn[1024], *suffix, *prefix;
    int i;
    int bytes_per_row = 16;
    char row[1024], byte[1024], character;
    struct stat st;
    long total_bytes;
    in = fopen(argv[argc], "rb");
    if (!in)
      continue;
    stat(argv[argc], &st);
    total_bytes = (long)st.st_size;
    strcpy(output_fn, argv[argc]);
    suffix = strrchr(output_fn, '.');
    if (suffix)
      *suffix = '_';
    strcat(output_fn, ".h");
    out = fopen(output_fn, "w");
    if (!out) {
      fclose(in);
      continue;
    }
    prefix = strrchr(output_fn, '/');
    if (!prefix)
      prefix = output_fn;
    else
      prefix++;
    strcpy(header_fn, prefix);
    for (i = 0; i < strlen(header_fn); i++) {
      if (i == 0 && isdigit(header_fn[i])) {
        int k;
        for (k = strlen(header_fn); k >= 0; k--) {
          header_fn[k + 1] = header_fn[k];
        }
        header_fn[0] = '_';
      }
      if (header_fn[i] == '.')
        header_fn[i] = '_';
      else
        header_fn[i] = toupper(header_fn[i]);
    }
    strcpy(variable, prefix);
    suffix = strrchr(variable, '.');
    if (suffix)
      *suffix = 0;
    if (isdigit(variable[0])) {
      int k;
      for (k = strlen(variable); k >= 0; k--) {
        variable[k + 1] = variable[k];
      }
      variable[0] = '_';
    }
    fprintf(out,
            "#ifndef %s\n"
            "#define %s\n"
            "\n"
            "static unsigned char %s[] = \n{\n",
            header_fn, header_fn, variable);
    fprintf(out, "\t0x%02x, 0x%02x, 0x%02x, 0x%02x, \n",
            (int)(total_bytes & 0xff000000) >> 24,
            (int)(total_bytes & 0xff0000) >> 16,
            (int)(total_bytes & 0xff00) >> 8, (int)(total_bytes & 0xff));
    while (total_bytes > 0) {
      sprintf(row, "\t");
      for (i = 0; i < bytes_per_row && total_bytes > 0; i++) {
        if (i == 0)
          sprintf(byte, "0x%02x", fgetc(in));
        else
          sprintf(byte, ", 0x%02x", fgetc(in));
        strcat(row, byte);
        total_bytes--;
      }
      if (total_bytes > 0)
        sprintf(byte, ", \n");
      else
        sprintf(byte, "\n");
      fprintf(out, "%s%s", row, byte);
    }
    fprintf(out, "};\n\n#endif\n");
    fclose(out);
    fclose(in);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1480,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11ef <main+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1745 <main+0x585>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1745 <main+0x585>
movl   $0x10,-0xc38(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xde1(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1238 <main+0x78>
jmp    1737 <main+0x577>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x1450(%rbp),%rsi
call   10b0 <stat@plt>
mov    -0x1450(%rbp),%rax
mov    %rax,-0x1458(%rbp)
lea    -0xc20(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1040 <strcpy@plt>
lea    -0xc20(%rbp),%rdi
mov    $0x2e,%esi
call   1080 <strrchr@plt>
mov    %rax,-0xc28(%rbp)
cmpq   $0x0,-0xc28(%rbp)
je     12a6 <main+0xe6>
mov    -0xc28(%rbp),%rax
movb   $0x5f,(%rax)
lea    -0xc20(%rbp),%rdi
lea    0xd4f(%rip),%rsi
call   10d0 <strcat@plt>
lea    -0xc20(%rbp),%rdi
lea    0xd3f(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    12e9 <main+0x129>
mov    -0x18(%rbp),%rdi
call   1060 <fclose@plt>
jmp    1737 <main+0x577>
lea    -0xc20(%rbp),%rdi
mov    $0x2f,%esi
call   1080 <strrchr@plt>
mov    %rax,-0xc30(%rbp)
cmpq   $0x0,-0xc30(%rbp)
jne    1322 <main+0x162>
lea    -0xc20(%rbp),%rax
mov    %rax,-0xc30(%rbp)
jmp    1334 <main+0x174>
mov    -0xc30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xc30(%rbp)
lea    -0x820(%rbp),%rdi
mov    -0xc30(%rbp),%rsi
call   1040 <strcpy@plt>
movl   $0x0,-0xc34(%rbp)
mov    -0xc34(%rbp),%eax
mov    %eax,-0x1464(%rbp)
lea    -0x820(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x1464(%rbp),%eax
cmp    %ecx,%eax
jge    1467 <main+0x2a7>
cmpl   $0x0,-0xc34(%rbp)
jne    13fe <main+0x23e>
movslq -0xc34(%rbp),%rax
movsbl -0x820(%rbp,%rax,1),%edi
ff
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     13fe <main+0x23e>
lea    -0x820(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,-0x145c(%rbp)
cmpl   $0x0,-0x145c(%rbp)
jl     13f7 <main+0x237>
movslq -0x145c(%rbp),%rax
mov    -0x820(%rbp,%rax,1),%cl
mov    -0x145c(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cl,-0x820(%rbp,%rax,1)
mov    -0x145c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x145c(%rbp)
jmp    13b6 <main+0x1f6>
movb   $0x5f,-0x820(%rbp)
movslq -0xc34(%rbp),%rax
movsbl -0x820(%rbp,%rax,1),%eax
ff
cmp    $0x2e,%eax
jne    142a <main+0x26a>
movslq -0xc34(%rbp),%rax
movb   $0x5f,-0x820(%rbp,%rax,1)
5f
jmp    144e <main+0x28e>
movslq -0xc34(%rbp),%rax
movsbl -0x820(%rbp,%rax,1),%edi
ff
call   1050 <toupper@plt>
mov    %al,%cl
movslq -0xc34(%rbp),%rax
mov    %cl,-0x820(%rbp,%rax,1)
jmp    1453 <main+0x293>
mov    -0xc34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc34(%rbp)
jmp    1351 <main+0x191>
lea    -0x420(%rbp),%rdi
mov    -0xc30(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x420(%rbp),%rdi
mov    $0x2e,%esi
call   1080 <strrchr@plt>
mov    %rax,-0xc28(%rbp)
cmpq   $0x0,-0xc28(%rbp)
je     14aa <main+0x2ea>
mov    -0xc28(%rbp),%rax
movb   $0x0,(%rax)
movsbl -0x420(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     151a <main+0x35a>
lea    -0x420(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,-0x1460(%rbp)
cmpl   $0x0,-0x1460(%rbp)
jl     1513 <main+0x353>
movslq -0x1460(%rbp),%rax
mov    -0x420(%rbp,%rax,1),%cl
mov    -0x1460(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cl,-0x420(%rbp,%rax,1)
mov    -0x1460(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1460(%rbp)
jmp    14d2 <main+0x312>
movb   $0x5f,-0x420(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x820(%rbp),%rdx
lea    -0x820(%rbp),%rcx
lea    -0x420(%rbp),%r8
lea    0xace(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
movabs $0xff000000,%rax
and    -0x1458(%rbp),%rax
mov    %eax,%edx
sar    $0x18,%edx
mov    -0x1458(%rbp),%rax
and    $0xff0000,%rax
mov    %eax,%ecx
sar    $0x10,%ecx
mov    -0x1458(%rbp),%rax
and    $0xff00,%rax
mov    %eax,%r8d
sar    $0x8,%r8d
mov    -0x1458(%rbp),%rax
and    $0xff,%rax
mov    %eax,%r9d
lea    0xaa7(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
cmpq   $0x0,-0x1458(%rbp)
jle    1713 <main+0x553>
lea    -0x1040(%rbp),%rdi
lea    0xaa7(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
movl   $0x0,-0xc34(%rbp)
mov    -0xc34(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc38(%rbp),%ecx
mov    %al,-0x1465(%rbp)
jge    15f7 <main+0x437>
cmpq   $0x0,-0x1458(%rbp)
setg   %al
mov    %al,-0x1465(%rbp)
mov    -0x1465(%rbp),%al
test   $0x1,%al
jne    160a <main+0x44a>
jmp    16b1 <main+0x4f1>
cmpl   $0x0,-0xc34(%rbp)
jne    164a <main+0x48a>
lea    -0x1440(%rbp),%rax
mov    %rax,-0x1470(%rbp)
mov    -0x18(%rbp),%rdi
call   1090 <fgetc@plt>
mov    -0x1470(%rbp),%rdi
mov    %eax,%edx
lea    0xa28(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
jmp    1678 <main+0x4b8>
lea    -0x1440(%rbp),%rax
mov    %rax,-0x1478(%rbp)
mov    -0x18(%rbp),%rdi
call   1090 <fgetc@plt>
mov    -0x1478(%rbp),%rdi
mov    %eax,%edx
lea    0x9f3(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
lea    -0x1040(%rbp),%rdi
lea    -0x1440(%rbp),%rsi
call   10d0 <strcat@plt>
mov    -0x1458(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x1458(%rbp)
mov    -0xc34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc34(%rbp)
jmp    15cc <main+0x40c>
cmpq   $0x0,-0x1458(%rbp)
jle    16d9 <main+0x519>
lea    -0x1440(%rbp),%rdi
lea    0x991(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
jmp    16ee <main+0x52e>
lea    -0x1440(%rbp),%rdi
lea    0x979(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
mov    -0x20(%rbp),%rdi
lea    -0x1040(%rbp),%rdx
lea    -0x1440(%rbp),%rcx
lea    0x966(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    159f <main+0x3df>
mov    -0x20(%rbp),%rdi
lea    0x954(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    11f8 <main+0x38>
mov    -0x4(%rbp),%eax
add    $0x1480,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1438,%rsp
mov    %rsi,0x10(%rsp)
mov    $0x1,%eax
cmp    $0x2,%edi
jl     160c <main+0x43c>
mov    %edi,%eax
lea    0x30(%rsp),%r13
lea    0x830(%rsp),%r14
jmp    1252 <main+0x82>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xb,%esi
mov    $0x1,%edx
lea    0xe4f(%rip),%rdi
mov    0x8(%rsp),%rbx
mov    %rbx,%rcx
call   10f0 <fwrite@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    0x18(%rsp),%r15
mov    %r12,%rdi
call   1060 <fclose@plt>
cmpq   $0x2,0x20(%rsp)
mov    %r15,%rax
jle    160a <main+0x43a>
mov    %rax,0x20(%rsp)
lea    -0x1(%rax),%r15
mov    %r15d,%ebx
mov    0x10(%rsp),%rax
mov    (%rax,%rbx,8),%rdi
lea    0xd92(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1243 <main+0x73>
mov    %rax,%r12
mov    0x10(%rsp),%rbp
mov    0x0(%rbp,%rbx,8),%rdi
lea    0x28(%rsp),%rsi
call   10b0 <stat@plt>
mov    0x28(%rsp),%rax
mov    %rax,(%rsp)
mov    0x0(%rbp,%rbx,8),%rsi
lea    0x1030(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1080 <strrchr@plt>
test   %rax,%rax
je     12c2 <main+0xf2>
movb   $0x5f,(%rax)
lea    0x1030(%rsp),%rbx
mov    %rbx,%rdi
lea    0xd2f(%rip),%rsi
call   10d0 <strcat@plt>
mov    %rbx,%rdi
lea    0xd23(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     123b <main+0x6b>
mov    %r15,0x18(%rsp)
lea    0x1030(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1080 <strrchr@plt>
lea    0x1(%rax),%rbp
test   %rax,%rax
cmove  %rbx,%rbp
mov    %r13,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    %r13,%rdi
call   1070 <strlen@plt>
test   %eax,%eax
jle    13f0 <main+0x220>
xor    %r15d,%r15d
jmp    135c <main+0x18c>
nopl   0x0(%rax,%rax,1)
mov    %al,0x30(%rsp,%r15,1)
add    $0x1,%r15
mov    %r13,%rdi
call   1070 <strlen@plt>
cltq
cmp    %rax,%r15
jge    13f0 <main+0x220>
test   %r15,%r15
jne    13c7 <main+0x1f7>
movsbl 0x30(%rsp),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     13c7 <main+0x1f7>
mov    %r13,%rdi
call   1070 <strlen@plt>
test   %eax,%eax
js     13c2 <main+0x1f2>
mov    %eax,%ecx
lea    0x1(%rax),%edx
and    $0x3,%rdx
je     13a3 <main+0x1d3>
nopw   0x0(%rax,%rax,1)
movzbl 0x30(%rsp,%rcx,1),%ebx
mov    %bl,0x31(%rsp,%rcx,1)
add    $0xffffffffffffffff,%rcx
add    $0xffffffffffffffff,%rdx
jne    1390 <main+0x1c0>
cmp    $0x3,%eax
jb     13c2 <main+0x1f2>
nopl   0x0(%rax,%rax,1)
mov    0x2d(%rsp,%rcx,1),%eax
mov    %eax,0x2e(%rsp,%rcx,1)
add    $0xfffffffffffffffc,%rcx
cmp    $0xffffffffffffffff,%rcx
jne    13b0 <main+0x1e0>
movb   $0x5f,0x30(%rsp)
mov    0x30(%rsp,%r15,1),%cl
mov    $0x5f,%al
cmp    $0x2e,%cl
je     1340 <main+0x170>
movsbl %cl,%edi
call   1050 <toupper@plt>
jmp    1340 <main+0x170>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x430(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1080 <strrchr@plt>
test   %rax,%rax
je     1418 <main+0x248>
movb   $0x0,(%rax)
movsbl 0x430(%rsp),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
lea    0xc30(%rsp),%r15
mov    (%rsp),%rbx
je     14b0 <main+0x2e0>
lea    0x430(%rsp),%rdi
call   1070 <strlen@plt>
test   %eax,%eax
js     14a8 <main+0x2d8>
mov    %eax,%ecx
lea    0x1(%rax),%edx
and    $0x3,%rdx
je     1479 <main+0x2a9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x430(%rsp,%rcx,1),%ebx
mov    %bl,0x431(%rsp,%rcx,1)
add    $0xffffffffffffffff,%rcx
add    $0xffffffffffffffff,%rdx
jne    1460 <main+0x290>
cmp    $0x3,%eax
mov    (%rsp),%rbx
jb     14a8 <main+0x2d8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x42d(%rsp,%rcx,1),%eax
mov    %eax,0x42e(%rsp,%rcx,1)
add    $0xfffffffffffffffc,%rcx
cmp    $0xffffffffffffffff,%rcx
jne    1490 <main+0x2c0>
movb   $0x5f,0x430(%rsp)
5f
mov    0x8(%rsp),%rbp
mov    %rbp,%rdi
lea    0xb49(%rip),%rsi
mov    %r13,%rdx
mov    %r13,%rcx
lea    0x430(%rsp),%r8
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %ebx,%edx
sar    $0x18,%edx
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%ecx
movzbl %bh,%eax
movzbl %bl,%r9d
mov    %rbp,%rdi
lea    0xb4d(%rip),%rsi
mov    %eax,%r8d
xor    %eax,%eax
call   10a0 <fprintf@plt>
test   %rbx,%rbx
jg     1556 <main+0x386>
jmp    1210 <main+0x40>
cs nopw 0x0(%rax,%rax,1)
mov    $0x1,%ebp
xor    %r15d,%r15d
movw   $0xa,0x830(%rsp)
mov    0x8(%rsp),%rdi
lea    0xb3d(%rip),%rsi
lea    0xc30(%rsp),%rbx
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   10a0 <fprintf@plt>
cmp    $0x1,%rbp
mov    %r15,%rax
mov    %rbx,%r15
mov    %rax,%rbx
jle    1210 <main+0x40>
movw   $0x9,0xc30(%rsp)
mov    %r12,%rdi
call   1090 <fgetc@plt>
mov    %r14,%rdi
lea    0xaf2(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   10e0 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   10d0 <strcat@plt>
cmp    $0x1,%rbx
je     1510 <main+0x340>
mov    %rbx,(%rsp)
add    $0xfffffffffffffffe,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %rbp,%r13
add    $0x1,%rbp
mov    %r12,%rdi
call   1090 <fgetc@plt>
mov    %r14,%rdi
lea    0xaa9(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   10e0 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   10d0 <strcat@plt>
cmp    $0xe,%ebp
ja     15d7 <main+0x407>
cmp    %r13,%rbx
jne    15a0 <main+0x3d0>
mov    (%rsp),%rax
sub    %rbp,%rax
mov    %rax,%rbp
lea    -0x1(%rax),%r15
cmp    %r13,%rbx
je     1600 <main+0x430>
movl   $0xa202c,0x830(%rsp)
lea    0x30(%rsp),%r13
jmp    1522 <main+0x352>
nop
lea    0x30(%rsp),%r13
jmp    1518 <main+0x348>
xor    %eax,%eax
add    $0x1438,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
@.str = [3 x i8] c"rb\00"
@.str.1 = [3 x i8] c".h\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [55 x i8] c"#ifndef %s\0A#define %s\0A\0Astatic unsigned char %s[] = \0A{\0A\00"
@.str.4 = [35 x i8] c"\090x%02x, 0x%02x, 0x%02x, 0x%02x, \0A\00"
@.str.5 = [2 x i8] c"\09\00"
@.str.6 = [7 x i8] c"0x%02x\00"
@.str.7 = [9 x i8] c", 0x%02x\00"
@.str.8 = [4 x i8] c", \0A\00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [5 x i8] c"%s%s\00"
@.str.11 = [12 x i8] c"};\0A\0A#endif\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 [1024 x i8]
%9 = alloca [1024 x i8]
%10 = alloca [1024 x i8]
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca [1024 x i8]
%16 = alloca [1024 x i8]
%17 = alloca i8
%18 = alloca %struct.stat
%19 = alloca i64
%20 = alloca i32
%21 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%22 = load i32, i32* %4
%23 = icmp slt i32 %22, 2
br i1 %23, label %24, label %25
24: ; preds = %2
store i32 1, i32* %3
br label %265
25: ; preds = %2
%26 = load i32, i32* %4
%27 = add nsw i32 %26, -1
store i32 %27, i32* %4
br label %28
28: ; preds = %262, %25
%29 = load i32, i32* %4
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %265
31: ; preds = %28
store i32 16, i32* %14
%32 = load i8**, i8*** %5
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
%36 = load i8*, i8** %35
%37 = call i32* @fopen(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %37, i32** %6
%38 = load i32*, i32** %6
%39 = icmp ne i32* %38, null
br i1 %39, label %41, label %40
40: ; preds = %31
br label %262
41: ; preds = %31
%42 = load i8**, i8*** %5
%43 = load i32, i32* %4
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8*, i8** %42, i64 %44
%46 = load i8*, i8** %45
%47 = call i32 @stat(i8* %46, %struct.stat* %18)
%48 = getelementptr inbounds %struct.stat, %struct.stat* %18, i32 0, i32 0
%49 = load i64, i64* %48
store i64 %49, i64* %19
%50 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%51 = load i8**, i8*** %5
%52 = load i32, i32* %4
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8*, i8** %51, i64 %53
%55 = load i8*, i8** %54
%56 = call i32 @strcpy(i8* %50, i8* %55)
%57 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%58 = call i8* @strrchr(i8* %57, i8 signext 46)
store i8* %58, i8** %11
%59 = load i8*, i8** %11
%60 = icmp ne i8* %59, null
br i1 %60, label %61, label %63
61: ; preds = %41
%62 = load i8*, i8** %11
store i8 95, i8* %62
br label %63
63: ; preds = %61, %41
%64 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%65 = call i32 @strcat(i8* %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%66 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%67 = call i32* @fopen(i8* %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %67, i32** %7
%68 = load i32*, i32** %7
%69 = icmp ne i32* %68, null
br i1 %69, label %73, label %70
70: ; preds = %63
%71 = load i32*, i32** %6
%72 = call i32 @fclose(i32* %71)
br label %262
73: ; preds = %63
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%75 = call i8* @strrchr(i8* %74, i8 signext 47)
store i8* %75, i8** %12
%76 = load i8*, i8** %12
%77 = icmp ne i8* %76, null
br i1 %77, label %80, label %78
78: ; preds = %73
%79 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
store i8* %79, i8** %12
br label %83
80: ; preds = %73
%81 = load i8*, i8** %12
%82 = getelementptr inbounds i8, i8* %81, i32 1
store i8* %82, i8** %12
br label %83
83: ; preds = %80, %78
%84 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%85 = load i8*, i8** %12
%86 = call i32 @strcpy(i8* %84, i8* %85)
store i32 0, i32* %13
br label %87
87: ; preds = %143, %83
%88 = load i32, i32* %13
%89 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%90 = call i32 @strlen(i8* %89)
%91 = icmp slt i32 %88, %90
br i1 %91, label %92, label %146
92: ; preds = %87
%93 = load i32, i32* %13
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %122
95: ; preds = %92
%96 = load i32, i32* %13
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 %97
%99 = load i8, i8* %98
%100 = call i64 @isdigit(i8 signext %99)
%101 = icmp ne i64 %100, 0
br i1 %101, label %102, label %122
102: ; preds = %95
%103 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%104 = call i32 @strlen(i8* %103)
store i32 %104, i32* %20
br label %105
105: ; preds = %117, %102
%106 = load i32, i32* %20
%107 = icmp sge i32 %106, 0
br i1 %107, label %108, label %120
108: ; preds = %105
%109 = load i32, i32* %20
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 %110
%112 = load i8, i8* %111
%113 = load i32, i32* %20
%114 = add nsw i32 %113, 1
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 %115
store i8 %112, i8* %116
br label %117
117: ; preds = %108
%118 = load i32, i32* %20
%119 = add nsw i32 %118, -1
store i32 %119, i32* %20
br label %105
120: ; preds = %105
%121 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
store i8 95, i8* %121
br label %122
122: ; preds = %120, %95, %92
%123 = load i32, i32* %13
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 %124
%126 = load i8, i8* %125
%127 = sext i8 %126 to i32
%128 = icmp eq i32 %127, 46
br i1 %128, label %129, label %133
129: ; preds = %122
%130 = load i32, i32* %13
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 %131
store i8 95, i8* %132
br label %142
133: ; preds = %122
%134 = load i32, i32* %13
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 %135
%137 = load i8, i8* %136
%138 = call signext i8 @toupper(i8 signext %137)
%139 = load i32, i32* %13
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 %140
store i8 %138, i8* %141
br label %142
142: ; preds = %133, %129
br label %143
143: ; preds = %142
%144 = load i32, i32* %13
%145 = add nsw i32 %144, 1
store i32 %145, i32* %13
br label %87
146: ; preds = %87
%147 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%148 = load i8*, i8** %12
%149 = call i32 @strcpy(i8* %147, i8* %148)
%150 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%151 = call i8* @strrchr(i8* %150, i8 signext 46)
store i8* %151, i8** %11
%152 = load i8*, i8** %11
%153 = icmp ne i8* %152, null
br i1 %153, label %154, label %156
154: ; preds = %146
%155 = load i8*, i8** %11
store i8 0, i8* %155
br label %156
156: ; preds = %154, %146
%157 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%158 = load i8, i8* %157
%159 = call i64 @isdigit(i8 signext %158)
%160 = icmp ne i64 %159, 0
br i1 %160, label %161, label %181
161: ; preds = %156
%162 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%163 = call i32 @strlen(i8* %162)
store i32 %163, i32* %21
br label %164
164: ; preds = %176, %161
%165 = load i32, i32* %21
%166 = icmp sge i32 %165, 0
br i1 %166, label %167, label %179
167: ; preds = %164
%168 = load i32, i32* %21
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %169
%171 = load i8, i8* %170
%172 = load i32, i32* %21
%173 = add nsw i32 %172, 1
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %174
store i8 %171, i8* %175
br label %176
176: ; preds = %167
%177 = load i32, i32* %21
%178 = add nsw i32 %177, -1
store i32 %178, i32* %21
br label %164
179: ; preds = %164
%180 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
store i8 95, i8* %180
br label %181
181: ; preds = %179, %156
%182 = load i32*, i32** %7
%183 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%184 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%185 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%186 = call i32 (i32*, i8*, ...) @fprintf(i32* %182, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i8* %183, i8* %184, i8* %185)
%187 = load i32*, i32** %7
%188 = load i64, i64* %19
%189 = and i64 %188, 4278190080
%190 = trunc i64 %189 to i32
%191 = ashr i32 %190, 24
%192 = load i64, i64* %19
%193 = and i64 %192, 16711680
%194 = trunc i64 %193 to i32
%195 = ashr i32 %194, 16
%196 = load i64, i64* %19
%197 = and i64 %196, 65280
%198 = trunc i64 %197 to i32
%199 = ashr i32 %198, 8
%200 = load i64, i64* %19
%201 = and i64 %200, 255
%202 = trunc i64 %201 to i32
%203 = call i32 (i32*, i8*, ...) @fprintf(i32* %187, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %191, i32 %195, i32 %199, i32 %202)
br label %204
204: ; preds = %250, %181
%205 = load i64, i64* %19
%206 = icmp sgt i64 %205, 0
br i1 %206, label %207, label %255
207: ; preds = %204
%208 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%209 = call i32 (i8*, i8*, ...) @sprintf(i8* %208, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %13
br label %210
210: ; preds = %238, %207
%211 = load i32, i32* %13
%212 = load i32, i32* %14
%213 = icmp slt i32 %211, %212
br i1 %213, label %214, label %217
214: ; preds = %210
%215 = load i64, i64* %19
%216 = icmp sgt i64 %215, 0
br label %217
217: ; preds = %214, %210
%218 = phi i1 [ false, %210 ], [ %216, %214 ]
br i1 %218, label %219, label %241
219: ; preds = %217
%220 = load i32, i32* %13
%221 = icmp eq i32 %220, 0
br i1 %221, label %222, label %227
222: ; preds = %219
%223 = getelementptr inbounds [1024 x i8], [1024 x i8]* %16, i64 0, i64 0
%224 = load i32*, i32** %6
%225 = call i32 @fgetc(i32* %224)
%226 = call i32 (i8*, i8*, ...) @sprintf(i8* %223, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %225)
br label %232
227: ; preds = %219
%228 = getelementptr inbounds [1024 x i8], [1024 x i8]* %16, i64 0, i64 0
%229 = load i32*, i32** %6
%230 = call i32 @fgetc(i32* %229)
%231 = call i32 (i8*, i8*, ...) @sprintf(i8* %228, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %230)
br label %232
232: ; preds = %227, %222
%233 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%234 = getelementptr inbounds [1024 x i8], [1024 x i8]* %16, i64 0, i64 0
%235 = call i32 @strcat(i8* %233, i8* %234)
%236 = load i64, i64* %19
%237 = add nsw i64 %236, -1
store i64 %237, i64* %19
br label %238
238: ; preds = %232
%239 = load i32, i32* %13
%240 = add nsw i32 %239, 1
store i32 %240, i32* %13
br label %210
241: ; preds = %217
%242 = load i64, i64* %19
%243 = icmp sgt i64 %242, 0
br i1 %243, label %244, label %247
244: ; preds = %241
%245 = getelementptr inbounds [1024 x i8], [1024 x i8]* %16, i64 0, i64 0
%246 = call i32 (i8*, i8*, ...) @sprintf(i8* %245, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
br label %250
247: ; preds = %241
%248 = getelementptr inbounds [1024 x i8], [1024 x i8]* %16, i64 0, i64 0
%249 = call i32 (i8*, i8*, ...) @sprintf(i8* %248, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %250
250: ; preds = %247, %244
%251 = load i32*, i32** %7
%252 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%253 = getelementptr inbounds [1024 x i8], [1024 x i8]* %16, i64 0, i64 0
%254 = call i32 (i32*, i8*, ...) @fprintf(i32* %251, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* %252, i8* %253)
br label %204
255: ; preds = %204
%256 = load i32*, i32** %7
%257 = call i32 (i32*, i8*, ...) @fprintf(i32* %256, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%258 = load i32*, i32** %7
%259 = call i32 @fclose(i32* %258)
%260 = load i32*, i32** %6
%261 = call i32 @fclose(i32* %260)
br label %262
262: ; preds = %255, %70, %40
%263 = load i32, i32* %4
%264 = add nsw i32 %263, -1
store i32 %264, i32* %4
br label %28
265: ; preds = %24, %28
%266 = load i32, i32* %3
ret i32 %266
}

LLVM IR (-O2):
%struct.stat = type { i64 }
@.str = [3 x i8] c"rb\00"
@.str.1 = [3 x i8] c".h\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [55 x i8] c"#ifndef %s\0A#define %s\0A\0Astatic unsigned char %s[] = \0A{\0A\00"
@.str.4 = [35 x i8] c"\090x%02x, 0x%02x, 0x%02x, 0x%02x, \0A\00"
@.str.6 = [7 x i8] c"0x%02x\00"
@.str.7 = [9 x i8] c", 0x%02x\00"
@.str.10 = [5 x i8] c"%s%s\00"
@.str.11 = [12 x i8] c"};\0A\0A#endif\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = alloca [1024 x i8]
%6 = alloca [1024 x i8]
%7 = alloca [1024 x i8]
%8 = alloca %struct.stat
%9 = icmp slt i32 %0, 2
br i1 %9, label %209, label %10
10: ; preds = %2
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%16 = bitcast %struct.stat* %8 to i8*
%17 = getelementptr inbounds %struct.stat, %struct.stat* %8, i64 0, i32 0
%18 = bitcast [1024 x i8]* %6 to i16*
%19 = bitcast [1024 x i8]* %7 to i16*
%20 = bitcast [1024 x i8]* %7 to i32*
%21 = zext i32 %0 to i64
br label %22
22: ; preds = %10, %207
%23 = phi i64 [ %21, %10 ], [ %24, %207 ]
%24 = add nsw i64 %23, -1
%25 = and i64 %24, 4294967295
%26 = getelementptr inbounds i8*, i8** %1, i64 %25
%27 = load i8*, i8** %26
%28 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%29 = icmp eq i32* %28, null
br i1 %29, label %207, label %30
30: ; preds = %22
%31 = load i8*, i8** %26
%32 = call i32 @stat(i8* %31, %struct.stat* %8)
%33 = load i64, i64* %17
%34 = load i8*, i8** %26
%35 = call i32 @strcpy(i8* %13, i8* %34)
%36 = call i8* @strrchr(i8* %13, i8 signext 46)
%37 = icmp eq i8* %36, null
br i1 %37, label %39, label %38
38: ; preds = %30
store i8 95, i8* %36
br label %39
39: ; preds = %38, %30
%40 = call i32 @strcat(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%41 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%42 = icmp eq i32* %41, null
br i1 %42, label %205, label %43
43: ; preds = %39
%44 = call i8* @strrchr(i8* %13, i8 signext 47)
%45 = icmp eq i8* %44, null
%46 = getelementptr inbounds i8, i8* %44, i64 1
%47 = select i1 %45, i8* %13, i8* %46
%48 = call i32 @strcpy(i8* %12, i8* %47)
%49 = call i32 @strlen(i8* %12)
%50 = icmp sgt i32 %49, 0
br i1 %50, label %51, label %112
51: ; preds = %43, %106
%52 = phi i64 [ %108, %106 ], [ 0, %43 ]
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %100
54: ; preds = %51
%55 = load i8, i8* %12
%56 = call i64 @isdigit(i8 signext %55)
%57 = icmp eq i64 %56, 0
br i1 %57, label %100, label %58
58: ; preds = %54
%59 = call i32 @strlen(i8* %12)
%60 = icmp sgt i32 %59, -1
br i1 %60, label %61, label %99
61: ; preds = %58
%62 = zext i32 %59 to i64
%63 = add nuw nsw i64 %62, 1
%64 = and i64 %63, 3
%65 = icmp eq i64 %64, 0
br i1 %65, label %76, label %66
66: ; preds = %61, %66
%67 = phi i64 [ %73, %66 ], [ %62, %61 ]
%68 = phi i64 [ %74, %66 ], [ 0, %61 ]
%69 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %67
%70 = load i8, i8* %69
%71 = add nuw nsw i64 %67, 1
%72 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %71
store i8 %70, i8* %72
%73 = add nsw i64 %67, -1
%74 = add i64 %68, 1
%75 = icmp eq i64 %74, %64
br i1 %75, label %76, label %66
76: ; preds = %66, %61
%77 = phi i64 [ %62, %61 ], [ %73, %66 ]
%78 = icmp ult i32 %59, 3
br i1 %78, label %99, label %79
79: ; preds = %76, %79
%80 = phi i64 [ %97, %79 ], [ %77, %76 ]
%81 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %80
%82 = load i8, i8* %81
%83 = add nuw nsw i64 %80, 1
%84 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %83
store i8 %82, i8* %84
%85 = add nsw i64 %80, -1
%86 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %85
%87 = load i8, i8* %86
%88 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %80
store i8 %87, i8* %88
%89 = add nsw i64 %80, -2
%90 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %89
%91 = load i8, i8* %90
%92 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %85
store i8 %91, i8* %92
%93 = add nsw i64 %80, -3
%94 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %93
%95 = load i8, i8* %94
%96 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %89
store i8 %95, i8* %96
%97 = add nsw i64 %80, -4
%98 = icmp eq i64 %93, 0
br i1 %98, label %99, label %79
99: ; preds = %76, %79, %58
store i8 95, i8* %12
br label %100
100: ; preds = %99, %54, %51
%101 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %52
%102 = load i8, i8* %101
%103 = icmp eq i8 %102, 46
br i1 %103, label %106, label %104
104: ; preds = %100
%105 = call signext i8 @toupper(i8 signext %102)
br label %106
106: ; preds = %100, %104
%107 = phi i8 [ %105, %104 ], [ 95, %100 ]
store i8 %107, i8* %101
%108 = add nuw nsw i64 %52, 1
%109 = call i32 @strlen(i8* %12)
%110 = sext i32 %109 to i64
%111 = icmp slt i64 %108, %110
br i1 %111, label %51, label %112
112: ; preds = %106, %43
%113 = call i32 @strcpy(i8* %11, i8* %47)
%114 = call i8* @strrchr(i8* %11, i8 signext 46)
%115 = icmp eq i8* %114, null
br i1 %115, label %117, label %116
116: ; preds = %112
store i8 0, i8* %114
br label %117
117: ; preds = %116, %112
%118 = load i8, i8* %11
%119 = call i64 @isdigit(i8 signext %118)
%120 = icmp eq i64 %119, 0
br i1 %120, label %163, label %121
121: ; preds = %117
%122 = call i32 @strlen(i8* %11)
%123 = icmp sgt i32 %122, -1
br i1 %123, label %124, label %162
124: ; preds = %121
%125 = zext i32 %122 to i64
%126 = add nuw nsw i64 %125, 1
%127 = and i64 %126, 3
%128 = icmp eq i64 %127, 0
br i1 %128, label %139, label %129
129: ; preds = %124, %129
%130 = phi i64 [ %136, %129 ], [ %125, %124 ]
%131 = phi i64 [ %137, %129 ], [ 0, %124 ]
%132 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %130
%133 = load i8, i8* %132
%134 = add nuw nsw i64 %130, 1
%135 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %134
store i8 %133, i8* %135
%136 = add nsw i64 %130, -1
%137 = add i64 %131, 1
%138 = icmp eq i64 %137, %127
br i1 %138, label %139, label %129
139: ; preds = %129, %124
%140 = phi i64 [ %125, %124 ], [ %136, %129 ]
%141 = icmp ult i32 %122, 3
br i1 %141, label %162, label %142
142: ; preds = %139, %142
%143 = phi i64 [ %160, %142 ], [ %140, %139 ]
%144 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %143
%145 = load i8, i8* %144
%146 = add nuw nsw i64 %143, 1
%147 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %146
store i8 %145, i8* %147
%148 = add nsw i64 %143, -1
%149 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %148
%150 = load i8, i8* %149
%151 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %143
store i8 %150, i8* %151
%152 = add nsw i64 %143, -2
%153 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %152
%154 = load i8, i8* %153
%155 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %148
store i8 %154, i8* %155
%156 = add nsw i64 %143, -3
%157 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %156
%158 = load i8, i8* %157
%159 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %152
store i8 %158, i8* %159
%160 = add nsw i64 %143, -4
%161 = icmp eq i64 %156, 0
br i1 %161, label %162, label %142
162: ; preds = %139, %142, %121
store i8 95, i8* %11
br label %163
163: ; preds = %162, %117
%164 = call i32 (i32*, i8*, ...) @fprintf(i32* %41, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i8* %12, i8* %12, i8* %11)
%165 = trunc i64 %33 to i32
%166 = ashr i32 %165, 24
%167 = lshr i32 %165, 16
%168 = and i32 %167, 255
%169 = lshr i32 %165, 8
%170 = and i32 %169, 255
%171 = and i32 %165, 255
%172 = call i32 (i32*, i8*, ...) @fprintf(i32* %41, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %166, i32 %168, i32 %170, i32 %171)
%173 = icmp sgt i64 %33, 0
br i1 %173, label %174, label %202
174: ; preds = %163, %197
%175 = phi i64 [ %199, %197 ], [ %33, %163 ]
store i16 9, i16* %18
%176 = call i32 @fgetc(i32* %28)
%177 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %176)
%178 = call i32 @strcat(i8* %14, i8* %15)
%179 = add nsw i64 %175, -1
%180 = icmp eq i64 %179, 0
br i1 %180, label %194, label %181
181: ; preds = %174, %181
%182 = phi i64 [ %187, %181 ], [ %179, %174 ]
%183 = phi i32 [ %188, %181 ], [ 1, %174 ]
%184 = call i32 @fgetc(i32* %28)
%185 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %184)
%186 = call i32 @strcat(i8* %14, i8* %15)
%187 = add nsw i64 %182, -1
%188 = add nuw nsw i32 %183, 1
%189 = icmp ult i32 %183, 15
%190 = icmp ne i64 %187, 0
%191 = select i1 %189, i1 %190, i1 false
br i1 %191, label %181, label %192
192: ; preds = %181
br i1 %190, label %193, label %194
193: ; preds = %192
store i32 663596, i32* %20
br label %197
194: ; preds = %174, %192
%195 = phi i64 [ %182, %192 ], [ 1, %174 ]
%196 = phi i64 [ %187, %192 ], [ 0, %174 ]
store i16 10, i16* %19
br label %197
197: ; preds = %194, %193
%198 = phi i64 [ %195, %194 ], [ %182, %193 ]
%199 = phi i64 [ %196, %194 ], [ %187, %193 ]
%200 = call i32 (i32*, i8*, ...) @fprintf(i32* %41, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* %14, i8* %15)
%201 = icmp sgt i64 %198, 1
br i1 %201, label %174, label %202
202: ; preds = %197, %163
%203 = call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i64 11, i64 1, i32* %41)
%204 = call i32 @fclose(i32* %41)
br label %205
205: ; preds = %39, %202
%206 = call i32 @fclose(i32* %28)
br label %207
207: ; preds = %205, %22
%208 = icmp sgt i64 %23, 2
br i1 %208, label %22, label %209
209: ; preds = %207, %2
%210 = phi i32 [ 1, %2 ], [ 0, %207 ]
ret i32 %210
}