#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*/ clearArgs(char **);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ parseInput(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  extern char input[];
  extern char *args[];
  int running = 1;
  int debug = 0;
  srand(time(NULL));
  int i;
  for (i = 1; argv[i] != NULL; i++) {
    if (strcmp(argv[i], "--debug") == 0 || strcmp(argv[i], "-d") == 0)
      debug = 1;
    else if (strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0) {
      printf("\n\n'--debug' or '-d':\tDebug mode on\n'--help' or '-h':\tPrint "
             "this message\n\n");
      return 0;
    } else {
      printf("\nInvalid command line argument.\n\n");
      return 1;
    }
  }
  printf("\nDebug mode: %s\n\n", (debug == 1) ? "ON" : "OFF");
  puts("\tCCC YYY BBB EEE RRR DD  U U NNN GGG");
  puts("\tC    Y  B B E   R R D D U U N N G  ");
  puts("\tC    Y  BBB EEE RR  D D U U N N G G");
  puts("\tC    Y  B B E   R R D D U U N N G G");
  puts("\tCCC  Y  BBB EEE R R DDD UUU N N GGG\n");
  while (running) {
    printf("> ");
    fgets(input, 100, stdin);
    clearArgs(args);
    parseInput(input);
    if (debug) {
      i = 0;
      for (i = 0; i < 10; i++)
        printf("\n%s\n", args[i]);
    }
    if (strcmp(args[0], "quit") == 0) {
      printf("\nDo you really want to quit the program? Y/N\n");
      if (getchar() == 'y')
        return 0;
      if (getchar() == 'n')
        printf("\nOkay.\n");
    } else if (strcmp(args[0], "make") == 0 && strcmp(args[1], "love\n") == 0) {
      printf("\nNot war.\n");
    } else
      printf("\nUnknown command '%s'.\n", args[0]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
movl   $0x1,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     12b9 <main+0x129>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe0f(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     1222 <main+0x92>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdf5(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    122e <main+0x9e>
movl   $0x1,-0x18(%rbp)
jmp    12a6 <main+0x116>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdca(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     1272 <main+0xe2>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdaf(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    128c <main+0xfc>
lea    0xd9c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14a0 <main+0x310>
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    14a0 <main+0x310>
jmp    12ab <main+0x11b>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11cb <main+0x3b>
mov    -0x18(%rbp),%ecx
lea    0xdd3(%rip),%rsi
lea    0xdc9(%rip),%rax
cmp    $0x1,%ecx
cmove  %rax,%rsi
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xdcd(%rip),%rdi
call   1030 <puts@plt>
lea    0xde6(%rip),%rdi
call   1030 <puts@plt>
lea    0xdff(%rip),%rdi
call   1030 <puts@plt>
lea    0xe18(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0x14(%rbp)
je     14a0 <main+0x310>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2cae(%rip),%rax
mov    (%rax),%edx
mov    0x2c85(%rip),%rdi
mov    $0x64,%esi
call   1070 <fgets@plt>
mov    0x2c84(%rip),%rdi
call   10b0 <clearArgs@plt>
mov    0x2c68(%rip),%rdi
call   1050 <parseInput@plt>
cmpl   $0x0,-0x18(%rbp)
je     13b7 <main+0x227>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0xa,-0x1c(%rbp)
jge    13b2 <main+0x222>
movslq -0x1c(%rbp),%rcx
mov    0x2c46(%rip),%rax
mov    (%rax,%rcx,8),%rsi
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    137d <main+0x1ed>
jmp    13b7 <main+0x227>
mov    0x2c1a(%rip),%rax
mov    (%rax),%rdi
lea    0xd94(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    142a <main+0x29a>
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
movsbl %al,%eax
cmp    $0x79,%eax
jne    1404 <main+0x274>
movl   $0x0,-0x4(%rbp)
jmp    14a0 <main+0x310>
mov    $0x0,%al
call   1090 <getchar@plt>
movsbl %al,%eax
cmp    $0x6e,%eax
jne    1425 <main+0x295>
lea    0xd71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    149b <main+0x30b>
mov    0x2ba7(%rip),%rax
mov    (%rax),%rdi
lea    0xd5c(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    147e <main+0x2ee>
mov    0x2b87(%rip),%rax
mov    0x8(%rax),%rdi
lea    0xd40(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    147e <main+0x2ee>
lea    0xd30(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1496 <main+0x306>
mov    0x2b53(%rip),%rax
mov    (%rax),%rsi
lea    0xd1e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    149b <main+0x30b>
jmp    131b <main+0x18b>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
xor    %edi,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    0x8(%rbx),%r15
test   %r15,%r15
je     1251 <main+0xc1>
add    $0x8,%rbx
lea    0xe3c(%rip),%rbp
lea    0xe5c(%rip),%r12
lea    0xe36(%rip),%r14
mov    %r15,%rdi
jmp    11ed <main+0x5d>
nopw   0x0(%rax,%rax,1)
mov    0x8(%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
je     1258 <main+0xc8>
mov    %rbp,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     11e0 <main+0x50>
mov    (%rbx),%rdi
mov    %r14,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     11e0 <main+0x50>
mov    (%rbx),%rdi
lea    0xdf7(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1439 <main+0x2a9>
mov    (%rbx),%rdi
lea    0xde6(%rip),%rsi
call   1080 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
setne  %bpl
lea    0xf36(%rip),%rax
lea    0xf0e(%rip),%rdi
cmove  %rax,%rdi
jmp    1442 <main+0x2b2>
lea    0xdd2(%rip),%r12
lea    0xdb6(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdbe(%rip),%rdi
call   1030 <puts@plt>
lea    0xdd7(%rip),%rdi
call   1030 <puts@plt>
lea    0xdf0(%rip),%rdi
call   1030 <puts@plt>
lea    0xe09(%rip),%rdi
call   1030 <puts@plt>
lea    0xe22(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d3c(%rip),%r14
mov    0x2d15(%rip),%r13
mov    0x2d1e(%rip),%rbx
lea    0xe2f(%rip),%r12
jmp    12e1 <main+0x151>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx),%rsi
lea    0xe26(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe00(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14),%edx
mov    %r13,%rdi
mov    $0x64,%esi
call   1070 <fgets@plt>
mov    %rbx,%rdi
call   10b0 <clearArgs@plt>
mov    %r13,%rdi
call   1050 <parseInput@plt>
test   %r15,%r15
je     13aa <main+0x21a>
mov    (%rbx),%rsi
lea    0xdc9(%rip),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rbx),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rbx),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rbx),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rbx),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rbx),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rbx),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rbx),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rdi
mov    %r12,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1400 <main+0x270>
mov    (%rbx),%rdi
lea    0xd31(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    12d0 <main+0x140>
mov    0x8(%rbx),%rdi
lea    0xd1d(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    12d0 <main+0x140>
lea    0xd26(%rip),%rdi
call   1030 <puts@plt>
jmp    12e1 <main+0x151>
nopl   0x0(%rax)
lea    0xd1b(%rip),%rdi
call   1030 <puts@plt>
xor    %ebp,%ebp
xor    %eax,%eax
call   1090 <getchar@plt>
cmp    $0x79,%al
je     1447 <main+0x2b7>
xor    %eax,%eax
call   1090 <getchar@plt>
cmp    $0x6e,%al
jne    12e1 <main+0x151>
lea    0xd20(%rip),%rdi
call   1030 <puts@plt>
jmp    12e1 <main+0x151>
xor    %ebp,%ebp
lea    0xd35(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"--debug\00"
@.str.1 = [3 x i8] c"-d\00"
@.str.2 = [7 x i8] c"--help\00"
@.str.3 = [3 x i8] c"-h\00"
@.str.4 = [74 x i8] c"\0A\0A'--debug' or '-d':\09Debug mode on\0A'--help' or '-h':\09Print this message\0A\0A\00"
@.str.5 = [34 x i8] c"\0AInvalid command line argument.\0A\0A\00"
@.str.6 = [18 x i8] c"\0ADebug mode: %s\0A\0A\00"
@.str.7 = [3 x i8] c"ON\00"
@.str.8 = [4 x i8] c"OFF\00"
@.str.9 = [37 x i8] c"\09CCC YYY BBB EEE RRR DD U U NNN GGG\00"
@.str.10 = [37 x i8] c"\09C Y B B E R R D D U U N N G \00"
@.str.11 = [37 x i8] c"\09C Y BBB EEE RR D D U U N N G G\00"
@.str.12 = [37 x i8] c"\09C Y B B E R R D D U U N N G G\00"
@.str.13 = [38 x i8] c"\09CCC Y BBB EEE R R DDD UUU N N GGG\0A\00"
@.str.14 = [3 x i8] c"> \00"
@input = external global [0 x i8]
@stdin = global i32 0
@args = external global [0 x i8*]
@.str.15 = [5 x i8] c"\0A%s\0A\00"
@.str.16 = [5 x i8] c"quit\00"
@.str.17 = [46 x i8] c"\0ADo you really want to quit the program? Y/N\0A\00"
@.str.18 = [8 x i8] c"\0AOkay.\0A\00"
@.str.19 = [5 x i8] c"make\00"
@.str.20 = [6 x i8] c"love\0A\00"
@.str.21 = [11 x i8] c"\0ANot war.\0A\00"
@.str.22 = [24 x i8] c"\0AUnknown command '%s'.\0A\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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
store i32 0, i32* %7
%9 = call i32 @time(i32* null)
%10 = call i32 @srand(i32 %9)
store i32 1, i32* %8
br label %11
11: ; preds = %56, %2
%12 = load i8**, i8*** %5
%13 = load i32, i32* %8
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %59
18: ; preds = %11
%19 = load i8**, i8*** %5
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8*, i8** %19, i64 %21
%23 = load i8*, i8** %22
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %34, label %26
26: ; preds = %18
%27 = load i8**, i8*** %5
%28 = load i32, i32* %8
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8*, i8** %27, i64 %29
%31 = load i8*, i8** %30
%32 = call i64 @strcmp(i8* %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %35
34: ; preds = %26, %18
store i32 1, i32* %7
br label %55
35: ; preds = %26
%36 = load i8**, i8*** %5
%37 = load i32, i32* %8
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8*, i8** %36, i64 %38
%40 = load i8*, i8** %39
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %51, label %43
43: ; preds = %35
%44 = load i8**, i8*** %5
%45 = load i32, i32* %8
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %44, i64 %46
%48 = load i8*, i8** %47
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %43, %35
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
br label %127
53: ; preds = %43
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %3
br label %127
55: ; preds = %34
br label %56
56: ; preds = %55
%57 = load i32, i32* %8
%58 = add nsw i32 %57, 1
store i32 %58, i32* %8
br label %11
59: ; preds = %11
%60 = load i32, i32* %7
%61 = icmp eq i32 %60, 1
%62 = zext i1 %61 to i64
%63 = select i1 %61, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0)
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8* %63)
%65 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
%66 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
%67 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
%68 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0))
%69 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.13, i64 0, i64 0))
br label %70
70: ; preds = %126, %59
%71 = load i32, i32* %6
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %127
73: ; preds = %70
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%75 = load i32, i32* @stdin
%76 = call i32 @fgets(i8* getelementptr inbounds ([0 x i8], [0 x i8]* @input, i64 0, i64 0), i32 100, i32 %75)
%77 = call i32 @clearArgs(i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 0))
%78 = call i32 @parseInput(i8* getelementptr inbounds ([0 x i8], [0 x i8]* @input, i64 0, i64 0))
%79 = load i32, i32* %7
%80 = icmp ne i32 %79, 0
br i1 %80, label %81, label %95
81: ; preds = %73
store i32 0, i32* %8
store i32 0, i32* %8
br label %82
82: ; preds = %91, %81
%83 = load i32, i32* %8
%84 = icmp slt i32 %83, 10
br i1 %84, label %85, label %94
85: ; preds = %82
%86 = load i32, i32* %8
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [0 x i8*], [0 x i8*]* @args, i64 0, i64 %87
%89 = load i8*, i8** %88
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %89)
br label %91
91: ; preds = %85
%92 = load i32, i32* %8
%93 = add nsw i32 %92, 1
store i32 %93, i32* %8
br label %82
94: ; preds = %82
br label %95
95: ; preds = %94, %73
%96 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 0)
%97 = call i64 @strcmp(i8* %96, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%98 = icmp eq i64 %97, 0
br i1 %98, label %99, label %112
99: ; preds = %95
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))
%101 = call signext i8 (...) @getchar()
%102 = sext i8 %101 to i32
%103 = icmp eq i32 %102, 121
br i1 %103, label %104, label %105
104: ; preds = %99
store i32 0, i32* %3
br label %127
105: ; preds = %99
%106 = call signext i8 (...) @getchar()
%107 = sext i8 %106 to i32
%108 = icmp eq i32 %107, 110
br i1 %108, label %109, label %111
109: ; preds = %105
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
br label %111
111: ; preds = %109, %105
br label %126
112: ; preds = %95
%113 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 0)
%114 = call i64 @strcmp(i8* %113, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0))
%115 = icmp eq i64 %114, 0
br i1 %115, label %116, label %122
116: ; preds = %112
%117 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 1)
%118 = call i64 @strcmp(i8* %117, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
%119 = icmp eq i64 %118, 0
br i1 %119, label %120, label %122
120: ; preds = %116
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0))
br label %125
122: ; preds = %116, %112
%123 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 0)
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i8* %123)
br label %125
125: ; preds = %122, %120
br label %126
126: ; preds = %125, %111
br label %70
127: ; preds = %51, %53, %104, %70
%128 = load i32, i32* %3
ret i32 %128
}

LLVM IR (-O2):
@.str = [8 x i8] c"--debug\00"
@.str.1 = [3 x i8] c"-d\00"
@.str.2 = [7 x i8] c"--help\00"
@.str.3 = [3 x i8] c"-h\00"
@.str.6 = [18 x i8] c"\0ADebug mode: %s\0A\0A\00"
@.str.7 = [3 x i8] c"ON\00"
@.str.8 = [4 x i8] c"OFF\00"
@.str.9 = [37 x i8] c"\09CCC YYY BBB EEE RRR DD U U NNN GGG\00"
@.str.10 = [37 x i8] c"\09C Y B B E R R D D U U N N G \00"
@.str.11 = [37 x i8] c"\09C Y BBB EEE RR D D U U N N G G\00"
@.str.12 = [37 x i8] c"\09C Y B B E R R D D U U N N G G\00"
@.str.13 = [38 x i8] c"\09CCC Y BBB EEE R R DDD UUU N N GGG\0A\00"
@.str.14 = [3 x i8] c"> \00"
@input = external global [0 x i8]
@stdin = global i32 0
@args = external global [0 x i8*]
@.str.15 = [5 x i8] c"\0A%s\0A\00"
@.str.16 = [5 x i8] c"quit\00"
@.str.19 = [5 x i8] c"make\00"
@.str.20 = [6 x i8] c"love\0A\00"
@.str.22 = [24 x i8] c"\0AUnknown command '%s'.\0A\00"
@str = [10 x i8] c"\0ANot war.\00"
@str.23 = [45 x i8] c"\0ADo you really want to quit the program? Y/N\00"
@str.24 = [7 x i8] c"\0AOkay.\00"
@str.25 = [33 x i8] c"\0AInvalid command line argument.\0A\00"
@str.26 = [73 x i8] c"\0A\0A'--debug' or '-d':\09Debug mode on\0A'--help' or '-h':\09Print this message\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
br i1 %7, label %34, label %8
8: ; preds = %2, %18
%9 = phi i64 [ %19, %18 ], [ 1, %2 ]
%10 = phi i8* [ %21, %18 ], [ %6, %2 ]
%11 = phi i8** [ %20, %18 ], [ %5, %2 ]
%12 = tail call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %8
%15 = load i8*, i8** %11
%16 = tail call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %14, %8
%19 = add nuw i64 %9, 1
%20 = getelementptr inbounds i8*, i8** %1, i64 %19
%21 = load i8*, i8** %20
%22 = icmp eq i8* %21, null
br i1 %22, label %34, label %8
23: ; preds = %14
%24 = load i8*, i8** %11
%25 = tail call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %96, label %27
27: ; preds = %23
%28 = load i8*, i8** %11
%29 = tail call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
%31 = select i1 %30, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @str.26, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.25, i64 0, i64 0)
%32 = xor i1 %30, true
%33 = zext i1 %32 to i32
br label %96
34: ; preds = %18, %2
%35 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), %2 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), %18 ]
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8* %35)
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0))
%41 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.13, i64 0, i64 0))
br label %42
42: ; preds = %92, %34
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%44 = load i32, i32* @stdin
%45 = tail call i32 @fgets(i8* getelementptr inbounds ([0 x i8], [0 x i8]* @input, i64 0, i64 0), i32 100, i32 %44)
%46 = tail call i32 @clearArgs(i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 0))
%47 = tail call i32 @parseInput(i8* getelementptr inbounds ([0 x i8], [0 x i8]* @input, i64 0, i64 0))
br i1 %7, label %69, label %48
48: ; preds = %42
%49 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 0)
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %49)
%51 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 1)
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %51)
%53 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 2)
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %53)
%55 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 3)
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %55)
%57 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 4)
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %57)
%59 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 5)
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %59)
%61 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 6)
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %61)
%63 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 7)
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %63)
%65 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 8)
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %65)
%67 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 9)
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* %67)
br label %69
69: ; preds = %48, %42
%70 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 0)
%71 = tail call i64 @strcmp(i8* %70, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%72 = icmp eq i64 %71, 0
br i1 %72, label %73, label %82
73: ; preds = %69
%74 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.23, i64 0, i64 0))
%75 = tail call signext i8 (...) @getchar()
%76 = icmp eq i8 %75, 121
br i1 %76, label %100, label %77
77: ; preds = %73
%78 = tail call signext i8 (...) @getchar()
%79 = icmp eq i8 %78, 110
br i1 %79, label %80, label %92
80: ; preds = %77
%81 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.24, i64 0, i64 0))
br label %92
82: ; preds = %69
%83 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 0)
%84 = tail call i64 @strcmp(i8* %83, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0))
%85 = icmp eq i64 %84, 0
br i1 %85, label %86, label %93
86: ; preds = %82
%87 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 1)
%88 = tail call i64 @strcmp(i8* %87, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
br i1 %89, label %90, label %93
90: ; preds = %86
%91 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %92
92: ; preds = %90, %93, %77, %80
br label %42
93: ; preds = %86, %82
%94 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @args, i64 0, i64 0)
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i8* %94)
br label %92
96: ; preds = %27, %23
%97 = phi i8* [ getelementptr inbounds ([73 x i8], [73 x i8]* @str.26, i64 0, i64 0), %23 ], [ %31, %27 ]
%98 = phi i32 [ 0, %23 ], [ %33, %27 ]
%99 = tail call i32 @puts(i8* dereferenceable(1) %97)
br label %100
100: ; preds = %73, %96
%101 = phi i32 [ %98, %96 ], [ 0, %73 ]
ret i32 %101
}