#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*/ InitializeFoundation();
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;
  }
  InitializeFoundation();
  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    1257 <main+0x67>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xdcd(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1257 <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   1060 <InitializeFoundation@plt>
mov    $0x0,%al
call   1050 <InitializeFiles@plt>
mov    $0x0,%al
call   10c0 <InitializePosition@plt>
mov    $0x0,%al
call   1100 <InitializeLiterals@plt>
mov    $0x0,%al
call   1080 <InitializeReports@plt>
mov    $0x0,%al
call   10b0 <InitializeScopes@plt>
cmpl   $0x1,-0x8(%rbp)
jle    12c0 <main+0xd0>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd6f(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    12c0 <main+0xd0>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   10d0 <bootstrap_main@plt>
jmp    12cc <main+0xdc>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <full_main@plt>
mov    $0x0,%al
call   10f0 <ErrorsDidOccur@plt>
cmp    $0x0,%rax
je     12e9 <main+0xf9>
movl   $0x1,-0x14(%rbp)
jmp    12f0 <main+0x100>
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <FinalizeScopes@plt>
mov    $0x0,%al
call   1070 <FinalizeReports@plt>
mov    $0x0,%al
call   1110 <FinalizeLiterals@plt>
mov    $0x0,%al
call   10e0 <FinalizePosition@plt>
mov    $0x0,%al
call   10a0 <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     122a <main+0x3a>
mov    %rsi,%rbx
mov    (%r14),%rdi
lea    0xded(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
jne    122a <main+0x3a>
add    $0xfffffffe,%ebp
add    $0x10,%rbx
mov    %ebp,%r15d
mov    %rbx,%r14
xor    %eax,%eax
call   1060 <InitializeFoundation@plt>
xor    %eax,%eax
call   1050 <InitializeFiles@plt>
xor    %eax,%eax
call   10c0 <InitializePosition@plt>
xor    %eax,%eax
call   1100 <InitializeLiterals@plt>
xor    %eax,%eax
call   1080 <InitializeReports@plt>
xor    %eax,%eax
call   10b0 <InitializeScopes@plt>
cmp    $0x2,%r15d
jl     126e <main+0x7e>
mov    (%r14),%rdi
lea    0xda4(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     127b <main+0x8b>
mov    %r15d,%edi
mov    %r14,%rsi
call   1040 <full_main@plt>
jmp    128e <main+0x9e>
add    $0xffffffff,%r15d
add    $0x8,%r14
mov    %r15d,%edi
mov    %r14,%rsi
call   10d0 <bootstrap_main@plt>
xor    %eax,%eax
call   10f0 <ErrorsDidOccur@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
xor    %eax,%eax
call   1030 <FinalizeScopes@plt>
xor    %eax,%eax
call   1070 <FinalizeReports@plt>
xor    %eax,%eax
call   1110 <FinalizeLiterals@plt>
xor    %eax,%eax
call   10e0 <FinalizePosition@plt>
xor    %eax,%eax
call   10a0 <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 (...) @InitializeFoundation()
%26 = call i32 (...) @InitializeFiles()
%27 = call i32 (...) @InitializePosition()
%28 = call i32 (...) @InitializeLiterals()
%29 = call i32 (...) @InitializeReports()
%30 = call i32 (...) @InitializeScopes()
%31 = load i32, i32* %4
%32 = icmp sgt i32 %31, 1
br i1 %32, label %33, label %45
33: ; preds = %24
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 0
%36 = load i8*, i8** %35
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %45
39: ; preds = %33
%40 = load i32, i32* %4
%41 = sub nsw i32 %40, 1
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 1
%44 = call i32 @bootstrap_main(i32 %41, i8** %43)
br label %49
45: ; preds = %33, %24
%46 = load i32, i32* %4
%47 = load i8**, i8*** %5
%48 = call i32 @full_main(i32 %46, i8** %47)
br label %49
49: ; preds = %45, %39
%50 = call i64 (...) @ErrorsDidOccur()
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %53
52: ; preds = %49
store i32 1, i32* %6
br label %54
53: ; preds = %49
store i32 0, i32* %6
br label %54
54: ; preds = %53, %52
%55 = call i32 (...) @FinalizeScopes()
%56 = call i32 (...) @FinalizeReports()
%57 = call i32 (...) @FinalizeLiterals()
%58 = call i32 (...) @FinalizePosition()
%59 = call i32 (...) @FinalizeFiles()
%60 = load i32, i32* %6
ret i32 %60
}

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 (...) @InitializeFoundation()
%17 = tail call i32 (...) @InitializeFiles()
%18 = tail call i32 (...) @InitializePosition()
%19 = tail call i32 (...) @InitializeLiterals()
%20 = tail call i32 (...) @InitializeReports()
%21 = tail call i32 (...) @InitializeScopes()
%22 = icmp sgt i32 %14, 1
br i1 %22, label %23, label %31
23: ; preds = %13
%24 = load i8*, i8** %15
%25 = tail call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %31
27: ; preds = %23
%28 = add nsw i32 %14, -1
%29 = getelementptr inbounds i8*, i8** %15, i64 1
%30 = tail call i32 @bootstrap_main(i32 %28, i8** %29)
br label %33
31: ; preds = %23, %13
%32 = tail call i32 @full_main(i32 %14, i8** %15)
br label %33
33: ; preds = %31, %27
%34 = tail call i64 (...) @ErrorsDidOccur()
%35 = icmp ne i64 %34, 0
%36 = zext i1 %35 to i32
%37 = tail call i32 (...) @FinalizeScopes()
%38 = tail call i32 (...) @FinalizeReports()
%39 = tail call i32 (...) @FinalizeLiterals()
%40 = tail call i32 (...) @FinalizePosition()
%41 = tail call i32 (...) @FinalizeFiles()
ret i32 %36
}