#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 */

/* Variables and functions */
int /*<<< orphan*/ braf_displayErrorInArguments(char *, char *);
int /*<<< orphan*/ braf_displayHelp();
int /*<<< orphan*/ braf_displayInfo();
char *braf_extractCodeFromFile(char *);
int /*<<< orphan*/ braf_interactiveMode(char *, int);
int /*<<< orphan*/ braf_interpretCode(char *, char *, int);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int main(int argc, char *argv[]) {
  char tape[30000] = {0};
  char *tapePtr = tape;
  char *code = NULL;
  bool verbose = false;
  for (int argIndex = 1; argIndex < argc; argIndex++) {
    int argLen = strlen(argv[argIndex]);
    char currArg[argLen];
    strcpy(currArg, argv[argIndex]);
    if (strcmp(currArg, "-d") == 0 || strcmp(currArg, "--debug") == 0 ||
        strcmp(currArg, "--verbose") == 0) {
      if (verbose) {
        verbose = false;
      } else if (!verbose) {
        verbose = true;
      }
    }
  }
  if (argc == 1) {
    braf_interactiveMode(tapePtr, false);
  } else if (argc == 2 &&
             (strcmp(argv[1], "-d") == 0 || strcmp(argv[1], "--debug") == 0 ||
              strcmp(argv[1], "--verbose") == 0)) {
    braf_interactiveMode(tapePtr, true);
  } else if (argc > 1) {
    bool helpDisplayed = false;
    bool versionDisplayed = false;
    bool enableInteractive = false;
    bool interactiveDone = false;
    for (int argIndex = 1; argIndex < argc; argIndex++) {
      int argLen = strlen(argv[argIndex]);
      char currArg[argLen];
      strcpy(currArg, argv[argIndex]);
      if (currArg[0] == '-') {
        if (strcmp(currArg, "-h") == 0 || strcmp(currArg, "--help") == 0) {
          if (!helpDisplayed) {
            braf_displayHelp();
            helpDisplayed = true;
          }
        } else if (strcmp(currArg, "-v") == 0 ||
                   strcmp(currArg, "--version") == 0) {
          if (!versionDisplayed) {
            braf_displayInfo();
            versionDisplayed = true;
          }
        } else if (strcmp(currArg, "-i") == 0 ||
                   strcmp(currArg, "--interactive") == 0) {
          if (!interactiveDone) {
            braf_interactiveMode(tapePtr, verbose);
            verbose = false;
            interactiveDone = true;
          }
          return 0;
        } else if (strcmp(currArg, "-d") == 0 ||
                   strcmp(currArg, "--debug") == 0 ||
                   strcmp(currArg, "--verbose") == 0) {
          continue;
        } else {
          braf_displayErrorInArguments("unknown arguments: ", currArg);
          return 1;
        }
      } else {
        char *code = braf_extractCodeFromFile(currArg);
        if (code) {
          braf_interpretCode(code, tapePtr, verbose);
        } else {
          return 1;
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x75c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x7540(%rbp),%rdi
xor    %esi,%esi
mov    $0x7530,%edx
call   1060 <memset@plt>
lea    -0x7540(%rbp),%rax
mov    %rax,-0x7548(%rbp)
movq   $0x0,-0x7550(%rbp)
movl   $0x0,-0x7554(%rbp)
movl   $0x1,-0x7558(%rbp)
mov    -0x7558(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    131a <main+0x17a>
mov    -0x10(%rbp),%rax
movslq -0x7558(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x755c(%rbp)
mov    -0x755c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x7568(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x75b0(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x7570(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x7558(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1040 <strcpy@plt>
mov    -0x75b0(%rbp),%rdi
lea    0xd8a(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     12bf <main+0x11f>
mov    -0x75b0(%rbp),%rdi
lea    0xd70(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     12bf <main+0x11f>
mov    -0x75b0(%rbp),%rdi
lea    0xd5b(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    12fc <main+0x15c>
cmpl   $0x0,-0x7554(%rbp)
je     12db <main+0x13b>
movl   $0x0,-0x7554(%rbp)
jmp    12f7 <main+0x157>
cmpl   $0x0,-0x7554(%rbp)
jne    12f2 <main+0x152>
movl   $0x1,-0x7554(%rbp)
jmp    12f7 <main+0x157>
jmp    12fc <main+0x15c>
mov    -0x7568(%rbp),%rax
mov    %rax,%rsp
mov    -0x7558(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7558(%rbp)
jmp    11f9 <main+0x59>
cmpl   $0x1,-0x8(%rbp)
jne    1337 <main+0x197>
mov    -0x7548(%rbp),%rdi
xor    %esi,%esi
call   1030 <braf_interactiveMode@plt>
jmp    170d <main+0x56d>
cmpl   $0x2,-0x8(%rbp)
jne    13b1 <main+0x211>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcb0(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     139b <main+0x1fb>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc95(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     139b <main+0x1fb>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc7f(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    13b1 <main+0x211>
mov    -0x7548(%rbp),%rdi
mov    $0x1,%esi
call   1030 <braf_interactiveMode@plt>
jmp    1708 <main+0x568>
cmpl   $0x1,-0x8(%rbp)
jle    1703 <main+0x563>
movl   $0x0,-0x7574(%rbp)
movl   $0x0,-0x7578(%rbp)
movl   $0x0,-0x757c(%rbp)
movl   $0x0,-0x7580(%rbp)
movl   $0x1,-0x7584(%rbp)
mov    -0x7584(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    16fe <main+0x55e>
mov    -0x10(%rbp),%rax
movslq -0x7584(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x7588(%rbp)
mov    -0x7588(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x7590(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x75b8(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x7598(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x7584(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1040 <strcpy@plt>
mov    -0x75b8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1645 <main+0x4a5>
mov    -0x75b8(%rbp),%rdi
lea    0xb98(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     14a9 <main+0x309>
mov    -0x75b8(%rbp),%rdi
lea    0xb7e(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    14cc <main+0x32c>
cmpl   $0x0,-0x7574(%rbp)
jne    14c7 <main+0x327>
mov    $0x0,%al
call   10a0 <braf_displayHelp@plt>
movl   $0x1,-0x7574(%rbp)
jmp    1640 <main+0x4a0>
mov    -0x75b8(%rbp),%rdi
lea    0xb45(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1506 <main+0x366>
mov    -0x75b8(%rbp),%rdi
lea    0xb2b(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1529 <main+0x389>
cmpl   $0x0,-0x7578(%rbp)
jne    1524 <main+0x384>
mov    $0x0,%al
call   10c0 <braf_displayInfo@plt>
movl   $0x1,-0x7578(%rbp)
jmp    163b <main+0x49b>
mov    -0x75b8(%rbp),%rdi
lea    0xaf5(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1563 <main+0x3c3>
mov    -0x75b8(%rbp),%rdi
lea    0xadb(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    15ac <main+0x40c>
cmpl   $0x0,-0x7580(%rbp)
jne    1596 <main+0x3f6>
mov    -0x7548(%rbp),%rdi
mov    -0x7554(%rbp),%esi
call   1030 <braf_interactiveMode@plt>
movl   $0x0,-0x7554(%rbp)
movl   $0x1,-0x7580(%rbp)
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x759c(%rbp)
jmp    16a9 <main+0x509>
mov    -0x75b8(%rbp),%rdi
lea    0xa46(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1603 <main+0x463>
mov    -0x75b8(%rbp),%rdi
lea    0xa2c(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1603 <main+0x463>
mov    -0x75b8(%rbp),%rdi
lea    0xa17(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1612 <main+0x472>
movl   $0x7,-0x759c(%rbp)
jmp    16a9 <main+0x509>
mov    -0x75b8(%rbp),%rsi
lea    0xa1d(%rip),%rdi
call   1090 <braf_displayErrorInArguments@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x759c(%rbp)
jmp    16a9 <main+0x509>
jmp    1640 <main+0x4a0>
jmp    169f <main+0x4ff>
mov    -0x75b8(%rbp),%rdi
call   10b0 <braf_extractCodeFromFile@plt>
mov    %rax,-0x75a8(%rbp)
cmpq   $0x0,-0x75a8(%rbp)
je     1684 <main+0x4e4>
mov    -0x75a8(%rbp),%rdi
mov    -0x7548(%rbp),%rsi
mov    -0x7554(%rbp),%edx
call   1080 <braf_interpretCode@plt>
jmp    169a <main+0x4fa>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x759c(%rbp)
jmp    16a9 <main+0x509>
jmp    169f <main+0x4ff>
movl   $0x0,-0x759c(%rbp)
mov    -0x7590(%rbp),%rax
mov    %rax,%rsp
mov    -0x759c(%rbp),%eax
mov    %eax,-0x75bc(%rbp)
test   %eax,%eax
je     16e5 <main+0x545>
jmp    16cc <main+0x52c>
mov    -0x75bc(%rbp),%eax
sub    $0x1,%eax
je     1714 <main+0x574>
jmp    16e0 <main+0x540>
jmp    16ea <main+0x54a>
jmp    16ea <main+0x54a>
mov    -0x7584(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7584(%rbp)
jmp    13ed <main+0x24d>
jmp    1703 <main+0x563>
jmp    1708 <main+0x568>
jmp    170d <main+0x56d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7558,%rsp
mov    %rsi,%rbx
mov    %edi,%r14d
lea    -0x7580(%rbp),%rdi
movl   $0x0,-0x2c(%rbp)
mov    $0x7530,%edx
xor    %esi,%esi
call   1060 <memset@plt>
mov    %r14d,-0x38(%rbp)
cmp    $0x2,%r14d
jl     1284 <main+0xe4>
mov    -0x38(%rbp),%r13d
movl   $0x0,-0x2c(%rbp)
mov    $0x1,%r14d
jmp    1218 <main+0x78>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
cmpl   $0x0,-0x2c(%rbp)
sete   %al
mov    %eax,-0x2c(%rbp)
mov    %r12,%rsp
add    $0x1,%r14
cmp    %r14,%r13
je     1284 <main+0xe4>
mov    (%rbx,%r14,8),%rdi
call   1050 <strlen@plt>
mov    %rsp,%r12
mov    %eax,%eax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
mov    (%rbx,%r14,8),%rsi
mov    %r15,%rdi
call   1040 <strcpy@plt>
mov    %r15,%rdi
lea    0xdb3(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1200 <main+0x60>
mov    %r15,%rdi
lea    0xda2(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1200 <main+0x60>
mov    %r15,%rdi
lea    0xd96(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    120c <main+0x6c>
jmp    1200 <main+0x60>
mov    -0x38(%rbp),%r14d
cmp    $0x1,%r14d
je     14b0 <main+0x310>
cmp    $0x2,%r14d
jne    12e3 <main+0x143>
mov    0x8(%rbx),%rdi
lea    0xd5d(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     14c3 <main+0x323>
mov    0x8(%rbx),%rdi
lea    0xd47(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     14c3 <main+0x323>
mov    0x8(%rbx),%rdi
lea    0xd36(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     14c3 <main+0x323>
xor    %r15d,%r15d
cmp    $0x2,%r14d
jl     14d7 <main+0x337>
mov    %r14d,%eax
mov    %rax,-0x48(%rbp)
mov    $0x1,%r13d
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x3c(%rbp)
jmp    1339 <main+0x199>
nopl   (%rax)
cmpl   $0x0,-0x40(%rbp)
je     14a4 <main+0x304>
movl   $0x1,-0x40(%rbp)
mov    %r15,%rbx
mov    -0x38(%rbp),%r14
mov    %r14,%rsp
add    $0x1,%r13
cmp    %r13,-0x48(%rbp)
je     14d4 <main+0x334>
mov    (%rbx,%r13,8),%rdi
call   1050 <strlen@plt>
mov    %rsp,-0x38(%rbp)
mov    %rbx,%rcx
mov    %eax,%ebx
add    $0xf,%rbx
and    $0xfffffffffffffff0,%rbx
mov    %rsp,%r14
mov    %r14,%r12
sub    %rbx,%r12
neg    %rbx
mov    %r12,%rsp
mov    %rcx,%r15
mov    (%rcx,%r13,8),%rsi
mov    %r12,%rdi
call   1040 <strcpy@plt>
cmpb   $0x2d,(%r14,%rbx,1)
jne    1460 <main+0x2c0>
mov    %r12,%rdi
lea    0xc8f(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1310 <main+0x170>
mov    %r12,%rdi
lea    0xc7e(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1310 <main+0x170>
mov    %r12,%rdi
lea    0xc6d(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1484 <main+0x2e4>
mov    %r12,%rdi
lea    0xc58(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1484 <main+0x2e4>
mov    %r12,%rdi
lea    0xc4a(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
mov    -0x38(%rbp),%r14
je     14f5 <main+0x355>
mov    %r15,%rbx
mov    %r12,%rdi
lea    0xc2e(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     14f5 <main+0x355>
mov    %r12,%rdi
lea    0xbe7(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1328 <main+0x188>
mov    %r12,%rdi
lea    0xbd2(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1328 <main+0x188>
mov    %r12,%rdi
lea    0xbc2(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1328 <main+0x188>
jmp    150c <main+0x36c>
nopl   0x0(%rax)
mov    %r12,%rdi
call   10b0 <braf_extractCodeFromFile@plt>
test   %rax,%rax
je     14e9 <main+0x349>
mov    %rax,%rdi
lea    -0x7580(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1080 <braf_interpretCode@plt>
jmp    1321 <main+0x181>
cmpl   $0x0,-0x3c(%rbp)
mov    %r15,%rbx
mov    -0x38(%rbp),%r14
jne    1498 <main+0x2f8>
xor    %eax,%eax
call   10c0 <braf_displayInfo@plt>
movl   $0x1,-0x3c(%rbp)
jmp    1328 <main+0x188>
xor    %eax,%eax
call   10a0 <braf_displayHelp@plt>
jmp    131a <main+0x17a>
lea    -0x7580(%rbp),%rdi
xor    %r15d,%r15d
xor    %esi,%esi
call   1030 <braf_interactiveMode@plt>
jmp    14d7 <main+0x337>
lea    -0x7580(%rbp),%rdi
mov    $0x1,%esi
call   1030 <braf_interactiveMode@plt>
xor    %r15d,%r15d
mov    %r15d,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%r15d
mov    -0x38(%rbp),%r14
jmp    1507 <main+0x367>
lea    -0x7580(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1030 <braf_interactiveMode@plt>
xor    %r15d,%r15d
mov    %r14,%rsp
jmp    14d7 <main+0x337>
lea    0xb2a(%rip),%rdi
mov    %r12,%rsi
call   1090 <braf_displayErrorInArguments@plt>
mov    $0x1,%r15d
jmp    1507 <main+0x367>

LLVM IR (-O0):
@.str = [3 x i8] c"-d\00"
@.str.1 = [8 x i8] c"--debug\00"
@.str.2 = [10 x i8] c"--verbose\00"
@.str.3 = [3 x i8] c"-h\00"
@.str.4 = [7 x i8] c"--help\00"
@.str.5 = [3 x i8] c"-v\00"
@.str.6 = [10 x i8] c"--version\00"
@.str.7 = [3 x i8] c"-i\00"
@.str.8 = [14 x i8] c"--interactive\00"
@.str.9 = [20 x i8] c"unknown arguments: \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [30000 x i8]
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i8*
%21 = alloca i64
%22 = alloca i32
%23 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%24 = bitcast [30000 x i8]* %6 to i8*
%25 = getelementptr inbounds [30000 x i8], [30000 x i8]* %6, i64 0, i64 0
store i8* %25, i8** %7
store i8* null, i8** %8
store i32 0, i32* %9
store i32 1, i32* %10
br label %26
26: ; preds = %67, %2
%27 = load i32, i32* %10
%28 = load i32, i32* %4
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %70
30: ; preds = %26
%31 = load i8**, i8*** %5
%32 = load i32, i32* %10
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %31, i64 %33
%35 = load i8*, i8** %34
%36 = call i32 @strlen(i8* %35)
store i32 %36, i32* %11
%37 = load i32, i32* %11
%38 = zext i32 %37 to i64
%39 = call i8* @llvm.stacksave()
store i8* %39, i8** %12
%40 = alloca i8, i64 %38
store i64 %38, i64* %13
%41 = load i8**, i8*** %5
%42 = load i32, i32* %10
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %41, i64 %43
%45 = load i8*, i8** %44
%46 = call i32 @strcpy(i8* %40, i8* %45)
%47 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %55, label %49
49: ; preds = %30
%50 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %55, label %52
52: ; preds = %49
%53 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %65
55: ; preds = %52, %49, %30
%56 = load i32, i32* %9
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %59
58: ; preds = %55
store i32 0, i32* %9
br label %64
59: ; preds = %55
%60 = load i32, i32* %9
%61 = icmp ne i32 %60, 0
br i1 %61, label %63, label %62
62: ; preds = %59
store i32 1, i32* %9
br label %63
63: ; preds = %62, %59
br label %64
64: ; preds = %63, %58
br label %65
65: ; preds = %64, %52
%66 = load i8*, i8** %12
br label %67
67: ; preds = %65
%68 = load i32, i32* %10
%69 = add nsw i32 %68, 1
store i32 %69, i32* %10
br label %26
70: ; preds = %26
%71 = load i32, i32* %4
%72 = icmp eq i32 %71, 1
br i1 %72, label %73, label %76
73: ; preds = %70
%74 = load i8*, i8** %7
%75 = call i32 @braf_interactiveMode(i8* %74, i32 0)
br label %203
76: ; preds = %70
%77 = load i32, i32* %4
%78 = icmp eq i32 %77, 2
br i1 %78, label %79, label %100
79: ; preds = %76
%80 = load i8**, i8*** %5
%81 = getelementptr inbounds i8*, i8** %80, i64 1
%82 = load i8*, i8** %81
%83 = call i64 @strcmp(i8* %82, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%84 = icmp eq i64 %83, 0
br i1 %84, label %97, label %85
85: ; preds = %79
%86 = load i8**, i8*** %5
%87 = getelementptr inbounds i8*, i8** %86, i64 1
%88 = load i8*, i8** %87
%89 = call i64 @strcmp(i8* %88, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%90 = icmp eq i64 %89, 0
br i1 %90, label %97, label %91
91: ; preds = %85
%92 = load i8**, i8*** %5
%93 = getelementptr inbounds i8*, i8** %92, i64 1
%94 = load i8*, i8** %93
%95 = call i64 @strcmp(i8* %94, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%96 = icmp eq i64 %95, 0
br i1 %96, label %97, label %100
97: ; preds = %91, %85, %79
%98 = load i8*, i8** %7
%99 = call i32 @braf_interactiveMode(i8* %98, i32 1)
br label %202
100: ; preds = %91, %76
%101 = load i32, i32* %4
%102 = icmp sgt i32 %101, 1
br i1 %102, label %103, label %201
103: ; preds = %100
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
store i32 1, i32* %18
br label %104
104: ; preds = %197, %103
%105 = load i32, i32* %18
%106 = load i32, i32* %4
%107 = icmp slt i32 %105, %106
br i1 %107, label %108, label %200
108: ; preds = %104
%109 = load i8**, i8*** %5
%110 = load i32, i32* %18
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds i8*, i8** %109, i64 %111
%113 = load i8*, i8** %112
%114 = call i32 @strlen(i8* %113)
store i32 %114, i32* %19
%115 = load i32, i32* %19
%116 = zext i32 %115 to i64
%117 = call i8* @llvm.stacksave()
store i8* %117, i8** %20
%118 = alloca i8, i64 %116
store i64 %116, i64* %21
%119 = load i8**, i8*** %5
%120 = load i32, i32* %18
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds i8*, i8** %119, i64 %121
%123 = load i8*, i8** %122
%124 = call i32 @strcpy(i8* %118, i8* %123)
%125 = getelementptr inbounds i8, i8* %118, i64 0
%126 = load i8, i8* %125
%127 = sext i8 %126 to i32
%128 = icmp eq i32 %127, 45
br i1 %128, label %129, label %181
129: ; preds = %108
%130 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%131 = icmp eq i64 %130, 0
br i1 %131, label %135, label %132
132: ; preds = %129
%133 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%134 = icmp eq i64 %133, 0
br i1 %134, label %135, label %141
135: ; preds = %132, %129
%136 = load i32, i32* %14
%137 = icmp ne i32 %136, 0
br i1 %137, label %140, label %138
138: ; preds = %135
%139 = call i32 (...) @braf_displayHelp()
store i32 1, i32* %14
br label %140
140: ; preds = %138, %135
br label %180
141: ; preds = %132
%142 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%143 = icmp eq i64 %142, 0
br i1 %143, label %147, label %144
144: ; preds = %141
%145 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%146 = icmp eq i64 %145, 0
br i1 %146, label %147, label %153
147: ; preds = %144, %141
%148 = load i32, i32* %15
%149 = icmp ne i32 %148, 0
br i1 %149, label %152, label %150
150: ; preds = %147
%151 = call i32 (...) @braf_displayInfo()
store i32 1, i32* %15
br label %152
152: ; preds = %150, %147
br label %179
153: ; preds = %144
%154 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%155 = icmp eq i64 %154, 0
br i1 %155, label %159, label %156
156: ; preds = %153
%157 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%158 = icmp eq i64 %157, 0
br i1 %158, label %159, label %167
159: ; preds = %156, %153
%160 = load i32, i32* %17
%161 = icmp ne i32 %160, 0
br i1 %161, label %166, label %162
162: ; preds = %159
%163 = load i8*, i8** %7
%164 = load i32, i32* %9
%165 = call i32 @braf_interactiveMode(i8* %163, i32 %164)
store i32 0, i32* %9
store i32 1, i32* %17
br label %166
166: ; preds = %162, %159
store i32 0, i32* %3
store i32 1, i32* %22
br label %193
167: ; preds = %156
%168 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%169 = icmp eq i64 %168, 0
br i1 %169, label %176, label %170
170: ; preds = %167
%171 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%172 = icmp eq i64 %171, 0
br i1 %172, label %176, label %173
173: ; preds = %170
%174 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%175 = icmp eq i64 %174, 0
br i1 %175, label %176, label %177
176: ; preds = %173, %170, %167
store i32 7, i32* %22
br label %193
177: ; preds = %173
%178 = call i32 @braf_displayErrorInArguments(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i8* %118)
store i32 1, i32* %3
store i32 1, i32* %22
br label %193
179: ; preds = %152
br label %180
180: ; preds = %179, %140
br label %192
181: ; preds = %108
%182 = call i8* @braf_extractCodeFromFile(i8* %118)
store i8* %182, i8** %23
%183 = load i8*, i8** %23
%184 = icmp ne i8* %183, null
br i1 %184, label %185, label %190
185: ; preds = %181
%186 = load i8*, i8** %23
%187 = load i8*, i8** %7
%188 = load i32, i32* %9
%189 = call i32 @braf_interpretCode(i8* %186, i8* %187, i32 %188)
br label %191
190: ; preds = %181
store i32 1, i32* %3
store i32 1, i32* %22
br label %193
191: ; preds = %185
br label %192
192: ; preds = %191, %180
store i32 0, i32* %22
br label %193
193: ; preds = %192, %190, %177, %176, %166
%194 = load i8*, i8** %20
%195 = load i32, i32* %22
switch i32 %195, label %206 [
i32 0, label %196
i32 1, label %204
i32 7, label %197
]
196: ; preds = %193
br label %197
197: ; preds = %196, %193
%198 = load i32, i32* %18
%199 = add nsw i32 %198, 1
store i32 %199, i32* %18
br label %104
200: ; preds = %104
br label %201
201: ; preds = %200, %100
br label %202
202: ; preds = %201, %97
br label %203
203: ; preds = %202, %73
store i32 0, i32* %3
br label %204
204: ; preds = %203, %193
%205 = load i32, i32* %3
ret i32 %205
206: ; preds = %193
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"-d\00"
@.str.1 = [8 x i8] c"--debug\00"
@.str.2 = [10 x i8] c"--verbose\00"
@.str.3 = [3 x i8] c"-h\00"
@.str.4 = [7 x i8] c"--help\00"
@.str.5 = [3 x i8] c"-v\00"
@.str.6 = [10 x i8] c"--version\00"
@.str.7 = [3 x i8] c"-i\00"
@.str.8 = [14 x i8] c"--interactive\00"
@.str.9 = [20 x i8] c"unknown arguments: \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [30000 x i8]
%4 = getelementptr inbounds [30000 x i8], [30000 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %10
8: ; preds = %32, %2
%9 = phi i32 [ 0, %2 ], [ %33, %32 ]
switch i32 %0, label %53 [
i32 1, label %36
i32 2, label %38
]
10: ; preds = %6, %32
%11 = phi i64 [ 1, %6 ], [ %34, %32 ]
%12 = phi i32 [ 0, %6 ], [ %33, %32 ]
%13 = getelementptr inbounds i8*, i8** %1, i64 %11
%14 = load i8*, i8** %13
%15 = call i32 @strlen(i8* %14)
%16 = zext i32 %15 to i64
%17 = call i8* @llvm.stacksave()
%18 = alloca i8, i64 %16
%19 = load i8*, i8** %13
%20 = call i32 @strcpy(i8* %18, i8* %19)
%21 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %29, label %23
23: ; preds = %10
%24 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %23
%27 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %26, %23, %10
%30 = icmp eq i32 %12, 0
%31 = zext i1 %30 to i32
br label %32
32: ; preds = %29, %26
%33 = phi i32 [ %12, %26 ], [ %31, %29 ]
%34 = add nuw nsw i64 %11, 1
%35 = icmp eq i64 %34, %7
br i1 %35, label %8, label %10
36: ; preds = %8
%37 = call i32 @braf_interactiveMode(i8* %4, i32 0)
br label %121
38: ; preds = %8
%39 = getelementptr inbounds i8*, i8** %1, i64 1
%40 = load i8*, i8** %39
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %51, label %43
43: ; preds = %38
%44 = load i8*, i8** %39
%45 = call i64 @strcmp(i8* %44, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %51, label %47
47: ; preds = %43
%48 = load i8*, i8** %39
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %47, %43, %38
%52 = call i32 @braf_interactiveMode(i8* %4, i32 1)
br label %121
53: ; preds = %8, %47
br i1 %5, label %54, label %121
54: ; preds = %53
%55 = zext i32 %0 to i64
br label %56
56: ; preds = %54, %116
%57 = phi i64 [ 1, %54 ], [ %119, %116 ]
%58 = phi i32 [ 0, %54 ], [ %118, %116 ]
%59 = phi i32 [ 0, %54 ], [ %117, %116 ]
%60 = getelementptr inbounds i8*, i8** %1, i64 %57
%61 = load i8*, i8** %60
%62 = call i32 @strlen(i8* %61)
%63 = zext i32 %62 to i64
%64 = call i8* @llvm.stacksave()
%65 = alloca i8, i64 %63
%66 = load i8*, i8** %60
%67 = call i32 @strcpy(i8* %65, i8* %66)
%68 = load i8, i8* %65
%69 = icmp eq i8 %68, 45
br i1 %69, label %70, label %109
70: ; preds = %56
%71 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%72 = icmp eq i64 %71, 0
br i1 %72, label %76, label %73
73: ; preds = %70
%74 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %80
76: ; preds = %73, %70
%77 = icmp eq i32 %58, 0
br i1 %77, label %78, label %116
78: ; preds = %76
%79 = call i32 (...) @braf_displayHelp()
br label %116
80: ; preds = %73
%81 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%82 = icmp eq i64 %81, 0
br i1 %82, label %86, label %83
83: ; preds = %80
%84 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%85 = icmp eq i64 %84, 0
br i1 %85, label %86, label %90
86: ; preds = %83, %80
%87 = icmp eq i32 %59, 0
br i1 %87, label %88, label %116
88: ; preds = %86
%89 = call i32 (...) @braf_displayInfo()
br label %116
90: ; preds = %83
%91 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%92 = icmp eq i64 %91, 0
br i1 %92, label %96, label %93
93: ; preds = %90
%94 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%95 = icmp eq i64 %94, 0
br i1 %95, label %96, label %98
96: ; preds = %90, %93
%97 = call i32 @braf_interactiveMode(i8* %4, i32 %9)
br label %114
98: ; preds = %93
%99 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%100 = icmp eq i64 %99, 0
br i1 %100, label %116, label %101
101: ; preds = %98
%102 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%103 = icmp eq i64 %102, 0
br i1 %103, label %116, label %104
104: ; preds = %101
%105 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%106 = icmp eq i64 %105, 0
br i1 %106, label %116, label %107
107: ; preds = %104
%108 = call i32 @braf_displayErrorInArguments(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i8* %65)
br label %114
109: ; preds = %56
%110 = call i8* @braf_extractCodeFromFile(i8* %65)
%111 = icmp eq i8* %110, null
br i1 %111, label %114, label %112
112: ; preds = %109
%113 = call i32 @braf_interpretCode(i8* %110, i8* %4, i32 %9)
br label %116
114: ; preds = %109, %107, %96
%115 = phi i32 [ 1, %107 ], [ 0, %96 ], [ 1, %109 ]
br label %121
116: ; preds = %104, %101, %98, %112, %78, %76, %86, %88
%117 = phi i32 [ %59, %112 ], [ 1, %88 ], [ 1, %86 ], [ %59, %78 ], [ %59, %76 ], [ %59, %98 ], [ %59, %101 ], [ %59, %104 ]
%118 = phi i32 [ %58, %112 ], [ %58, %88 ], [ %58, %86 ], [ 1, %78 ], [ 1, %76 ], [ %58, %98 ], [ %58, %101 ], [ %58, %104 ]
%119 = add nuw nsw i64 %57, 1
%120 = icmp eq i64 %119, %55
br i1 %120, label %121, label %56
121: ; preds = %116, %36, %53, %51, %114
%122 = phi i32 [ %115, %114 ], [ 0, %51 ], [ 0, %53 ], [ 0, %36 ], [ 0, %116 ]
ret i32 %122
}