#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 lxlfw_create(int, char **);
int lxlfw_info(int, char **);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  if (argc > 1) {
    if (!strcmp(argv[1], "info"))
      return lxlfw_info(argc, argv);
    else if (!strcmp(argv[1], "create"))
      return lxlfw_create(argc, argv);
  }
  usage();
  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   $0x1,-0x8(%rbp)
jle    11cc <main+0x8c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe91(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1191 <main+0x51>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <lxlfw_info@plt>
mov    %eax,-0x4(%rbp)
jmp    11da <main+0x9a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe65(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11c2 <main+0x82>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <lxlfw_create@plt>
mov    %eax,-0x4(%rbp)
jmp    11da <main+0x9a>
jmp    11c7 <main+0x87>
jmp    11cc <main+0x8c>
mov    $0x0,%al
call   1040 <usage@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1178 <main+0x38>
mov    %rsi,%r14
mov    %edi,%ebp
mov    0x8(%rsi),%rbx
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1186 <main+0x46>
lea    0xe99(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1194 <main+0x54>
xor    %eax,%eax
call   1040 <usage@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %ebp,%edi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <lxlfw_info@plt>
mov    %ebp,%edi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <lxlfw_create@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"info\00"
@.str.1 = [7 x i8] c"create\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 sgt i32 %6, 1
br i1 %7, label %8, label %30
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @strcmp(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = icmp ne i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %8
%15 = load i32, i32* %4
%16 = load i8**, i8*** %5
%17 = call i32 @lxlfw_info(i32 %15, i8** %16)
store i32 %17, i32* %3
br label %32
18: ; preds = %8
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @strcmp(i8* %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp ne i32 %22, 0
br i1 %23, label %28, label %24
24: ; preds = %18
%25 = load i32, i32* %4
%26 = load i8**, i8*** %5
%27 = call i32 @lxlfw_create(i32 %25, i8** %26)
store i32 %27, i32* %3
br label %32
28: ; preds = %18
br label %29
29: ; preds = %28
br label %30
30: ; preds = %29, %2
%31 = call i32 (...) @usage()
store i32 0, i32* %3
br label %32
32: ; preds = %30, %24, %14
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
@.str = [5 x i8] c"info\00"
@.str.1 = [7 x i8] c"create\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 @lxlfw_info(i32 %0, i8** %1)
br label %18
11: ; preds = %4
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = tail call i32 @lxlfw_create(i32 %0, i8** %1)
br label %18
16: ; preds = %11, %2
%17 = tail call i32 (...) @usage()
br label %18
18: ; preds = %16, %14, %9
%19 = phi i32 [ 0, %16 ], [ %15, %14 ], [ %10, %9 ]
ret i32 %19
}