#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*/ main_c(char *, int, char **);
int /*<<< orphan*/ main_l(char *);
int /*<<< orphan*/ main_t(char *, char *, int, char **);
int /*<<< orphan*/ main_u(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ usage(char **);
int main(int argc, char **argv) {
  if (argc < 3) {
    usage(argv);
  }
  if (strcmp(argv[1], "-c") == 0) {
    if (argc < 4)
      usage(argv);
    main_c(argv[2], argc - 3, &argv[3]);
  } else if (strcmp(argv[1], "-t") == 0) {
    if (argc < 4)
      usage(argv);
    main_t(argv[2], argv[3], argc - 4, &argv[4]);
  } else if (strcmp(argv[1], "-u") == 0) {
    if (argc < 4)
      usage(argv);
    main_u(argv[2], argv[3]);
  } else if (strcmp(argv[1], "-l") == 0) {
    main_l(argv[2]);
  } else {
    usage(argv);
  }
  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   $0x3,-0x8(%rbp)
jge    1189 <main+0x29>
mov    -0x10(%rbp),%rdi
call   1070 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe68(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11da <main+0x7a>
cmpl   $0x4,-0x8(%rbp)
jge    11ba <main+0x5a>
mov    -0x10(%rbp),%rdi
call   1070 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x8(%rbp),%esi
sub    $0x3,%esi
mov    -0x10(%rbp),%rdx
add    $0x18,%rdx
call   1080 <main_c@plt>
jmp    12c6 <main+0x166>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe1a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1233 <main+0xd3>
cmpl   $0x4,-0x8(%rbp)
jge    120b <main+0xab>
mov    -0x10(%rbp),%rdi
call   1070 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
mov    -0x8(%rbp),%edx
sub    $0x4,%edx
mov    -0x10(%rbp),%rcx
add    $0x20,%rcx
call   1050 <main_t@plt>
jmp    12c1 <main+0x161>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdc4(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    127e <main+0x11e>
cmpl   $0x4,-0x8(%rbp)
jge    1264 <main+0x104>
mov    -0x10(%rbp),%rdi
call   1070 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1030 <main_u@plt>
jmp    12bc <main+0x15c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd7c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    12ae <main+0x14e>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <main_l@plt>
jmp    12b7 <main+0x157>
mov    -0x10(%rbp),%rdi
call   1070 <usage@plt>
jmp    12bc <main+0x15c>
jmp    12c1 <main+0x161>
jmp    12c6 <main+0x166>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
cmp    $0x2,%edi
jg     1175 <main+0x15>
mov    %rbx,%rdi
call   1070 <usage@plt>
mov    0x8(%rbx),%rdi
lea    0xe80(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11d3 <main+0x73>
mov    0x8(%rbx),%rdi
lea    0xe6e(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11f7 <main+0x97>
mov    0x8(%rbx),%rdi
lea    0xe5c(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     121f <main+0xbf>
mov    0x8(%rbx),%rdi
lea    0xe4a(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     123b <main+0xdb>
mov    %rbx,%rdi
call   1070 <usage@plt>
jmp    1244 <main+0xe4>
cmp    $0x3,%ebp
jg     11e0 <main+0x80>
mov    %rbx,%rdi
call   1070 <usage@plt>
mov    0x10(%rbx),%rdi
add    $0xfffffffd,%ebp
add    $0x18,%rbx
mov    %ebp,%esi
mov    %rbx,%rdx
call   1080 <main_c@plt>
jmp    1244 <main+0xe4>
cmp    $0x3,%ebp
jg     1204 <main+0xa4>
mov    %rbx,%rdi
call   1070 <usage@plt>
mov    0x10(%rbx),%rdi
mov    0x18(%rbx),%rsi
add    $0xfffffffc,%ebp
add    $0x20,%rbx
mov    %ebp,%edx
mov    %rbx,%rcx
call   1050 <main_t@plt>
jmp    1244 <main+0xe4>
cmp    $0x3,%ebp
jg     122c <main+0xcc>
mov    %rbx,%rdi
call   1070 <usage@plt>
mov    0x10(%rbx),%rdi
mov    0x18(%rbx),%rsi
call   1030 <main_u@plt>
jmp    1244 <main+0xe4>
mov    0x10(%rbx),%rdi
call   1060 <main_l@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-c\00"
@.str.1 = [3 x i8] c"-t\00"
@.str.2 = [3 x i8] c"-u\00"
@.str.3 = [3 x i8] c"-l\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, 3
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = call i32 @usage(i8** %9)
br label %11
11: ; preds = %8, %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %32
17: ; preds = %11
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 4
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i8**, i8*** %5
%22 = call i32 @usage(i8** %21)
br label %23
23: ; preds = %20, %17
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 2
%26 = load i8*, i8** %25
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 3
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 3
%31 = call i32 @main_c(i8* %26, i32 %28, i8** %30)
br label %93
32: ; preds = %11
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %56
38: ; preds = %32
%39 = load i32, i32* %4
%40 = icmp slt i32 %39, 4
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i8**, i8*** %5
%43 = call i32 @usage(i8** %42)
br label %44
44: ; preds = %41, %38
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 2
%47 = load i8*, i8** %46
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 3
%50 = load i8*, i8** %49
%51 = load i32, i32* %4
%52 = sub nsw i32 %51, 4
%53 = load i8**, i8*** %5
%54 = getelementptr inbounds i8*, i8** %53, i64 4
%55 = call i32 @main_t(i8* %47, i8* %50, i32 %52, i8** %54)
br label %92
56: ; preds = %32
%57 = load i8**, i8*** %5
%58 = getelementptr inbounds i8*, i8** %57, i64 1
%59 = load i8*, i8** %58
%60 = call i64 @strcmp(i8* %59, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %76
62: ; preds = %56
%63 = load i32, i32* %4
%64 = icmp slt i32 %63, 4
br i1 %64, label %65, label %68
65: ; preds = %62
%66 = load i8**, i8*** %5
%67 = call i32 @usage(i8** %66)
br label %68
68: ; preds = %65, %62
%69 = load i8**, i8*** %5
%70 = getelementptr inbounds i8*, i8** %69, i64 2
%71 = load i8*, i8** %70
%72 = load i8**, i8*** %5
%73 = getelementptr inbounds i8*, i8** %72, i64 3
%74 = load i8*, i8** %73
%75 = call i32 @main_u(i8* %71, i8* %74)
br label %91
76: ; preds = %56
%77 = load i8**, i8*** %5
%78 = getelementptr inbounds i8*, i8** %77, i64 1
%79 = load i8*, i8** %78
%80 = call i64 @strcmp(i8* %79, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %87
82: ; preds = %76
%83 = load i8**, i8*** %5
%84 = getelementptr inbounds i8*, i8** %83, i64 2
%85 = load i8*, i8** %84
%86 = call i32 @main_l(i8* %85)
br label %90
87: ; preds = %76
%88 = load i8**, i8*** %5
%89 = call i32 @usage(i8** %88)
br label %90
90: ; preds = %87, %82
br label %91
91: ; preds = %90, %68
br label %92
92: ; preds = %91, %44
br label %93
93: ; preds = %92, %23
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-c\00"
@.str.1 = [3 x i8] c"-t\00"
@.str.2 = [3 x i8] c"-u\00"
@.str.3 = [3 x i8] c"-l\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @usage(i8** %1)
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %6
%12 = icmp slt i32 %0, 4
br i1 %12, label %13, label %15
13: ; preds = %11
%14 = tail call i32 @usage(i8** %1)
br label %15
15: ; preds = %13, %11
%16 = getelementptr inbounds i8*, i8** %1, i64 2
%17 = load i8*, i8** %16
%18 = add nsw i32 %0, -3
%19 = getelementptr inbounds i8*, i8** %1, i64 3
%20 = tail call i32 @main_c(i8* %17, i32 %18, i8** %19)
br label %61
21: ; preds = %6
%22 = load i8*, i8** %7
%23 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %37
25: ; preds = %21
%26 = icmp slt i32 %0, 4
br i1 %26, label %27, label %29
27: ; preds = %25
%28 = tail call i32 @usage(i8** %1)
br label %29
29: ; preds = %27, %25
%30 = getelementptr inbounds i8*, i8** %1, i64 2
%31 = load i8*, i8** %30
%32 = getelementptr inbounds i8*, i8** %1, i64 3
%33 = load i8*, i8** %32
%34 = add nsw i32 %0, -4
%35 = getelementptr inbounds i8*, i8** %1, i64 4
%36 = tail call i32 @main_t(i8* %31, i8* %33, i32 %34, i8** %35)
br label %61
37: ; preds = %21
%38 = load i8*, i8** %7
%39 = tail call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %51
41: ; preds = %37
%42 = icmp slt i32 %0, 4
br i1 %42, label %43, label %45
43: ; preds = %41
%44 = tail call i32 @usage(i8** %1)
br label %45
45: ; preds = %43, %41
%46 = getelementptr inbounds i8*, i8** %1, i64 2
%47 = load i8*, i8** %46
%48 = getelementptr inbounds i8*, i8** %1, i64 3
%49 = load i8*, i8** %48
%50 = tail call i32 @main_u(i8* %47, i8* %49)
br label %61
51: ; preds = %37
%52 = load i8*, i8** %7
%53 = tail call i64 @strcmp(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %59
55: ; preds = %51
%56 = getelementptr inbounds i8*, i8** %1, i64 2
%57 = load i8*, i8** %56
%58 = tail call i32 @main_l(i8* %57)
br label %61
59: ; preds = %51
%60 = tail call i32 @usage(i8** %1)
br label %61
61: ; preds = %29, %55, %59, %45, %15
ret i32 0
}