#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 EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ compile_begin(int);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  argc--;
  argv++;
  return compile_begin(!!(argc && !strcmp(*argv, "--dump-ast"))) ? EXIT_SUCCESS
                                                                 : EXIT_FAILURE;
}


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
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     1178 <main+0x58>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe98(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <compile_begin@plt>
cmp    $0x0,%rax
je     11a4 <main+0x84>
mov    0x2e3e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
jmp    11b0 <main+0x90>
mov    0x2e35(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %edi,%eax
xor    %edi,%edi
cmp    $0x1,%eax
je     1142 <main+0x22>
mov    0x8(%rsi),%rdi
lea    0xecb(%rip),%rsi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <compile_begin@plt>
test   %rax,%rax
jne    1155 <main+0x35>
mov    0x2e8d(%rip),%rax
jmp    115c <main+0x3c>
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"--dump-ast\00"
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = add nsw i32 %6, -1
store i32 %7, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i32 1
store i8** %9, i8*** %5
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
br label %18
18: ; preds = %12, %2
%19 = phi i1 [ false, %2 ], [ %17, %12 ]
%20 = xor i1 %19, true
%21 = xor i1 %20, true
%22 = zext i1 %21 to i32
%23 = call i64 @compile_begin(i32 %22)
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %18
%26 = load i32, i32* @EXIT_SUCCESS
br label %29
27: ; preds = %18
%28 = load i32, i32* @EXIT_FAILURE
br label %29
29: ; preds = %27, %25
%30 = phi i32 [ %26, %25 ], [ %28, %27 ]
ret i32 %30
}

LLVM IR (-O2):
@.str = [11 x i8] c"--dump-ast\00"
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %2
%11 = phi i32 [ 0, %2 ], [ %9, %4 ]
%12 = tail call i64 @compile_begin(i32 %11)
%13 = icmp eq i64 %12, 0
%14 = load i32, i32* @EXIT_SUCCESS
%15 = load i32, i32* @EXIT_FAILURE
%16 = select i1 %13, i32 %15, i32 %14
ret i32 %16
}