#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*/ print_usage(char *);
int /*<<< orphan*/ print_usage_err(char *, char *);
int /*<<< orphan*/ print_ver_info();
int /*<<< orphan*/ start_cyoagen();
int main(int argc, char **argv) {
  if (argc < 2) {
    start_cyoagen();
  } else if (argc > 3) {
    print_usage_err(*argv, "too many arguments passed");
    return 1;
  } else {
    if (*argv[1] == '-') {
      switch (argv[1][1]) {
      case 'c':
        if (argc < 3) {
        } else {
        }
        break;
      case 'h':
        print_usage(*argv);
        break;
      case 'r':
        if (argc < 3) {
        } else {
        }
        break;
      case 'v':
        print_ver_info();
        break;
      default:
        print_usage_err(*argv, "invalid option");
        return 1;
      }
    } else if (argc > 2) {
      print_usage_err(*argv, "too many files passed");
      return 1;
    } else {
    }
  }
  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   $0x2,-0x8(%rbp)
jge    116c <main+0x2c>
mov    $0x0,%al
call   1030 <start_cyoagen@plt>
jmp    128b <main+0x14b>
cmpl   $0x3,-0x8(%rbp)
jle    1195 <main+0x55>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xecc(%rip),%rsi
call   1040 <print_usage_err@plt>
movl   $0x1,-0x4(%rbp)
jmp    1292 <main+0x152>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    124e <main+0x10e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
add    $0xffffff9d,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x13,%eax
ja     122a <main+0xea>
mov    -0x18(%rbp),%rax
lea    0xe2e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0x3,-0x8(%rbp)
jge    11ea <main+0xaa>
jmp    11ef <main+0xaf>
jmp    11ef <main+0xaf>
jmp    1249 <main+0x109>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <print_usage@plt>
jmp    1249 <main+0x109>
cmpl   $0x3,-0x8(%rbp)
jge    1214 <main+0xd4>
jmp    1219 <main+0xd9>
jmp    1219 <main+0xd9>
jmp    1249 <main+0x109>
mov    $0x0,%al
call   1060 <print_ver_info@plt>
jmp    1249 <main+0x109>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe32(%rip),%rsi
call   1040 <print_usage_err@plt>
movl   $0x1,-0x4(%rbp)
jmp    1292 <main+0x152>
jmp    1281 <main+0x141>
cmpl   $0x2,-0x8(%rbp)
jle    1277 <main+0x137>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe13(%rip),%rsi
call   1040 <print_usage_err@plt>
movl   $0x1,-0x4(%rbp)
jmp    1292 <main+0x152>
jmp    127c <main+0x13c>
jmp    1281 <main+0x141>
jmp    1286 <main+0x146>
jmp    128b <main+0x14b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jg     1151 <main+0x11>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <start_cyoagen@plt>
jmp    116a <main+0x2a>
cmp    $0x4,%edi
jb     116e <main+0x2e>
mov    (%rsi),%rdi
lea    0xef0(%rip),%rsi
call   1040 <print_usage_err@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret
mov    0x8(%rsi),%rax
cmpb   $0x2d,(%rax)
jne    119f <main+0x5f>
movsbl 0x1(%rax),%eax
add    $0xffffff9d,%eax
cmp    $0x13,%eax
ja     11b2 <main+0x72>
xor    %ebx,%ebx
lea    0xe74(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    (%rsi),%rdi
call   1050 <print_usage@plt>
jmp    116a <main+0x2a>
xor    %ebx,%ebx
cmp    $0x3,%edi
jb     116a <main+0x2a>
mov    (%rsi),%rdi
lea    0xec9(%rip),%rsi
jmp    1160 <main+0x20>
mov    (%rsi),%rdi
lea    0xeae(%rip),%rsi
jmp    1160 <main+0x20>
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <print_ver_info@plt>
jmp    116a <main+0x2a>

LLVM IR (-O0):
@.str = [26 x i8] c"too many arguments passed\00"
@.str.1 = [15 x i8] c"invalid option\00"
@.str.2 = [22 x i8] c"too many files passed\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 slt i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @start_cyoagen()
br label %65
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 3
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i8**, i8*** %5
%15 = load i8*, i8** %14
%16 = call i32 @print_usage_err(i8* %15, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %66
17: ; preds = %10
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 45
br i1 %23, label %24, label %54
24: ; preds = %17
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = getelementptr inbounds i8, i8* %27, i64 1
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
switch i32 %30, label %49 [
i32 99, label %31
i32 104, label %37
i32 114, label %41
i32 118, label %47
]
31: ; preds = %24
%32 = load i32, i32* %4
%33 = icmp slt i32 %32, 3
br i1 %33, label %34, label %35
34: ; preds = %31
br label %36
35: ; preds = %31
br label %36
36: ; preds = %35, %34
br label %53
37: ; preds = %24
%38 = load i8**, i8*** %5
%39 = load i8*, i8** %38
%40 = call i32 @print_usage(i8* %39)
br label %53
41: ; preds = %24
%42 = load i32, i32* %4
%43 = icmp slt i32 %42, 3
br i1 %43, label %44, label %45
44: ; preds = %41
br label %46
45: ; preds = %41
br label %46
46: ; preds = %45, %44
br label %53
47: ; preds = %24
%48 = call i32 (...) @print_ver_info()
br label %53
49: ; preds = %24
%50 = load i8**, i8*** %5
%51 = load i8*, i8** %50
%52 = call i32 @print_usage_err(i8* %51, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %66
53: ; preds = %47, %46, %37, %36
br label %63
54: ; preds = %17
%55 = load i32, i32* %4
%56 = icmp sgt i32 %55, 2
br i1 %56, label %57, label %61
57: ; preds = %54
%58 = load i8**, i8*** %5
%59 = load i8*, i8** %58
%60 = call i32 @print_usage_err(i8* %59, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %66
61: ; preds = %54
br label %62
62: ; preds = %61
br label %63
63: ; preds = %62, %53
br label %64
64: ; preds = %63
br label %65
65: ; preds = %64, %8
store i32 0, i32* %3
br label %66
66: ; preds = %65, %57, %49, %13
%67 = load i32, i32* %3
ret i32 %67
}

LLVM IR (-O2):
@.str = [26 x i8] c"too many arguments passed\00"
@.str.1 = [15 x i8] c"invalid option\00"
@.str.2 = [22 x i8] c"too many files passed\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @start_cyoagen()
br label %33
6: ; preds = %2
%7 = icmp ugt i32 %0, 3
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = load i8*, i8** %1
%10 = tail call i32 @print_usage_err(i8* %9, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %33
11: ; preds = %6
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 45
br i1 %15, label %16, label %28
16: ; preds = %11
%17 = getelementptr inbounds i8, i8* %13, i64 1
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
switch i32 %19, label %25 [
i32 99, label %33
i32 104, label %20
i32 114, label %33
i32 118, label %23
]
20: ; preds = %16
%21 = load i8*, i8** %1
%22 = tail call i32 @print_usage(i8* %21)
br label %33
23: ; preds = %16
%24 = tail call i32 (...) @print_ver_info()
br label %33
25: ; preds = %16
%26 = load i8*, i8** %1
%27 = tail call i32 @print_usage_err(i8* %26, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %33
28: ; preds = %11
%29 = icmp ugt i32 %0, 2
br i1 %29, label %30, label %33
30: ; preds = %28
%31 = load i8*, i8** %1
%32 = tail call i32 @print_usage_err(i8* %31, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
br label %33
33: ; preds = %4, %16, %16, %23, %20, %28, %30, %25, %8
%34 = phi i32 [ 1, %8 ], [ 1, %25 ], [ 1, %30 ], [ 0, %28 ], [ 0, %20 ], [ 0, %23 ], [ 0, %16 ], [ 0, %16 ], [ 0, %4 ]
ret i32 %34
}