#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*/ about();
int /*<<< orphan*/ appendf();
int /*<<< orphan*/ concatf();
int /*<<< orphan*/ createf();
int /*<<< orphan*/ editf();
int /*<<< orphan*/ help();
int /*<<< orphan*/ readf();
int main(int argc, char *argv[]) {
  int input;
  if (argc > 1) {
    while (--argc > 0 && (*++argv)[0] == '-')
      while (input = *++argv[0])
        switch (input) {
        case 'r':
        case 'R':
          readf();
          break;
        case 'c':
        case 'C':
          concatf();
          break;
        case 'a':
        case 'A':
          appendf();
          break;
        case 'n':
        case 'N':
          createf();
          break;
        case 'i':
        case 'I':
          about();
          break;
        case 'e':
        case 'E':
          editf();
          break;
        default:
          help();
        }
  } else {
    help();
  }
  return 0;
}


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)
cmpl   $0x1,-0x8(%rbp)
jle    1288 <main+0x118>
jmp    1195 <main+0x25>
mov    -0x8(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
jle    11cb <main+0x5b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    11db <main+0x6b>
jmp    1283 <main+0x113>
jmp    11e0 <main+0x70>
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movsbl 0x1(%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     127e <main+0x10e>
mov    -0x14(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x31,%eax
ja     1272 <main+0x102>
mov    -0x20(%rbp),%rax
lea    0xddf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1050 <readf@plt>
jmp    1279 <main+0x109>
mov    $0x0,%al
call   1040 <concatf@plt>
jmp    1279 <main+0x109>
mov    $0x0,%al
call   1030 <appendf@plt>
jmp    1279 <main+0x109>
mov    $0x0,%al
call   1080 <createf@plt>
jmp    1279 <main+0x109>
mov    $0x0,%al
call   1060 <about@plt>
jmp    1279 <main+0x109>
mov    $0x0,%al
call   1090 <editf@plt>
jmp    1279 <main+0x109>
mov    $0x0,%al
call   1070 <help@plt>
jmp    11e0 <main+0x70>
jmp    1195 <main+0x25>
jmp    128f <main+0x11f>
mov    $0x0,%al
call   1070 <help@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     122b <main+0xbb>
mov    %rsi,%rbx
mov    %edi,%r14d
lea    0xe75(%rip),%r15
jmp    11a1 <main+0x31>
nopl   (%rax)
lea    -0x1(%r14),%eax
cmp    $0x3,%r14d
mov    %eax,%r14d
jl     1232 <main+0xc2>
mov    0x8(%rbx),%rax
cmpb   $0x2d,(%rax)
jne    1232 <main+0xc2>
add    $0x8,%rbx
jmp    11c0 <main+0x50>
xor    %eax,%eax
call   1090 <editf@plt>
mov    (%rbx),%rax
xchg   %ax,%ax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movzbl 0x1(%rax),%eax
test   %al,%al
je     1190 <main+0x20>
movsbl %al,%eax
add    $0xffffffbf,%eax
cmp    $0x31,%eax
ja     121f <main+0xaf>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
xor    %eax,%eax
call   1030 <appendf@plt>
mov    (%rbx),%rax
jmp    11c0 <main+0x50>
xor    %eax,%eax
call   1040 <concatf@plt>
mov    (%rbx),%rax
jmp    11c0 <main+0x50>
xor    %eax,%eax
call   1060 <about@plt>
mov    (%rbx),%rax
jmp    11c0 <main+0x50>
xor    %eax,%eax
call   1080 <createf@plt>
mov    (%rbx),%rax
jmp    11c0 <main+0x50>
xor    %eax,%eax
call   1050 <readf@plt>
mov    (%rbx),%rax
jmp    11c0 <main+0x50>
xor    %eax,%eax
call   1070 <help@plt>
mov    (%rbx),%rax
jmp    11c0 <main+0x50>
xor    %eax,%eax
call   1070 <help@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
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
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %52
9: ; preds = %2
br label %10
10: ; preds = %50, %9
%11 = load i32, i32* %4
%12 = add nsw i32 %11, -1
store i32 %12, i32* %4
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i32 1
store i8** %16, i8*** %5
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 45
br label %22
22: ; preds = %14, %10
%23 = phi i1 [ false, %10 ], [ %21, %14 ]
br i1 %23, label %24, label %51
24: ; preds = %22
br label %25
25: ; preds = %49, %24
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 0
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %27
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
store i32 %31, i32* %6
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %50
33: ; preds = %25
%34 = load i32, i32* %6
switch i32 %34, label %47 [
i32 114, label %35
i32 82, label %35
i32 99, label %37
i32 67, label %37
i32 97, label %39
i32 65, label %39
i32 110, label %41
i32 78, label %41
i32 105, label %43
i32 73, label %43
i32 101, label %45
i32 69, label %45
]
35: ; preds = %33, %33
%36 = call i32 (...) @readf()
br label %49
37: ; preds = %33, %33
%38 = call i32 (...) @concatf()
br label %49
39: ; preds = %33, %33
%40 = call i32 (...) @appendf()
br label %49
41: ; preds = %33, %33
%42 = call i32 (...) @createf()
br label %49
43: ; preds = %33, %33
%44 = call i32 (...) @about()
br label %49
45: ; preds = %33, %33
%46 = call i32 (...) @editf()
br label %49
47: ; preds = %33
%48 = call i32 (...) @help()
br label %49
49: ; preds = %47, %45, %43, %41, %39, %37, %35
br label %25
50: ; preds = %25
br label %10
51: ; preds = %22
br label %54
52: ; preds = %2
%53 = call i32 (...) @help()
br label %54
54: ; preds = %52, %51
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %6, label %40
4: ; preds = %35, %14
%5 = icmp sgt i32 %7, 2
br i1 %5, label %6, label %42
6: ; preds = %2, %4
%7 = phi i32 [ %9, %4 ], [ %0, %2 ]
%8 = phi i8** [ %10, %4 ], [ %1, %2 ]
%9 = add nsw i32 %7, -1
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = load i8*, i8** %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 45
br i1 %13, label %14, label %42
14: ; preds = %6
%15 = getelementptr inbounds i8, i8* %11, i64 1
store i8* %15, i8** %10
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %4, label %18
18: ; preds = %14, %35
%19 = phi i8 [ %38, %35 ], [ %16, %14 ]
%20 = sext i8 %19 to i32
switch i32 %20, label %33 [
i32 114, label %21
i32 82, label %21
i32 99, label %23
i32 67, label %23
i32 97, label %25
i32 65, label %25
i32 110, label %27
i32 78, label %27
i32 105, label %29
i32 73, label %29
i32 101, label %31
i32 69, label %31
]
21: ; preds = %18, %18
%22 = tail call i32 (...) @readf()
br label %35
23: ; preds = %18, %18
%24 = tail call i32 (...) @concatf()
br label %35
25: ; preds = %18, %18
%26 = tail call i32 (...) @appendf()
br label %35
27: ; preds = %18, %18
%28 = tail call i32 (...) @createf()
br label %35
29: ; preds = %18, %18
%30 = tail call i32 (...) @about()
br label %35
31: ; preds = %18, %18
%32 = tail call i32 (...) @editf()
br label %35
33: ; preds = %18
%34 = tail call i32 (...) @help()
br label %35
35: ; preds = %33, %31, %29, %27, %25, %23, %21
%36 = load i8*, i8** %10
%37 = getelementptr inbounds i8, i8* %36, i64 1
store i8* %37, i8** %10
%38 = load i8, i8* %37
%39 = icmp eq i8 %38, 0
br i1 %39, label %4, label %18
40: ; preds = %2
%41 = tail call i32 (...) @help()
br label %42
42: ; preds = %4, %6, %40
ret i32 0
}