#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*/ pumpd_start();
int /*<<< orphan*/ pumpd_stat();
int /*<<< orphan*/ pumpd_stop();
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  if (argc == 1)
    usage();
  else if (((strcmp((argv[(1)]), (("start"))) == 0) ? true : false))
    pumpd_start();
  else if (((strcmp((argv[(1)]), (("stop"))) == 0) ? true : false))
    pumpd_stop();
  else if (((strcmp((argv[(1)]), (("stat"))) == 0) ? true : false))
    pumpd_stat();
  else if (((strcmp((argv[(1)]), (("help"))) == 0) ? true : false) ||
           ((strcmp((argv[(1)]), (("?"))) == 0) ? true : false))
    usage();
  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   $0x1,-0x8(%rbp)
jne    117c <main+0x2c>
mov    $0x0,%al
call   1060 <usage@plt>
jmp    12e7 <main+0x197>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe75(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11a9 <main+0x59>
mov    $0x1,%al
test   $0x1,%al
jne    11b8 <main+0x68>
jmp    11c4 <main+0x74>
xor    %eax,%eax
test   $0x1,%al
jne    11b8 <main+0x68>
jmp    11c4 <main+0x74>
mov    $0x0,%al
call   1050 <pumpd_start@plt>
jmp    12e2 <main+0x192>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe33(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11f1 <main+0xa1>
mov    $0x1,%al
test   $0x1,%al
jne    1200 <main+0xb0>
jmp    120c <main+0xbc>
xor    %eax,%eax
test   $0x1,%al
jne    1200 <main+0xb0>
jmp    120c <main+0xbc>
mov    $0x0,%al
call   1030 <pumpd_stop@plt>
jmp    12dd <main+0x18d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf0(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1239 <main+0xe9>
mov    $0x1,%al
test   $0x1,%al
jne    1248 <main+0xf8>
jmp    1254 <main+0x104>
xor    %eax,%eax
test   $0x1,%al
jne    1248 <main+0xf8>
jmp    1254 <main+0x104>
mov    $0x0,%al
call   1070 <pumpd_stat@plt>
jmp    12d8 <main+0x188>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdad(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1281 <main+0x131>
mov    $0x1,%al
test   $0x1,%al
jne    12cc <main+0x17c>
jmp    1290 <main+0x140>
xor    %eax,%eax
test   $0x1,%al
jne    12cc <main+0x17c>
jmp    1290 <main+0x140>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd76(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    12bd <main+0x16d>
mov    $0x1,%al
test   $0x1,%al
jne    12cc <main+0x17c>
jmp    12d3 <main+0x183>
xor    %eax,%eax
test   $0x1,%al
jne    12cc <main+0x17c>
jmp    12d3 <main+0x183>
mov    $0x0,%al
call   1060 <usage@plt>
jmp    12d8 <main+0x188>
jmp    12dd <main+0x18d>
jmp    12e2 <main+0x192>
jmp    12e7 <main+0x197>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jne    1162 <main+0x12>
xor    %eax,%eax
call   1060 <usage@plt>
jmp    11e9 <main+0x99>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xe90(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11d0 <main+0x80>
mov    0x8(%rbx),%rdi
lea    0xe81(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11d9 <main+0x89>
mov    0x8(%rbx),%rdi
lea    0xe71(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11e2 <main+0x92>
mov    0x8(%rbx),%rdi
lea    0xe61(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1156 <main+0x6>
mov    0x8(%rbx),%rdi
lea    0xe51(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    11e9 <main+0x99>
jmp    1156 <main+0x6>
xor    %eax,%eax
call   1050 <pumpd_start@plt>
jmp    11e9 <main+0x99>
xor    %eax,%eax
call   1030 <pumpd_stop@plt>
jmp    11e9 <main+0x99>
xor    %eax,%eax
call   1070 <pumpd_stat@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"start\00"
@.str.1 = [5 x i8] c"stop\00"
@.str.2 = [5 x i8] c"stat\00"
@.str.3 = [5 x i8] c"help\00"
@.str.4 = [2 x i8] c"?\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, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @usage()
br label %62
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %10
br i1 true, label %18, label %20
17: ; preds = %10
br i1 false, label %18, label %20
18: ; preds = %17, %16
%19 = call i32 (...) @pumpd_start()
br label %61
20: ; preds = %17, %16
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %20
br i1 true, label %28, label %30
27: ; preds = %20
br i1 false, label %28, label %30
28: ; preds = %27, %26
%29 = call i32 (...) @pumpd_stop()
br label %60
30: ; preds = %27, %26
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %30
br i1 true, label %38, label %40
37: ; preds = %30
br i1 false, label %38, label %40
38: ; preds = %37, %36
%39 = call i32 (...) @pumpd_stat()
br label %59
40: ; preds = %37, %36
%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.3, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %40
br i1 true, label %56, label %48
47: ; preds = %40
br i1 false, label %56, label %48
48: ; preds = %47, %46
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 1
%51 = load i8*, i8** %50
%52 = call i64 @strcmp(i8* %51, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %55
54: ; preds = %48
br i1 true, label %56, label %58
55: ; preds = %48
br i1 false, label %56, label %58
56: ; preds = %55, %54, %47, %46
%57 = call i32 (...) @usage()
br label %58
58: ; preds = %56, %55, %54
br label %59
59: ; preds = %58, %38
br label %60
60: ; preds = %59, %28
br label %61
61: ; preds = %60, %18
br label %62
62: ; preds = %61, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"start\00"
@.str.1 = [5 x i8] c"stop\00"
@.str.2 = [5 x i8] c"stat\00"
@.str.3 = [5 x i8] c"help\00"
@.str.4 = [2 x i8] c"?\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %35
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = tail call i32 (...) @pumpd_start()
br label %35
13: ; preds = %6
%14 = load i8*, i8** %7
%15 = tail call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = tail call i32 (...) @pumpd_stop()
br label %35
19: ; preds = %13
%20 = load i8*, i8** %7
%21 = tail call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = tail call i32 (...) @pumpd_stat()
br label %35
25: ; preds = %19
%26 = load i8*, i8** %7
%27 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %33, label %29
29: ; preds = %25
%30 = load i8*, i8** %7
%31 = tail call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29, %25
%34 = tail call i32 (...) @usage()
br label %35
35: ; preds = %11, %23, %29, %33, %17, %4
ret i32 0
}