#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int add(int, char **);
int delete (int, char **);
int exec(int, char **);
int identify(int, char **);
int list();
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  int i;
  for (i = 1; i < argc; i++) {
    if (strcmp(argv[i], "--help") == 0) {
      usage();
      return EXIT_SUCCESS;
    }
  }
  if (argc < 2) {
    return list();
  }
  if (strcmp(argv[1], "help") == 0) {
    usage();
    return EXIT_SUCCESS;
  }
  if (strcmp(argv[1], "list") == 0) {
    return list();
  }
  if (strcmp(argv[1], "add") == 0) {
    return add(argc - 2, argv + 2);
  }
  if (strcmp(argv[1], "exec") == 0) {
    return exec(argc - 2, argv + 2);
  }
  if (strcmp(argv[1], "delete") == 0) {
    return delete (argc - 2, argv + 2);
  }
  if (strcmp(argv[1], "identify") == 0) {
    return identify(argc - 2, argv + 2);
  }
  usage();
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e6 <main+0x76>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe54(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11d3 <main+0x63>
mov    $0x0,%al
call   1070 <usage@plt>
mov    0x2e0f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1359 <main+0x1e9>
jmp    11d8 <main+0x68>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118d <main+0x1d>
cmpl   $0x2,-0x8(%rbp)
jge    11ff <main+0x8f>
mov    $0x0,%al
call   1050 <list@plt>
mov    %eax,-0x4(%rbp)
jmp    1359 <main+0x1e9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf4(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1235 <main+0xc5>
mov    $0x0,%al
call   1070 <usage@plt>
mov    0x2dad(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1359 <main+0x1e9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdc3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1262 <main+0xf2>
mov    $0x0,%al
call   1050 <list@plt>
mov    %eax,-0x4(%rbp)
jmp    1359 <main+0x1e9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd9b(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    129b <main+0x12b>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
call   1030 <add@plt>
mov    %eax,-0x4(%rbp)
jmp    1359 <main+0x1e9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd66(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    12d4 <main+0x164>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
call   1090 <exec@plt>
mov    %eax,-0x4(%rbp)
jmp    1359 <main+0x1e9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd32(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    130d <main+0x19d>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
call   1080 <delete@plt>
mov    %eax,-0x4(%rbp)
jmp    1359 <main+0x1e9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd00(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1346 <main+0x1d6>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
call   1060 <identify@plt>
mov    %eax,-0x4(%rbp)
jmp    1359 <main+0x1e9>
mov    $0x0,%al
call   1070 <usage@plt>
mov    0x2c8c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
cmp    $0x2,%edi
jl     11c4 <main+0x54>
mov    %rsi,%r15
mov    %edi,%r14d
mov    %edi,%ebx
mov    $0x1,%ebp
lea    0xe6f(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbp,8),%rdi
mov    %r12,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1261 <main+0xf1>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    11a0 <main+0x30>
cmp    $0x1,%r14d
jg     11d3 <main+0x63>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <list@plt>
mov    0x8(%r15),%rdi
lea    0xe24(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1261 <main+0xf1>
mov    0x8(%r15),%rdi
lea    0xe14(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11c4 <main+0x54>
mov    0x8(%r15),%rdi
lea    0xe04(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     127a <main+0x10a>
mov    0x8(%r15),%rdi
lea    0xdf3(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1295 <main+0x125>
mov    0x8(%r15),%rdi
lea    0xde3(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12b0 <main+0x140>
mov    0x8(%r15),%rdi
lea    0xdd5(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12cb <main+0x15b>
xor    %eax,%eax
call   1070 <usage@plt>
mov    0x2d81(%rip),%rax
jmp    126f <main+0xff>
xor    %eax,%eax
call   1070 <usage@plt>
mov    0x2d69(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0xfffffffe,%r14d
add    $0x10,%r15
mov    %r14d,%edi
mov    %r15,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <add@plt>
add    $0xfffffffe,%r14d
add    $0x10,%r15
mov    %r14d,%edi
mov    %r15,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <exec@plt>
add    $0xfffffffe,%r14d
add    $0x10,%r15
mov    %r14d,%edi
mov    %r15,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <delete@plt>
add    $0xfffffffe,%r14d
add    $0x10,%r15
mov    %r14d,%edi
mov    %r15,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <identify@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"--help\00"
@EXIT_SUCCESS = global i32 0
@.str.1 = [5 x i8] c"help\00"
@.str.2 = [5 x i8] c"list\00"
@.str.3 = [4 x i8] c"add\00"
@.str.4 = [5 x i8] c"exec\00"
@.str.5 = [7 x i8] c"delete\00"
@.str.6 = [9 x i8] c"identify\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %7
7: ; preds = %23, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %26
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %11
%20 = call i32 (...) @usage()
%21 = load i32, i32* @EXIT_SUCCESS
store i32 %21, i32* %3
br label %99
22: ; preds = %11
br label %23
23: ; preds = %22
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %7
26: ; preds = %7
%27 = load i32, i32* %4
%28 = icmp slt i32 %27, 2
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 (...) @list()
store i32 %30, i32* %3
br label %99
31: ; preds = %26
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = call i64 @strcmp(i8* %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %31
%38 = call i32 (...) @usage()
%39 = load i32, i32* @EXIT_SUCCESS
store i32 %39, i32* %3
br label %99
40: ; preds = %31
%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.2, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %40
%47 = call i32 (...) @list()
store i32 %47, i32* %3
br label %99
48: ; preds = %40
%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 ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %60
54: ; preds = %48
%55 = load i32, i32* %4
%56 = sub nsw i32 %55, 2
%57 = load i8**, i8*** %5
%58 = getelementptr inbounds i8*, i8** %57, i64 2
%59 = call i32 @add(i32 %56, i8** %58)
store i32 %59, i32* %3
br label %99
60: ; preds = %48
%61 = load i8**, i8*** %5
%62 = getelementptr inbounds i8*, i8** %61, i64 1
%63 = load i8*, i8** %62
%64 = call i64 @strcmp(i8* %63, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %72
66: ; preds = %60
%67 = load i32, i32* %4
%68 = sub nsw i32 %67, 2
%69 = load i8**, i8*** %5
%70 = getelementptr inbounds i8*, i8** %69, i64 2
%71 = call i32 @exec(i32 %68, i8** %70)
store i32 %71, i32* %3
br label %99
72: ; preds = %60
%73 = load i8**, i8*** %5
%74 = getelementptr inbounds i8*, i8** %73, i64 1
%75 = load i8*, i8** %74
%76 = call i64 @strcmp(i8* %75, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %84
78: ; preds = %72
%79 = load i32, i32* %4
%80 = sub nsw i32 %79, 2
%81 = load i8**, i8*** %5
%82 = getelementptr inbounds i8*, i8** %81, i64 2
%83 = call i32 @delete(i32 %80, i8** %82)
store i32 %83, i32* %3
br label %99
84: ; preds = %72
%85 = load i8**, i8*** %5
%86 = getelementptr inbounds i8*, i8** %85, i64 1
%87 = load i8*, i8** %86
%88 = call i64 @strcmp(i8* %87, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
br i1 %89, label %90, label %96
90: ; preds = %84
%91 = load i32, i32* %4
%92 = sub nsw i32 %91, 2
%93 = load i8**, i8*** %5
%94 = getelementptr inbounds i8*, i8** %93, i64 2
%95 = call i32 @identify(i32 %92, i8** %94)
store i32 %95, i32* %3
br label %99
96: ; preds = %84
%97 = call i32 (...) @usage()
%98 = load i32, i32* @EXIT_FAILURE
store i32 %98, i32* %3
br label %99
99: ; preds = %96, %90, %78, %66, %54, %46, %37, %29, %19
%100 = load i32, i32* %3
ret i32 %100
}

LLVM IR (-O2):
@.str = [7 x i8] c"--help\00"
@EXIT_SUCCESS = global i32 0
@.str.1 = [5 x i8] c"help\00"
@.str.2 = [5 x i8] c"list\00"
@.str.3 = [4 x i8] c"add\00"
@.str.4 = [5 x i8] c"exec\00"
@.str.5 = [7 x i8] c"delete\00"
@.str.6 = [9 x i8] c"identify\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %20
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %14, %5
br i1 %7, label %18, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 1, %4 ], [ %14, %6 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
%14 = add nuw nsw i64 %9, 1
br i1 %13, label %15, label %6
15: ; preds = %8
%16 = tail call i32 (...) @usage()
%17 = load i32, i32* @EXIT_SUCCESS
br label %71
18: ; preds = %6
%19 = icmp slt i32 %0, 2
br i1 %19, label %20, label %22
20: ; preds = %2, %18
%21 = tail call i32 (...) @list()
br label %71
22: ; preds = %18
%23 = getelementptr inbounds i8*, i8** %1, i64 1
%24 = load i8*, i8** %23
%25 = tail call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %22
%28 = tail call i32 (...) @usage()
%29 = load i32, i32* @EXIT_SUCCESS
br label %71
30: ; preds = %22
%31 = load i8*, i8** %23
%32 = tail call i64 @strcmp(i8* %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = tail call i32 (...) @list()
br label %71
36: ; preds = %30
%37 = load i8*, i8** %23
%38 = tail call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %44
40: ; preds = %36
%41 = add nsw i32 %0, -2
%42 = getelementptr inbounds i8*, i8** %1, i64 2
%43 = tail call i32 @add(i32 %41, i8** %42)
br label %71
44: ; preds = %36
%45 = load i8*, i8** %23
%46 = tail call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %52
48: ; preds = %44
%49 = add nsw i32 %0, -2
%50 = getelementptr inbounds i8*, i8** %1, i64 2
%51 = tail call i32 @exec(i32 %49, i8** %50)
br label %71
52: ; preds = %44
%53 = load i8*, i8** %23
%54 = tail call i64 @strcmp(i8* %53, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %60
56: ; preds = %52
%57 = add nsw i32 %0, -2
%58 = getelementptr inbounds i8*, i8** %1, i64 2
%59 = tail call i32 @delete(i32 %57, i8** %58)
br label %71
60: ; preds = %52
%61 = load i8*, i8** %23
%62 = tail call i64 @strcmp(i8* %61, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %68
64: ; preds = %60
%65 = add nsw i32 %0, -2
%66 = getelementptr inbounds i8*, i8** %1, i64 2
%67 = tail call i32 @identify(i32 %65, i8** %66)
br label %71
68: ; preds = %60
%69 = tail call i32 (...) @usage()
%70 = load i32, i32* @EXIT_FAILURE
br label %71
71: ; preds = %68, %64, %56, %48, %40, %34, %27, %20, %15
%72 = phi i32 [ %17, %15 ], [ %21, %20 ], [ %29, %27 ], [ %35, %34 ], [ %43, %40 ], [ %51, %48 ], [ %59, %56 ], [ %67, %64 ], [ %70, %68 ]
ret i32 %72
}