#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*/ create_it();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ receive_it();
int /*<<< orphan*/ remove_it();
int /*<<< orphan*/ send_it();
int /*<<< orphan*/ strcasecmp(char *, char *);
int main(int argc, char *argv[]) {
  if (argc > 1) {
    if (!strcasecmp("create", argv[1]))
      create_it();
    if (!strcasecmp("remove", argv[1]))
      remove_it();
    if (!strcasecmp("receive", argv[1]))
      receive_it();
    if (!strcasecmp("send", argv[1]))
      send_it();
  }
  printf("Usage: %s  create | remove | receive | send \n", argv[0]);
  exit(-1);
}


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)
jle    1225 <main+0xb5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe61(%rip),%rdi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    11b4 <main+0x44>
mov    $0x0,%al
call   1090 <create_it@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe44(%rip),%rdi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    11d8 <main+0x68>
mov    $0x0,%al
call   1050 <remove_it@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe27(%rip),%rdi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    11fc <main+0x8c>
mov    $0x0,%al
call   1030 <receive_it@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe0b(%rip),%rdi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1220 <main+0xb0>
mov    $0x0,%al
call   1070 <send_it@plt>
jmp    1225 <main+0xb5>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xde8(%rip),%rdi
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
cmp    $0x2,%edi
jl     11f4 <main+0x84>
mov    0x8(%r14),%rbx
lea    0xe79(%rip),%rdi
mov    %rbx,%rsi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    119e <main+0x2e>
xor    %eax,%eax
call   1090 <create_it@plt>
mov    0x8(%r14),%rbx
lea    0xe62(%rip),%rdi
mov    %rbx,%rsi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    11bc <main+0x4c>
xor    %eax,%eax
call   1050 <remove_it@plt>
mov    0x8(%r14),%rbx
lea    0xe4b(%rip),%rdi
mov    %rbx,%rsi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    11da <main+0x6a>
xor    %eax,%eax
call   1030 <receive_it@plt>
mov    0x8(%r14),%rbx
lea    0xe35(%rip),%rdi
mov    %rbx,%rsi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    11f4 <main+0x84>
xor    %eax,%eax
call   1070 <send_it@plt>
mov    (%r14),%rsi
lea    0xe1d(%rip),%rdi
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"create\00"
@.str.1 = [7 x i8] c"remove\00"
@.str.2 = [8 x i8] c"receive\00"
@.str.3 = [5 x i8] c"send\00"
@.str.4 = [46 x i8] c"Usage: %s create | remove | receive | send \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 sgt i32 %6, 1
br i1 %7, label %8, label %41
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @strcasecmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %8
%15 = call i32 (...) @create_it()
br label %16
16: ; preds = %14, %8
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @strcasecmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %16
%23 = call i32 (...) @remove_it()
br label %24
24: ; preds = %22, %16
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @strcasecmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %27)
%29 = icmp ne i32 %28, 0
br i1 %29, label %32, label %30
30: ; preds = %24
%31 = call i32 (...) @receive_it()
br label %32
32: ; preds = %30, %24
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i32 @strcasecmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %35)
%37 = icmp ne i32 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %32
%39 = call i32 (...) @send_it()
br label %40
40: ; preds = %38, %32
br label %41
41: ; preds = %40, %2
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 0
%44 = load i8*, i8** %43
%45 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i8* %44)
%46 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"create\00"
@.str.1 = [7 x i8] c"remove\00"
@.str.2 = [8 x i8] c"receive\00"
@.str.3 = [5 x i8] c"send\00"
@.str.4 = [46 x i8] c"Usage: %s create | remove | receive | send \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %32
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strcasecmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = tail call i32 (...) @create_it()
%11 = load i8*, i8** %5
br label %12
12: ; preds = %9, %4
%13 = phi i8* [ %11, %9 ], [ %6, %4 ]
%14 = tail call i32 @strcasecmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = tail call i32 (...) @remove_it()
%18 = load i8*, i8** %5
br label %19
19: ; preds = %16, %12
%20 = phi i8* [ %18, %16 ], [ %13, %12 ]
%21 = tail call i32 @strcasecmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %20)
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %19
%24 = tail call i32 (...) @receive_it()
%25 = load i8*, i8** %5
br label %26
26: ; preds = %23, %19
%27 = phi i8* [ %25, %23 ], [ %20, %19 ]
%28 = tail call i32 @strcasecmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %27)
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = tail call i32 (...) @send_it()
br label %32
32: ; preds = %26, %30, %2
%33 = load i8*, i8** %1
%34 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i8* %33)
%35 = tail call i32 @exit(i32 -1)
unreachable
}