#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*/ execute(char *, int, int);
int /*<<< orphan*/ print_usage();
int /*<<< orphan*/ sys_init(int, char **);
int main(int argc, char *argv[]) {
  if (argc >= 2) {
    sys_init(argc - 2, argc > 2 ? &argv[2] : NULL);
    execute(argv[1], 0x200000, 0x100000);
  } else {
    print_usage();
  }
  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)
jl     11a7 <main+0x77>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    1174 <main+0x44>
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x20(%rbp)
jmp    117f <main+0x4f>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    117f <main+0x4f>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <sys_init@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x200000,%esi
mov    $0x100000,%edx
call   1040 <execute@plt>
jmp    11ae <main+0x7e>
mov    $0x0,%al
call   1050 <print_usage@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jl     1165 <main+0x35>
mov    %rsi,%rbx
lea    -0x2(%rdi),%eax
lea    0x10(%rsi),%rcx
xor    %esi,%esi
cmp    $0x2,%edi
cmovne %rcx,%rsi
mov    %eax,%edi
call   1030 <sys_init@plt>
mov    0x8(%rbx),%rdi
mov    $0x200000,%esi
mov    $0x100000,%edx
call   1040 <execute@plt>
jmp    116c <main+0x3c>
xor    %eax,%eax
call   1050 <print_usage@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
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 sge i32 %6, 2
br i1 %7, label %8, label %24
8: ; preds = %2
%9 = load i32, i32* %4
%10 = sub nsw i32 %9, 2
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 2
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
br label %17
16: ; preds = %8
br label %17
17: ; preds = %16, %13
%18 = phi i8** [ %15, %13 ], [ null, %16 ]
%19 = call i32 @sys_init(i32 %10, i8** %18)
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i32 @execute(i8* %22, i32 2097152, i32 1048576)
br label %26
24: ; preds = %2
%25 = call i32 (...) @print_usage()
br label %26
26: ; preds = %24, %17
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = add nsw i32 %0, -2
%6 = icmp eq i32 %0, 2
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = select i1 %6, i8** null, i8** %7
%9 = tail call i32 @sys_init(i32 %5, i8** %8)
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @execute(i8* %11, i32 2097152, i32 1048576)
br label %15
13: ; preds = %2
%14 = tail call i32 (...) @print_usage()
br label %15
15: ; preds = %13, %4
ret i32 0
}