#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 */
char EOF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ remove(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  int toCFlag = 0;
  int v = 0;
  for (v; v < argc; v++) {
    if (argv[v] == "-c") {
      toCFlag = 1;
    }
  }
  FILE *s = fopen(argv[1], "r");
  FILE *o = fopen("a.c", "w");
  fprintf(o, "#include <stdio.h>\n");
  fprintf(o, "#include <stdlib.h>\n");
  fprintf(o, "#include <string.h>\n");
  fprintf(o, "int main( void ){\n");
  fprintf(o, "\tchar* codep = \"");
  int i = 0;
  for (;;) {
    char p = fgetc(s);
    if (p == EOF) {
      break;
    }
    if (p == '<' || p == '>' || p == '.' || p == ',' || p == '[' || p == ']' ||
        p == '+' || p == '-') {
      fprintf(o, "%c", p);
      i++;
    }
  }
  fclose(s);
  fprintf(o, "\";\n\tchar* mem = (char*) malloc(sizeof(char) * 600);");
  fprintf(o, "\n\tint i; // instruction pointer");
  fprintf(o, "\n\tchar code[%d];", i);
  fprintf(o, "\n\tstrcpy(code,codep);");
  fprintf(o, "\n\tint ptr = 0; // memory pointer");
  fprintf(o, "\n\tfor(i = 0; i < %d; i++){", i);
  fprintf(o, "\n\t\tif(code[i] == '>') ptr++;");
  fprintf(o, "\n\t\tif(code[i] == '<') ptr--;");
  fprintf(o, "\n\t\tif(code[i] == '+') *(mem + ptr) = *(mem + ptr) + 1;");
  fprintf(o, "\n\t\tif(code[i] == '-') *(mem + ptr) = *(mem + ptr) - 1;");
  fprintf(o, "\n\t\tif(code[i] == '.') putchar(*(mem + ptr));");
  fprintf(o, "\n\t\tif(code[i] == ',') *(mem + ptr) = getchar();");
  fprintf(o, "\n\t\tif(code[i] == '['){");
  fprintf(o, "\n\t\t\tif(*(mem + ptr) == 0){");
  fprintf(o, "\n\t\t\t\twhile((code[i] != ']')){");
  fprintf(o, "\n\t\t\t\t\ti++;");
  fprintf(o, "\n\t\t\t\t}");
  fprintf(o, "\n\t\t\t\ti++;");
  fprintf(o, "\n\t\t\t}");
  fprintf(o, "\n\t\t}");
  fprintf(o, "\n\t\tif(code[i] == ']'){");
  fprintf(o, "\n\t\t\tif(*(mem + ptr) != 0){");
  fprintf(o, "\n\t\t\t\twhile((code[i] != '[')){");
  fprintf(o, "\n\t\t\t\t\ti--;");
  fprintf(o, "\n\t\t\t\t}");
  fprintf(o, "\n\t\t\t\ti--;");
  fprintf(o, "\n\t\t\t}");
  fprintf(o, "\n\t\t}");
  fprintf(o, "\n\t}");
  fprintf(o, "\n\treturn 0;\n}");
  fclose(o);
  char command[60];
  strcat(command, "gcc a.c -o ");
  strcat(command, argv[2]);
  system(command);
  if (toCFlag == 1) {
    remove("a.c");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11d3 <main+0x63>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
lea    0xe51(%rip),%rdx
cmp    %rdx,(%rax,%rcx,8)
jne    11c0 <main+0x50>
movl   $0x1,-0x14(%rbp)
jmp    11c5 <main+0x55>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1194 <main+0x24>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xede(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x20(%rbp)
lea    0xe11(%rip),%rdi
lea    0xe0e(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xdfc(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xdfe(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe01(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe04(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe05(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %al,-0x2d(%rbp)
movsbl -0x2d(%rbp),%eax
mov    0x2d6e(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    128a <main+0x11a>
jmp    1316 <main+0x1a6>
movsbl -0x2d(%rbp),%eax
cmp    $0x3c,%eax
je     12f2 <main+0x182>
movsbl -0x2d(%rbp),%eax
cmp    $0x3e,%eax
je     12f2 <main+0x182>
movsbl -0x2d(%rbp),%eax
cmp    $0x2e,%eax
je     12f2 <main+0x182>
movsbl -0x2d(%rbp),%eax
cmp    $0x2c,%eax
je     12f2 <main+0x182>
movsbl -0x2d(%rbp),%eax
cmp    $0x5b,%eax
je     12f2 <main+0x182>
movsbl -0x2d(%rbp),%eax
cmp    $0x5d,%eax
je     12f2 <main+0x182>
movsbl -0x2d(%rbp),%eax
cmp    $0x2b,%eax
je     12f2 <main+0x182>
movsbl -0x2d(%rbp),%eax
cmp    $0x2d,%eax
jne    1311 <main+0x1a1>
mov    -0x28(%rbp),%rdi
movsbl -0x2d(%rbp),%edx
lea    0xd6a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1263 <main+0xf3>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x28(%rbp),%rdi
lea    0xd44(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xd66(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%edx
lea    0xd71(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xd70(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xd74(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%edx
lea    0xd80(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xd89(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xd94(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xd9f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xdc4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xde9(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe04(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe22(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe27(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe30(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe3c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe35(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe2a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe22(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe16(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe09(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe0e(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe17(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe23(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xda5(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe0a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xd92(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xd86(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xdde(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xdd0(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
lea    -0x70(%rbp),%rdi
lea    0xdc3(%rip),%rsi
call   1090 <strcat@plt>
lea    -0x70(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1090 <strcat@plt>
lea    -0x70(%rbp),%rdi
call   1050 <system@plt>
cmpl   $0x1,-0x14(%rbp)
jne    158a <main+0x41a>
lea    0xa7e(%rip),%rdi
call   1030 <remove@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
xor    %r15d,%r15d
mov    $0x0,%ebx
test   %edi,%edi
jle    1230 <main+0xa0>
mov    %edi,%edx
lea    -0x1(%rdx),%rcx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0x3,%rcx
jae    11c5 <main+0x35>
xor    %ecx,%ecx
xor    %ebx,%ebx
jmp    1208 <main+0x78>
and    $0xfffffffc,%edx
xor    %ecx,%ecx
lea    0xe2f(%rip),%rbp
mov    $0x1,%edi
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
cmp    %rbp,(%rsi,%rcx,8)
cmove  %edi,%ebx
cmp    %rbp,0x8(%rsi,%rcx,8)
cmove  %edi,%ebx
cmp    %rbp,0x10(%rsi,%rcx,8)
cmove  %edi,%ebx
cmp    %rbp,0x18(%rsi,%rcx,8)
cmove  %edi,%ebx
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    11e0 <main+0x50>
test   %rax,%rax
je     1230 <main+0xa0>
lea    (%rsi,%rcx,8),%rcx
xor    %edx,%edx
lea    0xde6(%rip),%rbp
mov    $0x1,%edi
nop
cmp    %rbp,(%rcx,%rdx,8)
cmove  %edi,%ebx
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1220 <main+0x90>
mov    %rsi,0x8(%rsp)
mov    0x8(%rsi),%rdi
lea    0xe7d(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbp
lea    0xdb4(%rip),%rdi
lea    0xdb1(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r13
lea    0xda4(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   10b0 <fwrite@plt>
lea    0xd9f(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd9b(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd97(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd91(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
mov    %rbp,%rdi
call   1060 <fgetc@plt>
mov    0x2cfe(%rip),%r12
cmp    (%r12),%al
jne    1634 <main+0x4a4>
mov    %rbp,%rdi
call   1040 <fclose@plt>
lea    0xd68(%rip),%rdi
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd83(%rip),%rdi
mov    $0x1f,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd8a(%rip),%rsi
mov    %r13,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
lea    0xd87(%rip),%rdi
mov    $0x15,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd84(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd8c(%rip),%rsi
mov    %r13,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
lea    0xd93(%rip),%rdi
mov    $0x1c,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd97(%rip),%rdi
mov    $0x1c,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd9b(%rip),%rdi
mov    $0x36,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xdb9(%rip),%rdi
mov    $0x36,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xdd7(%rip),%rdi
mov    $0x2c,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xdeb(%rip),%rdi
mov    $0x2f,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xe02(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xe00(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xe02(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xe07(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xdf9(%rip),%r15
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xde4(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xdd5(%rip),%r12
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r12,%rdi
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xdbf(%rip),%rbp
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xda8(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xda6(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xda8(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xdad(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd8a(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r12,%rdi
mov    %r13,%rcx
call   10b0 <fwrite@plt>
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd51(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
lea    0xd3c(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10b0 <fwrite@plt>
mov    %r13,%rdi
call   1040 <fclose@plt>
lea    0xd29(%rip),%rsi
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   10a0 <strcat@plt>
mov    0x8(%rsp),%rax
mov    0x10(%rax),%rsi
mov    %rbp,%rdi
call   10a0 <strcat@plt>
mov    %rbp,%rdi
call   1050 <system@plt>
cmp    $0x1,%ebx
jne    1623 <main+0x493>
lea    0x9e5(%rip),%rdi
call   1030 <remove@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r15d,%r15d
movabs $0x50000000a000f,%r14
jmp    1662 <main+0x4d2>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbp,%rdi
call   1060 <fgetc@plt>
cmp    (%r12),%al
je     12f4 <main+0x164>
lea    -0x2b(%rax),%ecx
cmp    $0x32,%cl
ja     1650 <main+0x4c0>
movzbl %cl,%ecx
bt     %rcx,%r14
jae    1650 <main+0x4c0>
movzbl %al,%edi
mov    %r13,%rsi
call   1070 <fputc@plt>
add    $0x1,%r15d
jmp    1650 <main+0x4c0>

LLVM IR (-O0):
@.str = [3 x i8] c"-c\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"a.c\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [20 x i8] c"#include <stdio.h>\0A\00"
@.str.5 = [21 x i8] c"#include <stdlib.h>\0A\00"
@.str.6 = [21 x i8] c"#include <string.h>\0A\00"
@.str.7 = [19 x i8] c"int main( void ){\0A\00"
@.str.8 = [17 x i8] c"\09char* codep = \22\00"
@EOF = global i8 0
@.str.9 = [3 x i8] c"%c\00"
@.str.10 = [52 x i8] c"\22;\0A\09char* mem = (char*) malloc(sizeof(char) * 600);\00"
@.str.11 = [32 x i8] c"\0A\09int i; // instruction pointer\00"
@.str.12 = [17 x i8] c"\0A\09char code[%d];\00"
@.str.13 = [22 x i8] c"\0A\09strcpy(code,codep);\00"
@.str.14 = [33 x i8] c"\0A\09int ptr = 0; // memory pointer\00"
@.str.15 = [27 x i8] c"\0A\09for(i = 0; i < %d; i++){\00"
@.str.16 = [29 x i8] c"\0A\09\09if(code[i] == '>') ptr++;\00"
@.str.17 = [29 x i8] c"\0A\09\09if(code[i] == '<') ptr--;\00"
@.str.18 = [55 x i8] c"\0A\09\09if(code[i] == '+') *(mem + ptr) = *(mem + ptr) + 1;\00"
@.str.19 = [55 x i8] c"\0A\09\09if(code[i] == '-') *(mem + ptr) = *(mem + ptr) - 1;\00"
@.str.20 = [45 x i8] c"\0A\09\09if(code[i] == '.') putchar(*(mem + ptr));\00"
@.str.21 = [48 x i8] c"\0A\09\09if(code[i] == ',') *(mem + ptr) = getchar();\00"
@.str.22 = [23 x i8] c"\0A\09\09if(code[i] == '['){\00"
@.str.23 = [27 x i8] c"\0A\09\09\09if(*(mem + ptr) == 0){\00"
@.str.24 = [30 x i8] c"\0A\09\09\09\09while((code[i] != ']')){\00"
@.str.25 = [11 x i8] c"\0A\09\09\09\09\09i++;\00"
@.str.26 = [7 x i8] c"\0A\09\09\09\09}\00"
@.str.27 = [10 x i8] c"\0A\09\09\09\09i++;\00"
@.str.28 = [6 x i8] c"\0A\09\09\09}\00"
@.str.29 = [5 x i8] c"\0A\09\09}\00"
@.str.30 = [23 x i8] c"\0A\09\09if(code[i] == ']'){\00"
@.str.31 = [27 x i8] c"\0A\09\09\09if(*(mem + ptr) != 0){\00"
@.str.32 = [30 x i8] c"\0A\09\09\09\09while((code[i] != '[')){\00"
@.str.33 = [11 x i8] c"\0A\09\09\09\09\09i--;\00"
@.str.34 = [10 x i8] c"\0A\09\09\09\09i--;\00"
@.str.35 = [4 x i8] c"\0A\09}\00"
@.str.36 = [14 x i8] c"\0A\09return 0;\0A}\00"
@.str.37 = [12 x i8] c"gcc a.c -o \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 i8
%12 = alloca [60 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
%13 = load i32, i32* %7
br label %14
14: ; preds = %27, %2
%15 = load i32, i32* %7
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %30
18: ; preds = %14
%19 = load i8**, i8*** %5
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8*, i8** %19, i64 %21
%23 = load i8*, i8** %22
%24 = icmp eq i8* %23, getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
br i1 %24, label %25, label %26
25: ; preds = %18
store i32 1, i32* %6
br label %26
26: ; preds = %25, %18
br label %27
27: ; preds = %26
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
br label %14
30: ; preds = %14
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32* @fopen(i8* %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %34, i32** %8
%35 = call i32* @fopen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %35, i32** %9
%36 = load i32*, i32** %9
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%38 = load i32*, i32** %9
%39 = call i32 (i32*, i8*, ...) @fprintf(i32* %38, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%40 = load i32*, i32** %9
%41 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%42 = load i32*, i32** %9
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%44 = load i32*, i32** %9
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %10
br label %46
46: ; preds = %94, %30
%47 = load i32*, i32** %8
%48 = call signext i8 @fgetc(i32* %47)
store i8 %48, i8* %11
%49 = load i8, i8* %11
%50 = sext i8 %49 to i32
%51 = load i8, i8* @EOF
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %50, %52
br i1 %53, label %54, label %55
54: ; preds = %46
br label %95
55: ; preds = %46
%56 = load i8, i8* %11
%57 = sext i8 %56 to i32
%58 = icmp eq i32 %57, 60
br i1 %58, label %87, label %59
59: ; preds = %55
%60 = load i8, i8* %11
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 62
br i1 %62, label %87, label %63
63: ; preds = %59
%64 = load i8, i8* %11
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %65, 46
br i1 %66, label %87, label %67
67: ; preds = %63
%68 = load i8, i8* %11
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 44
br i1 %70, label %87, label %71
71: ; preds = %67
%72 = load i8, i8* %11
%73 = sext i8 %72 to i32
%74 = icmp eq i32 %73, 91
br i1 %74, label %87, label %75
75: ; preds = %71
%76 = load i8, i8* %11
%77 = sext i8 %76 to i32
%78 = icmp eq i32 %77, 93
br i1 %78, label %87, label %79
79: ; preds = %75
%80 = load i8, i8* %11
%81 = sext i8 %80 to i32
%82 = icmp eq i32 %81, 43
br i1 %82, label %87, label %83
83: ; preds = %79
%84 = load i8, i8* %11
%85 = sext i8 %84 to i32
%86 = icmp eq i32 %85, 45
br i1 %86, label %87, label %94
87: ; preds = %83, %79, %75, %71, %67, %63, %59, %55
%88 = load i32*, i32** %9
%89 = load i8, i8* %11
%90 = sext i8 %89 to i32
%91 = call i32 (i32*, i8*, ...) @fprintf(i32* %88, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 %90)
%92 = load i32, i32* %10
%93 = add nsw i32 %92, 1
store i32 %93, i32* %10
br label %94
94: ; preds = %87, %83
br label %46
95: ; preds = %54
%96 = load i32*, i32** %8
%97 = call i32 @fclose(i32* %96)
%98 = load i32*, i32** %9
%99 = call i32 (i32*, i8*, ...) @fprintf(i32* %98, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0))
%100 = load i32*, i32** %9
%101 = call i32 (i32*, i8*, ...) @fprintf(i32* %100, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0))
%102 = load i32*, i32** %9
%103 = load i32, i32* %10
%104 = call i32 (i32*, i8*, ...) @fprintf(i32* %102, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32 %103)
%105 = load i32*, i32** %9
%106 = call i32 (i32*, i8*, ...) @fprintf(i32* %105, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%107 = load i32*, i32** %9
%108 = call i32 (i32*, i8*, ...) @fprintf(i32* %107, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.14, i64 0, i64 0))
%109 = load i32*, i32** %9
%110 = load i32, i32* %10
%111 = call i32 (i32*, i8*, ...) @fprintf(i32* %109, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), i32 %110)
%112 = load i32*, i32** %9
%113 = call i32 (i32*, i8*, ...) @fprintf(i32* %112, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0))
%114 = load i32*, i32** %9
%115 = call i32 (i32*, i8*, ...) @fprintf(i32* %114, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.17, i64 0, i64 0))
%116 = load i32*, i32** %9
%117 = call i32 (i32*, i8*, ...) @fprintf(i32* %116, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.18, i64 0, i64 0))
%118 = load i32*, i32** %9
%119 = call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.19, i64 0, i64 0))
%120 = load i32*, i32** %9
%121 = call i32 (i32*, i8*, ...) @fprintf(i32* %120, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.20, i64 0, i64 0))
%122 = load i32*, i32** %9
%123 = call i32 (i32*, i8*, ...) @fprintf(i32* %122, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.21, i64 0, i64 0))
%124 = load i32*, i32** %9
%125 = call i32 (i32*, i8*, ...) @fprintf(i32* %124, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.22, i64 0, i64 0))
%126 = load i32*, i32** %9
%127 = call i32 (i32*, i8*, ...) @fprintf(i32* %126, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0))
%128 = load i32*, i32** %9
%129 = call i32 (i32*, i8*, ...) @fprintf(i32* %128, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.24, i64 0, i64 0))
%130 = load i32*, i32** %9
%131 = call i32 (i32*, i8*, ...) @fprintf(i32* %130, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.25, i64 0, i64 0))
%132 = load i32*, i32** %9
%133 = call i32 (i32*, i8*, ...) @fprintf(i32* %132, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.26, i64 0, i64 0))
%134 = load i32*, i32** %9
%135 = call i32 (i32*, i8*, ...) @fprintf(i32* %134, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.27, i64 0, i64 0))
%136 = load i32*, i32** %9
%137 = call i32 (i32*, i8*, ...) @fprintf(i32* %136, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.28, i64 0, i64 0))
%138 = load i32*, i32** %9
%139 = call i32 (i32*, i8*, ...) @fprintf(i32* %138, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.29, i64 0, i64 0))
%140 = load i32*, i32** %9
%141 = call i32 (i32*, i8*, ...) @fprintf(i32* %140, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.30, i64 0, i64 0))
%142 = load i32*, i32** %9
%143 = call i32 (i32*, i8*, ...) @fprintf(i32* %142, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.31, i64 0, i64 0))
%144 = load i32*, i32** %9
%145 = call i32 (i32*, i8*, ...) @fprintf(i32* %144, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.32, i64 0, i64 0))
%146 = load i32*, i32** %9
%147 = call i32 (i32*, i8*, ...) @fprintf(i32* %146, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.33, i64 0, i64 0))
%148 = load i32*, i32** %9
%149 = call i32 (i32*, i8*, ...) @fprintf(i32* %148, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.26, i64 0, i64 0))
%150 = load i32*, i32** %9
%151 = call i32 (i32*, i8*, ...) @fprintf(i32* %150, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.34, i64 0, i64 0))
%152 = load i32*, i32** %9
%153 = call i32 (i32*, i8*, ...) @fprintf(i32* %152, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.28, i64 0, i64 0))
%154 = load i32*, i32** %9
%155 = call i32 (i32*, i8*, ...) @fprintf(i32* %154, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.29, i64 0, i64 0))
%156 = load i32*, i32** %9
%157 = call i32 (i32*, i8*, ...) @fprintf(i32* %156, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.35, i64 0, i64 0))
%158 = load i32*, i32** %9
%159 = call i32 (i32*, i8*, ...) @fprintf(i32* %158, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.36, i64 0, i64 0))
%160 = load i32*, i32** %9
%161 = call i32 @fclose(i32* %160)
%162 = getelementptr inbounds [60 x i8], [60 x i8]* %12, i64 0, i64 0
%163 = call i32 @strcat(i8* %162, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.37, i64 0, i64 0))
%164 = getelementptr inbounds [60 x i8], [60 x i8]* %12, i64 0, i64 0
%165 = load i8**, i8*** %5
%166 = getelementptr inbounds i8*, i8** %165, i64 2
%167 = load i8*, i8** %166
%168 = call i32 @strcat(i8* %164, i8* %167)
%169 = getelementptr inbounds [60 x i8], [60 x i8]* %12, i64 0, i64 0
%170 = call i32 @system(i8* %169)
%171 = load i32, i32* %6
%172 = icmp eq i32 %171, 1
br i1 %172, label %173, label %175
173: ; preds = %95
%174 = call i32 @remove(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %175
175: ; preds = %173, %95
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-c\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"a.c\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [20 x i8] c"#include <stdio.h>\0A\00"
@.str.5 = [21 x i8] c"#include <stdlib.h>\0A\00"
@.str.6 = [21 x i8] c"#include <string.h>\0A\00"
@.str.7 = [19 x i8] c"int main( void ){\0A\00"
@.str.8 = [17 x i8] c"\09char* codep = \22\00"
@EOF = global i8 0
@.str.10 = [52 x i8] c"\22;\0A\09char* mem = (char*) malloc(sizeof(char) * 600);\00"
@.str.11 = [32 x i8] c"\0A\09int i; // instruction pointer\00"
@.str.12 = [17 x i8] c"\0A\09char code[%d];\00"
@.str.13 = [22 x i8] c"\0A\09strcpy(code,codep);\00"
@.str.14 = [33 x i8] c"\0A\09int ptr = 0; // memory pointer\00"
@.str.15 = [27 x i8] c"\0A\09for(i = 0; i < %d; i++){\00"
@.str.16 = [29 x i8] c"\0A\09\09if(code[i] == '>') ptr++;\00"
@.str.17 = [29 x i8] c"\0A\09\09if(code[i] == '<') ptr--;\00"
@.str.18 = [55 x i8] c"\0A\09\09if(code[i] == '+') *(mem + ptr) = *(mem + ptr) + 1;\00"
@.str.19 = [55 x i8] c"\0A\09\09if(code[i] == '-') *(mem + ptr) = *(mem + ptr) - 1;\00"
@.str.20 = [45 x i8] c"\0A\09\09if(code[i] == '.') putchar(*(mem + ptr));\00"
@.str.21 = [48 x i8] c"\0A\09\09if(code[i] == ',') *(mem + ptr) = getchar();\00"
@.str.22 = [23 x i8] c"\0A\09\09if(code[i] == '['){\00"
@.str.23 = [27 x i8] c"\0A\09\09\09if(*(mem + ptr) == 0){\00"
@.str.24 = [30 x i8] c"\0A\09\09\09\09while((code[i] != ']')){\00"
@.str.25 = [11 x i8] c"\0A\09\09\09\09\09i++;\00"
@.str.26 = [7 x i8] c"\0A\09\09\09\09}\00"
@.str.27 = [10 x i8] c"\0A\09\09\09\09i++;\00"
@.str.28 = [6 x i8] c"\0A\09\09\09}\00"
@.str.29 = [5 x i8] c"\0A\09\09}\00"
@.str.30 = [23 x i8] c"\0A\09\09if(code[i] == ']'){\00"
@.str.31 = [27 x i8] c"\0A\09\09\09if(*(mem + ptr) != 0){\00"
@.str.32 = [30 x i8] c"\0A\09\09\09\09while((code[i] != '[')){\00"
@.str.33 = [11 x i8] c"\0A\09\09\09\09\09i--;\00"
@.str.34 = [10 x i8] c"\0A\09\09\09\09i--;\00"
@.str.35 = [4 x i8] c"\0A\09}\00"
@.str.36 = [14 x i8] c"\0A\09return 0;\0A}\00"
@.str.37 = [12 x i8] c"gcc a.c -o \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [60 x i8]
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %54
5: ; preds = %2
%6 = zext i32 %0 to i64
%7 = add nsw i64 %6, -1
%8 = and i64 %6, 3
%9 = icmp ult i64 %7, 3
br i1 %9, label %38, label %10
10: ; preds = %5
%11 = and i64 %6, 4294967292
br label %12
12: ; preds = %12, %10
%13 = phi i64 [ 0, %10 ], [ %35, %12 ]
%14 = phi i32 [ 0, %10 ], [ %34, %12 ]
%15 = phi i64 [ 0, %10 ], [ %36, %12 ]
%16 = getelementptr inbounds i8*, i8** %1, i64 %13
%17 = load i8*, i8** %16
%18 = icmp eq i8* %17, getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%19 = or i64 %13, 1
%20 = getelementptr inbounds i8*, i8** %1, i64 %19
%21 = load i8*, i8** %20
%22 = icmp eq i8* %21, getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%23 = or i64 %13, 2
%24 = getelementptr inbounds i8*, i8** %1, i64 %23
%25 = load i8*, i8** %24
%26 = icmp eq i8* %25, getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%27 = or i64 %13, 3
%28 = getelementptr inbounds i8*, i8** %1, i64 %27
%29 = load i8*, i8** %28
%30 = icmp eq i8* %29, getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%31 = select i1 %30, i1 true, i1 %26
%32 = select i1 %31, i1 true, i1 %22
%33 = select i1 %32, i1 true, i1 %18
%34 = select i1 %33, i32 1, i32 %14
%35 = add nuw nsw i64 %13, 4
%36 = add i64 %15, 4
%37 = icmp eq i64 %36, %11
br i1 %37, label %38, label %12
38: ; preds = %12, %5
%39 = phi i32 [ undef, %5 ], [ %34, %12 ]
%40 = phi i64 [ 0, %5 ], [ %35, %12 ]
%41 = phi i32 [ 0, %5 ], [ %34, %12 ]
%42 = icmp eq i64 %8, 0
br i1 %42, label %54, label %43
43: ; preds = %38, %43
%44 = phi i64 [ %51, %43 ], [ %40, %38 ]
%45 = phi i32 [ %50, %43 ], [ %41, %38 ]
%46 = phi i64 [ %52, %43 ], [ 0, %38 ]
%47 = getelementptr inbounds i8*, i8** %1, i64 %44
%48 = load i8*, i8** %47
%49 = icmp eq i8* %48, getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%50 = select i1 %49, i32 1, i32 %45
%51 = add nuw nsw i64 %44, 1
%52 = add i64 %46, 1
%53 = icmp eq i64 %52, %8
br i1 %53, label %54, label %43
54: ; preds = %38, %43, %2
%55 = phi i32 [ 0, %2 ], [ %39, %38 ], [ %50, %43 ]
%56 = getelementptr inbounds i8*, i8** %1, i64 1
%57 = load i8*, i8** %56
%58 = tail call i32* @fopen(i8* %57, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%59 = tail call i32* @fopen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%60 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i64 19, i64 1, i32* %59)
%61 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i64 20, i64 1, i32* %59)
%62 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i64 20, i64 1, i32* %59)
%63 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i64 18, i64 1, i32* %59)
%64 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i64 16, i64 1, i32* %59)
%65 = tail call signext i8 @fgetc(i32* %58)
%66 = load i8, i8* @EOF
%67 = icmp eq i8 %65, %66
br i1 %67, label %80, label %68
68: ; preds = %54, %75
%69 = phi i8 [ %77, %75 ], [ %65, %54 ]
%70 = phi i32 [ %76, %75 ], [ 0, %54 ]
switch i8 %69, label %75 [
i8 93, label %71
i8 91, label %71
i8 62, label %71
i8 60, label %71
i8 46, label %71
i8 45, label %71
i8 44, label %71
i8 43, label %71
]
71: ; preds = %68, %68, %68, %68, %68, %68, %68, %68
%72 = zext i8 %69 to i32
%73 = tail call i32 @fputc(i32 %72, i32* %59)
%74 = add nsw i32 %70, 1
br label %75
75: ; preds = %71, %68
%76 = phi i32 [ %74, %71 ], [ %70, %68 ]
%77 = tail call signext i8 @fgetc(i32* %58)
%78 = load i8, i8* @EOF
%79 = icmp eq i8 %77, %78
br i1 %79, label %80, label %68
80: ; preds = %75, %54
%81 = phi i32 [ 0, %54 ], [ %76, %75 ]
%82 = tail call i32 @fclose(i32* %58)
%83 = tail call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i64 51, i64 1, i32* %59)
%84 = tail call i64 @fwrite(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i64 31, i64 1, i32* %59)
%85 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %59, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32 %81)
%86 = tail call i64 @fwrite(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), i64 21, i64 1, i32* %59)
%87 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.14, i64 0, i64 0), i64 32, i64 1, i32* %59)
%88 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %59, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), i32 %81)
%89 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0), i64 28, i64 1, i32* %59)
%90 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.17, i64 0, i64 0), i64 28, i64 1, i32* %59)
%91 = tail call i64 @fwrite(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.18, i64 0, i64 0), i64 54, i64 1, i32* %59)
%92 = tail call i64 @fwrite(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.19, i64 0, i64 0), i64 54, i64 1, i32* %59)
%93 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.20, i64 0, i64 0), i64 44, i64 1, i32* %59)
%94 = tail call i64 @fwrite(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.21, i64 0, i64 0), i64 47, i64 1, i32* %59)
%95 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.22, i64 0, i64 0), i64 22, i64 1, i32* %59)
%96 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), i64 26, i64 1, i32* %59)
%97 = tail call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.24, i64 0, i64 0), i64 29, i64 1, i32* %59)
%98 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.25, i64 0, i64 0), i64 10, i64 1, i32* %59)
%99 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.26, i64 0, i64 0), i64 6, i64 1, i32* %59)
%100 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.27, i64 0, i64 0), i64 9, i64 1, i32* %59)
%101 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.28, i64 0, i64 0), i64 5, i64 1, i32* %59)
%102 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.29, i64 0, i64 0), i64 4, i64 1, i32* %59)
%103 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.30, i64 0, i64 0), i64 22, i64 1, i32* %59)
%104 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.31, i64 0, i64 0), i64 26, i64 1, i32* %59)
%105 = tail call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.32, i64 0, i64 0), i64 29, i64 1, i32* %59)
%106 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.33, i64 0, i64 0), i64 10, i64 1, i32* %59)
%107 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.26, i64 0, i64 0), i64 6, i64 1, i32* %59)
%108 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.34, i64 0, i64 0), i64 9, i64 1, i32* %59)
%109 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.28, i64 0, i64 0), i64 5, i64 1, i32* %59)
%110 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.29, i64 0, i64 0), i64 4, i64 1, i32* %59)
%111 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.35, i64 0, i64 0), i64 3, i64 1, i32* %59)
%112 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.36, i64 0, i64 0), i64 13, i64 1, i32* %59)
%113 = tail call i32 @fclose(i32* %59)
%114 = getelementptr inbounds [60 x i8], [60 x i8]* %3, i64 0, i64 0
%115 = call i32 @strcat(i8* %114, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.37, i64 0, i64 0))
%116 = getelementptr inbounds i8*, i8** %1, i64 2
%117 = load i8*, i8** %116
%118 = call i32 @strcat(i8* %114, i8* %117)
%119 = call i32 @system(i8* %114)
%120 = icmp eq i32 %55, 1
br i1 %120, label %121, label %123
121: ; preds = %80
%122 = call i32 @remove(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %123
123: ; preds = %121, %80
ret i32 0
}