#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*/ out_filename_h;
typedef int /*<<< orphan*/ in_filename_symbol;
typedef int /*<<< orphan*/ in_filename;
typedef int /*<<< orphan*/ data;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
size_t fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ isalnum(char);
int /*<<< orphan*/ show_usage(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
char *strerror(int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
void *strrchr(char *, char);
int main(int argc, char *argv[]) {
  if (argc < 3) {
    show_usage(argv[0]);
    return EXIT_FAILURE;
  }
  FILE *f_in = fopen(argv[1], "rb");
  if (!f_in) {
    fprintf(stderr, "Error: Could not open input file '%s'. Error %d: %s.\n",
            argv[1], errno, strerror(errno));
    return EXIT_FAILURE;
  }
  char in_filename[1024];
  const char *slash = strrchr(argv[1], '/');
  if (!slash) {
    do {
      strncpy(in_filename, argv[1], sizeof(in_filename));
      in_filename[sizeof(in_filename) - 1] = 0x00;
    } while (0);
  } else {
    do {
      strncpy(in_filename, slash + 1, sizeof(in_filename));
      in_filename[sizeof(in_filename) - 1] = 0x00;
    } while (0);
  }
  char in_filename_symbol[1024];
  do {
    strncpy(in_filename_symbol, in_filename, sizeof(in_filename_symbol));
    in_filename_symbol[sizeof(in_filename_symbol) - 1] = 0x00;
  } while (0);
  char *n;
  for (n = &in_filename_symbol[0]; *n != 0x00; n++) {
    if (!isalnum(*n))
      *n = '_';
  }
  const char *out_filename_c = argv[2];
  char out_filename_h[1024 + 16];
  do {
    strncpy(out_filename_h, out_filename_c, sizeof(out_filename_h));
    out_filename_h[sizeof(out_filename_h) - 1] = 0x00;
  } while (0);
  char *h_extpos = strrchr(out_filename_h, '.');
  const char *h_slashpos = strrchr(out_filename_h, '/');
  if (h_extpos && (!h_slashpos || (h_slashpos < h_extpos))) {
    *h_extpos = 0x00;
  }
  strcat(out_filename_h, ".h");
  FILE *f_out_c = fopen(out_filename_c, "wb");
  if (!f_out_c) {
    fprintf(stderr, "Error: Could not open C output file '%s'. Error %d: %s.\n",
            out_filename_c, errno, strerror(errno));
    fclose(f_in);
    return EXIT_FAILURE;
  }
  FILE *f_out_h = fopen(out_filename_h, "wb");
  if (!f_out_h) {
    fprintf(stderr, "Error: Could not open H output file '%s'. Error %d: %s.\n",
            out_filename_h, errno, strerror(errno));
    fclose(f_in);
    fclose(f_out_c);
    return EXIT_FAILURE;
  }
  fseek(f_in, 0, SEEK_END);
  long in_fsize = ftell(f_in);
  fseek(f_in, 0, SEEK_SET);
  fprintf(f_out_c,
          "/**\n"
          " * This file was generated using the C Binary Object Builder v"
          "0"
          "."
          "1"
          "."
          "1"
          ".\n"
          " * CBOB Source Code File.\n"
          " *\n"
          " * Source file: %s\n"
          " */\n\n",
          in_filename);
  fprintf(f_out_c, "const unsigned char cbob_%s[%ld] =\n{\n",
          in_filename_symbol, in_fsize);
  unsigned char data[16];
  int write_fsize;
  for (write_fsize = in_fsize; write_fsize > 0; write_fsize -= 16) {
    size_t sz = fread(data, sizeof(data[0]), sizeof(data), f_in);
    if (sz == 0)
      break;
    fprintf(f_out_c, "\t");
    unsigned char *dataptr = &data[0];
    for (; sz != 0; sz--) {
      fprintf(f_out_c, "0x%02X", *dataptr++);
      if (sz == 1) {
        if (write_fsize > 16)
          fprintf(f_out_c, ",");
        fprintf(f_out_c, "\n");
      } else {
        fprintf(f_out_c, ", ");
      }
    }
  }
  fprintf(f_out_c, "};\n");
  fclose(f_out_c);
  fclose(f_in);
  fprintf(f_out_h,
          "/**\n"
          " * This file was generated using the C Binary Object Builder v"
          "0"
          "."
          "1"
          "."
          "1"
          ".\n"
          " * CBOB Header File.\n"
          " *\n"
          " * Source file: %s\n"
          " */\n\n",
          in_filename);
  fprintf(f_out_h,
          "#ifdef __cplusplus\n"
          "extern \"C\" {\n"
          "#endif\n\n"
          "extern const unsigned char cbob_%s[%ld];\n\n"
          "#ifdef __cplusplus\n"
          "}\n"
          "#endif\n",
          in_filename_symbol, in_fsize);
  fclose(f_out_h);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xcf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1200 <main+0x40>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <show_usage@plt>
mov    0x2dca(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    17c6 <main+0x606>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf1(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1296 <main+0xd6>
mov    0x2dae(%rip),%rax
movslq (%rax),%rax
mov    %rax,-0xcc0(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0xcb8(%rbp)
mov    0x2d86(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xcac(%rbp)
mov    0x2d77(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xcc0(%rbp),%rdi
mov    -0xcb8(%rbp),%rdx
mov    -0xcac(%rbp),%ecx
mov    %rax,%r8
lea    0xd85(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2d34(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    17c6 <main+0x606>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x428(%rbp)
cmpq   $0x0,-0x428(%rbp)
jne    12e4 <main+0x124>
jmp    12c2 <main+0x102>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    $0x400,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x21(%rbp)
jmp    130e <main+0x14e>
jmp    12e9 <main+0x129>
lea    -0x420(%rbp),%rdi
mov    -0x428(%rbp),%rsi
add    $0x1,%rsi
mov    $0x400,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x21(%rbp)
jmp    130e <main+0x14e>
jmp    1313 <main+0x153>
lea    -0x830(%rbp),%rdi
lea    -0x420(%rbp),%rsi
mov    $0x400,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x431(%rbp)
lea    -0x830(%rbp),%rax
mov    %rax,-0x838(%rbp)
mov    -0x838(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1391 <main+0x1d1>
mov    -0x838(%rbp),%rax
movsbl (%rax),%edi
call   1060 <isalnum@plt>
cmp    $0x0,%eax
jne    1375 <main+0x1b5>
mov    -0x838(%rbp),%rax
movb   $0x5f,(%rax)
jmp    137a <main+0x1ba>
mov    -0x838(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x838(%rbp)
jmp    1340 <main+0x180>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x840(%rbp)
lea    -0xc50(%rbp),%rdi
mov    -0x840(%rbp),%rsi
mov    $0x410,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x841(%rbp)
lea    -0xc50(%rbp),%rdi
mov    $0x2e,%esi
call   1070 <strrchr@plt>
mov    %rax,-0xc58(%rbp)
lea    -0xc50(%rbp),%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0xc60(%rbp)
cmpq   $0x0,-0xc58(%rbp)
je     1429 <main+0x269>
cmpq   $0x0,-0xc60(%rbp)
je     141f <main+0x25f>
mov    -0xc60(%rbp),%rax
cmp    -0xc58(%rbp),%rax
jae    1429 <main+0x269>
mov    -0xc58(%rbp),%rax
movb   $0x0,(%rax)
lea    -0xc50(%rbp),%rdi
lea    0xc02(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x840(%rbp),%rdi
lea    0xbf2(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0xc68(%rbp)
cmpq   $0x0,-0xc68(%rbp)
jne    14df <main+0x31f>
mov    0x2b6d(%rip),%rax
movslq (%rax),%rax
mov    %rax,-0xcd8(%rbp)
mov    -0x840(%rbp),%rax
mov    %rax,-0xcd0(%rbp)
mov    0x2b46(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xcc4(%rbp)
mov    0x2b37(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xcd8(%rbp),%rdi
mov    -0xcd0(%rbp),%rdx
mov    -0xcc4(%rbp),%ecx
mov    %rax,%r8
lea    0xb81(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    0x2aeb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    17c6 <main+0x606>
lea    -0xc50(%rbp),%rdi
lea    0xb4f(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0xc70(%rbp)
cmpq   $0x0,-0xc70(%rbp)
jne    158e <main+0x3ce>
mov    0x2aca(%rip),%rax
movslq (%rax),%rax
mov    %rax,-0xcf0(%rbp)
lea    -0xc50(%rbp),%rax
mov    %rax,-0xce8(%rbp)
mov    0x2aa3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xcdc(%rbp)
mov    0x2a94(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xcf0(%rbp),%rdi
mov    -0xce8(%rbp),%rdx
mov    -0xcdc(%rbp),%ecx
mov    %rax,%r8
lea    0xb17(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0xc68(%rbp),%rdi
call   1050 <fclose@plt>
mov    0x2a3c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    17c6 <main+0x606>
mov    -0x18(%rbp),%rdi
mov    0x2a4f(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10a0 <fseek@plt>
mov    -0x18(%rbp),%rdi
call   1090 <ftell@plt>
mov    %rax,-0xc78(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2a0b(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10a0 <fseek@plt>
mov    -0xc68(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    0xad6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0xc68(%rbp),%rdi
lea    -0x830(%rbp),%rdx
mov    -0xc78(%rbp),%rcx
lea    0xb32(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0xc78(%rbp),%rax
mov    %eax,-0xc94(%rbp)
cmpl   $0x0,-0xc94(%rbp)
jle    1745 <main+0x585>
lea    -0xc90(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x10,%edx
call   1040 <fread@plt>
mov    %rax,-0xca0(%rbp)
cmpq   $0x0,-0xca0(%rbp)
jne    1653 <main+0x493>
jmp    1745 <main+0x585>
mov    -0xc68(%rbp),%rdi
lea    0xaf5(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
lea    -0xc90(%rbp),%rax
mov    %rax,-0xca8(%rbp)
cmpq   $0x0,-0xca0(%rbp)
je     172c <main+0x56c>
mov    -0xc68(%rbp),%rdi
mov    -0xca8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xca8(%rbp)
movzbl (%rax),%edx
lea    0xaae(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
cmpq   $0x1,-0xca0(%rbp)
01
jne    16fb <main+0x53b>
cmpl   $0x10,-0xc94(%rbp)
jle    16e1 <main+0x521>
mov    -0xc68(%rbp),%rdi
lea    0xa85(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0xc68(%rbp),%rdi
lea    0xa3f(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1710 <main+0x550>
mov    -0xc68(%rbp),%rdi
lea    0xa58(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1715 <main+0x555>
mov    -0xca0(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0xca0(%rbp)
jmp    1676 <main+0x4b6>
jmp    1731 <main+0x571>
mov    -0xc94(%rbp),%eax
sub    $0x10,%eax
mov    %eax,-0xc94(%rbp)
jmp    1612 <main+0x452>
mov    -0xc68(%rbp),%rdi
lea    0xa11(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0xc68(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0xc70(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    0x9e4(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0xc70(%rbp),%rdi
lea    -0x830(%rbp),%rdx
mov    -0xc78(%rbp),%rcx
lea    0xa3b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0xc70(%rbp),%rdi
call   1050 <fclose@plt>
mov    0x27f7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xcf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc48,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jg     120d <main+0x2d>
mov    (%rbx),%rdi
call   10c0 <show_usage@plt>
mov    0x2db8(%rip),%rax
jmp    1613 <main+0x433>
mov    0x8(%rbx),%rdi
lea    0xde8(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     124c <main+0x6c>
mov    %rax,%r14
mov    0x8(%rbx),%rbp
mov    %rbp,%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
test   %rax,%rax
je     128f <main+0xaf>
add    $0x1,%rax
lea    0x430(%rsp),%rdi
mov    %rax,%rsi
jmp    129a <main+0xba>
mov    0x2d85(%rip),%rax
movslq (%rax),%rbp
mov    0x8(%rbx),%r14
mov    0x2d6f(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1100 <strerror@plt>
lea    0xd92(%rip),%rsi
mov    %rbp,%rdi
mov    %r14,%rdx
mov    %ebx,%ecx
mov    %rax,%r8
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x2d36(%rip),%rax
jmp    1613 <main+0x433>
lea    0x430(%rsp),%rdi
mov    %rbp,%rsi
mov    $0x400,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x82f(%rsp)
lea    0x30(%rsp),%rdi
lea    0x430(%rsp),%rsi
mov    $0x400,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x42f(%rsp)
mov    0x30(%rsp),%al
test   %al,%al
je     12fe <main+0x11e>
lea    0x31(%rsp),%rbp
jmp    12ec <main+0x10c>
nopw   0x0(%rax,%rax,1)
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
je     12fe <main+0x11e>
movsbl %al,%edi
call   1060 <isalnum@plt>
test   %eax,%eax
jne    12e0 <main+0x100>
movb   $0x5f,-0x1(%rbp)
jmp    12e0 <main+0x100>
mov    0x10(%rbx),%r15
lea    0x830(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
mov    $0x410,%edx
call   1030 <strncpy@plt>
movb   $0x0,0xc3f(%rsp)
mov    %rbp,%rdi
mov    $0x2e,%esi
call   1070 <strrchr@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
test   %rbx,%rbx
je     1351 <main+0x171>
test   %rax,%rax
je     134e <main+0x16e>
cmp    %rbx,%rax
jae    1351 <main+0x171>
movb   $0x0,(%rbx)
lea    0xce1(%rip),%rsi
lea    0x830(%rsp),%rdi
call   10e0 <strcat@plt>
lea    0xcd0(%rip),%rsi
mov    %r15,%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1504 <main+0x324>
mov    %rax,%rbx
lea    0xcb5(%rip),%rsi
lea    0x830(%rsp),%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
je     153c <main+0x35c>
mov    %rax,0x28(%rsp)
mov    0x2c3f(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   10b0 <fseek@plt>
mov    %r14,%rdi
call   10a0 <ftell@plt>
mov    %rax,%rbp
mov    0x2c01(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   10b0 <fseek@plt>
lea    0xcd7(%rip),%rsi
lea    0x430(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xd3d(%rip),%rsi
lea    0x30(%rsp),%rdx
mov    %rbx,%rdi
mov    %rbp,%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbp,0x20(%rsp)
test   %ebp,%ebp
jle    15a2 <main+0x3c2>
lea    0x10(%rsp),%rdi
mov    $0x1,%esi
mov    $0x10,%edx
mov    %r14,%rcx
call   1040 <fread@plt>
test   %rax,%rax
je     15a2 <main+0x3c2>
mov    %rax,%r15
lea    0xd1a(%rip),%r13
lea    0xd1a(%rip),%r12
mov    %r14,0x8(%rsp)
nopl   0x0(%rax,%rax,1)
mov    $0x9,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
movzbl 0x10(%rsp),%edx
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
cmp    $0x1,%r15
je     14b1 <main+0x2d1>
mov    $0x1,%r14d
nopl   0x0(%rax,%rax,1)
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r12,%rdi
mov    %rbx,%rcx
call   10f0 <fwrite@plt>
movzbl 0x10(%rsp,%r14,1),%edx
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
add    $0x1,%r14
cmp    %r14,%r15
jne    1480 <main+0x2a0>
cmp    $0x10,%ebp
jbe    1590 <main+0x3b0>
mov    $0x2c,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
add    $0xfffffff0,%ebp
lea    0x10(%rsp),%rdi
mov    $0x1,%esi
mov    $0x10,%edx
mov    0x8(%rsp),%r14
mov    %r14,%rcx
call   1040 <fread@plt>
mov    %rax,%r15
test   %rax,%rax
jne    1450 <main+0x270>
jmp    15a2 <main+0x3c2>
mov    0x2acd(%rip),%rax
movslq (%rax),%rbx
mov    0x2abb(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   1100 <strerror@plt>
lea    0xb1a(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    %ebp,%ecx
mov    %rax,%r8
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r14,%rdi
jmp    157f <main+0x39f>
mov    0x2a95(%rip),%rax
movslq (%rax),%r15
mov    0x2a83(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   1100 <strerror@plt>
lea    0xb1b(%rip),%rsi
lea    0x830(%rsp),%rdx
mov    %r15,%rdi
mov    %ebp,%ecx
mov    %rax,%r8
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x2a35(%rip),%rax
jmp    1613 <main+0x433>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
mov    0x8(%rsp),%r14
lea    0xbb7(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10f0 <fwrite@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
lea    0xb92(%rip),%rsi
lea    0x430(%rsp),%rdx
mov    0x28(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xbee(%rip),%rsi
lea    0x30(%rsp),%rdx
mov    %rbx,%rdi
mov    0x20(%rsp),%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x29a5(%rip),%rax
mov    (%rax),%eax
add    $0xc48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.1 = [54 x i8] c"Error: Could not open input file '%s'. Error %d: %s.\0A\00"
@errno = global i32 0
@.str.2 = [3 x i8] c".h\00"
@.str.3 = [3 x i8] c"wb\00"
@.str.4 = [57 x i8] c"Error: Could not open C output file '%s'. Error %d: %s.\0A\00"
@.str.5 = [57 x i8] c"Error: Could not open H output file '%s'. Error %d: %s.\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.6 = [127 x i8] c"/**\0A * This file was generated using the C Binary Object Builder v0.1.1.\0A * CBOB Source Code File.\0A *\0A * Source file: %s\0A */\0A\0A\00"
@.str.7 = [38 x i8] c"const unsigned char cbob_%s[%ld] =\0A{\0A\00"
@.str.8 = [2 x i8] c"\09\00"
@.str.9 = [7 x i8] c"0x%02X\00"
@.str.10 = [2 x i8] c",\00"
@.str.11 = [2 x i8] c"\0A\00"
@.str.12 = [3 x i8] c", \00"
@.str.13 = [4 x i8] c"};\0A\00"
@.str.14 = [122 x i8] c"/**\0A * This file was generated using the C Binary Object Builder v0.1.1.\0A * CBOB Header File.\0A *\0A * Source file: %s\0A */\0A\0A\00"
@.str.15 = [111 x i8] c"#ifdef __cplusplus\0Aextern \22C\22 {\0A#endif\0A\0Aextern const unsigned char cbob_%s[%ld];\0A\0A#ifdef __cplusplus\0A}\0A#endif\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [1024 x i8]
%8 = alloca i8*
%9 = alloca [1024 x i8]
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca [1040 x i8]
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i64
%18 = alloca [16 x i8]
%19 = alloca i32
%20 = alloca i64
%21 = alloca i8*
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, 3
br i1 %23, label %24, label %30
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 0
%27 = load i8*, i8** %26
%28 = call i32 @show_usage(i8* %27)
%29 = load i32, i32* @EXIT_FAILURE
store i32 %29, i32* %3
br label %241
30: ; preds = %2
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32* @fopen(i8* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %34, i32** %6
%35 = load i32*, i32** %6
%36 = icmp ne i32* %35, null
br i1 %36, label %49, label %37
37: ; preds = %30
%38 = load i32, i32* @stderr
%39 = sext i32 %38 to i64
%40 = inttoptr i64 %39 to i32*
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 1
%43 = load i8*, i8** %42
%44 = load i32, i32* @errno
%45 = load i32, i32* @errno
%46 = call i8* @strerror(i32 %45)
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i8* %43, i32 %44, i8* %46)
%48 = load i32, i32* @EXIT_FAILURE
store i32 %48, i32* %3
br label %241
49: ; preds = %30
%50 = load i8**, i8*** %5
%51 = getelementptr inbounds i8*, i8** %50, i64 1
%52 = load i8*, i8** %51
%53 = call i8* @strrchr(i8* %52, i8 signext 47)
store i8* %53, i8** %8
%54 = load i8*, i8** %8
%55 = icmp ne i8* %54, null
br i1 %55, label %65, label %56
56: ; preds = %49
br label %57
57: ; preds = %56
%58 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 1
%61 = load i8*, i8** %60
%62 = call i32 @strncpy(i8* %58, i8* %61, i32 1024)
%63 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 1023
store i8 0, i8* %63
br label %64
64: ; preds = %57
br label %73
65: ; preds = %49
br label %66
66: ; preds = %65
%67 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%68 = load i8*, i8** %8
%69 = getelementptr inbounds i8, i8* %68, i64 1
%70 = call i32 @strncpy(i8* %67, i8* %69, i32 1024)
%71 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 1023
store i8 0, i8* %71
br label %72
72: ; preds = %66
br label %73
73: ; preds = %72, %64
br label %74
74: ; preds = %73
%75 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%76 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%77 = call i32 @strncpy(i8* %75, i8* %76, i32 1024)
%78 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 1023
store i8 0, i8* %78
br label %79
79: ; preds = %74
%80 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
store i8* %80, i8** %10
br label %81
81: ; preds = %94, %79
%82 = load i8*, i8** %10
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %97
86: ; preds = %81
%87 = load i8*, i8** %10
%88 = load i8, i8* %87
%89 = call i32 @isalnum(i8 signext %88)
%90 = icmp ne i32 %89, 0
br i1 %90, label %93, label %91
91: ; preds = %86
%92 = load i8*, i8** %10
store i8 95, i8* %92
br label %93
93: ; preds = %91, %86
br label %94
94: ; preds = %93
%95 = load i8*, i8** %10
%96 = getelementptr inbounds i8, i8* %95, i32 1
store i8* %96, i8** %10
br label %81
97: ; preds = %81
%98 = load i8**, i8*** %5
%99 = getelementptr inbounds i8*, i8** %98, i64 2
%100 = load i8*, i8** %99
store i8* %100, i8** %11
br label %101
101: ; preds = %97
%102 = getelementptr inbounds [1040 x i8], [1040 x i8]* %12, i64 0, i64 0
%103 = load i8*, i8** %11
%104 = call i32 @strncpy(i8* %102, i8* %103, i32 1040)
%105 = getelementptr inbounds [1040 x i8], [1040 x i8]* %12, i64 0, i64 1039
store i8 0, i8* %105
br label %106
106: ; preds = %101
%107 = getelementptr inbounds [1040 x i8], [1040 x i8]* %12, i64 0, i64 0
%108 = call i8* @strrchr(i8* %107, i8 signext 46)
store i8* %108, i8** %13
%109 = getelementptr inbounds [1040 x i8], [1040 x i8]* %12, i64 0, i64 0
%110 = call i8* @strrchr(i8* %109, i8 signext 47)
store i8* %110, i8** %14
%111 = load i8*, i8** %13
%112 = icmp ne i8* %111, null
br i1 %112, label %113, label %122
113: ; preds = %106
%114 = load i8*, i8** %14
%115 = icmp ne i8* %114, null
br i1 %115, label %116, label %120
116: ; preds = %113
%117 = load i8*, i8** %14
%118 = load i8*, i8** %13
%119 = icmp ult i8* %117, %118
br i1 %119, label %120, label %122
120: ; preds = %116, %113
%121 = load i8*, i8** %13
store i8 0, i8* %121
br label %122
122: ; preds = %120, %116, %106
%123 = getelementptr inbounds [1040 x i8], [1040 x i8]* %12, i64 0, i64 0
%124 = call i32 @strcat(i8* %123, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%125 = load i8*, i8** %11
%126 = call i32* @fopen(i8* %125, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %126, i32** %15
%127 = load i32*, i32** %15
%128 = icmp ne i32* %127, null
br i1 %128, label %141, label %129
129: ; preds = %122
%130 = load i32, i32* @stderr
%131 = sext i32 %130 to i64
%132 = inttoptr i64 %131 to i32*
%133 = load i8*, i8** %11
%134 = load i32, i32* @errno
%135 = load i32, i32* @errno
%136 = call i8* @strerror(i32 %135)
%137 = call i32 (i32*, i8*, ...) @fprintf(i32* %132, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), i8* %133, i32 %134, i8* %136)
%138 = load i32*, i32** %6
%139 = call i32 @fclose(i32* %138)
%140 = load i32, i32* @EXIT_FAILURE
store i32 %140, i32* %3
br label %241
141: ; preds = %122
%142 = getelementptr inbounds [1040 x i8], [1040 x i8]* %12, i64 0, i64 0
%143 = call i32* @fopen(i8* %142, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %143, i32** %16
%144 = load i32*, i32** %16
%145 = icmp ne i32* %144, null
br i1 %145, label %160, label %146
146: ; preds = %141
%147 = load i32, i32* @stderr
%148 = sext i32 %147 to i64
%149 = inttoptr i64 %148 to i32*
%150 = getelementptr inbounds [1040 x i8], [1040 x i8]* %12, i64 0, i64 0
%151 = load i32, i32* @errno
%152 = load i32, i32* @errno
%153 = call i8* @strerror(i32 %152)
%154 = call i32 (i32*, i8*, ...) @fprintf(i32* %149, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0), i8* %150, i32 %151, i8* %153)
%155 = load i32*, i32** %6
%156 = call i32 @fclose(i32* %155)
%157 = load i32*, i32** %15
%158 = call i32 @fclose(i32* %157)
%159 = load i32, i32* @EXIT_FAILURE
store i32 %159, i32* %3
br label %241
160: ; preds = %141
%161 = load i32*, i32** %6
%162 = load i32, i32* @SEEK_END
%163 = call i32 @fseek(i32* %161, i32 0, i32 %162)
%164 = load i32*, i32** %6
%165 = call i64 @ftell(i32* %164)
store i64 %165, i64* %17
%166 = load i32*, i32** %6
%167 = load i32, i32* @SEEK_SET
%168 = call i32 @fseek(i32* %166, i32 0, i32 %167)
%169 = load i32*, i32** %15
%170 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%171 = call i32 (i32*, i8*, ...) @fprintf(i32* %169, i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.6, i64 0, i64 0), i8* %170)
%172 = load i32*, i32** %15
%173 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%174 = load i64, i64* %17
%175 = call i32 (i32*, i8*, ...) @fprintf(i32* %172, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0), i8* %173, i64 %174)
%176 = load i64, i64* %17
%177 = trunc i64 %176 to i32
store i32 %177, i32* %19
br label %178
178: ; preds = %221, %160
%179 = load i32, i32* %19
%180 = icmp sgt i32 %179, 0
br i1 %180, label %181, label %224
181: ; preds = %178
%182 = getelementptr inbounds [16 x i8], [16 x i8]* %18, i64 0, i64 0
%183 = load i32*, i32** %6
%184 = call i64 @fread(i8* %182, i32 1, i32 16, i32* %183)
store i64 %184, i64* %20
%185 = load i64, i64* %20
%186 = icmp eq i64 %185, 0
br i1 %186, label %187, label %188
187: ; preds = %181
br label %224
188: ; preds = %181
%189 = load i32*, i32** %15
%190 = call i32 (i32*, i8*, ...) @fprintf(i32* %189, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%191 = getelementptr inbounds [16 x i8], [16 x i8]* %18, i64 0, i64 0
store i8* %191, i8** %21
br label %192
192: ; preds = %217, %188
%193 = load i64, i64* %20
%194 = icmp ne i64 %193, 0
br i1 %194, label %195, label %220
195: ; preds = %192
%196 = load i32*, i32** %15
%197 = load i8*, i8** %21
%198 = getelementptr inbounds i8, i8* %197, i32 1
store i8* %198, i8** %21
%199 = load i8, i8* %197
%200 = zext i8 %199 to i32
%201 = call i32 (i32*, i8*, ...) @fprintf(i32* %196, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 %200)
%202 = load i64, i64* %20
%203 = icmp eq i64 %202, 1
br i1 %203, label %204, label %213
204: ; preds = %195
%205 = load i32, i32* %19
%206 = icmp sgt i32 %205, 16
br i1 %206, label %207, label %210
207: ; preds = %204
%208 = load i32*, i32** %15
%209 = call i32 (i32*, i8*, ...) @fprintf(i32* %208, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %210
210: ; preds = %207, %204
%211 = load i32*, i32** %15
%212 = call i32 (i32*, i8*, ...) @fprintf(i32* %211, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %216
213: ; preds = %195
%214 = load i32*, i32** %15
%215 = call i32 (i32*, i8*, ...) @fprintf(i32* %214, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
br label %216
216: ; preds = %213, %210
br label %217
217: ; preds = %216
%218 = load i64, i64* %20
%219 = add i64 %218, -1
store i64 %219, i64* %20
br label %192
220: ; preds = %192
br label %221
221: ; preds = %220
%222 = load i32, i32* %19
%223 = sub nsw i32 %222, 16
store i32 %223, i32* %19
br label %178
224: ; preds = %187, %178
%225 = load i32*, i32** %15
%226 = call i32 (i32*, i8*, ...) @fprintf(i32* %225, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
%227 = load i32*, i32** %15
%228 = call i32 @fclose(i32* %227)
%229 = load i32*, i32** %6
%230 = call i32 @fclose(i32* %229)
%231 = load i32*, i32** %16
%232 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%233 = call i32 (i32*, i8*, ...) @fprintf(i32* %231, i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str.14, i64 0, i64 0), i8* %232)
%234 = load i32*, i32** %16
%235 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%236 = load i64, i64* %17
%237 = call i32 (i32*, i8*, ...) @fprintf(i32* %234, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.15, i64 0, i64 0), i8* %235, i64 %236)
%238 = load i32*, i32** %16
%239 = call i32 @fclose(i32* %238)
%240 = load i32, i32* @EXIT_SUCCESS
store i32 %240, i32* %3
br label %241
241: ; preds = %224, %146, %129, %37, %24
%242 = load i32, i32* %3
ret i32 %242
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.1 = [54 x i8] c"Error: Could not open input file '%s'. Error %d: %s.\0A\00"
@errno = global i32 0
@.str.2 = [3 x i8] c".h\00"
@.str.3 = [3 x i8] c"wb\00"
@.str.4 = [57 x i8] c"Error: Could not open C output file '%s'. Error %d: %s.\0A\00"
@.str.5 = [57 x i8] c"Error: Could not open H output file '%s'. Error %d: %s.\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.6 = [127 x i8] c"/**\0A * This file was generated using the C Binary Object Builder v0.1.1.\0A * CBOB Source Code File.\0A *\0A * Source file: %s\0A */\0A\0A\00"
@.str.7 = [38 x i8] c"const unsigned char cbob_%s[%ld] =\0A{\0A\00"
@.str.9 = [7 x i8] c"0x%02X\00"
@.str.12 = [3 x i8] c", \00"
@.str.13 = [4 x i8] c"};\0A\00"
@.str.14 = [122 x i8] c"/**\0A * This file was generated using the C Binary Object Builder v0.1.1.\0A * CBOB Header File.\0A *\0A * Source file: %s\0A */\0A\0A\00"
@.str.15 = [111 x i8] c"#ifdef __cplusplus\0Aextern \22C\22 {\0A#endif\0A\0Aextern const unsigned char cbob_%s[%ld];\0A\0A#ifdef __cplusplus\0A}\0A#endif\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = alloca [1040 x i8]
%6 = alloca [16 x i8]
%7 = icmp slt i32 %0, 3
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = tail call i32 @show_usage(i8* %9)
%11 = load i32, i32* @EXIT_FAILURE
br label %145
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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %26
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 = load i32, i32* @errno
%23 = tail call i8* @strerror(i32 %22)
%24 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i8* %21, i32 %22, i8* %23)
%25 = load i32, i32* @EXIT_FAILURE
br label %145
26: ; preds = %12
%27 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%28 = load i8*, i8** %13
%29 = tail call i8* @strrchr(i8* dereferenceable(1) %28, i8 signext 47)
%30 = icmp eq i8* %29, null
br i1 %30, label %31, label %33
31: ; preds = %26
%32 = call i32 @strncpy(i8* %27, i8* %28, i32 1024)
br label %36
33: ; preds = %26
%34 = getelementptr inbounds i8, i8* %29, i64 1
%35 = call i32 @strncpy(i8* %27, i8* %34, i32 1024)
br label %36
36: ; preds = %33, %31
%37 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 1023
store i8 0, i8* %37
%38 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%39 = call i32 @strncpy(i8* %38, i8* %27, i32 1024)
%40 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 1023
store i8 0, i8* %40
%41 = load i8, i8* %38
%42 = icmp eq i8 %41, 0
br i1 %42, label %53, label %43
43: ; preds = %36, %49
%44 = phi i8 [ %51, %49 ], [ %41, %36 ]
%45 = phi i8* [ %50, %49 ], [ %38, %36 ]
%46 = call i32 @isalnum(i8 signext %44)
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %49
48: ; preds = %43
store i8 95, i8* %45
br label %49
49: ; preds = %43, %48
%50 = getelementptr inbounds i8, i8* %45, i64 1
%51 = load i8, i8* %50
%52 = icmp eq i8 %51, 0
br i1 %52, label %53, label %43
53: ; preds = %49, %36
%54 = getelementptr inbounds i8*, i8** %1, i64 2
%55 = load i8*, i8** %54
%56 = getelementptr inbounds [1040 x i8], [1040 x i8]* %5, i64 0, i64 0
%57 = call i32 @strncpy(i8* %56, i8* %55, i32 1040)
%58 = getelementptr inbounds [1040 x i8], [1040 x i8]* %5, i64 0, i64 1039
store i8 0, i8* %58
%59 = call i8* @strrchr(i8* %56, i8 signext 46)
%60 = call i8* @strrchr(i8* %56, i8 signext 47)
%61 = icmp eq i8* %59, null
br i1 %61, label %67, label %62
62: ; preds = %53
%63 = icmp eq i8* %60, null
%64 = icmp ult i8* %60, %59
%65 = select i1 %63, i1 true, i1 %64
br i1 %65, label %66, label %67
66: ; preds = %62
store i8 0, i8* %59
br label %67
67: ; preds = %62, %66, %53
%68 = call i32 @strcat(i8* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%69 = call i32* @fopen(i8* %55, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%70 = icmp eq i32* %69, null
br i1 %70, label %71, label %80
71: ; preds = %67
%72 = load i32, i32* @stderr
%73 = sext i32 %72 to i64
%74 = inttoptr i64 %73 to i32*
%75 = load i32, i32* @errno
%76 = call i8* @strerror(i32 %75)
%77 = call i32 (i32*, i8*, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), i8* %55, i32 %75, i8* %76)
%78 = call i32 @fclose(i32* %15)
%79 = load i32, i32* @EXIT_FAILURE
br label %143
80: ; preds = %67
%81 = call i32* @fopen(i8* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%82 = icmp eq i32* %81, null
br i1 %82, label %83, label %93
83: ; preds = %80
%84 = load i32, i32* @stderr
%85 = sext i32 %84 to i64
%86 = inttoptr i64 %85 to i32*
%87 = load i32, i32* @errno
%88 = call i8* @strerror(i32 %87)
%89 = call i32 (i32*, i8*, ...) @fprintf(i32* %86, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0), i8* %56, i32 %87, i8* %88)
%90 = call i32 @fclose(i32* %15)
%91 = call i32 @fclose(i32* %69)
%92 = load i32, i32* @EXIT_FAILURE
br label %143
93: ; preds = %80
%94 = load i32, i32* @SEEK_END
%95 = call i32 @fseek(i32* %15, i32 0, i32 %94)
%96 = call i64 @ftell(i32* %15)
%97 = load i32, i32* @SEEK_SET
%98 = call i32 @fseek(i32* %15, i32 0, i32 %97)
%99 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.6, i64 0, i64 0), i8* %27)
%100 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0), i8* %38, i64 %96)
%101 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%102 = trunc i64 %96 to i32
%103 = icmp sgt i32 %102, 0
br i1 %103, label %104, label %135
104: ; preds = %93
%105 = call i64 @fread(i8* %101, i32 1, i32 16, i32* %15)
%106 = icmp eq i64 %105, 0
br i1 %106, label %135, label %107
107: ; preds = %104, %129
%108 = phi i64 [ %133, %129 ], [ %105, %104 ]
%109 = phi i32 [ %132, %129 ], [ %102, %104 ]
%110 = call i32 @fputc(i32 9, i32* %69)
%111 = icmp ugt i32 %109, 16
%112 = load i8, i8* %101
%113 = zext i8 %112 to i32
%114 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 %113)
%115 = icmp eq i64 %108, 1
br i1 %115, label %116, label %119
116: ; preds = %119, %107
br i1 %111, label %129, label %117
117: ; preds = %116
%118 = call i32 @fputc(i32 10, i32* %69)
br label %135
119: ; preds = %107, %119
%120 = phi i64 [ %124, %119 ], [ %108, %107 ]
%121 = phi i8* [ %122, %119 ], [ %101, %107 ]
%122 = getelementptr inbounds i8, i8* %121, i64 1
%123 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i64 2, i64 1, i32* %69)
%124 = add i64 %120, -1
%125 = load i8, i8* %122
%126 = zext i8 %125 to i32
%127 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 %126)
%128 = icmp eq i64 %124, 1
br i1 %128, label %116, label %119
129: ; preds = %116
%130 = call i32 @fputc(i32 44, i32* %69)
%131 = call i32 @fputc(i32 10, i32* %69)
%132 = add nsw i32 %109, -16
%133 = call i64 @fread(i8* %101, i32 1, i32 16, i32* %15)
%134 = icmp eq i64 %133, 0
br i1 %134, label %135, label %107
135: ; preds = %129, %104, %117, %93
%136 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i64 3, i64 1, i32* %69)
%137 = call i32 @fclose(i32* %69)
%138 = call i32 @fclose(i32* %15)
%139 = call i32 (i32*, i8*, ...) @fprintf(i32* %81, i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str.14, i64 0, i64 0), i8* %27)
%140 = call i32 (i32*, i8*, ...) @fprintf(i32* %81, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.15, i64 0, i64 0), i8* %38, i64 %96)
%141 = call i32 @fclose(i32* %81)
%142 = load i32, i32* @EXIT_SUCCESS
br label %143
143: ; preds = %83, %135, %71
%144 = phi i32 [ %79, %71 ], [ %142, %135 ], [ %92, %83 ]
br label %145
145: ; preds = %17, %143, %8
%146 = phi i32 [ %11, %8 ], [ %144, %143 ], [ %25, %17 ]
ret i32 %146
}