#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*/ print_help(char *);
int /*<<< orphan*/ run_code(char *);
int /*<<< orphan*/ run_file(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  if (argc != 3) {
    print_help(argv[0]);
    return -1;
  }
  if (!strcmp("-f", argv[1])) {
    run_file(argv[2]);
  } else if (!strcmp("-e", argv[1])) {
    run_code(argv[2]);
  } else {
    print_help(argv[0]);
    return -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   $0x3,-0x8(%rbp)
je     1178 <main+0x38>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <print_help@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11fa <main+0xba>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe79(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11a7 <main+0x67>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <run_file@plt>
jmp    11f3 <main+0xb3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe4d(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11d6 <main+0x96>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <run_code@plt>
jmp    11ee <main+0xae>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <print_help@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11fa <main+0xba>
jmp    11f3 <main+0xb3>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x3,%edi
jne    1176 <main+0x36>
mov    0x8(%rbx),%r14
lea    0xea9(%rip),%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1185 <main+0x45>
lea    0xe99(%rip),%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1190 <main+0x50>
mov    (%rbx),%rdi
call   1050 <print_help@plt>
mov    $0xffffffff,%eax
jmp    119b <main+0x5b>
mov    0x10(%rbx),%rdi
call   1030 <run_file@plt>
jmp    1199 <main+0x59>
mov    0x10(%rbx),%rdi
call   1060 <run_code@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-f\00"
@.str.1 = [3 x i8] c"-e\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 ne i32 %6, 3
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @print_help(i8* %11)
store i32 -1, i32* %3
br label %42
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %24, label %19
19: ; preds = %13
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
%23 = call i32 @run_file(i8* %22)
br label %41
24: ; preds = %13
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %27)
%29 = icmp ne i32 %28, 0
br i1 %29, label %35, label %30
30: ; preds = %24
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 2
%33 = load i8*, i8** %32
%34 = call i32 @run_code(i8* %33)
br label %40
35: ; preds = %24
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 0
%38 = load i8*, i8** %37
%39 = call i32 @print_help(i8* %38)
store i32 -1, i32* %3
br label %42
40: ; preds = %30
br label %41
41: ; preds = %40, %19
store i32 0, i32* %3
br label %42
42: ; preds = %41, %35, %8
%43 = load i32, i32* %3
ret i32 %43
}

LLVM IR (-O2):
@.str = [3 x i8] c"-f\00"
@.str.1 = [3 x i8] c"-e\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @print_help(i8* %5)
br label %26
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @strcmp(i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* dereferenceable(1) %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = tail call i32 @run_file(i8* %14)
br label %26
16: ; preds = %7
%17 = tail call i32 @strcmp(i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* dereferenceable(1) %9)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = tail call i32 @run_code(i8* %21)
br label %26
23: ; preds = %16
%24 = load i8*, i8** %1
%25 = tail call i32 @print_help(i8* %24)
br label %26
26: ; preds = %12, %19, %23, %4
%27 = phi i32 [ -1, %4 ], [ -1, %23 ], [ 0, %19 ], [ 0, %12 ]
ret i32 %27
}