#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int /*<<< orphan*/ *strstr(char *, char *);
int main(int argc, char *argv[]) {
  char filename[20];
  FILE *fh;
  char data[1024];
  int is_metafont = 0;
  int is_luatex = 0;
  if (argc != 2) {
    fprintf(stderr, "%s: need exactly one argument (base name).\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  strcpy(filename, argv[1]);
  strcat(filename, ".pool");
  fh = fopen(filename, "r");
  if (!fh) {
    fprintf(stderr, "%s: can't open %s for reading.\n", argv[0], filename);
    exit(EXIT_FAILURE);
  }
  if (strstr(filename, "luatex.pool") != NULL)
    is_luatex = 1;
  else if (strstr(filename, "mf.pool") != NULL)
    is_metafont = 1;
  printf("/*\n"
         " * This file is auto-generated by makecpool.\n"
         " *   %s %s\n"
         " */\n"
         "\n"
         "#include <stdio.h>\n"
         "#include <string.h>\n"
         "#define EXTERN extern\n"
         "#include \"%sd.h\"\n"
         "\n"
         "static const char *poolfilearr[] = {\n",
         argv[0], argv[1], argv[1]);
  while (fgets(data, 1024, fh)) {
    int i;
    int len = strlen(data);
    int o = 0;
    if (data[len - 1] == '\n') {
      data[len - 1] = 0;
      len--;
    }
    if (data[0] == '*')
      break;
    if (data[0] >= '0' && data[0] <= '9' && data[1] >= '0' && data[1] <= '9') {
      o = 2;
    }
    printf("  \"");
    for (i = o; i < len; i++) {
      if (data[i] == '"' || data[i] == '\\')
        putchar('\\');
      if (data[i] == '?')
        printf("\" \"");
      putchar(data[i]);
    }
    printf("\",\n");
  }
  fclose(fh);
  printf("  NULL };\n"
         "int loadpoolstrings (integer spare_size) {\n"
         "  const char *s;\n"
         "  strnumber g=0;\n"
         "  int i=0,j=0;\n"
         "  while ((s = poolfilearr[j++])) {\n"
         "    int l = strlen (s);\n"
         "    i += l;\n"
         "    if (i>=spare_size) return 0;\n");
  if (is_luatex)
    printf("    while (l-- > 0) str_pool[pool_ptr++] = *s++;\n"
           "    g = make_string();\n");
  else
    printf("    while (l-- > 0) strpool[poolptr++] = *s++;\n"
           "    g = makestring();\n");
  if (is_metafont)
    printf("    strref[g]= 127;\n");
  printf("  }\n"
         "  return g;\n"
         "}\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x444(%rbp)
movl   $0x0,-0x448(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1213 <main+0x63>
mov    0x2df2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe02(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2dcc(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1040 <strcpy@plt>
lea    -0x30(%rbp),%rdi
lea    0xe2d(%rip),%rsi
call   10b0 <strcat@plt>
lea    -0x30(%rbp),%rdi
lea    0xded(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1283 <main+0xd3>
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    -0x30(%rbp),%rcx
lea    0xdc0(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
lea    -0x30(%rbp),%rdi
lea    0xdc0(%rip),%rsi
call   10d0 <strstr@plt>
cmp    $0x0,%rax
je     12ac <main+0xfc>
movl   $0x1,-0x448(%rbp)
jmp    12d5 <main+0x125>
lea    -0x30(%rbp),%rdi
lea    0xda3(%rip),%rsi
call   10d0 <strstr@plt>
cmp    $0x0,%rax
je     12d0 <main+0x120>
movl   $0x1,-0x444(%rbp)
jmp    12d5 <main+0x125>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xd6f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x440(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    $0x400,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     1499 <main+0x2e9>
lea    -0x440(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x450(%rbp)
movl   $0x0,-0x454(%rbp)
mov    -0x450(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x440(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    1373 <main+0x1c3>
mov    -0x450(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x440(%rbp,%rax,1)
mov    -0x450(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x450(%rbp)
movsbl -0x440(%rbp),%eax
cmp    $0x2a,%eax
jne    1388 <main+0x1d8>
jmp    1499 <main+0x2e9>
movsbl -0x440(%rbp),%eax
cmp    $0x30,%eax
jl     13d2 <main+0x222>
movsbl -0x440(%rbp),%eax
cmp    $0x39,%eax
jg     13d2 <main+0x222>
movsbl -0x43f(%rbp),%eax
cmp    $0x30,%eax
jl     13d2 <main+0x222>
movsbl -0x43f(%rbp),%eax
cmp    $0x39,%eax
jg     13d2 <main+0x222>
movl   $0x2,-0x454(%rbp)
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x454(%rbp),%eax
mov    %eax,-0x44c(%rbp)
mov    -0x44c(%rbp),%eax
cmp    -0x450(%rbp),%eax
jge    1486 <main+0x2d6>
movslq -0x44c(%rbp),%rax
movsbl -0x440(%rbp,%rax,1),%eax
ff
cmp    $0x22,%eax
je     142e <main+0x27e>
movslq -0x44c(%rbp),%rax
movsbl -0x440(%rbp,%rax,1),%eax
ff
cmp    $0x5c,%eax
jne    1438 <main+0x288>
mov    $0x5c,%edi
call   1030 <putchar@plt>
movslq -0x44c(%rbp),%rax
movsbl -0x440(%rbp,%rax,1),%eax
ff
cmp    $0x3f,%eax
jne    145e <main+0x2ae>
lea    0xcc4(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movslq -0x44c(%rbp),%rax
movsbl -0x440(%rbp,%rax,1),%edi
ff
call   1030 <putchar@plt>
mov    -0x44c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44c(%rbp)
jmp    13ec <main+0x23c>
lea    0xc92(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    12fa <main+0x14a>
mov    -0x38(%rbp),%rdi
call   1050 <fclose@plt>
lea    0xc7a(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
cmpl   $0x0,-0x448(%rbp)
je     14d0 <main+0x320>
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    14de <main+0x32e>
lea    0xd64(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
cmpl   $0x0,-0x444(%rbp)
je     14f9 <main+0x349>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xd96(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2ac2(%rip),%rax
mov    (%rax),%eax
add    $0x460,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x438,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    13e4 <main+0x224>
mov    0x8(%rbx),%rsi
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strcpy@plt>
lea    0xe67(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <strcat@plt>
lea    0xe28(%rip),%rsi
mov    %rbp,%rdi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1400 <main+0x240>
mov    %rax,%r15
lea    0xe2f(%rip),%rsi
lea    0x10(%rsp),%rdi
call   10e0 <strstr@plt>
mov    $0x1,%cl
mov    %rax,0x8(%rsp)
test   %rax,%rax
jne    124c <main+0x8c>
lea    0xe1e(%rip),%rsi
lea    0x10(%rsp),%rdi
call   10e0 <strstr@plt>
test   %rax,%rax
sete   %cl
mov    %cl,0x7(%rsp)
mov    (%rbx),%rsi
mov    0x8(%rbx),%rcx
lea    0xe04(%rip),%rdi
mov    %rcx,%rdx
xor    %eax,%eax
call   1080 <printf@plt>
lea    0x30(%rsp),%rdi
mov    $0x400,%esi
mov    %r15,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     1379 <main+0x1b9>
lea    0x30(%rsp),%r13
lea    0xe8c(%rip),%rbx
jmp    12c5 <main+0x105>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xff9(%rip),%rdi
call   1050 <puts@plt>
mov    %r13,%rdi
mov    $0x400,%esi
mov    %r15,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     1379 <main+0x1b9>
mov    %r13,%rdi
call   1070 <strlen@plt>
mov    %eax,%r14d
cltq
cmpb   $0xa,0x2f(%rsp,%rax,1)
jne    12e5 <main+0x125>
add    $0xffffffffffffffff,%rax
movb   $0x0,0x30(%rsp,%rax,1)
mov    %eax,%r14d
mov    0x30(%rsp),%al
cmp    $0x2a,%al
je     1379 <main+0x1b9>
add    $0xd0,%al
cmp    $0xa,%al
setb   %al
mov    0x31(%rsp),%cl
cmp    $0x30,%cl
setge  %dl
cmp    $0x3a,%cl
setl   %cl
and    %dl,%cl
and    %al,%cl
movzbl %cl,%ebp
add    %ebp,%ebp
lea    0xdff(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
cmp    %r14d,%ebp
jge    12a0 <main+0xe0>
mov    %ebp,%r12d
mov    %r14d,%ebp
jmp    1345 <main+0x185>
movsbl %al,%edi
call   1030 <putchar@plt>
add    $0x1,%r12
cmp    %r12,%rbp
je     12a0 <main+0xe0>
movzbl 0x30(%rsp,%r12,1),%eax
cmp    $0x5c,%al
je     1353 <main+0x193>
cmp    $0x22,%al
jne    1363 <main+0x1a3>
mov    $0x5c,%edi
call   1030 <putchar@plt>
movzbl 0x30(%rsp,%r12,1),%eax
cmp    $0x3f,%al
jne    1330 <main+0x170>
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
movzbl 0x30(%rsp,%r12,1),%eax
jmp    1330 <main+0x170>
mov    %r15,%rdi
call   1060 <fclose@plt>
lea    0xd97(%rip),%rdi
call   1050 <puts@plt>
cmpq   $0x0,0x8(%rsp)
lea    0xe53(%rip),%rax
lea    0xeb7(%rip),%rdi
cmove  %rax,%rdi
call   1050 <puts@plt>
cmpb   $0x0,0x7(%rsp)
jne    13bd <main+0x1fd>
lea    0xe8c(%rip),%rdi
call   1050 <puts@plt>
lea    0xe6e(%rip),%rdi
call   1050 <puts@plt>
mov    0x2c00(%rip),%rax
mov    (%rax),%eax
add    $0x438,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2bf5(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xc09(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    141f <main+0x25f>
mov    0x2bd9(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xc1b(%rip),%rsi
lea    0x10(%rsp),%rcx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x2bb2(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"%s: need exactly one argument (base name).\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [6 x i8] c".pool\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [32 x i8] c"%s: can't open %s for reading.\0A\00"
@.str.4 = [12 x i8] c"luatex.pool\00"
@.str.5 = [8 x i8] c"mf.pool\00"
@.str.6 = [181 x i8] c"/*\0A * This file is auto-generated by makecpool.\0A * %s %s\0A */\0A\0A#include <stdio.h>\0A#include <string.h>\0A#define EXTERN extern\0A#include \22%sd.h\22\0A\0Astatic const char *poolfilearr[] = {\0A\00"
@.str.7 = [4 x i8] c" \22\00"
@.str.8 = [4 x i8] c"\22 \22\00"
@.str.9 = [4 x i8] c"\22,\0A\00"
@.str.10 = [207 x i8] c" NULL };\0Aint loadpoolstrings (integer spare_size) {\0A const char *s;\0A strnumber g=0;\0A int i=0,j=0;\0A while ((s = poolfilearr[j++])) {\0A int l = strlen (s);\0A i += l;\0A if (i>=spare_size) return 0;\0A\00"
@.str.11 = [73 x i8] c" while (l-- > 0) str_pool[pool_ptr++] = *s++;\0A g = make_string();\0A\00"
@.str.12 = [70 x i8] c" while (l-- > 0) strpool[poolptr++] = *s++;\0A g = makestring();\0A\00"
@.str.13 = [21 x i8] c" strref[g]= 127;\0A\00"
@.str.14 = [19 x i8] c" }\0A return g;\0A}\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 [20 x i8]
%7 = alloca i32*
%8 = alloca [1024 x i8]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
store i32 0, i32* %10
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 2
br i1 %15, label %16, label %24
16: ; preds = %2
%17 = load i32, i32* @stderr
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = load i32, i32* @EXIT_FAILURE
%23 = call i32 @exit(i32 %22)
unreachable
24: ; preds = %2
%25 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i32 @strcpy(i8* %25, i8* %28)
%30 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%31 = call i32 @strcat(i8* %30, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%32 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%33 = call i32* @fopen(i8* %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %33, i32** %7
%34 = load i32*, i32** %7
%35 = icmp ne i32* %34, null
br i1 %35, label %45, label %36
36: ; preds = %24
%37 = load i32, i32* @stderr
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 0
%40 = load i8*, i8** %39
%41 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%42 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %40, i8* %41)
%43 = load i32, i32* @EXIT_FAILURE
%44 = call i32 @exit(i32 %43)
unreachable
45: ; preds = %24
%46 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%47 = call i32* @strstr(i8* %46, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%48 = icmp ne i32* %47, null
br i1 %48, label %49, label %50
49: ; preds = %45
store i32 1, i32* %10
br label %56
50: ; preds = %45
%51 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%52 = call i32* @strstr(i8* %51, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%53 = icmp ne i32* %52, null
br i1 %53, label %54, label %55
54: ; preds = %50
store i32 1, i32* %9
br label %55
55: ; preds = %54, %50
br label %56
56: ; preds = %55, %49
%57 = load i8**, i8*** %5
%58 = getelementptr inbounds i8*, i8** %57, i64 0
%59 = load i8*, i8** %58
%60 = load i8**, i8*** %5
%61 = getelementptr inbounds i8*, i8** %60, i64 1
%62 = load i8*, i8** %61
%63 = load i8**, i8*** %5
%64 = getelementptr inbounds i8*, i8** %63, i64 1
%65 = load i8*, i8** %64
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.6, i64 0, i64 0), i8* %59, i8* %62, i8* %65)
br label %67
67: ; preds = %157, %56
%68 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%69 = load i32*, i32** %7
%70 = call i64 @fgets(i8* %68, i32 1024, i32* %69)
%71 = icmp ne i64 %70, 0
br i1 %71, label %72, label %159
72: ; preds = %67
%73 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%74 = call i32 @strlen(i8* %73)
store i32 %74, i32* %12
store i32 0, i32* %13
%75 = load i32, i32* %12
%76 = sub nsw i32 %75, 1
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %77
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp eq i32 %80, 10
br i1 %81, label %82, label %89
82: ; preds = %72
%83 = load i32, i32* %12
%84 = sub nsw i32 %83, 1
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %85
store i8 0, i8* %86
%87 = load i32, i32* %12
%88 = add nsw i32 %87, -1
store i32 %88, i32* %12
br label %89
89: ; preds = %82, %72
%90 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp eq i32 %92, 42
br i1 %93, label %94, label %95
94: ; preds = %89
br label %159
95: ; preds = %89
%96 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp sge i32 %98, 48
br i1 %99, label %100, label %116
100: ; preds = %95
%101 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = icmp sle i32 %103, 57
br i1 %104, label %105, label %116
105: ; preds = %100
%106 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 1
%107 = load i8, i8* %106
%108 = sext i8 %107 to i32
%109 = icmp sge i32 %108, 48
br i1 %109, label %110, label %116
110: ; preds = %105
%111 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 1
%112 = load i8, i8* %111
%113 = sext i8 %112 to i32
%114 = icmp sle i32 %113, 57
br i1 %114, label %115, label %116
115: ; preds = %110
store i32 2, i32* %13
br label %116
116: ; preds = %115, %110, %105, %100, %95
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%118 = load i32, i32* %13
store i32 %118, i32* %11
br label %119
119: ; preds = %154, %116
%120 = load i32, i32* %11
%121 = load i32, i32* %12
%122 = icmp slt i32 %120, %121
br i1 %122, label %123, label %157
123: ; preds = %119
%124 = load i32, i32* %11
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %125
%127 = load i8, i8* %126
%128 = sext i8 %127 to i32
%129 = icmp eq i32 %128, 34
br i1 %129, label %137, label %130
130: ; preds = %123
%131 = load i32, i32* %11
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %132
%134 = load i8, i8* %133
%135 = sext i8 %134 to i32
%136 = icmp eq i32 %135, 92
br i1 %136, label %137, label %139
137: ; preds = %130, %123
%138 = call i32 @putchar(i8 signext 92)
br label %139
139: ; preds = %137, %130
%140 = load i32, i32* %11
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %141
%143 = load i8, i8* %142
%144 = sext i8 %143 to i32
%145 = icmp eq i32 %144, 63
br i1 %145, label %146, label %148
146: ; preds = %139
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
br label %148
148: ; preds = %146, %139
%149 = load i32, i32* %11
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %150
%152 = load i8, i8* %151
%153 = call i32 @putchar(i8 signext %152)
br label %154
154: ; preds = %148
%155 = load i32, i32* %11
%156 = add nsw i32 %155, 1
store i32 %156, i32* %11
br label %119
157: ; preds = %119
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
br label %67
159: ; preds = %94, %67
%160 = load i32*, i32** %7
%161 = call i32 @fclose(i32* %160)
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([207 x i8], [207 x i8]* @.str.10, i64 0, i64 0))
%163 = load i32, i32* %10
%164 = icmp ne i32 %163, 0
br i1 %164, label %165, label %167
165: ; preds = %159
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.11, i64 0, i64 0))
br label %169
167: ; preds = %159
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0))
br label %169
169: ; preds = %167, %165
%170 = load i32, i32* %9
%171 = icmp ne i32 %170, 0
br i1 %171, label %172, label %174
172: ; preds = %169
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
br label %174
174: ; preds = %172, %169
%175 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0))
%176 = load i32, i32* @EXIT_SUCCESS
ret i32 %176
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"%s: need exactly one argument (base name).\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [6 x i8] c".pool\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [32 x i8] c"%s: can't open %s for reading.\0A\00"
@.str.4 = [12 x i8] c"luatex.pool\00"
@.str.5 = [8 x i8] c"mf.pool\00"
@.str.6 = [181 x i8] c"/*\0A * This file is auto-generated by makecpool.\0A * %s %s\0A */\0A\0A#include <stdio.h>\0A#include <string.h>\0A#define EXTERN extern\0A#include \22%sd.h\22\0A\0Astatic const char *poolfilearr[] = {\0A\00"
@.str.7 = [4 x i8] c" \22\00"
@.str.8 = [4 x i8] c"\22 \22\00"
@EXIT_SUCCESS = global i32 0
@str = [206 x i8] c" NULL };\0Aint loadpoolstrings (integer spare_size) {\0A const char *s;\0A strnumber g=0;\0A int i=0,j=0;\0A while ((s = poolfilearr[j++])) {\0A int l = strlen (s);\0A i += l;\0A if (i>=spare_size) return 0;\00"
@str.15 = [69 x i8] c" while (l-- > 0) strpool[poolptr++] = *s++;\0A g = makestring();\00"
@str.16 = [18 x i8] c" }\0A return g;\0A}\00"
@str.17 = [20 x i8] c" strref[g]= 127;\00"
@str.18 = [72 x i8] c" while (l-- > 0) str_pool[pool_ptr++] = *s++;\0A g = make_string();\00"
@str.19 = [3 x i8] c"\22,\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [20 x i8]
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%7 = icmp eq i32 %0, 2
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %1
%11 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* @EXIT_FAILURE
%13 = tail call i32 @exit(i32 %12)
unreachable
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @strcpy(i8* %5, i8* %16)
%18 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %27
21: ; preds = %14
%22 = load i32, i32* @stderr
%23 = load i8*, i8** %1
%24 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %23, i8* %5)
%25 = load i32, i32* @EXIT_FAILURE
%26 = call i32 @exit(i32 %25)
unreachable
27: ; preds = %14
%28 = call i32* @strstr(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%29 = icmp eq i32* %28, null
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = call i32* @strstr(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%32 = icmp eq i32* %31, null
br label %33
33: ; preds = %30, %27
%34 = phi i1 [ true, %27 ], [ %32, %30 ]
%35 = load i8*, i8** %1
%36 = load i8*, i8** %15
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([181 x i8], [181 x i8]* @.str.6, i64 0, i64 0), i8* %35, i8* %36, i8* %36)
%38 = call i64 @fgets(i8* %6, i32 1024, i32* %19)
%39 = icmp eq i64 %38, 0
br i1 %39, label %90, label %40
40: ; preds = %33
%41 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 1
br label %42
42: ; preds = %40, %86
%43 = call i32 @strlen(i8* %6)
%44 = add nsw i32 %43, -1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %45
%47 = load i8, i8* %46
%48 = icmp eq i8 %47, 10
br i1 %48, label %49, label %50
49: ; preds = %42
store i8 0, i8* %46
br label %50
50: ; preds = %49, %42
%51 = phi i32 [ %44, %49 ], [ %43, %42 ]
%52 = load i8, i8* %6
%53 = icmp eq i8 %52, 42
br i1 %53, label %90, label %54
54: ; preds = %50
%55 = add i8 %52, -48
%56 = icmp ult i8 %55, 10
%57 = load i8, i8* %41
%58 = icmp sgt i8 %57, 47
%59 = select i1 %56, i1 %58, i1 false
%60 = icmp slt i8 %57, 58
%61 = select i1 %59, i1 %60, i1 false
%62 = select i1 %61, i32 2, i32 0
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%64 = icmp slt i32 %62, %51
br i1 %64, label %65, label %86
65: ; preds = %54
%66 = zext i32 %62 to i64
%67 = zext i32 %51 to i64
br label %68
68: ; preds = %65, %81
%69 = phi i64 [ %66, %65 ], [ %84, %81 ]
%70 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %69
%71 = load i8, i8* %70
switch i8 %71, label %75 [
i8 34, label %72
i8 92, label %72
]
72: ; preds = %68, %68
%73 = call i32 @putchar(i8 signext 92)
%74 = load i8, i8* %70
br label %75
75: ; preds = %68, %72
%76 = phi i8 [ %71, %68 ], [ %74, %72 ]
%77 = icmp eq i8 %76, 63
br i1 %77, label %78, label %81
78: ; preds = %75
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%80 = load i8, i8* %70
br label %81
81: ; preds = %78, %75
%82 = phi i8 [ %80, %78 ], [ %76, %75 ]
%83 = call i32 @putchar(i8 signext %82)
%84 = add nuw nsw i64 %69, 1
%85 = icmp eq i64 %84, %67
br i1 %85, label %86, label %68
86: ; preds = %81, %54
%87 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.19, i64 0, i64 0))
%88 = call i64 @fgets(i8* %6, i32 1024, i32* %19)
%89 = icmp eq i64 %88, 0
br i1 %89, label %90, label %42
90: ; preds = %86, %50, %33
%91 = call i32 @fclose(i32* %19)
%92 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([206 x i8], [206 x i8]* @str, i64 0, i64 0))
%93 = select i1 %29, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @str.15, i64 0, i64 0), i8* getelementptr inbounds ([72 x i8], [72 x i8]* @str.18, i64 0, i64 0)
%94 = call i32 @puts(i8* dereferenceable(1) %93)
br i1 %34, label %97, label %95
95: ; preds = %90
%96 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.17, i64 0, i64 0))
br label %97
97: ; preds = %95, %90
%98 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.16, i64 0, i64 0))
%99 = load i32, i32* @EXIT_SUCCESS
ret i32 %99
}