#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 EOF;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int fputc(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ isgraph(int);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int sscanf(char *, char *, char *, char *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
char *strerror(int /*<<< orphan*/);
int strlen(char *);
int /*<<< orphan*/ *tmpfile();
int main(int argc, char **argv) {
  int i;
  FILE *out = tmpfile();
  ;
  if (!out) {
    fprintf(stderr, "Failed to open temporary output file.\n");
    exit(1);
  }
  for (i = 1; i < argc; i++) {
    char sym[1024];
    char fname[1024];
    FILE *f;
    int pos;
    int j;
    int indent;
    if (sscanf(argv[i], "%1023[^=]=%1023s", sym, fname) != 2) {
      fprintf(stderr, "Argument '%s' is too mysterious to process.\n", argv[i]);
      exit(1);
    }
    f = fopen(fname, "r");
    if (!f) {
      fprintf(stderr, "Failed to open `%s' for reading: %s\n", fname,
              strerror(errno));
      exit(1);
    }
    fprintf(out, "const char %s[] = \"", sym);
    indent = 15 + strlen(sym);
    pos = 0;
    for (;;) {
      int ch = fgetc(f);
      if (ch == EOF) {
        if (ferror(f)) {
          fprintf(stderr, "Error reading %s: %s\n", fname, strerror(errno));
          exit(1);
        }
        break;
      }
      switch (ch) {
      case '\n':
        fprintf(out, "\\n");
        pos += 2;
        break;
      case '\r':
        fprintf(out, "\\r");
        pos += 2;
        break;
      case '\t':
        fprintf(out, "\\t");
        pos += 2;
        break;
      case '\\':
        fprintf(out, "\\\\");
        pos += 2;
        break;
      case '"':
        fprintf(out, "\\\"");
        pos += 2;
        break;
      default:
        if (isgraph(ch) || ch == ' ') {
          fputc(ch, out);
          pos += 1;
        } else {
          fprintf(out, "\\%03o", ch);
          pos += 3;
        }
      }
      if (pos >= 64) {
        fputc('"', out);
        fputc('\n', out);
        for (j = 0; j < indent; j++)
          fputc(' ', out);
        fputc('"', out);
        pos = 0;
      }
    }
    fputc('"', out);
    fputc(';', out);
    fputc('\n', out);
    fprintf(out, "const int %s_size = sizeof(%s)-1;\n", sym, sym);
    fputc('\n', out);
  }
  if (ferror(out)) {
    fprintf(stderr, "Error writing temporary output file: %s\n",
            strerror(errno));
    exit(1);
  }
  rewind(out);
  for (;;) {
    int ch = fgetc(out);
    if (ch == EOF) {
      if (feof(out))
        break;
      else {
        fprintf(stderr, "Failed rereading temporary file: %s\n",
                strerror(errno));
        exit(1);
      }
    }
    if (fputc(ch, stdout) == EOF) {
      fprintf(stderr, "Failed writing output: %s\n", strerror(errno));
      exit(1);
    }
  }
  fclose(out);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x880,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1090 <tmpfile@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1231 <main+0x51>
mov    0x2dc2(%rip),%rax
mov    (%rax),%rdi
lea    0xde0(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1671 <main+0x491>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x420(%rbp),%rdx
lea    -0x820(%rbp),%rcx
lea    0xdc2(%rip),%rsi
call   10c0 <sscanf@plt>
cmp    $0x2,%eax
je     12a1 <main+0xc1>
mov    0x2d5e(%rip),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xda8(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
lea    -0x820(%rbp),%rdi
lea    0xe09(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x828(%rbp)
cmpq   $0x0,-0x828(%rbp)
jne    131f <main+0x13f>
mov    0x2d08(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x850(%rbp)
lea    -0x820(%rbp),%rax
mov    %rax,-0x848(%rbp)
mov    0x2ce1(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x850(%rbp),%rdi
mov    -0x848(%rbp),%rdx
mov    %rax,%rcx
lea    0xd57(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    -0x20(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    0xd59(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
lea    -0x420(%rbp),%rdi
call   1050 <strlen@plt>
add    $0xf,%eax
mov    %eax,-0x834(%rbp)
movl   $0x0,-0x82c(%rbp)
mov    -0x828(%rbp),%rdi
call   1070 <fgetc@plt>
mov    %eax,-0x838(%rbp)
mov    -0x838(%rbp),%eax
mov    0x2c72(%rip),%rcx
cmp    (%rcx),%eax
jne    13ef <main+0x20f>
mov    -0x828(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     13ea <main+0x20a>
mov    0x2c3d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x860(%rbp)
lea    -0x820(%rbp),%rax
mov    %rax,-0x858(%rbp)
mov    0x2c16(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x860(%rbp),%rdi
mov    -0x858(%rbp),%rdx
mov    %rax,%rcx
lea    0xcc5(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
jmp    160b <main+0x42b>
mov    -0x838(%rbp),%eax
mov    %eax,-0x864(%rbp)
sub    $0x9,%eax
je     14a5 <main+0x2c5>
jmp    1409 <main+0x229>
mov    -0x864(%rbp),%eax
sub    $0xa,%eax
je     1459 <main+0x279>
jmp    141d <main+0x23d>
mov    -0x864(%rbp),%eax
sub    $0xd,%eax
je     147f <main+0x29f>
jmp    1431 <main+0x251>
mov    -0x864(%rbp),%eax
sub    $0x22,%eax
je     14f1 <main+0x311>
jmp    1445 <main+0x265>
mov    -0x864(%rbp),%eax
sub    $0x5c,%eax
je     14cb <main+0x2eb>
jmp    1517 <main+0x337>
mov    -0x20(%rbp),%rdi
lea    0xc50(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x82c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x82c(%rbp)
jmp    1587 <main+0x3a7>
mov    -0x20(%rbp),%rdi
lea    0xc2d(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x82c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x82c(%rbp)
jmp    1587 <main+0x3a7>
mov    -0x20(%rbp),%rdi
lea    0xc0a(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x82c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x82c(%rbp)
jmp    1587 <main+0x3a7>
mov    -0x20(%rbp),%rdi
lea    0xbe7(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x82c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x82c(%rbp)
jmp    1587 <main+0x3a7>
mov    -0x20(%rbp),%rdi
lea    0xbc4(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x82c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x82c(%rbp)
jmp    1587 <main+0x3a7>
mov    -0x838(%rbp),%edi
call   1100 <isgraph@plt>
cmp    $0x0,%eax
jne    1538 <main+0x358>
cmpl   $0x20,-0x838(%rbp)
jne    155b <main+0x37b>
mov    -0x838(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1080 <fputc@plt>
mov    -0x82c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x82c(%rbp)
jmp    1582 <main+0x3a2>
mov    -0x20(%rbp),%rdi
mov    -0x838(%rbp),%edx
lea    0xb57(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x82c(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x82c(%rbp)
jmp    1587 <main+0x3a7>
cmpl   $0x40,-0x82c(%rbp)
jl     1606 <main+0x426>
mov    -0x20(%rbp),%rsi
mov    $0x22,%edi
call   1080 <fputc@plt>
mov    -0x20(%rbp),%rsi
mov    $0xa,%edi
call   1080 <fputc@plt>
movl   $0x0,-0x830(%rbp)
mov    -0x830(%rbp),%eax
cmp    -0x834(%rbp),%eax
jge    15ee <main+0x40e>
mov    -0x20(%rbp),%rsi
mov    $0x20,%edi
call   1080 <fputc@plt>
mov    -0x830(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x830(%rbp)
jmp    15ba <main+0x3da>
mov    -0x20(%rbp),%rsi
mov    $0x22,%edi
call   1080 <fputc@plt>
movl   $0x0,-0x82c(%rbp)
jmp    1357 <main+0x177>
mov    -0x20(%rbp),%rsi
mov    $0x22,%edi
call   1080 <fputc@plt>
mov    -0x20(%rbp),%rsi
mov    $0x3b,%edi
call   1080 <fputc@plt>
mov    -0x20(%rbp),%rsi
mov    $0xa,%edi
call   1080 <fputc@plt>
mov    -0x20(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    -0x420(%rbp),%rcx
lea    0xa7b(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x20(%rbp),%rsi
mov    $0xa,%edi
call   1080 <fputc@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1238 <main+0x58>
mov    -0x20(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     16c5 <main+0x4e5>
mov    0x294d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x870(%rbp)
mov    0x2934(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x870(%rbp),%rdi
mov    %rax,%rdx
lea    0xa38(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    -0x20(%rbp),%rdi
call   1060 <rewind@plt>
mov    -0x20(%rbp),%rdi
call   1070 <fgetc@plt>
mov    %eax,-0x83c(%rbp)
mov    -0x83c(%rbp),%eax
mov    0x28fe(%rip),%rcx
cmp    (%rcx),%eax
jne    174b <main+0x56b>
mov    -0x20(%rbp),%rdi
call   10b0 <feof@plt>
cmp    $0x0,%rax
je     170a <main+0x52a>
jmp    17b5 <main+0x5d5>
mov    0x28c7(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x878(%rbp)
mov    0x28ae(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x878(%rbp),%rdi
mov    %rax,%rdx
lea    0x9db(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    -0x83c(%rbp),%edi
mov    0x2870(%rip),%rax
mov    (%rax),%rsi
call   1080 <fputc@plt>
mov    0x2881(%rip),%rcx
cmp    (%rcx),%eax
jne    17b0 <main+0x5d0>
mov    0x2862(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x880(%rbp)
mov    0x2849(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x880(%rbp),%rdi
mov    %rax,%rdx
lea    0x99b(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
jmp    16ce <main+0x4ee>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x880,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x828,%rsp
mov    %rsi,0x8(%rsp)
mov    %edi,%ebp
xor    %eax,%eax
call   1090 <tmpfile@plt>
test   %rax,%rax
je     15d9 <main+0x3e9>
mov    %rax,%rbx
cmp    $0x2,%ebp
jl     14b9 <main+0x2c9>
mov    %ebp,%eax
mov    %rax,0x10(%rsp)
mov    $0x1,%ebp
lea    0x420(%rsp),%r14
lea    0x20(%rsp),%r15
nopl   (%rax)
mov    0x8(%rsp),%rax
mov    (%rax,%rbp,8),%rdi
lea    0xe3f(%rip),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   10c0 <sscanf@plt>
cmp    $0x2,%eax
jne    1550 <main+0x360>
mov    %rbp,0x18(%rsp)
mov    %r15,%rdi
lea    0xead(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     157d <main+0x38d>
mov    %rax,%r15
mov    %rbx,%rdi
lea    0xe64(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %eax,%r14d
mov    %r15,%rdi
call   1070 <fgetc@plt>
mov    %eax,%r13d
mov    0x2d33(%rip),%rax
cmp    (%rax),%r13d
jne    1340 <main+0x150>
mov    %r15,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
jne    159e <main+0x3ae>
mov    $0x22,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
mov    $0x3b,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
mov    %rbx,%rdi
lea    0xe31(%rip),%rsi
lea    0x420(%rsp),%r14
mov    %r14,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
mov    0x18(%rsp),%rbp
add    $0x1,%rbp
cmp    0x10(%rsp),%rbp
lea    0x20(%rsp),%r15
jne    1240 <main+0x50>
jmp    14b9 <main+0x2c9>
lea    0xe(%r14),%eax
xor    %r12d,%r12d
test   %eax,%eax
cmovle %r12d,%eax
add    $0x1,%eax
mov    %eax,0x4(%rsp)
jmp    138b <main+0x19b>
cs nopw 0x0(%rax,%rax,1)
mov    $0x22,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
xor    %r12d,%r12d
mov    %r15,%rdi
call   1070 <fgetc@plt>
mov    %eax,%r13d
mov    0x2c66(%rip),%rax
cmp    (%rax),%r13d
je     12be <main+0xce>
lea    -0x9(%r13),%eax
cmp    $0x19,%eax
ja     13c0 <main+0x1d0>
lea    0xc65(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xd6d(%rip),%rdi
jmp    1445 <main+0x255>
nopw   0x0(%rax,%rax,1)
cmp    $0x5c,%r13d
jne    13d9 <main+0x1e9>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xd4e(%rip),%rdi
jmp    1445 <main+0x255>
mov    %r13d,%edi
call   1110 <isgraph@plt>
cmp    $0x20,%r13d
je     14a7 <main+0x2b7>
test   %eax,%eax
jne    14a7 <main+0x2b7>
mov    %rbx,%rdi
lea    0xd2e(%rip),%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x3,%eax
jmp    1452 <main+0x262>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xcfd(%rip),%rdi
jmp    1445 <main+0x255>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xced(%rip),%rdi
jmp    1445 <main+0x255>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xce3(%rip),%rdi
mov    %rbx,%rcx
call   10f0 <fwrite@plt>
mov    $0x2,%eax
add    %eax,%r12d
cmp    $0x40,%r12d
jl     1370 <main+0x180>
mov    $0x22,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
cmp    $0xfffffff2,%r14d
jl     1360 <main+0x170>
mov    0x4(%rsp),%ebp
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
add    $0xffffffff,%ebp
jne    1490 <main+0x2a0>
jmp    1360 <main+0x170>
mov    %r13d,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
mov    $0x1,%eax
jmp    1452 <main+0x262>
mov    %rbx,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
jne    1603 <main+0x413>
mov    %rbx,%rdi
call   1060 <rewind@plt>
mov    0x2b0f(%rip),%rbp
mov    0x2ae8(%rip),%r14
mov    %rbx,%rdi
call   1070 <fgetc@plt>
cmp    0x0(%rbp),%eax
je     1523 <main+0x333>
mov    (%r14),%rsi
mov    %eax,%edi
call   1080 <fputc@plt>
cmp    0x0(%rbp),%eax
jne    14e0 <main+0x2f0>
mov    0x2ad5(%rip),%rax
mov    (%rax),%rbx
mov    0x2ac3(%rip),%rax
mov    (%rax),%edi
call   1100 <strerror@plt>
lea    0xc87(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
jmp    156c <main+0x37c>
mov    %rbx,%rdi
call   10b0 <feof@plt>
test   %rax,%rax
je     1627 <main+0x437>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x828,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebp,%eax
mov    0x2a7f(%rip),%rcx
mov    (%rcx),%rdi
mov    0x8(%rsp),%rcx
mov    (%rcx,%rax,8),%rdx
lea    0xb34(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    0x2a54(%rip),%rax
mov    (%rax),%rbx
mov    0x2a42(%rip),%rax
mov    (%rax),%edi
call   1100 <strerror@plt>
lea    0xb31(%rip),%rsi
jmp    15bd <main+0x3cd>
mov    0x2a33(%rip),%rax
mov    (%rax),%rbx
mov    0x2a21(%rip),%rax
mov    (%rax),%edi
call   1100 <strerror@plt>
lea    0xb49(%rip),%rsi
lea    0x20(%rsp),%rdx
mov    %rbx,%rdi
mov    %rax,%rcx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    0x29f8(%rip),%rax
mov    (%rax),%rcx
lea    0xa7e(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
call   10f0 <fwrite@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    0x29ce(%rip),%rax
mov    (%rax),%rbx
mov    0x29bc(%rip),%rax
mov    (%rax),%edi
call   1100 <strerror@plt>
lea    0xb32(%rip),%rsi
jmp    151b <main+0x32b>
mov    0x29aa(%rip),%rax
mov    (%rax),%rbx
mov    0x2998(%rip),%rax
mov    (%rax),%edi
call   1100 <strerror@plt>
lea    0xb37(%rip),%rsi
jmp    151b <main+0x32b>

LLVM IR (-O0):
@stderr = global i32* null
@.str = [39 x i8] c"Failed to open temporary output file.\0A\00"
@.str.1 = [17 x i8] c"%1023[^=]=%1023s\00"
@.str.2 = [45 x i8] c"Argument '%s' is too mysterious to process.\0A\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [37 x i8] c"Failed to open `%s' for reading: %s\0A\00"
@errno = global i32 0
@.str.5 = [20 x i8] c"const char %s[] = \22\00"
@EOF = global i32 0
@.str.6 = [22 x i8] c"Error reading %s: %s\0A\00"
@.str.7 = [3 x i8] c"\\n\00"
@.str.8 = [3 x i8] c"\\r\00"
@.str.9 = [3 x i8] c"\\t\00"
@.str.10 = [3 x i8] c"\\\\\00"
@.str.11 = [3 x i8] c"\\\22\00"
@.str.12 = [6 x i8] c"\\%03o\00"
@.str.13 = [35 x i8] c"const int %s_size = sizeof(%s)-1;\0A\00"
@.str.14 = [41 x i8] c"Error writing temporary output file: %s\0A\00"
@.str.15 = [37 x i8] c"Failed rereading temporary file: %s\0A\00"
@stdout = global i32* null
@.str.16 = [27 x i8] c"Failed writing output: %s\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 i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = call i32* (...) @tmpfile()
store i32* %16, i32** %7
%17 = load i32*, i32** %7
%18 = icmp ne i32* %17, null
br i1 %18, label %23, label %19
19: ; preds = %2
%20 = load i32*, i32** @stderr
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%22 = call i32 @exit(i32 1)
unreachable
23: ; preds = %2
store i32 1, i32* %6
br label %24
24: ; preds = %166, %23
%25 = load i32, i32* %6
%26 = load i32, i32* %4
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %169
28: ; preds = %24
%29 = load i8**, i8*** %5
%30 = load i32, i32* %6
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8*, i8** %29, i64 %31
%33 = load i8*, i8** %32
%34 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%35 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%36 = call i32 @sscanf(i8* %33, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %34, i8* %35)
%37 = icmp ne i32 %36, 2
br i1 %37, label %38, label %47
38: ; preds = %28
%39 = load i32*, i32** @stderr
%40 = load i8**, i8*** %5
%41 = load i32, i32* %6
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8*, i8** %40, i64 %42
%44 = load i8*, i8** %43
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %39, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i8* %44)
%46 = call i32 @exit(i32 1)
unreachable
47: ; preds = %28
%48 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%49 = call i32* @fopen(i8* %48, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %49, i32** %10
%50 = load i32*, i32** %10
%51 = icmp ne i32* %50, null
br i1 %51, label %59, label %52
52: ; preds = %47
%53 = load i32*, i32** @stderr
%54 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%55 = load i32, i32* @errno
%56 = call i8* @strerror(i32 %55)
%57 = call i32 (i32*, i8*, ...) @fprintf(i32* %53, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %54, i8* %56)
%58 = call i32 @exit(i32 1)
unreachable
59: ; preds = %47
%60 = load i32*, i32** %7
%61 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%62 = call i32 (i32*, i8*, ...) @fprintf(i32* %60, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %61)
%63 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%64 = call i32 @strlen(i8* %63)
%65 = add nsw i32 15, %64
store i32 %65, i32* %13
store i32 0, i32* %11
br label %66
66: ; preds = %152, %59
%67 = load i32*, i32** %10
%68 = call i32 @fgetc(i32* %67)
store i32 %68, i32* %14
%69 = load i32, i32* %14
%70 = load i32, i32* @EOF
%71 = icmp eq i32 %69, %70
br i1 %71, label %72, label %84
72: ; preds = %66
%73 = load i32*, i32** %10
%74 = call i64 @ferror(i32* %73)
%75 = icmp ne i64 %74, 0
br i1 %75, label %76, label %83
76: ; preds = %72
%77 = load i32*, i32** @stderr
%78 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%79 = load i32, i32* @errno
%80 = call i8* @strerror(i32 %79)
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %77, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8* %78, i8* %80)
%82 = call i32 @exit(i32 1)
unreachable
83: ; preds = %72
br label %153
84: ; preds = %66
%85 = load i32, i32* %14
switch i32 %85, label %111 [
i32 10, label %86
i32 13, label %91
i32 9, label %96
i32 92, label %101
i32 34, label %106
]
86: ; preds = %84
%87 = load i32*, i32** %7
%88 = call i32 (i32*, i8*, ...) @fprintf(i32* %87, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%89 = load i32, i32* %11
%90 = add nsw i32 %89, 2
store i32 %90, i32* %11
br label %131
91: ; preds = %84
%92 = load i32*, i32** %7
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%94 = load i32, i32* %11
%95 = add nsw i32 %94, 2
store i32 %95, i32* %11
br label %131
96: ; preds = %84
%97 = load i32*, i32** %7
%98 = call i32 (i32*, i8*, ...) @fprintf(i32* %97, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%99 = load i32, i32* %11
%100 = add nsw i32 %99, 2
store i32 %100, i32* %11
br label %131
101: ; preds = %84
%102 = load i32*, i32** %7
%103 = call i32 (i32*, i8*, ...) @fprintf(i32* %102, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%104 = load i32, i32* %11
%105 = add nsw i32 %104, 2
store i32 %105, i32* %11
br label %131
106: ; preds = %84
%107 = load i32*, i32** %7
%108 = call i32 (i32*, i8*, ...) @fprintf(i32* %107, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%109 = load i32, i32* %11
%110 = add nsw i32 %109, 2
store i32 %110, i32* %11
br label %131
111: ; preds = %84
%112 = load i32, i32* %14
%113 = call i32 @isgraph(i32 %112)
%114 = icmp ne i32 %113, 0
br i1 %114, label %118, label %115
115: ; preds = %111
%116 = load i32, i32* %14
%117 = icmp eq i32 %116, 32
br i1 %117, label %118, label %124
118: ; preds = %115, %111
%119 = load i32, i32* %14
%120 = load i32*, i32** %7
%121 = call i32 @fputc(i32 %119, i32* %120)
%122 = load i32, i32* %11
%123 = add nsw i32 %122, 1
store i32 %123, i32* %11
br label %130
124: ; preds = %115
%125 = load i32*, i32** %7
%126 = load i32, i32* %14
%127 = call i32 (i32*, i8*, ...) @fprintf(i32* %125, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i32 %126)
%128 = load i32, i32* %11
%129 = add nsw i32 %128, 3
store i32 %129, i32* %11
br label %130
130: ; preds = %124, %118
br label %131
131: ; preds = %130, %106, %101, %96, %91, %86
%132 = load i32, i32* %11
%133 = icmp sge i32 %132, 64
br i1 %133, label %134, label %152
134: ; preds = %131
%135 = load i32*, i32** %7
%136 = call i32 @fputc(i32 34, i32* %135)
%137 = load i32*, i32** %7
%138 = call i32 @fputc(i32 10, i32* %137)
store i32 0, i32* %12
br label %139
139: ; preds = %146, %134
%140 = load i32, i32* %12
%141 = load i32, i32* %13
%142 = icmp slt i32 %140, %141
br i1 %142, label %143, label %149
143: ; preds = %139
%144 = load i32*, i32** %7
%145 = call i32 @fputc(i32 32, i32* %144)
br label %146
146: ; preds = %143
%147 = load i32, i32* %12
%148 = add nsw i32 %147, 1
store i32 %148, i32* %12
br label %139
149: ; preds = %139
%150 = load i32*, i32** %7
%151 = call i32 @fputc(i32 34, i32* %150)
store i32 0, i32* %11
br label %152
152: ; preds = %149, %131
br label %66
153: ; preds = %83
%154 = load i32*, i32** %7
%155 = call i32 @fputc(i32 34, i32* %154)
%156 = load i32*, i32** %7
%157 = call i32 @fputc(i32 59, i32* %156)
%158 = load i32*, i32** %7
%159 = call i32 @fputc(i32 10, i32* %158)
%160 = load i32*, i32** %7
%161 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%162 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%163 = call i32 (i32*, i8*, ...) @fprintf(i32* %160, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0), i8* %161, i8* %162)
%164 = load i32*, i32** %7
%165 = call i32 @fputc(i32 10, i32* %164)
br label %166
166: ; preds = %153
%167 = load i32, i32* %6
%168 = add nsw i32 %167, 1
store i32 %168, i32* %6
br label %24
169: ; preds = %24
%170 = load i32*, i32** %7
%171 = call i64 @ferror(i32* %170)
%172 = icmp ne i64 %171, 0
br i1 %172, label %173, label %179
173: ; preds = %169
%174 = load i32*, i32** @stderr
%175 = load i32, i32* @errno
%176 = call i8* @strerror(i32 %175)
%177 = call i32 (i32*, i8*, ...) @fprintf(i32* %174, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* %176)
%178 = call i32 @exit(i32 1)
unreachable
179: ; preds = %169
%180 = load i32*, i32** %7
%181 = call i32 @rewind(i32* %180)
br label %182
182: ; preds = %211, %179
%183 = load i32*, i32** %7
%184 = call i32 @fgetc(i32* %183)
store i32 %184, i32* %15
%185 = load i32, i32* %15
%186 = load i32, i32* @EOF
%187 = icmp eq i32 %185, %186
br i1 %187, label %188, label %199
188: ; preds = %182
%189 = load i32*, i32** %7
%190 = call i64 @feof(i32* %189)
%191 = icmp ne i64 %190, 0
br i1 %191, label %192, label %193
192: ; preds = %188
br label %212
193: ; preds = %188
%194 = load i32*, i32** @stderr
%195 = load i32, i32* @errno
%196 = call i8* @strerror(i32 %195)
%197 = call i32 (i32*, i8*, ...) @fprintf(i32* %194, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.15, i64 0, i64 0), i8* %196)
%198 = call i32 @exit(i32 1)
unreachable
199: ; preds = %182
%200 = load i32, i32* %15
%201 = load i32*, i32** @stdout
%202 = call i32 @fputc(i32 %200, i32* %201)
%203 = load i32, i32* @EOF
%204 = icmp eq i32 %202, %203
br i1 %204, label %205, label %211
205: ; preds = %199
%206 = load i32*, i32** @stderr
%207 = load i32, i32* @errno
%208 = call i8* @strerror(i32 %207)
%209 = call i32 (i32*, i8*, ...) @fprintf(i32* %206, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.16, i64 0, i64 0), i8* %208)
%210 = call i32 @exit(i32 1)
unreachable
211: ; preds = %199
br label %182
212: ; preds = %192
%213 = load i32*, i32** %7
%214 = call i32 @fclose(i32* %213)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32* null
@.str = [39 x i8] c"Failed to open temporary output file.\0A\00"
@.str.1 = [17 x i8] c"%1023[^=]=%1023s\00"
@.str.2 = [45 x i8] c"Argument '%s' is too mysterious to process.\0A\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [37 x i8] c"Failed to open `%s' for reading: %s\0A\00"
@errno = global i32 0
@.str.5 = [20 x i8] c"const char %s[] = \22\00"
@EOF = global i32 0
@.str.6 = [22 x i8] c"Error reading %s: %s\0A\00"
@.str.7 = [3 x i8] c"\\n\00"
@.str.8 = [3 x i8] c"\\r\00"
@.str.9 = [3 x i8] c"\\t\00"
@.str.10 = [3 x i8] c"\\\\\00"
@.str.11 = [3 x i8] c"\\\22\00"
@.str.12 = [6 x i8] c"\\%03o\00"
@.str.13 = [35 x i8] c"const int %s_size = sizeof(%s)-1;\0A\00"
@.str.14 = [41 x i8] c"Error writing temporary output file: %s\0A\00"
@.str.15 = [37 x i8] c"Failed rereading temporary file: %s\0A\00"
@stdout = global i32* null
@.str.16 = [27 x i8] c"Failed writing output: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = tail call i32* (...) @tmpfile()
%6 = icmp eq i32* %5, null
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = icmp sgt i32 %0, 1
br i1 %8, label %9, label %107
9: ; preds = %7
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%12 = zext i32 %0 to i64
br label %17
13: ; preds = %2
%14 = load i32*, i32** @stderr
%15 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 38, i64 1, i32* %14)
%16 = tail call i32 @exit(i32 1)
unreachable
17: ; preds = %9, %99
%18 = phi i64 [ 1, %9 ], [ %105, %99 ]
%19 = getelementptr inbounds i8*, i8** %1, i64 %18
%20 = load i8*, i8** %19
%21 = call i32 @sscanf(i8* %20, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %10, i8* %11)
%22 = icmp eq i32 %21, 2
br i1 %22, label %30, label %23
23: ; preds = %17
%24 = and i64 %18, 4294967295
%25 = getelementptr inbounds i8*, i8** %1, i64 %24
%26 = load i32*, i32** @stderr
%27 = load i8*, i8** %25
%28 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i8* %27)
%29 = call i32 @exit(i32 1)
unreachable
30: ; preds = %17
%31 = call i32* @fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %39
33: ; preds = %30
%34 = load i32*, i32** @stderr
%35 = load i32, i32* @errno
%36 = call i8* @strerror(i32 %35)
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %11, i8* %36)
%38 = call i32 @exit(i32 1)
unreachable
39: ; preds = %30
%40 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %10)
%41 = call i32 @strlen(i8* %10)
%42 = call i32 @fgetc(i32* %31)
%43 = load i32, i32* @EOF
%44 = icmp eq i32 %42, %43
br i1 %44, label %49, label %45
45: ; preds = %39
%46 = icmp sgt i32 %41, -15
%47 = add i32 %41, 14
%48 = call i32 @llvm.smax.i32(i32 %47, i32 0)
br label %58
49: ; preds = %94, %39
%50 = call i64 @ferror(i32* %31)
%51 = icmp eq i64 %50, 0
br i1 %51, label %99, label %52
52: ; preds = %49
%53 = load i32*, i32** @stderr
%54 = load i32, i32* @errno
%55 = call i8* @strerror(i32 %54)
%56 = call i32 (i32*, i8*, ...) @fprintf(i32* %53, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8* %11, i8* %55)
%57 = call i32 @exit(i32 1)
unreachable
58: ; preds = %45, %94
%59 = phi i32 [ %42, %45 ], [ %96, %94 ]
%60 = phi i32 [ 0, %45 ], [ %95, %94 ]
switch i32 %59, label %71 [
i32 10, label %61
i32 13, label %63
i32 9, label %65
i32 92, label %67
i32 34, label %69
]
61: ; preds = %58
%62 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i64 2, i64 1, i32* %5)
br label %80
63: ; preds = %58
%64 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i64 2, i64 1, i32* %5)
br label %80
65: ; preds = %58
%66 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i64 2, i64 1, i32* %5)
br label %80
67: ; preds = %58
%68 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i64 2, i64 1, i32* %5)
br label %80
69: ; preds = %58
%70 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i64 2, i64 1, i32* %5)
br label %80
71: ; preds = %58
%72 = call i32 @isgraph(i32 %59)
%73 = icmp ne i32 %72, 0
%74 = icmp eq i32 %59, 32
%75 = or i1 %74, %73
br i1 %75, label %76, label %78
76: ; preds = %71
%77 = call i32 @fputc(i32 %59, i32* %5)
br label %80
78: ; preds = %71
%79 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i32 %59)
br label %80
80: ; preds = %76, %78, %69, %67, %65, %63, %61
%81 = phi i32 [ 1, %76 ], [ 3, %78 ], [ 2, %69 ], [ 2, %67 ], [ 2, %65 ], [ 2, %63 ], [ 2, %61 ]
%82 = add nsw i32 %60, %81
%83 = icmp sgt i32 %82, 63
br i1 %83, label %84, label %94
84: ; preds = %80
%85 = call i32 @fputc(i32 34, i32* %5)
%86 = call i32 @fputc(i32 10, i32* %5)
br i1 %46, label %87, label %92
87: ; preds = %84, %87
%88 = phi i32 [ %90, %87 ], [ 0, %84 ]
%89 = call i32 @fputc(i32 32, i32* %5)
%90 = add nuw i32 %88, 1
%91 = icmp eq i32 %88, %48
br i1 %91, label %92, label %87
92: ; preds = %87, %84
%93 = call i32 @fputc(i32 34, i32* %5)
br label %94
94: ; preds = %80, %92
%95 = phi i32 [ 0, %92 ], [ %82, %80 ]
%96 = call i32 @fgetc(i32* %31)
%97 = load i32, i32* @EOF
%98 = icmp eq i32 %96, %97
br i1 %98, label %49, label %58
99: ; preds = %49
%100 = call i32 @fputc(i32 34, i32* %5)
%101 = call i32 @fputc(i32 59, i32* %5)
%102 = call i32 @fputc(i32 10, i32* %5)
%103 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0), i8* %10, i8* %10)
%104 = call i32 @fputc(i32 10, i32* %5)
%105 = add nuw nsw i64 %18, 1
%106 = icmp eq i64 %105, %12
br i1 %106, label %107, label %17
107: ; preds = %99, %7
%108 = call i64 @ferror(i32* %5)
%109 = icmp eq i64 %108, 0
br i1 %109, label %116, label %110
110: ; preds = %107
%111 = load i32*, i32** @stderr
%112 = load i32, i32* @errno
%113 = call i8* @strerror(i32 %112)
%114 = call i32 (i32*, i8*, ...) @fprintf(i32* %111, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* %113)
%115 = call i32 @exit(i32 1)
unreachable
116: ; preds = %107
%117 = call i32 @rewind(i32* %5)
br label %118
118: ; preds = %131, %116
%119 = call i32 @fgetc(i32* %5)
%120 = load i32, i32* @EOF
%121 = icmp eq i32 %119, %120
br i1 %121, label %122, label %131
122: ; preds = %118
%123 = call i64 @feof(i32* %5)
%124 = icmp eq i64 %123, 0
br i1 %124, label %125, label %142
125: ; preds = %122
%126 = load i32*, i32** @stderr
%127 = load i32, i32* @errno
%128 = call i8* @strerror(i32 %127)
%129 = call i32 (i32*, i8*, ...) @fprintf(i32* %126, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.15, i64 0, i64 0), i8* %128)
%130 = call i32 @exit(i32 1)
unreachable
131: ; preds = %118
%132 = load i32*, i32** @stdout
%133 = call i32 @fputc(i32 %119, i32* %132)
%134 = load i32, i32* @EOF
%135 = icmp eq i32 %133, %134
br i1 %135, label %136, label %118
136: ; preds = %131
%137 = load i32*, i32** @stderr
%138 = load i32, i32* @errno
%139 = call i8* @strerror(i32 %138)
%140 = call i32 (i32*, i8*, ...) @fprintf(i32* %137, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.16, i64 0, i64 0), i8* %139)
%141 = call i32 @exit(i32 1)
unreachable
142: ; preds = %122
%143 = call i32 @fclose(i32* %5)
ret i32 0
}