#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*/ compile(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ install(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  if (argc != 3) {
    usage();
    exit(0);
  }
  if (!strcmp(argv[1], "compile"))
    compile(argv[2]);
  else if (!strcmp(argv[1], "install"))
    install(argv[2]);
  else
    usage();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     117e <main+0x2e>
mov    $0x0,%al
call   1060 <usage@plt>
xor    %edi,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe73(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11ad <main+0x5d>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <compile@plt>
jmp    11e8 <main+0x98>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe4c(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11dc <main+0x8c>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <install@plt>
jmp    11e3 <main+0x93>
mov    $0x0,%al
call   1060 <usage@plt>
jmp    11e8 <main+0x98>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x3,%edi
jne    11a6 <main+0x56>
mov    %rsi,%rbx
mov    0x8(%rsi),%r14
lea    0xe99(%rip),%rsi
mov    %r14,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    1183 <main+0x33>
mov    0x10(%rbx),%rdi
call   1030 <compile@plt>
xor    %edi,%edi
call   1070 <exit@plt>
lea    0xe7e(%rip),%rsi
mov    %r14,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    11a6 <main+0x56>
mov    0x10(%rbx),%rdi
call   1040 <install@plt>
xor    %edi,%edi
call   1070 <exit@plt>
xor    %eax,%eax
call   1060 <usage@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"compile\00"
@.str.1 = [8 x i8] c"install\00"
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 = icmp ne i32 %6, 3
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 (...) @usage()
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
br i1 %16, label %22, label %17
17: ; preds = %11
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = load i8*, i8** %19
%21 = call i32 @compile(i8* %20)
br label %36
22: ; preds = %11
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @strcmp(i8* %25, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp ne i32 %26, 0
br i1 %27, label %33, label %28
28: ; preds = %22
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 2
%31 = load i8*, i8** %30
%32 = call i32 @install(i8* %31)
br label %35
33: ; preds = %22
%34 = call i32 (...) @usage()
br label %35
35: ; preds = %33, %28
br label %36
36: ; preds = %35, %17
%37 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"compile\00"
@.str.1 = [8 x i8] c"install\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 (...) @usage()
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = tail call i32 @compile(i8* %14)
br label %25
16: ; preds = %7
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = tail call i32 @install(i8* %21)
br label %25
23: ; preds = %16
%24 = tail call i32 (...) @usage()
br label %25
25: ; preds = %19, %23, %12
%26 = tail call i32 @exit(i32 0)
unreachable
}