#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*/ puts(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  char arg2[64];
  puts("Minecraft Package Manager C Remake");
  switch (argc) {
  case 1:
    puts("Not enough args.");
    return 1;
  case 2:
    strcpy(arg2, argv[1]);
    if (strcmp(arg2, "install") == 0) {
      puts("Install!");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <puts@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x54(%rbp)
sub    $0x1,%eax
je     1177 <main+0x47>
jmp    1166 <main+0x36>
mov    -0x54(%rbp),%eax
sub    $0x2,%eax
je     118f <main+0x5f>
jmp    11ca <main+0x9a>
lea    0xea5(%rip),%rdi
call   1040 <puts@plt>
movl   $0x1,-0x4(%rbp)
jmp    11d1 <main+0xa1>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x50(%rbp),%rdi
lea    0xe89(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11c5 <main+0x95>
lea    0xe7c(%rip),%rdi
call   1040 <puts@plt>
jmp    11ca <main+0x9a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
lea    0xecc(%rip),%rdi
call   1040 <puts@plt>
xor    %ebx,%ebx
cmp    $0x2,%ebp
je     1158 <main+0x38>
cmp    $0x1,%ebp
jne    1180 <main+0x60>
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%ebx
jmp    1180 <main+0x60>
mov    0x8(%r14),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
movabs $0x6c6c6174736e69,%rax
cmp    %rax,(%rsp)
jne    1180 <main+0x60>
lea    0xeb9(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Minecraft Package Manager C Remake\00"
@.str.1 = [17 x i8] c"Not enough args.\00"
@.str.2 = [8 x i8] c"install\00"
@.str.3 = [9 x i8] c"Install!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [64 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
switch i32 %8, label %23 [
i32 1, label %9
i32 2, label %11
]
9: ; preds = %2
%10 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %24
11: ; preds = %2
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @strcpy(i8* %12, i8* %15)
%17 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%18 = call i32 @strcmp(i8* %17, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %11
%21 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %20, %11
br label %23
23: ; preds = %22, %2
store i32 0, i32* %3
br label %24
24: ; preds = %23, %9
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str = [35 x i8] c"Minecraft Package Manager C Remake\00"
@.str.1 = [17 x i8] c"Not enough args.\00"
@.str.3 = [9 x i8] c"Install!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
switch i32 %0, label %17 [
i32 1, label %6
i32 2, label %8
]
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %17
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @strcpy(i8* %4, i8* %10)
%12 = bitcast [64 x i8]* %3 to i64*
%13 = load i64, i64* %12
%14 = icmp eq i64 %13, 30518463306100329
br i1 %14, label %15, label %17
15: ; preds = %8
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %17
17: ; preds = %2, %15, %8, %6
%18 = phi i32 [ 1, %6 ], [ 0, %8 ], [ 0, %15 ], [ 0, %2 ]
ret i32 %18
}