#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*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
char *strrchr(char *, char);
int main(int argc, char **argv, char **envp) {
  char buf[1024];
  FILE *fin;
  FILE *fout;
  char *p;
  int doDotC = 0;
  if (argc < 3) {
    fprintf(stderr, "usage: %s jambase.c Jambase ...\n", argv[0]);
    return -1;
  }
  if (!(fout = fopen(argv[1], "w"))) {
    perror(argv[1]);
    return -1;
  }
  if ((p = strrchr(argv[1], '.')) && !strcmp(p, ".c"))
    doDotC++;
  argc -= 2;
  argv += 2;
  if (doDotC) {
    fprintf(fout, "/* Generated by mkjambase from Jambase */\n");
    fprintf(fout, "char *jambase[] = {\n");
  }
  for (; argc--; ++argv) {
    if (!(fin = fopen(*argv, "r"))) {
      perror(*argv);
      return -1;
    }
    if (doDotC)
      fprintf(fout, "/* %s */\n", *argv);
    else
      fprintf(fout, "### %s ###\n", *argv);
    while (fgets(buf, sizeof(buf), fin)) {
      if (doDotC) {
        char *p = buf;
        while ((*p == ' ') || (*p == '\t') || (*p == '\n'))
          ++p;
        if ((*p == '#') || !*p)
          continue;
        putc('"', fout);
        for (; *p && (*p != '\n'); ++p)
          switch (*p) {
          case '\\':
            putc('\\', fout);
            putc('\\', fout);
            break;
          case '"':
            putc('\\', fout);
            putc('"', fout);
            break;
          case '\r':
            break;
          default:
            putc(*p, fout);
            break;
          }
        fprintf(fout, "\\n\",\n");
      } else {
        fprintf(fout, "%s", buf);
      }
    }
    fclose(fin);
  }
  if (doDotC)
    fprintf(fout, "0 };\n");
  fclose(fout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x43c(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11dc <main+0x5c>
mov    0x2e28(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe37(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15e2 <main+0x462>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe36(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x430(%rbp)
cmp    $0x0,%rax
jne    121a <main+0x9a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10a0 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15e2 <main+0x462>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x438(%rbp)
cmp    $0x0,%rax
je     1268 <main+0xe8>
mov    -0x438(%rbp),%rdi
lea    0xdd8(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1268 <main+0xe8>
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x43c(%rbp)
je     12b4 <main+0x134>
mov    -0x430(%rbp),%rdi
lea    0xd8e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x430(%rbp),%rdi
lea    0xda4(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    12b9 <main+0x139>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     15ad <main+0x42d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd8b(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x428(%rbp)
cmp    $0x0,%rax
jne    1309 <main+0x189>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15e2 <main+0x462>
cmpl   $0x0,-0x43c(%rbp)
je     1337 <main+0x1b7>
mov    -0x430(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd3d(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1353 <main+0x1d3>
mov    -0x430(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd26(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1358 <main+0x1d8>
lea    -0x420(%rbp),%rdi
mov    -0x428(%rbp),%rdx
mov    $0x400,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1590 <main+0x410>
cmpl   $0x0,-0x43c(%rbp)
je     156f <main+0x3ef>
lea    -0x420(%rbp),%rax
mov    %rax,-0x448(%rbp)
mov    -0x448(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x449(%rbp)
je     13e1 <main+0x261>
mov    -0x448(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x449(%rbp)
je     13e1 <main+0x261>
mov    -0x448(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x449(%rbp)
mov    -0x449(%rbp),%al
test   $0x1,%al
jne    13f4 <main+0x274>
jmp    140b <main+0x28b>
mov    -0x448(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x448(%rbp)
jmp    1395 <main+0x215>
mov    -0x448(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     142e <main+0x2ae>
mov    -0x448(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1433 <main+0x2b3>
jmp    1358 <main+0x1d8>
mov    -0x430(%rbp),%rsi
mov    $0x22,%edi
call   1070 <putc@plt>
mov    -0x448(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x44a(%rbp)
je     1475 <main+0x2f5>
mov    -0x448(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x44a(%rbp)
mov    -0x44a(%rbp),%al
test   $0x1,%al
jne    1488 <main+0x308>
jmp    1555 <main+0x3d5>
mov    -0x448(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x450(%rbp)
sub    $0xd,%eax
je     151c <main+0x39c>
jmp    14a6 <main+0x326>
mov    -0x450(%rbp),%eax
sub    $0x22,%eax
je     14f5 <main+0x375>
jmp    14ba <main+0x33a>
mov    -0x450(%rbp),%eax
sub    $0x5c,%eax
jne    1521 <main+0x3a1>
jmp    14ce <main+0x34e>
mov    -0x430(%rbp),%rsi
mov    $0x5c,%edi
call   1070 <putc@plt>
mov    -0x430(%rbp),%rsi
mov    $0x5c,%edi
call   1070 <putc@plt>
jmp    1539 <main+0x3b9>
mov    -0x430(%rbp),%rsi
mov    $0x5c,%edi
call   1070 <putc@plt>
mov    -0x430(%rbp),%rsi
mov    $0x22,%edi
call   1070 <putc@plt>
jmp    1539 <main+0x3b9>
jmp    1539 <main+0x3b9>
mov    -0x448(%rbp),%rax
mov    (%rax),%al
mov    -0x430(%rbp),%rsi
movsbl %al,%edi
call   1070 <putc@plt>
jmp    153e <main+0x3be>
mov    -0x448(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x448(%rbp)
jmp    1444 <main+0x2c4>
mov    -0x430(%rbp),%rdi
lea    0xb1b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    158b <main+0x40b>
mov    -0x430(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    0xb00(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1358 <main+0x1d8>
mov    -0x428(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    12b9 <main+0x139>
cmpl   $0x0,-0x43c(%rbp)
je     15cf <main+0x44f>
mov    -0x430(%rbp),%rdi
lea    0xabf(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x430(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x428,%rsp
mov    %rsi,%rbp
cmp    $0x2,%edi
jg     11df <main+0x3f>
mov    0x2e20(%rip),%rax
movslq (%rax),%rdi
mov    0x0(%rbp),%rdx
lea    0xe32(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0xffffffff,%eax
jmp    1402 <main+0x262>
mov    %edi,%r15d
mov    0x8(%rbp),%rdi
lea    0xe34(%rip),%rsi
call   10a0 <fopen@plt>
mov    0x8(%rbp),%rdi
test   %rax,%rax
je     1417 <main+0x277>
mov    %rax,%rbx
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    $0x1,%r12b
test   %rax,%rax
je     125c <main+0xbc>
lea    0xe08(%rip),%rsi
mov    %rax,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    125c <main+0xbc>
lea    0xdf8(%rip),%rdi
mov    $0x2a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10c0 <fwrite@plt>
lea    0xe0a(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10c0 <fwrite@plt>
xor    %r12d,%r12d
add    $0xfffffffd,%r15d
add    $0x10,%rbp
lea    0xe07(%rip),%rax
lea    0xdf6(%rip),%rcx
test   %r12b,%r12b
cmovne %rax,%rcx
mov    %rcx,0x10(%rsp)
lea    0x20(%rsp),%r14
movabs $0x100000600,%r13
mov    %r12d,0xc(%rsp)
jmp    12c0 <main+0x120>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,%rdi
call   1030 <fclose@plt>
mov    0x18(%rsp),%rbp
add    $0x8,%rbp
mov    0x8(%rsp),%r15d
sub    $0x1,%r15d
jb     13da <main+0x23a>
mov    %r15d,0x8(%rsp)
mov    0x0(%rbp),%rdi
lea    0xd96(%rip),%rsi
call   10a0 <fopen@plt>
mov    0x0(%rbp),%rdx
test   %rax,%rax
je     1414 <main+0x274>
mov    %rax,%r15
mov    %rbp,0x18(%rsp)
mov    %rbx,%rdi
mov    0x10(%rsp),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    130b <main+0x16b>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
mov    %r14,%rdi
mov    $0x400,%esi
mov    %r15,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     12a0 <main+0x100>
test   %r12b,%r12b
jne    1300 <main+0x160>
mov    %r14,%rbp
nopl   0x0(%rax,%rax,1)
movzbl 0x0(%rbp),%eax
cmp    $0x23,%rax
ja     1360 <main+0x1c0>
bt     %rax,%r13
jae    1350 <main+0x1b0>
add    $0x1,%rbp
jmp    1330 <main+0x190>
cs nopw 0x0(%rax,%rax,1)
movabs $0x800000001,%rcx
bt     %rax,%rcx
jb     130b <main+0x16b>
mov    $0x22,%edi
mov    %rbx,%rsi
call   1080 <putc@plt>
jmp    1390 <main+0x1f0>
nop
mov    $0x5c,%r12b
mov    $0x5c,%edi
mov    %rbx,%rsi
call   1080 <putc@plt>
movsbl %r12b,%edi
mov    %rbx,%rsi
call   1080 <putc@plt>
add    $0x1,%rbp
movsbl 0x0(%rbp),%r12d
test   %r12d,%r12d
je     13b7 <main+0x217>
cmp    $0xa,%r12b
je     13b7 <main+0x217>
cmp    $0xd,%r12d
je     138c <main+0x1ec>
cmp    $0x5c,%r12d
je     1370 <main+0x1d0>
cmp    $0x22,%r12d
jne    1380 <main+0x1e0>
mov    $0x22,%r12b
jmp    1373 <main+0x1d3>
mov    $0x5,%esi
mov    $0x1,%edx
lea    0xcb6(%rip),%rdi
mov    %rbx,%rcx
call   10c0 <fwrite@plt>
mov    0xc(%rsp),%r12d
jmp    130b <main+0x16b>
test   %r12b,%r12b
jne    13f8 <main+0x258>
lea    0xc9e(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10c0 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x428,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rdx,%rdi
call   10b0 <perror@plt>
mov    $0xffffffff,%eax
jmp    1402 <main+0x262>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"usage: %s jambase.c Jambase ...\0A\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [3 x i8] c".c\00"
@.str.3 = [43 x i8] c"/* Generated by mkjambase from Jambase */\0A\00"
@.str.4 = [21 x i8] c"char *jambase[] = {\0A\00"
@.str.5 = [2 x i8] c"r\00"
@.str.6 = [10 x i8] c"/* %s */\0A\00"
@.str.7 = [12 x i8] c"### %s ###\0A\00"
@.str.8 = [6 x i8] c"\\n\22,\0A\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [6 x i8] c"0 };\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca [1024 x i8]
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i32 0, i32* %12
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, 3
br i1 %15, label %16, label %24
16: ; preds = %3
%17 = load i32, i32* @stderr
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
%20 = load i8**, i8*** %6
%21 = getelementptr inbounds i8*, i8** %20, i64 0
%22 = load i8*, i8** %21
%23 = call i32 (i32*, i8*, ...) @fprintf(i32* %19, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %22)
store i32 -1, i32* %4
br label %190
24: ; preds = %3
%25 = load i8**, i8*** %6
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %28, i32** %10
%29 = icmp ne i32* %28, null
br i1 %29, label %35, label %30
30: ; preds = %24
%31 = load i8**, i8*** %6
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32 @perror(i8* %33)
store i32 -1, i32* %4
br label %190
35: ; preds = %24
%36 = load i8**, i8*** %6
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
%39 = call i8* @strrchr(i8* %38, i8 signext 46)
store i8* %39, i8** %11
%40 = icmp ne i8* %39, null
br i1 %40, label %41, label %48
41: ; preds = %35
%42 = load i8*, i8** %11
%43 = call i32 @strcmp(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%44 = icmp ne i32 %43, 0
br i1 %44, label %48, label %45
45: ; preds = %41
%46 = load i32, i32* %12
%47 = add nsw i32 %46, 1
store i32 %47, i32* %12
br label %48
48: ; preds = %45, %41, %35
%49 = load i32, i32* %5
%50 = sub nsw i32 %49, 2
store i32 %50, i32* %5
%51 = load i8**, i8*** %6
%52 = getelementptr inbounds i8*, i8** %51, i64 2
store i8** %52, i8*** %6
%53 = load i32, i32* %12
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %60
55: ; preds = %48
%56 = load i32*, i32** %10
%57 = call i32 (i32*, i8*, ...) @fprintf(i32* %56, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%58 = load i32*, i32** %10
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %58, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %60
60: ; preds = %55, %48
br label %61
61: ; preds = %178, %60
%62 = load i32, i32* %5
%63 = add nsw i32 %62, -1
store i32 %63, i32* %5
%64 = icmp ne i32 %62, 0
br i1 %64, label %65, label %181
65: ; preds = %61
%66 = load i8**, i8*** %6
%67 = load i8*, i8** %66
%68 = call i32* @fopen(i8* %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %68, i32** %9
%69 = icmp ne i32* %68, null
br i1 %69, label %74, label %70
70: ; preds = %65
%71 = load i8**, i8*** %6
%72 = load i8*, i8** %71
%73 = call i32 @perror(i8* %72)
store i32 -1, i32* %4
br label %190
74: ; preds = %65
%75 = load i32, i32* %12
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %82
77: ; preds = %74
%78 = load i32*, i32** %10
%79 = load i8**, i8*** %6
%80 = load i8*, i8** %79
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %78, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* %80)
br label %87
82: ; preds = %74
%83 = load i32*, i32** %10
%84 = load i8**, i8*** %6
%85 = load i8*, i8** %84
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %83, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %85)
br label %87
87: ; preds = %82, %77
br label %88
88: ; preds = %174, %127, %87
%89 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%90 = load i32*, i32** %9
%91 = call i64 @fgets(i8* %89, i32 1024, i32* %90)
%92 = icmp ne i64 %91, 0
br i1 %92, label %93, label %175
93: ; preds = %88
%94 = load i32, i32* %12
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %170
96: ; preds = %93
%97 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
store i8* %97, i8** %13
br label %98
98: ; preds = %115, %96
%99 = load i8*, i8** %13
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp eq i32 %101, 32
br i1 %102, label %113, label %103
103: ; preds = %98
%104 = load i8*, i8** %13
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = icmp eq i32 %106, 9
br i1 %107, label %113, label %108
108: ; preds = %103
%109 = load i8*, i8** %13
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = icmp eq i32 %111, 10
br label %113
113: ; preds = %108, %103, %98
%114 = phi i1 [ true, %103 ], [ true, %98 ], [ %112, %108 ]
br i1 %114, label %115, label %118
115: ; preds = %113
%116 = load i8*, i8** %13
%117 = getelementptr inbounds i8, i8* %116, i32 1
store i8* %117, i8** %13
br label %98
118: ; preds = %113
%119 = load i8*, i8** %13
%120 = load i8, i8* %119
%121 = sext i8 %120 to i32
%122 = icmp eq i32 %121, 35
br i1 %122, label %127, label %123
123: ; preds = %118
%124 = load i8*, i8** %13
%125 = load i8, i8* %124
%126 = icmp ne i8 %125, 0
br i1 %126, label %128, label %127
127: ; preds = %123, %118
br label %88
128: ; preds = %123
%129 = load i32*, i32** %10
%130 = call i32 @putc(i8 signext 34, i32* %129)
br label %131
131: ; preds = %164, %128
%132 = load i8*, i8** %13
%133 = load i8, i8* %132
%134 = sext i8 %133 to i32
%135 = icmp ne i32 %134, 0
br i1 %135, label %136, label %141
136: ; preds = %131
%137 = load i8*, i8** %13
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = icmp ne i32 %139, 10
br label %141
141: ; preds = %136, %131
%142 = phi i1 [ false, %131 ], [ %140, %136 ]
br i1 %142, label %143, label %167
143: ; preds = %141
%144 = load i8*, i8** %13
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
switch i32 %146, label %158 [
i32 92, label %147
i32 34, label %152
i32 13, label %157
]
147: ; preds = %143
%148 = load i32*, i32** %10
%149 = call i32 @putc(i8 signext 92, i32* %148)
%150 = load i32*, i32** %10
%151 = call i32 @putc(i8 signext 92, i32* %150)
br label %163
152: ; preds = %143
%153 = load i32*, i32** %10
%154 = call i32 @putc(i8 signext 92, i32* %153)
%155 = load i32*, i32** %10
%156 = call i32 @putc(i8 signext 34, i32* %155)
br label %163
157: ; preds = %143
br label %163
158: ; preds = %143
%159 = load i8*, i8** %13
%160 = load i8, i8* %159
%161 = load i32*, i32** %10
%162 = call i32 @putc(i8 signext %160, i32* %161)
br label %163
163: ; preds = %158, %157, %152, %147
br label %164
164: ; preds = %163
%165 = load i8*, i8** %13
%166 = getelementptr inbounds i8, i8* %165, i32 1
store i8* %166, i8** %13
br label %131
167: ; preds = %141
%168 = load i32*, i32** %10
%169 = call i32 (i32*, i8*, ...) @fprintf(i32* %168, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
br label %174
170: ; preds = %93
%171 = load i32*, i32** %10
%172 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%173 = call i32 (i32*, i8*, ...) @fprintf(i32* %171, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %172)
br label %174
174: ; preds = %170, %167
br label %88
175: ; preds = %88
%176 = load i32*, i32** %9
%177 = call i32 @fclose(i32* %176)
br label %178
178: ; preds = %175
%179 = load i8**, i8*** %6
%180 = getelementptr inbounds i8*, i8** %179, i32 1
store i8** %180, i8*** %6
br label %61
181: ; preds = %61
%182 = load i32, i32* %12
%183 = icmp ne i32 %182, 0
br i1 %183, label %184, label %187
184: ; preds = %181
%185 = load i32*, i32** %10
%186 = call i32 (i32*, i8*, ...) @fprintf(i32* %185, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
br label %187
187: ; preds = %184, %181
%188 = load i32*, i32** %10
%189 = call i32 @fclose(i32* %188)
store i32 0, i32* %4
br label %190
190: ; preds = %187, %70, %30, %16
%191 = load i32, i32* %4
ret i32 %191
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"usage: %s jambase.c Jambase ...\0A\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [3 x i8] c".c\00"
@.str.3 = [43 x i8] c"/* Generated by mkjambase from Jambase */\0A\00"
@.str.4 = [21 x i8] c"char *jambase[] = {\0A\00"
@.str.5 = [2 x i8] c"r\00"
@.str.6 = [10 x i8] c"/* %s */\0A\00"
@.str.7 = [12 x i8] c"### %s ###\0A\00"
@.str.8 = [6 x i8] c"\\n\22,\0A\00"
@.str.10 = [6 x i8] c"0 };\0A\00"
define i32 @main(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = icmp slt i32 %0, 3
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i32, i32* @stderr
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load i8*, i8** %1
%12 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %87
13: ; preds = %3
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = tail call i32* @fopen(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i32* %16, null
%18 = load i8*, i8** %14
br i1 %17, label %19, label %21
19: ; preds = %13
%20 = tail call i32 @perror(i8* %18)
br label %87
21: ; preds = %13
%22 = tail call i8* @strrchr(i8* dereferenceable(1) %18, i8 signext 46)
%23 = icmp eq i8* %22, null
br i1 %23, label %30, label %24
24: ; preds = %21
%25 = tail call i32 @strcmp(i8* %22, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = tail call i64 @fwrite(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i64 42, i64 1, i32* %16)
%29 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 20, i64 1, i32* %16)
br label %30
30: ; preds = %24, %27, %21
%31 = phi i1 [ false, %27 ], [ true, %24 ], [ true, %21 ]
%32 = add nsw i32 %0, -3
%33 = getelementptr inbounds i8*, i8** %1, i64 2
%34 = select i1 %31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0)
br label %35
35: ; preds = %30, %77
%36 = phi i32 [ %80, %77 ], [ %32, %30 ]
%37 = phi i8** [ %79, %77 ], [ %33, %30 ]
%38 = load i8*, i8** %37
%39 = call i32* @fopen(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%40 = icmp eq i32* %39, null
%41 = load i8*, i8** %37
br i1 %40, label %42, label %44
42: ; preds = %35
%43 = call i32 @perror(i8* %41)
br label %87
44: ; preds = %35
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* %34, i8* %41)
%46 = call i64 @fgets(i8* %5, i32 1024, i32* %39)
%47 = icmp eq i64 %46, 0
br i1 %47, label %77, label %48
48: ; preds = %44, %74
br i1 %31, label %72, label %49
49: ; preds = %48, %52
%50 = phi i8* [ %53, %52 ], [ %5, %48 ]
%51 = load i8, i8* %50
switch i8 %51, label %54 [
i8 32, label %52
i8 9, label %52
i8 10, label %52
i8 35, label %74
i8 0, label %74
]
52: ; preds = %49, %49, %49
%53 = getelementptr inbounds i8, i8* %50, i64 1
br label %49
54: ; preds = %49
%55 = call i32 @putc(i8 signext 34, i32* %16)
br label %56
56: ; preds = %68, %54
%57 = phi i8* [ %50, %54 ], [ %69, %68 ]
%58 = load i8, i8* %57
switch i8 %58, label %59 [
i8 0, label %70
i8 10, label %70
]
59: ; preds = %56
%60 = sext i8 %58 to i32
switch i32 %60, label %65 [
i32 92, label %62
i32 34, label %61
i32 13, label %68
]
61: ; preds = %59
br label %62
62: ; preds = %59, %61
%63 = phi i8 [ 34, %61 ], [ 92, %59 ]
%64 = call i32 @putc(i8 signext 92, i32* %16)
br label %65
65: ; preds = %62, %59
%66 = phi i8 [ %58, %59 ], [ %63, %62 ]
%67 = call i32 @putc(i8 signext %66, i32* %16)
br label %68
68: ; preds = %65, %59
%69 = getelementptr inbounds i8, i8* %57, i64 1
br label %56
70: ; preds = %56, %56
%71 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i64 5, i64 1, i32* %16)
br label %74
72: ; preds = %48
%73 = call i32 @fputs(i8* %5, i32* %16)
br label %74
74: ; preds = %49, %49, %72, %70
%75 = call i64 @fgets(i8* %5, i32 1024, i32* %39)
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %48
77: ; preds = %74, %44
%78 = call i32 @fclose(i32* %39)
%79 = getelementptr inbounds i8*, i8** %37, i64 1
%80 = add nsw i32 %36, -1
%81 = icmp eq i32 %36, 0
br i1 %81, label %82, label %35
82: ; preds = %77
br i1 %31, label %85, label %83
83: ; preds = %82
%84 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i64 5, i64 1, i32* %16)
br label %85
85: ; preds = %83, %82
%86 = call i32 @fclose(i32* %16)
br label %87
87: ; preds = %85, %42, %19, %7
%88 = phi i32 [ -1, %7 ], [ -1, %42 ], [ 0, %85 ], [ -1, %19 ]
ret i32 %88
}