#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*/ fclose(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(int);
int /*<<< orphan*/ stderr;
size_t strlen(char *);
scalar_t__ strstr(char *, char *);
int main(int argc, char *argv[]) {
  int x;
  int first_file = 1;
  printf("/* Built-in files */\n");
  printf("\n");
  printf("#include \"types.h\"\n");
  printf("\n");
  printf("const char *builtins[]=\n");
  printf("{\n");
  for (x = 1; argv[x]; ++x) {
    int c;
    int instring = 0;
    int first_string = 1;
    size_t z;
    int type;
    FILE *f;
    f = fopen(argv[x], "r");
    if (!f) {
      fprintf(stderr, "Couldn't open file '%s'\n", argv[x]);
      return -1;
    }
    for (z = strlen(argv[x]); z && argv[x][z - 1] != '/'; --z)
      ;
    if (first_file) {
      printf("	\"%s\",\n", argv[x] + z);
      first_file = 0;
    } else
      printf(",	\"%s\",\n", argv[x] + z);
    if (strstr(argv[x] + z, ".jsf"))
      type = 1;
    else
      type = 0;
    while ((c = fgetc(f)) != -1) {
      if (!instring) {
        if ((type && c == '#') ||
            (!type && (c == ' ' || c == '\t' || c == '\n'))) {
          do
            if (c == '\n')
              break;
          while ((c = fgetc(f)) != -1);
          continue;
        }
        if (first_string) {
          printf("		\"");
          first_string = 0;
        } else
          printf("		\"");
        instring = 1;
      }
      if (c == '"')
        printf("\\\"");
      else if (c == '\\')
        printf("\\\\");
      else if (c == '\n')
        printf("\\n");
      else if ((c >= 32 && c <= 126) || c == '\t')
        putchar(c);
      else
        printf("\\x%2.2x", c);
      if (c == '\n') {
        printf("\"\n");
        instring = 0;
      }
    }
    if (instring) {
      printf("\"\n");
      instring = 0;
    }
    fclose(f);
  }
  if (first_file)
    printf("	NULL\n");
  else
    printf(",	NULL\n");
  printf("};\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe56(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     152c <main+0x3ac>
movl   $0x0,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe1a(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    126d <main+0xed>
mov    0x2d99(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xdec(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    156c <main+0x3ec>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x30(%rbp)
mov    %al,-0x41(%rbp)
je     12b3 <main+0x133>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x30(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
setne  %al
mov    %al,-0x41(%rbp)
mov    -0x41(%rbp),%al
test   $0x1,%al
jne    12c3 <main+0x143>
jmp    12d9 <main+0x159>
jmp    12c8 <main+0x148>
mov    -0x30(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
jmp    1282 <main+0x102>
cmpl   $0x0,-0x18(%rbp)
je     130d <main+0x18d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
add    -0x30(%rbp),%rsi
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x18(%rbp)
jmp    132b <main+0x1ab>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
add    -0x30(%rbp),%rsi
lea    0xd3d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    -0x30(%rbp),%rdi
lea    0xd28(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
je     135d <main+0x1dd>
movl   $0x1,-0x34(%rbp)
jmp    1364 <main+0x1e4>
movl   $0x0,-0x34(%rbp)
jmp    1369 <main+0x1e9>
mov    -0x40(%rbp),%rdi
call   1070 <fgetc@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
je     14f6 <main+0x376>
cmpl   $0x0,-0x20(%rbp)
jne    1430 <main+0x2b0>
cmpl   $0x0,-0x34(%rbp)
je     139c <main+0x21c>
cmpl   $0x23,-0x1c(%rbp)
je     13c4 <main+0x244>
cmpl   $0x0,-0x34(%rbp)
jne    13f7 <main+0x277>
cmpl   $0x20,-0x1c(%rbp)
je     13c4 <main+0x244>
cmpl   $0x9,-0x1c(%rbp)
je     13c4 <main+0x244>
cmpl   $0xa,-0x1c(%rbp)
jne    13f7 <main+0x277>
jmp    13c9 <main+0x249>
cmpl   $0xa,-0x1c(%rbp)
jne    13d8 <main+0x258>
jmp    13f2 <main+0x272>
jmp    13dd <main+0x25d>
mov    -0x40(%rbp),%rdi
call   1070 <fgetc@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
jne    13c9 <main+0x249>
jmp    1369 <main+0x1e9>
cmpl   $0x0,-0x24(%rbp)
je     141b <main+0x29b>
lea    0xc67(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x24(%rbp)
jmp    1429 <main+0x2a9>
lea    0xc4d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x20(%rbp)
cmpl   $0x22,-0x1c(%rbp)
jne    144d <main+0x2cd>
lea    0xc32(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14d2 <main+0x352>
cmpl   $0x5c,-0x1c(%rbp)
jne    146a <main+0x2ea>
lea    0xc18(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14cd <main+0x34d>
cmpl   $0xa,-0x1c(%rbp)
jne    1487 <main+0x307>
lea    0xbfe(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14c8 <main+0x348>
cmpl   $0x20,-0x1c(%rbp)
jl     149b <main+0x31b>
cmpl   $0x7e,-0x1c(%rbp)
jle    14a5 <main+0x325>
cmpl   $0x9,-0x1c(%rbp)
jne    14b2 <main+0x332>
mov    -0x1c(%rbp),%edi
call   1030 <putchar@plt>
jmp    14c3 <main+0x343>
mov    -0x1c(%rbp),%esi
lea    0xbc0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14c8 <main+0x348>
jmp    14cd <main+0x34d>
jmp    14d2 <main+0x352>
cmpl   $0xa,-0x1c(%rbp)
jne    14f1 <main+0x371>
lea    0xb44(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x20(%rbp)
jmp    1369 <main+0x1e9>
cmpl   $0x0,-0x20(%rbp)
je     1515 <main+0x395>
lea    0xb20(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x40(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11f8 <main+0x78>
cmpl   $0x0,-0x18(%rbp)
je     1549 <main+0x3c9>
lea    0xb48(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1557 <main+0x3d7>
lea    0xb34(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xb2e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
lea    0xe99(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe98(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe95(%rip),%rdi
call   1040 <puts@plt>
lea    0xea1(%rip),%rdi
call   1040 <puts@plt>
mov    0x8(%rbx),%rdi
test   %rdi,%rdi
je     1449 <main+0x2b9>
lea    0x8(%rbx),%r14
lea    0xe22(%rip),%r12
mov    $0x1,%r15d
mov    %rbx,(%rsp)
jmp    123d <main+0xad>
cs nopw 0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1050 <fclose@plt>
mov    (%rsp),%rbx
lea    (%rbx,%r15,8),%r14
add    $0x8,%r14
mov    0x8(%rbx,%r15,8),%rdi
add    $0x1,%r15
lea    0xde7(%rip),%r12
test   %rdi,%rdi
je     1452 <main+0x2c2>
lea    0xdbc(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     146e <main+0x2de>
mov    %rax,%r13
mov    (%r14),%rbx
mov    %rbx,%rdi
call   1060 <strlen@plt>
add    %rax,%rbx
neg    %rax
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rsi
mov    %rax,%rbp
test   %rax,%rax
je     1289 <main+0xf9>
lea    -0x1(%rsi),%rbx
lea    0x1(%rbp),%rax
cmpb   $0x2f,-0x1(%rsi)
jne    1270 <main+0xe0>
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    (%r14),%rdi
sub    %rbp,%rdi
lea    0xd84(%rip),%rsi
call   10b0 <strstr@plt>
mov    %rax,%rbp
mov    %r13,%rdi
call   1080 <fgetc@plt>
cmp    $0xffffffff,%eax
je     1210 <main+0x80>
mov    %eax,%r12d
xor    %r14d,%r14d
jmp    12eb <main+0x15b>
xor    %ebx,%ebx
lea    0xd63(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x1,%r14d
mov    %r13,%rdi
call   1080 <fgetc@plt>
mov    %eax,%r12d
cmp    $0xffffffff,%eax
je     1430 <main+0x2a0>
test   %r14d,%r14d
je     1350 <main+0x1c0>
cmp    $0xa,%r12d
je     13bc <main+0x22c>
cmp    $0x5c,%r12d
je     1391 <main+0x201>
cmp    $0x22,%r12d
je     12c1 <main+0x131>
cmp    $0x9,%r12d
je     13cc <main+0x23c>
lea    -0x20(%r12),%eax
cmp    $0x5e,%eax
jbe    13cc <main+0x23c>
lea    0xd0d(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
cmp    $0xa,%r12d
je     13e0 <main+0x250>
jmp    13f6 <main+0x266>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %rbp,%rbp
je     139f <main+0x20f>
cmp    $0x23,%r12d
jne    139f <main+0x20f>
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1080 <fgetc@plt>
cmp    $0xa,%eax
je     1372 <main+0x1e2>
cmp    $0xffffffff,%eax
jne    1360 <main+0x1d0>
mov    %r13,%rdi
call   1080 <fgetc@plt>
mov    %eax,%r12d
mov    $0x0,%r14d
cmp    $0xffffffff,%eax
jne    12eb <main+0x15b>
jmp    1210 <main+0x80>
xor    %ebx,%ebx
lea    0xc96(%rip),%rdi
jmp    12ca <main+0x13a>
test   %rbp,%rbp
je     1403 <main+0x273>
lea    0xc7e(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
cmp    $0xa,%r12d
jne    12fa <main+0x16a>
lea    0xc70(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    13e0 <main+0x250>
mov    %r12d,%edi
call   1030 <putchar@plt>
cmp    $0xa,%r12d
jne    13f6 <main+0x266>
nopw   0x0(%rax,%rax,1)
lea    0xc44(%rip),%rdi
call   1040 <puts@plt>
xor    %r14d,%r14d
mov    $0x1,%bl
jmp    12d7 <main+0x147>
mov    $0x1,%r14d
xor    %ebx,%ebx
jmp    12d7 <main+0x147>
cmp    $0x20,%r12d
je     1360 <main+0x1d0>
cmp    $0xa,%r12d
je     1372 <main+0x1e2>
cmp    $0x9,%r12d
je     1360 <main+0x1d0>
jmp    13a4 <main+0x214>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %bl,%bl
jne    1210 <main+0x80>
lea    0xbec(%rip),%rdi
call   1040 <puts@plt>
jmp    1210 <main+0x80>
lea    0xc31(%rip),%rdi
jmp    1459 <main+0x2c9>
lea    0xc27(%rip),%rdi
call   1040 <puts@plt>
lea    0xc22(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
jmp    148b <main+0x2fb>
mov    0x2b6b(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xb81(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.5 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.6 = [25 x i8] c"Couldn't open file '%s'\0A\00"
@.str.7 = [8 x i8] c"\09\22%s\22,\0A\00"
@.str.8 = [9 x i8] c",\09\22%s\22,\0A\00"
@.str.9 = [5 x i8] c".jsf\00"
@.str.10 = [4 x i8] c"\09\09\22\00"
@.str.11 = [3 x i8] c"\\\22\00"
@.str.12 = [3 x i8] c"\\\\\00"
@.str.13 = [3 x i8] c"\\n\00"
@.str.14 = [8 x i8] c"\\x%2.2x\00"
@str = [21 x i8] c"/* Built-in files */\00"
@str.19 = [19 x i8] c"#include \22types.h\22\00"
@str.20 = [24 x i8] c"const char *builtins[]=\00"
@str.21 = [2 x i8] c"{\00"
@str.22 = [7 x i8] c",\09NULL\00"
@str.23 = [3 x i8] c"};\00"
@str.24 = [6 x i8] c"\09NULL\00"
@str.26 = [2 x i8] c"\22\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.19, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.21, i64 0, i64 0))
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %97, label %18
12: ; preds = %61, %40, %95, %94
%13 = tail call i32 @fclose(i32* %23)
%14 = add nuw i64 %19, 1
%15 = getelementptr inbounds i8*, i8** %1, i64 %14
%16 = load i8*, i8** %15
%17 = icmp eq i8* %16, null
br i1 %17, label %97, label %18
18: ; preds = %2, %12
%19 = phi i64 [ %14, %12 ], [ 1, %2 ]
%20 = phi i8* [ %16, %12 ], [ %10, %2 ]
%21 = phi i8** [ %15, %12 ], [ %9, %2 ]
%22 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), %12 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), %2 ]
%23 = tail call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %29
25: ; preds = %18
%26 = load i32, i32* @stderr
%27 = load i8*, i8** %21
%28 = tail call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %27)
br label %101
29: ; preds = %18
%30 = load i8*, i8** %21
%31 = tail call i64 @strlen(i8* dereferenceable(1) %30)
br label %32
32: ; preds = %35, %29
%33 = phi i64 [ %31, %29 ], [ %36, %35 ]
%34 = icmp eq i64 %33, 0
br i1 %34, label %40, label %35
35: ; preds = %32
%36 = add i64 %33, -1
%37 = getelementptr inbounds i8, i8* %30, i64 %36
%38 = load i8, i8* %37
%39 = icmp eq i8 %38, 47
br i1 %39, label %40, label %32
40: ; preds = %32, %35
%41 = getelementptr inbounds i8, i8* %30, i64 %33
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %22, i8* %41)
%43 = load i8*, i8** %21
%44 = getelementptr inbounds i8, i8* %43, i64 %33
%45 = tail call i64 @strstr(i8* %44, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
%47 = tail call i32 @fgetc(i32* %23)
%48 = icmp eq i32 %47, -1
br i1 %48, label %12, label %49
49: ; preds = %40, %64
%50 = phi i32 [ %65, %64 ], [ %47, %40 ]
%51 = phi i32 [ %66, %64 ], [ 0, %40 ]
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %69
53: ; preds = %49
%54 = icmp ne i32 %50, 35
%55 = or i1 %46, %54
br i1 %55, label %56, label %58
56: ; preds = %53
br i1 %46, label %57, label %67
57: ; preds = %56
switch i32 %50, label %67 [
i32 10, label %61
i32 9, label %58
i32 32, label %58
]
58: ; preds = %57, %57, %53
br label %59
59: ; preds = %58, %59
%60 = tail call i32 @fgetc(i32* %23)
switch i32 %60, label %59 [
i32 -1, label %61
i32 10, label %61
]
61: ; preds = %59, %59, %57
%62 = tail call i32 @fgetc(i32* %23)
%63 = icmp eq i32 %62, -1
br i1 %63, label %12, label %64
64: ; preds = %61, %89
%65 = phi i32 [ %62, %61 ], [ %92, %89 ]
%66 = phi i32 [ 0, %61 ], [ %91, %89 ]
br label %49
67: ; preds = %57, %56
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
br label %69
69: ; preds = %49, %67
switch i32 %50, label %76 [
i32 34, label %70
i32 92, label %72
i32 10, label %74
]
70: ; preds = %69
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
br label %89
72: ; preds = %69
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
br label %89
74: ; preds = %69
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br label %87
76: ; preds = %69
%77 = add i32 %50, -32
%78 = icmp ult i32 %77, 95
%79 = icmp eq i32 %50, 9
%80 = or i1 %79, %78
br i1 %80, label %81, label %83
81: ; preds = %76
%82 = tail call i32 @putchar(i32 %50)
br label %85
83: ; preds = %76
%84 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i32 %50)
br label %85
85: ; preds = %81, %83
%86 = icmp eq i32 %50, 10
br i1 %86, label %87, label %89
87: ; preds = %74, %85
%88 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.26, i64 0, i64 0))
br label %89
89: ; preds = %70, %72, %87, %85
%90 = phi i1 [ false, %70 ], [ false, %72 ], [ true, %87 ], [ false, %85 ]
%91 = phi i32 [ 1, %70 ], [ 1, %72 ], [ 0, %87 ], [ 1, %85 ]
%92 = tail call i32 @fgetc(i32* %23)
%93 = icmp eq i32 %92, -1
br i1 %93, label %94, label %64
94: ; preds = %89
br i1 %90, label %12, label %95
95: ; preds = %94
%96 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.26, i64 0, i64 0))
br label %12
97: ; preds = %12, %2
%98 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.24, i64 0, i64 0), %2 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.22, i64 0, i64 0), %12 ]
%99 = tail call i32 @puts(i8* dereferenceable(1) %98)
%100 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.23, i64 0, i64 0))
br label %101
101: ; preds = %25, %97
%102 = phi i32 [ 0, %97 ], [ -1, %25 ]
ret i32 %102
}