#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 */
scalar_t__ ErrorsDidOccur();
int /*<<< orphan*/ FinalizeFiles();
int /*<<< orphan*/ FinalizeLiterals();
int /*<<< orphan*/ FinalizePosition();
int /*<<< orphan*/ FinalizeReports();
int /*<<< orphan*/ FinalizeScopes();
int /*<<< orphan*/ InitializeFiles();
int /*<<< orphan*/ InitializeLiterals();
int /*<<< orphan*/ InitializePosition();
int /*<<< orphan*/ InitializeReports();
int /*<<< orphan*/ InitializeScopes();
int /*<<< orphan*/ bootstrap_main(int, char **);
int /*<<< orphan*/ full_main(int, char **);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  int t_return_code;
  argc -= 1;
  argv += 1;
  if (argc > 1 && strcmp(argv[0], "--debug") == 0) {
    argc -= 1;
    argv += 1;
  }
  InitializeFiles();
  InitializePosition();
  InitializeLiterals();
  InitializeReports();
  InitializeScopes();
  if (argc > 1 && strcmp(argv[0], "--bootstrap") == 0)
    bootstrap_main(argc - 1, argv + 1);
  else
    full_main(argc, argv);
  if (ErrorsDidOccur())
    t_return_code = 1;
  else
    t_return_code = 0;
  FinalizeScopes();
  FinalizeReports();
  FinalizeLiterals();
  FinalizePosition();
  FinalizeFiles();
  return t_return_code;
}


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)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1247 <main+0x67>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xddd(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1247 <main+0x67>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <InitializeFiles@plt>
mov    $0x0,%al
call   10b0 <InitializePosition@plt>
mov    $0x0,%al
call   10f0 <InitializeLiterals@plt>
mov    $0x0,%al
call   1070 <InitializeReports@plt>
mov    $0x0,%al
call   10a0 <InitializeScopes@plt>
cmpl   $0x1,-0x8(%rbp)
jle    12a9 <main+0xc9>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd86(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    12a9 <main+0xc9>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   10c0 <bootstrap_main@plt>
jmp    12b5 <main+0xd5>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <full_main@plt>
mov    $0x0,%al
call   10e0 <ErrorsDidOccur@plt>
cmp    $0x0,%rax
je     12d2 <main+0xf2>
movl   $0x1,-0x14(%rbp)
jmp    12d9 <main+0xf9>
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <FinalizeScopes@plt>
mov    $0x0,%al
call   1060 <FinalizeReports@plt>
mov    $0x0,%al
call   1100 <FinalizeLiterals@plt>
mov    $0x0,%al
call   10d0 <FinalizePosition@plt>
mov    $0x0,%al
call   1090 <FinalizeFiles@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebp
lea    -0x1(%rbp),%r15d
lea    0x8(%rsi),%r14
cmp    $0x3,%edi
jl     121a <main+0x3a>
mov    %rsi,%rbx
mov    (%r14),%rdi
lea    0xdfd(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    121a <main+0x3a>
add    $0xfffffffe,%ebp
add    $0x10,%rbx
mov    %ebp,%r15d
mov    %rbx,%r14
xor    %eax,%eax
call   1050 <InitializeFiles@plt>
xor    %eax,%eax
call   10b0 <InitializePosition@plt>
xor    %eax,%eax
call   10f0 <InitializeLiterals@plt>
xor    %eax,%eax
call   1070 <InitializeReports@plt>
xor    %eax,%eax
call   10a0 <InitializeScopes@plt>
cmp    $0x2,%r15d
jl     1257 <main+0x77>
mov    (%r14),%rdi
lea    0xdbb(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1264 <main+0x84>
mov    %r15d,%edi
mov    %r14,%rsi
call   1040 <full_main@plt>
jmp    1277 <main+0x97>
add    $0xffffffff,%r15d
add    $0x8,%r14
mov    %r15d,%edi
mov    %r14,%rsi
call   10c0 <bootstrap_main@plt>
xor    %eax,%eax
call   10e0 <ErrorsDidOccur@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
xor    %eax,%eax
call   1030 <FinalizeScopes@plt>
xor    %eax,%eax
call   1060 <FinalizeReports@plt>
xor    %eax,%eax
call   1100 <FinalizeLiterals@plt>
xor    %eax,%eax
call   10d0 <FinalizePosition@plt>
xor    %eax,%eax
call   1090 <FinalizeFiles@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"--debug\00"
@.str.1 = [12 x i8] c"--bootstrap\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %4
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
store i8** %10, i8*** %5
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 1
br i1 %12, label %13, label %24
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %13
%20 = load i32, i32* %4
%21 = sub nsw i32 %20, 1
store i32 %21, i32* %4
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
store i8** %23, i8*** %5
br label %24
24: ; preds = %19, %13, %2
%25 = call i32 (...) @InitializeFiles()
%26 = call i32 (...) @InitializePosition()
%27 = call i32 (...) @InitializeLiterals()
%28 = call i32 (...) @InitializeReports()
%29 = call i32 (...) @InitializeScopes()
%30 = load i32, i32* %4
%31 = icmp sgt i32 %30, 1
br i1 %31, label %32, label %44
32: ; preds = %24
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 0
%35 = load i8*, i8** %34
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %44
38: ; preds = %32
%39 = load i32, i32* %4
%40 = sub nsw i32 %39, 1
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 1
%43 = call i32 @bootstrap_main(i32 %40, i8** %42)
br label %48
44: ; preds = %32, %24
%45 = load i32, i32* %4
%46 = load i8**, i8*** %5
%47 = call i32 @full_main(i32 %45, i8** %46)
br label %48
48: ; preds = %44, %38
%49 = call i64 (...) @ErrorsDidOccur()
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %48
store i32 1, i32* %6
br label %53
52: ; preds = %48
store i32 0, i32* %6
br label %53
53: ; preds = %52, %51
%54 = call i32 (...) @FinalizeScopes()
%55 = call i32 (...) @FinalizeReports()
%56 = call i32 (...) @FinalizeLiterals()
%57 = call i32 (...) @FinalizePosition()
%58 = call i32 (...) @FinalizeFiles()
%59 = load i32, i32* %6
ret i32 %59
}

LLVM IR (-O2):
@.str = [8 x i8] c"--debug\00"
@.str.1 = [12 x i8] c"--bootstrap\00"
define i32 @main(i32 %0, i8** %1) {
%3 = add nsw i32 %0, -1
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = icmp sgt i32 %0, 2
br i1 %5, label %6, label %13
6: ; preds = %2
%7 = load i8*, i8** %4
%8 = tail call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = add nsw i32 %0, -2
%12 = getelementptr inbounds i8*, i8** %1, i64 2
br label %13
13: ; preds = %10, %6, %2
%14 = phi i32 [ %11, %10 ], [ %3, %6 ], [ %3, %2 ]
%15 = phi i8** [ %12, %10 ], [ %4, %6 ], [ %4, %2 ]
%16 = tail call i32 (...) @InitializeFiles()
%17 = tail call i32 (...) @InitializePosition()
%18 = tail call i32 (...) @InitializeLiterals()
%19 = tail call i32 (...) @InitializeReports()
%20 = tail call i32 (...) @InitializeScopes()
%21 = icmp sgt i32 %14, 1
br i1 %21, label %22, label %30
22: ; preds = %13
%23 = load i8*, i8** %15
%24 = tail call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = add nsw i32 %14, -1
%28 = getelementptr inbounds i8*, i8** %15, i64 1
%29 = tail call i32 @bootstrap_main(i32 %27, i8** %28)
br label %32
30: ; preds = %22, %13
%31 = tail call i32 @full_main(i32 %14, i8** %15)
br label %32
32: ; preds = %30, %26
%33 = tail call i64 (...) @ErrorsDidOccur()
%34 = icmp ne i64 %33, 0
%35 = zext i1 %34 to i32
%36 = tail call i32 (...) @FinalizeScopes()
%37 = tail call i32 (...) @FinalizeReports()
%38 = tail call i32 (...) @FinalizeLiterals()
%39 = tail call i32 (...) @FinalizePosition()
%40 = tail call i32 (...) @FinalizeFiles()
ret i32 %35
}