#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 CreateSecureBootImage(int, char **);
int /*<<< orphan*/ SBIUsage();
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  argc--;
  argv++;
  if (argc > 0) {
    if (!strcmp(*argv, "-out"))
      return CreateSecureBootImage(--argc, ++argv);
  }
  SBIUsage();
  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)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    11a8 <main+0x78>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe8d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11a3 <main+0x73>
mov    -0x8(%rbp),%edi
add    $0xffffffff,%edi
mov    %edi,-0x8(%rbp)
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    %rsi,-0x10(%rbp)
call   1040 <CreateSecureBootImage@plt>
mov    %eax,-0x4(%rbp)
jmp    11b6 <main+0x86>
jmp    11a8 <main+0x78>
mov    $0x0,%al
call   1050 <SBIUsage@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     1151 <main+0x21>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
lea    0xeb8(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1161 <main+0x31>
xor    %eax,%eax
call   1050 <SBIUsage@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
add    $0xfffffffe,%ebp
add    $0x10,%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <CreateSecureBootImage@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"-out\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
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 %13
9: ; preds = %4
%10 = add nsw i32 %0, -2
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = tail call i32 @CreateSecureBootImage(i32 %10, i8** %11)
br label %15
13: ; preds = %4, %2
%14 = tail call i32 (...) @SBIUsage()
br label %15
15: ; preds = %13, %9
%16 = phi i32 [ 0, %13 ], [ %12, %9 ]
ret i32 %16
}