#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*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printApiCpp(int /*<<< orphan*/ *);
int /*<<< orphan*/ printFileHeader(int /*<<< orphan*/ *);
int /*<<< orphan*/ printFuncDecls(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ printPlaybackCpp(int /*<<< orphan*/ *);
int /*<<< orphan*/ printPlaybackFuncs(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ printStructures(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ yylex();
int main(int argc, char **argv) {
  if (argc != 3) {
    fprintf(stderr, "usage: %s commandFile outFile\n", argv[0]);
    return 1;
  }
  const char *rsgFile = argv[1];
  const char *outFile = argv[2];
  FILE *input = fopen(rsgFile, "r");
  char choice = fgetc(input);
  fclose(input);
  if (choice < '0' || choice > '3') {
    fprintf(stderr, "Uknown command: \'%c\'\n", choice);
    return -2;
  }
  yylex();
  FILE *f = fopen(outFile, "w");
  printFileHeader(f);
  switch (choice) {
  case '0': {
    fprintf(f, "\n");
    fprintf(f, "#include \"rsContext.h\"\n");
    fprintf(f, "\n");
    fprintf(f, "namespace android {\n");
    fprintf(f, "namespace renderscript {\n");
    printStructures(f);
    printFuncDecls(f, "rsi_", 1);
    printPlaybackFuncs(f, "rsp_");
    fprintf(f,
            "\n\ntypedef void (*RsPlaybackFunc)(Context *, const void *);\n");
    fprintf(f, "extern RsPlaybackFunc gPlaybackFuncs[];\n");
    fprintf(f, "}\n");
    fprintf(f, "}\n");
  } break;
  case '1': {
    printFuncDecls(f, "rs", 0);
  } break;
  case '2': {
    printApiCpp(f);
  } break;
  case '3': {
    printFileHeader(f);
    printPlaybackCpp(f);
  } break;
  }
  fclose(f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11fb <main+0x4b>
mov    0x2e09(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe28(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13e8 <main+0x238>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe11(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %al,-0x29(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
movsbl -0x29(%rbp),%eax
cmp    $0x30,%eax
jl     1256 <main+0xa6>
movsbl -0x29(%rbp),%eax
cmp    $0x33,%eax
jle    127e <main+0xce>
mov    0x2d83(%rip),%rax
movslq (%rax),%rdi
movsbl -0x29(%rbp),%edx
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    13e8 <main+0x238>
xor    %eax,%eax
call   10b0 <yylex@plt>
mov    -0x20(%rbp),%rdi
lea    0xdb7(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
call   1080 <printFileHeader@plt>
movsbl -0x29(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0x3,%eax
ja     13d8 <main+0x228>
mov    -0x40(%rbp),%rax
lea    0xd3d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x38(%rbp),%rdi
lea    0xd88(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xd60(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xd64(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xd54(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xd57(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
call   1050 <printStructures@plt>
mov    -0x38(%rbp),%rdi
lea    0xd56(%rip),%rsi
mov    $0x1,%edx
call   10d0 <printFuncDecls@plt>
mov    -0x38(%rbp),%rdi
lea    0xd46(%rip),%rsi
call   1090 <printPlaybackFuncs@plt>
mov    -0x38(%rbp),%rdi
lea    0xd3b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xd65(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xd7c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xd6a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13d8 <main+0x228>
mov    -0x38(%rbp),%rdi
lea    0xd56(%rip),%rsi
xor    %edx,%edx
call   10d0 <printFuncDecls@plt>
jmp    13d8 <main+0x228>
mov    -0x38(%rbp),%rdi
call   10a0 <printApiCpp@plt>
jmp    13d8 <main+0x228>
mov    -0x38(%rbp),%rdi
call   1080 <printFileHeader@plt>
mov    -0x38(%rbp),%rdi
call   1040 <printPlaybackCpp@plt>
mov    -0x38(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x3,%edi
jne    1236 <main+0x66>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rbp
lea    0xe44(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <fgetc@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1030 <fclose@plt>
movsbl %r14b,%ebx
lea    -0x34(%rbx),%eax
cmp    $0xfb,%al
ja     125c <main+0x8c>
mov    0x2dc8(%rip),%rax
movslq (%rax),%rdi
lea    0xe0f(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xfffffffe,%r15d
jmp    13c6 <main+0x1f6>
mov    0x2da3(%rip),%rax
movslq (%rax),%rdi
mov    (%rsi),%rdx
lea    0xdc6(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%r15d
jmp    13c6 <main+0x1f6>
xor    %r15d,%r15d
xor    %eax,%eax
call   10c0 <yylex@plt>
lea    0xdda(%rip),%rsi
mov    %rbp,%rdi
call   10d0 <fopen@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1090 <printFileHeader@plt>
add    $0xffffffd0,%ebx
cmp    $0x3,%ebx
ja     13be <main+0x1ee>
lea    0xd6d(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0xa,%edi
mov    %r14,%rsi
call   1070 <fputc@plt>
lea    0xd99(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %r14,%rsi
call   1070 <fputc@plt>
lea    0xd8b(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10e0 <fwrite@plt>
lea    0xd87(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10e0 <fwrite@plt>
mov    %r14,%rdi
call   1050 <printStructures@plt>
lea    0xd80(%rip),%rsi
mov    %r14,%rdi
mov    $0x1,%edx
call   10f0 <printFuncDecls@plt>
lea    0xd71(%rip),%rsi
mov    %r14,%rdi
call   10a0 <printPlaybackFuncs@plt>
lea    0xd67(%rip),%rdi
mov    $0x3b,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10e0 <fwrite@plt>
lea    0xd8a(%rip),%rdi
mov    $0x28,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10e0 <fwrite@plt>
lea    0xd9a(%rip),%rbx
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rdi
mov    %r14,%rcx
call   10e0 <fwrite@plt>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rdi
mov    %r14,%rcx
call   10e0 <fwrite@plt>
jmp    13be <main+0x1ee>
lea    0xd6a(%rip),%rsi
mov    %r14,%rdi
xor    %edx,%edx
call   10f0 <printFuncDecls@plt>
jmp    13be <main+0x1ee>
mov    %r14,%rdi
call   10b0 <printApiCpp@plt>
jmp    13be <main+0x1ee>
mov    %r14,%rdi
call   1090 <printFileHeader@plt>
mov    %r14,%rdi
call   1040 <printPlaybackCpp@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"usage: %s commandFile outFile\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [22 x i8] c"Uknown command: '%c'\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [24 x i8] c"#include \22rsContext.h\22\0A\00"
@.str.6 = [21 x i8] c"namespace android {\0A\00"
@.str.7 = [26 x i8] c"namespace renderscript {\0A\00"
@.str.8 = [5 x i8] c"rsi_\00"
@.str.9 = [5 x i8] c"rsp_\00"
@.str.10 = [60 x i8] c"\0A\0Atypedef void (*RsPlaybackFunc)(Context *, const void *);\0A\00"
@.str.11 = [41 x i8] c"extern RsPlaybackFunc gPlaybackFuncs[];\0A\00"
@.str.12 = [3 x i8] c"}\0A\00"
@.str.13 = [3 x i8] c"rs\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%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 = load i32, i32* %4
%12 = icmp ne i32 %11, 3
br i1 %12, label %13, label %21
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %19)
store i32 1, i32* %3
br label %95
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
store i8* %24, i8** %6
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 2
%27 = load i8*, i8** %26
store i8* %27, i8** %7
%28 = load i8*, i8** %6
%29 = call i32* @fopen(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %29, i32** %8
%30 = load i32*, i32** %8
%31 = call signext i8 @fgetc(i32* %30)
store i8 %31, i8* %9
%32 = load i32*, i32** %8
%33 = call i32 @fclose(i32* %32)
%34 = load i8, i8* %9
%35 = sext i8 %34 to i32
%36 = icmp slt i32 %35, 48
br i1 %36, label %41, label %37
37: ; preds = %21
%38 = load i8, i8* %9
%39 = sext i8 %38 to i32
%40 = icmp sgt i32 %39, 51
br i1 %40, label %41, label %48
41: ; preds = %37, %21
%42 = load i32, i32* @stderr
%43 = sext i32 %42 to i64
%44 = inttoptr i64 %43 to i32*
%45 = load i8, i8* %9
%46 = sext i8 %45 to i32
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %46)
store i32 -2, i32* %3
br label %95
48: ; preds = %37
%49 = call i32 (...) @yylex()
%50 = load i8*, i8** %7
%51 = call i32* @fopen(i8* %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %51, i32** %10
%52 = load i32*, i32** %10
%53 = call i32 @printFileHeader(i32* %52)
%54 = load i8, i8* %9
%55 = sext i8 %54 to i32
switch i32 %55, label %92 [
i32 48, label %56
i32 49, label %81
i32 50, label %84
i32 51, label %87
]
56: ; preds = %48
%57 = load i32*, i32** %10
%58 = call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%59 = load i32*, i32** %10
%60 = call i32 (i32*, i8*, ...) @fprintf(i32* %59, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%61 = load i32*, i32** %10
%62 = call i32 (i32*, i8*, ...) @fprintf(i32* %61, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%63 = load i32*, i32** %10
%64 = call i32 (i32*, i8*, ...) @fprintf(i32* %63, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%65 = load i32*, i32** %10
%66 = call i32 (i32*, i8*, ...) @fprintf(i32* %65, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%67 = load i32*, i32** %10
%68 = call i32 @printStructures(i32* %67)
%69 = load i32*, i32** %10
%70 = call i32 @printFuncDecls(i32* %69, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 1)
%71 = load i32*, i32** %10
%72 = call i32 @printPlaybackFuncs(i32* %71, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%73 = load i32*, i32** %10
%74 = call i32 (i32*, i8*, ...) @fprintf(i32* %73, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.10, i64 0, i64 0))
%75 = load i32*, i32** %10
%76 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0))
%77 = load i32*, i32** %10
%78 = call i32 (i32*, i8*, ...) @fprintf(i32* %77, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%79 = load i32*, i32** %10
%80 = call i32 (i32*, i8*, ...) @fprintf(i32* %79, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
br label %92
81: ; preds = %48
%82 = load i32*, i32** %10
%83 = call i32 @printFuncDecls(i32* %82, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32 0)
br label %92
84: ; preds = %48
%85 = load i32*, i32** %10
%86 = call i32 @printApiCpp(i32* %85)
br label %92
87: ; preds = %48
%88 = load i32*, i32** %10
%89 = call i32 @printFileHeader(i32* %88)
%90 = load i32*, i32** %10
%91 = call i32 @printPlaybackCpp(i32* %90)
br label %92
92: ; preds = %48, %87, %84, %81, %56
%93 = load i32*, i32** %10
%94 = call i32 @fclose(i32* %93)
store i32 0, i32* %3
br label %95
95: ; preds = %92, %41, %13
%96 = load i32, i32* %3
ret i32 %96
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"usage: %s commandFile outFile\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [22 x i8] c"Uknown command: '%c'\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.5 = [24 x i8] c"#include \22rsContext.h\22\0A\00"
@.str.6 = [21 x i8] c"namespace android {\0A\00"
@.str.7 = [26 x i8] c"namespace renderscript {\0A\00"
@.str.8 = [5 x i8] c"rsi_\00"
@.str.9 = [5 x i8] c"rsp_\00"
@.str.10 = [60 x i8] c"\0A\0Atypedef void (*RsPlaybackFunc)(Context *, const void *);\0A\00"
@.str.11 = [41 x i8] c"extern RsPlaybackFunc gPlaybackFuncs[];\0A\00"
@.str.12 = [3 x i8] c"}\0A\00"
@.str.13 = [3 x i8] c"rs\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load i8*, i8** %1
%9 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %52
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = tail call i32* @fopen(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = tail call signext i8 @fgetc(i32* %15)
%17 = tail call i32 @fclose(i32* %15)
%18 = sext i8 %16 to i32
%19 = add i8 %16, -52
%20 = icmp ult i8 %19, -4
br i1 %20, label %21, label %26
21: ; preds = %10
%22 = load i32, i32* @stderr
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to i32*
%25 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %18)
br label %52
26: ; preds = %10
%27 = tail call i32 (...) @yylex()
%28 = tail call i32* @fopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%29 = tail call i32 @printFileHeader(i32* %28)
switch i32 %18, label %50 [
i32 48, label %30
i32 49, label %43
i32 50, label %45
i32 51, label %47
]
30: ; preds = %26
%31 = tail call i32 @fputc(i32 10, i32* %28)
%32 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i64 23, i64 1, i32* %28)
%33 = tail call i32 @fputc(i32 10, i32* %28)
%34 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i64 20, i64 1, i32* %28)
%35 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i64 25, i64 1, i32* %28)
%36 = tail call i32 @printStructures(i32* %28)
%37 = tail call i32 @printFuncDecls(i32* %28, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 1)
%38 = tail call i32 @printPlaybackFuncs(i32* %28, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%39 = tail call i64 @fwrite(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.10, i64 0, i64 0), i64 59, i64 1, i32* %28)
%40 = tail call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0), i64 40, i64 1, i32* %28)
%41 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i64 2, i64 1, i32* %28)
%42 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i64 2, i64 1, i32* %28)
br label %50
43: ; preds = %26
%44 = tail call i32 @printFuncDecls(i32* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32 0)
br label %50
45: ; preds = %26
%46 = tail call i32 @printApiCpp(i32* %28)
br label %50
47: ; preds = %26
%48 = tail call i32 @printFileHeader(i32* %28)
%49 = tail call i32 @printPlaybackCpp(i32* %28)
br label %50
50: ; preds = %26, %47, %45, %43, %30
%51 = tail call i32 @fclose(i32* %28)
br label %52
52: ; preds = %21, %50, %4
%53 = phi i32 [ 1, %4 ], [ -2, %21 ], [ 0, %50 ]
ret i32 %53
}