#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*/ declic(int, char **);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ genlic(int, char **);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  if (argc < 2) {
    usage();
    exit(1);
  }
  if (strncmp(argv[1], "-gen", 4) == 0) {
    genlic(argc, argv);
  } else if (strncmp(argv[1], "-dec", 4) == 0) {
    declic(argc, argv);
  } else {
    usage();
    exit(1);
  }
  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   $0x2,-0x8(%rbp)
jge    1181 <main+0x31>
mov    $0x0,%al
call   1050 <usage@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe70(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11b5 <main+0x65>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1070 <genlic@plt>
jmp    11ff <main+0xaf>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe41(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11e9 <main+0x99>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <declic@plt>
jmp    11fa <main+0xaa>
mov    $0x0,%al
call   1050 <usage@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
jmp    11ff <main+0xaf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x1,%edi
jle    11b0 <main+0x60>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
lea    0xe98(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     119d <main+0x4d>
mov    0x8(%rbx),%rdi
lea    0xe83(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    11b0 <main+0x60>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <declic@plt>
jmp    11a7 <main+0x57>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1070 <genlic@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
call   1050 <usage@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"-gen\00"
@.str.1 = [5 x i8] c"-dec\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 %11
8: ; preds = %2
%9 = call i32 (...) @usage()
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i64 @strncmp(i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %4
%19 = load i8**, i8*** %5
%20 = call i32 @genlic(i32 %18, i8** %19)
br label %35
21: ; preds = %11
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i64 @strncmp(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %31
27: ; preds = %21
%28 = load i32, i32* %4
%29 = load i8**, i8*** %5
%30 = call i32 @declic(i32 %28, i8** %29)
br label %34
31: ; preds = %21
%32 = call i32 (...) @usage()
%33 = call i32 @exit(i32 1)
unreachable
34: ; preds = %27
br label %35
35: ; preds = %34, %17
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"-gen\00"
@.str.1 = [5 x i8] c"-dec\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 (...) @usage()
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i64 @strncmp(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = tail call i32 @genlic(i32 %0, i8** %1)
br label %23
14: ; preds = %7
%15 = load i8*, i8** %8
%16 = tail call i64 @strncmp(i8* %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = tail call i32 @declic(i32 %0, i8** %1)
br label %23
20: ; preds = %14
%21 = tail call i32 (...) @usage()
%22 = tail call i32 @exit(i32 1)
unreachable
23: ; preds = %18, %12
ret i32 0
}