#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*/ display_help();
int /*<<< orphan*/ printf(char *);
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  if (argc == 2) {
    if (strcmp(argv[1], "start") == 0) {
      printf("Starting twitchmp daemon.\n");
    } else if (strcmp(argv[1], "stop") == 0) {
      printf("Stopping twitchmp daemon.\n");
    } else if (strcmp(argv[1], "restart") == 0) {
      printf("Restarting twitchmp daemon.\n");
    } else if (strcmp(argv[1], "install") == 0) {
      printf("Installing, please wait..\n");
    } else if (strcmp(argv[1], "help") == 0) {
      display_help();
    } else {
      printf("Error: Invalid argument. Use \"help\" for help!\n");
    }
  } else {
    printf("Error: Too many or too little arguments. Use \"help\" for help!\n");
  }
  return 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   $0x2,-0x8(%rbp)
jne    125b <main+0x12b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xede(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    117f <main+0x4f>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
jmp    1256 <main+0x126>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe8d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11ae <main+0x7e>
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
jmp    1251 <main+0x121>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe7e(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11dd <main+0xad>
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
jmp    124c <main+0x11c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe74(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    120c <main+0xdc>
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
jmp    1247 <main+0x117>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe68(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1236 <main+0x106>
mov    $0x0,%al
call   1040 <display_help@plt>
jmp    1242 <main+0x112>
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
jmp    1247 <main+0x117>
jmp    124c <main+0x11c>
jmp    1251 <main+0x121>
jmp    1256 <main+0x126>
jmp    1267 <main+0x137>
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jne    11ab <main+0x7b>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xec3(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11b4 <main+0x84>
mov    0x8(%rbx),%rdi
lea    0xea7(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11bd <main+0x8d>
mov    0x8(%rbx),%rdi
lea    0xe97(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11c6 <main+0x96>
mov    0x8(%rbx),%rdi
lea    0xe8a(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11cf <main+0x9f>
mov    0x8(%rbx),%rdi
lea    0xe7d(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11df <main+0xaf>
lea    0xeaf(%rip),%rdi
jmp    11d6 <main+0xa6>
lea    0xe68(%rip),%rdi
jmp    11d6 <main+0xa6>
lea    0xf1b(%rip),%rdi
jmp    11d6 <main+0xa6>
lea    0xef8(%rip),%rdi
jmp    11d6 <main+0xa6>
lea    0xed3(%rip),%rdi
jmp    11d6 <main+0xa6>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1040 <display_help@plt>
jmp    11db <main+0xab>

LLVM IR (-O0):
@.str = [6 x i8] c"start\00"
@.str.1 = [27 x i8] c"Starting twitchmp daemon.\0A\00"
@.str.2 = [5 x i8] c"stop\00"
@.str.3 = [27 x i8] c"Stopping twitchmp daemon.\0A\00"
@.str.4 = [8 x i8] c"restart\00"
@.str.5 = [29 x i8] c"Restarting twitchmp daemon.\0A\00"
@.str.6 = [8 x i8] c"install\00"
@.str.7 = [27 x i8] c"Installing, please wait..\0A\00"
@.str.8 = [5 x i8] c"help\00"
@.str.9 = [47 x i8] c"Error: Invalid argument. Use \22help\22 for help!\0A\00"
@.str.10 = [63 x i8] c"Error: Too many or too little arguments. Use \22help\22 for help!\0A\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 eq i32 %6, 2
br i1 %7, label %8, label %55
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %54
16: ; preds = %8
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %16
%23 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %53
24: ; preds = %16
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %24
%31 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
br label %52
32: ; preds = %24
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %32
%39 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
br label %51
40: ; preds = %32
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 1
%43 = load i8*, i8** %42
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %40
%47 = call i32 (...) @display_help()
br label %50
48: ; preds = %40
%49 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.9, i64 0, i64 0))
br label %50
50: ; preds = %48, %46
br label %51
51: ; preds = %50, %38
br label %52
52: ; preds = %51, %30
br label %53
53: ; preds = %52, %22
br label %54
54: ; preds = %53, %14
br label %57
55: ; preds = %2
%56 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0))
br label %57
57: ; preds = %55, %54
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"start\00"
@.str.2 = [5 x i8] c"stop\00"
@.str.4 = [8 x i8] c"restart\00"
@.str.6 = [8 x i8] c"install\00"
@.str.8 = [5 x i8] c"help\00"
@str = [62 x i8] c"Error: Too many or too little arguments. Use \22help\22 for help!\00"
@str.11 = [46 x i8] c"Error: Invalid argument. Use \22help\22 for help!\00"
@str.12 = [26 x i8] c"Installing, please wait..\00"
@str.13 = [28 x i8] c"Restarting twitchmp daemon.\00"
@str.14 = [26 x i8] c"Stopping twitchmp daemon.\00"
@str.15 = [26 x i8] c"Starting twitchmp daemon.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %37
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.15, i64 0, i64 0))
br label %39
11: ; preds = %4
%12 = load i8*, i8** %5
%13 = tail call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.14, i64 0, i64 0))
br label %39
17: ; preds = %11
%18 = load i8*, i8** %5
%19 = tail call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.13, i64 0, i64 0))
br label %39
23: ; preds = %17
%24 = load i8*, i8** %5
%25 = tail call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.12, i64 0, i64 0))
br label %39
29: ; preds = %23
%30 = load i8*, i8** %5
%31 = tail call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = tail call i32 (...) @display_help()
br label %39
35: ; preds = %29
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.11, i64 0, i64 0))
br label %39
37: ; preds = %2
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
br label %39
39: ; preds = %9, %21, %33, %35, %27, %15, %37
ret i32 0
}