#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 /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ free(char *);
char *intToString(int);
char *malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  char *target_prog = malloc(sizeof(char) * 32768);
  if (target_prog == NULL) {
    printf("Malloc error!\r\n");
    return -1;
  }
  memset(target_prog, 0, 32768);
  strcpy(target_prog, "#include <stdio.h>\r\n");
  strcat(target_prog, "int main(int argc, char** argv)\r\n");
  strcat(target_prog, "{\r\n");
  strcat(target_prog, "for(int i = 0; i < 100; i++)\r\n");
  strcat(target_prog, "{\r\n");
  strcat(target_prog, "if (i == 0 ) { printf(\"FizzBuzz\\r\\n\"); }\r\n");
  int x;
  int flag = 0;
  for (x = 1; x < 100; x++) {
    flag = 0;
    strcat(target_prog, "else if (i == ");
    char *intString = intToString(x);
    if (intString == NULL) {
      printf("Malloc failed!\r\n");
      return -1;
    }
    strcat(target_prog, intString);
    strcat(target_prog, ") { printf(\"");
    if (x % 3 == 0) {
      strcat(target_prog, "Fizz");
      flag = 1;
    }
    if (x % 5 == 0) {
      strcat(target_prog, "Buzz");
      flag = 1;
    }
    if (!flag) {
      strcat(target_prog, intString);
    }
    strcat(target_prog, "\\r\\n\"); }\r\n");
    free(intString);
  }
  strcat(target_prog, "}\r\n");
  strcat(target_prog, "}\r\n");
  FILE *file = fopen("fizzbuzz_gen.c", "w");
  if (file == NULL)
    return -1;
  fprintf(file, "%s", target_prog);
  fclose(file);
  system("gcc -std=c99 fizzbuzz_gen.c -o fizzbuzz");
  system("./fizzbuzz");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x8000,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11f7 <main+0x47>
lea    0xe1a(%rip),%rdi
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1400 <main+0x250>
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x8000,%edx
call   1080 <memset@plt>
mov    -0x18(%rbp),%rdi
lea    0xdfe(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rdi
lea    0xe03(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xe15(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xe09(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xdf5(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xe08(%rip),%rsi
call   10d0 <strcat@plt>
movl   $0x0,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x64,-0x1c(%rbp)
jge    1376 <main+0x1c6>
movl   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe04(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x1c(%rbp),%edi
call   1090 <intToString@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    12c5 <main+0x115>
lea    0xdf0(%rip),%rdi
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1400 <main+0x250>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10d0 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xdd8(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x1c(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    130d <main+0x15d>
mov    -0x18(%rbp),%rdi
lea    0xdc1(%rip),%rsi
call   10d0 <strcat@plt>
movl   $0x1,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1338 <main+0x188>
mov    -0x18(%rbp),%rdi
lea    0xd9b(%rip),%rsi
call   10d0 <strcat@plt>
movl   $0x1,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    134f <main+0x19f>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10d0 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xd2f(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1275 <main+0xc5>
mov    -0x18(%rbp),%rdi
lea    0xd10(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xd00(%rip),%rsi
call   10d0 <strcat@plt>
lea    0xd2f(%rip),%rdi
lea    0xd37(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    13c4 <main+0x214>
movl   $0xffffffff,-0x4(%rbp)
jmp    1400 <main+0x250>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xd0a(%rip),%rsi
call   10a0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
call   1050 <fclose@plt>
lea    0xcf8(%rip),%rdi
call   1060 <system@plt>
lea    0xd14(%rip),%rdi
call   1060 <system@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x8000,%edi
call   10b0 <malloc@plt>
test   %rax,%rax
je     131d <main+0x16d>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x8000,%edx
call   1090 <memset@plt>
lea    0xe19(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcpy@plt>
lea    0xe1f(%rip),%rsi
mov    %rbx,%rdi
call   10d0 <strcat@plt>
lea    0xe32(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10d0 <strcat@plt>
lea    0xe24(%rip),%rsi
mov    %rbx,%rdi
call   10d0 <strcat@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10d0 <strcat@plt>
lea    0xe29(%rip),%rsi
mov    %rbx,%rdi
call   10d0 <strcat@plt>
mov    $0x1,%ebp
lea    0xe34(%rip),%r12
jmp    127e <main+0xce>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xe4c(%rip),%rsi
call   10d0 <strcat@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   10d0 <strcat@plt>
mov    %r13,%rdi
call   1030 <free@plt>
add    $0x1,%ebp
cmp    $0x64,%ebp
je     1346 <main+0x196>
mov    %rbx,%rdi
lea    0xdfd(%rip),%rsi
call   10d0 <strcat@plt>
mov    %ebp,%edi
call   10a0 <intToString@plt>
test   %rax,%rax
je     1326 <main+0x176>
mov    %rax,%r13
movzbl %bpl,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
lea    (%rcx,%rcx,4),%r15d
neg    %r15d
imul   $0xab,%eax,%eax
shr    $0x9,%eax
lea    (%rax,%rax,2),%r14d
neg    %r14d
mov    %rbx,%rdi
mov    %r13,%rsi
call   10d0 <strcat@plt>
mov    %rbx,%rdi
lea    0xdbb(%rip),%rsi
call   10d0 <strcat@plt>
add    %bpl,%r14b
je     1300 <main+0x150>
add    %bpl,%r15b
je     1250 <main+0xa0>
mov    %rbx,%rdi
mov    %r13,%rsi
jmp    125a <main+0xaa>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xd97(%rip),%rsi
call   10d0 <strcat@plt>
add    %bpl,%r15b
jne    125f <main+0xaf>
jmp    1250 <main+0xa0>
lea    0xddb(%rip),%rdi
jmp    132d <main+0x17d>
lea    0xdc2(%rip),%rdi
call   1050 <puts@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd34(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10d0 <strcat@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10d0 <strcat@plt>
lea    0xd41(%rip),%rdi
lea    0xd49(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1332 <main+0x182>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %rax,%rsi
call   1080 <fputs@plt>
mov    %rbp,%rdi
call   1060 <fclose@plt>
lea    0xd24(%rip),%rdi
call   1070 <system@plt>
lea    0xd40(%rip),%rdi
call   1070 <system@plt>
xor    %eax,%eax
jmp    1337 <main+0x187>

LLVM IR (-O0):
@.str = [16 x i8] c"Malloc error!\0D\0A\00"
@.str.1 = [21 x i8] c"#include <stdio.h>\0D\0A\00"
@.str.2 = [34 x i8] c"int main(int argc, char** argv)\0D\0A\00"
@.str.3 = [4 x i8] c"{\0D\0A\00"
@.str.4 = [31 x i8] c"for(int i = 0; i < 100; i++)\0D\0A\00"
@.str.5 = [43 x i8] c"if (i == 0 ) { printf(\22FizzBuzz\\r\\n\22); }\0D\0A\00"
@.str.6 = [15 x i8] c"else if (i == \00"
@.str.7 = [17 x i8] c"Malloc failed!\0D\0A\00"
@.str.8 = [13 x i8] c") { printf(\22\00"
@.str.9 = [5 x i8] c"Fizz\00"
@.str.10 = [5 x i8] c"Buzz\00"
@.str.11 = [12 x i8] c"\\r\\n\22); }\0D\0A\00"
@.str.12 = [4 x i8] c"}\0D\0A\00"
@.str.13 = [15 x i8] c"fizzbuzz_gen.c\00"
@.str.14 = [2 x i8] c"w\00"
@.str.15 = [3 x i8] c"%s\00"
@.str.16 = [40 x i8] c"gcc -std=c99 fizzbuzz_gen.c -o fizzbuzz\00"
@.str.17 = [11 x i8] c"./fizzbuzz\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i8* @malloc(i32 32768)
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %94
16: ; preds = %2
%17 = load i8*, i8** %6
%18 = call i32 @memset(i8* %17, i32 0, i32 32768)
%19 = load i8*, i8** %6
%20 = call i32 @strcpy(i8* %19, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%21 = load i8*, i8** %6
%22 = call i32 @strcat(i8* %21, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%23 = load i8*, i8** %6
%24 = call i32 @strcat(i8* %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%25 = load i8*, i8** %6
%26 = call i32 @strcat(i8* %25, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%27 = load i8*, i8** %6
%28 = call i32 @strcat(i8* %27, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%29 = load i8*, i8** %6
%30 = call i32 @strcat(i8* %29, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %8
store i32 1, i32* %7
br label %31
31: ; preds = %74, %16
%32 = load i32, i32* %7
%33 = icmp slt i32 %32, 100
br i1 %33, label %34, label %77
34: ; preds = %31
store i32 0, i32* %8
%35 = load i8*, i8** %6
%36 = call i32 @strcat(i8* %35, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%37 = load i32, i32* %7
%38 = call i8* @intToString(i32 %37)
store i8* %38, i8** %9
%39 = load i8*, i8** %9
%40 = icmp eq i8* %39, null
br i1 %40, label %41, label %43
41: ; preds = %34
%42 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
store i32 -1, i32* %3
br label %94
43: ; preds = %34
%44 = load i8*, i8** %6
%45 = load i8*, i8** %9
%46 = call i32 @strcat(i8* %44, i8* %45)
%47 = load i8*, i8** %6
%48 = call i32 @strcat(i8* %47, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%49 = load i32, i32* %7
%50 = srem i32 %49, 3
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %43
%53 = load i8*, i8** %6
%54 = call i32 @strcat(i8* %53, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
store i32 1, i32* %8
br label %55
55: ; preds = %52, %43
%56 = load i32, i32* %7
%57 = srem i32 %56, 5
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %62
59: ; preds = %55
%60 = load i8*, i8** %6
%61 = call i32 @strcat(i8* %60, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
store i32 1, i32* %8
br label %62
62: ; preds = %59, %55
%63 = load i32, i32* %8
%64 = icmp ne i32 %63, 0
br i1 %64, label %69, label %65
65: ; preds = %62
%66 = load i8*, i8** %6
%67 = load i8*, i8** %9
%68 = call i32 @strcat(i8* %66, i8* %67)
br label %69
69: ; preds = %65, %62
%70 = load i8*, i8** %6
%71 = call i32 @strcat(i8* %70, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%72 = load i8*, i8** %9
%73 = call i32 @free(i8* %72)
br label %74
74: ; preds = %69
%75 = load i32, i32* %7
%76 = add nsw i32 %75, 1
store i32 %76, i32* %7
br label %31
77: ; preds = %31
%78 = load i8*, i8** %6
%79 = call i32 @strcat(i8* %78, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%80 = load i8*, i8** %6
%81 = call i32 @strcat(i8* %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%82 = call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
store i32* %82, i32** %10
%83 = load i32*, i32** %10
%84 = icmp eq i32* %83, null
br i1 %84, label %85, label %86
85: ; preds = %77
store i32 -1, i32* %3
br label %94
86: ; preds = %77
%87 = load i32*, i32** %10
%88 = load i8*, i8** %6
%89 = call i32 @fprintf(i32* %87, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %88)
%90 = load i32*, i32** %10
%91 = call i32 @fclose(i32* %90)
%92 = call i32 @system(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0))
%93 = call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0))
store i32 0, i32* %3
br label %94
94: ; preds = %86, %85, %41, %14
%95 = load i32, i32* %3
ret i32 %95
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"#include <stdio.h>\0D\0A\00"
@.str.2 = [34 x i8] c"int main(int argc, char** argv)\0D\0A\00"
@.str.3 = [4 x i8] c"{\0D\0A\00"
@.str.4 = [31 x i8] c"for(int i = 0; i < 100; i++)\0D\0A\00"
@.str.5 = [43 x i8] c"if (i == 0 ) { printf(\22FizzBuzz\\r\\n\22); }\0D\0A\00"
@.str.6 = [15 x i8] c"else if (i == \00"
@.str.8 = [13 x i8] c") { printf(\22\00"
@.str.9 = [5 x i8] c"Fizz\00"
@.str.10 = [5 x i8] c"Buzz\00"
@.str.11 = [12 x i8] c"\\r\\n\22); }\0D\0A\00"
@.str.12 = [4 x i8] c"}\0D\0A\00"
@.str.13 = [15 x i8] c"fizzbuzz_gen.c\00"
@.str.14 = [2 x i8] c"w\00"
@.str.16 = [40 x i8] c"gcc -std=c99 fizzbuzz_gen.c -o fizzbuzz\00"
@.str.17 = [11 x i8] c"./fizzbuzz\00"
@str = [16 x i8] c"Malloc failed!\0D\00"
@str.18 = [15 x i8] c"Malloc error!\0D\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(32768) i8* @malloc(i32 32768)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.18, i64 0, i64 0))
br label %54
7: ; preds = %2
%8 = tail call i32 @memset(i8* %3, i32 0, i32 32768)
%9 = tail call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%11 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%12 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%13 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%14 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
br label %15
15: ; preds = %7, %39
%16 = phi i32 [ 1, %7 ], [ %42, %39 ]
%17 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%18 = tail call i8* @intToString(i32 %16)
%19 = icmp eq i8* %18, null
br i1 %19, label %20, label %22
20: ; preds = %15
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %54
22: ; preds = %15
%23 = tail call i32 @strcat(i8* %3, i8* %18)
%24 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%25 = trunc i32 %16 to i8
%26 = urem i8 %25, 3
%27 = icmp eq i8 %26, 0
br i1 %27, label %28, label %32
28: ; preds = %22
%29 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%30 = urem i8 %25, 5
%31 = icmp eq i8 %30, 0
br i1 %31, label %35, label %39
32: ; preds = %22
%33 = urem i8 %25, 5
%34 = icmp eq i8 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %32, %28
%36 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %39
37: ; preds = %32
%38 = tail call i32 @strcat(i8* %3, i8* %18)
br label %39
39: ; preds = %28, %35, %37
%40 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%41 = tail call i32 @free(i8* %18)
%42 = add nuw nsw i32 %16, 1
%43 = icmp eq i32 %42, 100
br i1 %43, label %44, label %15
44: ; preds = %39
%45 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%46 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%47 = tail call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%48 = icmp eq i32* %47, null
br i1 %48, label %54, label %49
49: ; preds = %44
%50 = tail call i32 @fputs(i8* %3, i32* %47)
%51 = tail call i32 @fclose(i32* %47)
%52 = tail call i32 @system(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0))
%53 = tail call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0))
br label %54
54: ; preds = %20, %44, %49, %5
%55 = phi i32 [ -1, %5 ], [ 0, %49 ], [ -1, %44 ], [ -1, %20 ]
ret i32 %55
}