#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*/ exit(int /*<<< orphan*/);
int file_exists(char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int include_parser(char const *, char const *);
int /*<<< orphan*/ print_last_error();
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc < 3) {
    fprintf(stderr, "Usage: %s [output.file] [entry.file]\n", argv[0]);
    exit(0);
  }
  const char *output_file = argv[1];
  const char *input_file = argv[2];
  if (file_exists(input_file) == false) {
    print_last_error();
  }
  if (include_parser(input_file, output_file) == false) {
    print_last_error();
  }
  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   $0x3,-0x8(%rbp)
jge    1193 <main+0x43>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe79(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <file_exists@plt>
cmp    $0x0,%eax
jne    11c4 <main+0x74>
mov    $0x0,%al
call   1050 <print_last_error@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <include_parser@plt>
cmp    $0x0,%eax
jne    11e1 <main+0x91>
mov    $0x0,%al
call   1050 <print_last_error@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
jle    1194 <main+0x44>
mov    0x8(%rsi),%r14
mov    0x10(%rsi),%rbx
mov    %rbx,%rdi
call   1030 <file_exists@plt>
test   %eax,%eax
jne    1174 <main+0x24>
xor    %eax,%eax
call   1050 <print_last_error@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <include_parser@plt>
test   %eax,%eax
jne    118a <main+0x3a>
xor    %eax,%eax
call   1050 <print_last_error@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xe59(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"Usage: %s [output.file] [entry.file]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %17
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = call i32 @exit(i32 0)
unreachable
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
store i8* %20, i8** %6
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
store i8* %23, i8** %7
%24 = load i8*, i8** %7
%25 = call i32 @file_exists(i8* %24)
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %17
%28 = call i32 (...) @print_last_error()
br label %29
29: ; preds = %27, %17
%30 = load i8*, i8** %7
%31 = load i8*, i8** %6
%32 = call i32 @include_parser(i8* %30, i8* %31)
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %29
%35 = call i32 (...) @print_last_error()
br label %36
36: ; preds = %34, %29
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"Usage: %s [output.file] [entry.file]\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 @exit(i32 0)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = tail call i32 @file_exists(i8* %13)
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %9
%17 = tail call i32 (...) @print_last_error()
br label %18
18: ; preds = %16, %9
%19 = tail call i32 @include_parser(i8* %13, i8* %11)
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = tail call i32 (...) @print_last_error()
br label %23
23: ; preds = %21, %18
ret i32 0
}