#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*/ cmiInit();
int /*<<< orphan*/ dinoMain(int, char **);
int /*<<< orphan*/ dinoParseArgs(int, char **);
int /*<<< orphan*/ gfxInit();
scalar_t__ guiInit(int, char **);
int /*<<< orphan*/ guiMainLoop();
int /*<<< orphan*/ guitInit();
int main(int argc, char **argv) {
  int ret;
  dinoParseArgs(argc, argv);
  cmiInit();
  gfxInit();
  if (guiInit(argc, argv) < 0) {
    return -1;
  }
  dinoMain(argc, argv);
  guitInit();
  guiMainLoop();
  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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <dinoParseArgs@plt>
mov    $0x0,%al
call   1070 <cmiInit@plt>
mov    $0x0,%al
call   1080 <gfxInit@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <guiInit@plt>
cmp    $0x0,%rax
jge    11c2 <main+0x52>
movl   $0xffffffff,-0x4(%rbp)
jmp    11e3 <main+0x73>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <dinoMain@plt>
mov    $0x0,%al
call   1030 <guitInit@plt>
mov    $0x0,%al
call   1090 <guiMainLoop@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
call   1050 <dinoParseArgs@plt>
xor    %r14d,%r14d
xor    %eax,%eax
call   1070 <cmiInit@plt>
xor    %eax,%eax
call   1080 <gfxInit@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <guiInit@plt>
test   %rax,%rax
js     11b8 <main+0x48>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1060 <dinoMain@plt>
xor    %eax,%eax
call   1030 <guitInit@plt>
xor    %eax,%eax
call   1090 <guiMainLoop@plt>
jmp    11be <main+0x4e>
mov    $0xffffffff,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @dinoParseArgs(i32 %7, i8** %8)
%10 = call i32 (...) @cmiInit()
%11 = call i32 (...) @gfxInit()
%12 = load i32, i32* %4
%13 = load i8**, i8*** %5
%14 = call i64 @guiInit(i32 %12, i8** %13)
%15 = icmp slt i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 -1, i32* %3
br label %23
17: ; preds = %2
%18 = load i32, i32* %4
%19 = load i8**, i8*** %5
%20 = call i32 @dinoMain(i32 %18, i8** %19)
%21 = call i32 (...) @guitInit()
%22 = call i32 (...) @guiMainLoop()
store i32 0, i32* %3
br label %23
23: ; preds = %17, %16
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @dinoParseArgs(i32 %0, i8** %1)
%4 = tail call i32 (...) @cmiInit()
%5 = tail call i32 (...) @gfxInit()
%6 = tail call i64 @guiInit(i32 %0, i8** %1)
%7 = icmp slt i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = tail call i32 @dinoMain(i32 %0, i8** %1)
%10 = tail call i32 (...) @guitInit()
%11 = tail call i32 (...) @guiMainLoop()
br label %12
12: ; preds = %2, %8
%13 = phi i32 [ 0, %8 ], [ -1, %2 ]
ret i32 %13
}