#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*/ endwin();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ init();
int /*<<< orphan*/ mvprintw(int, int, char *);
int /*<<< orphan*/ newlev();
int /*<<< orphan*/ play();
int main(int argc, char *argv[]) {
  init();
  mvprintw(0, 0, "Downhill ASCII\nBy James E. Ward June 2009");
  mvprintw(5, 30, "   0    ");
  mvprintw(6, 30, "  _|_   ");
  mvprintw(7, 30, " / | \\  ");
  mvprintw(8, 30, "/ / \\ \\ ");
  mvprintw(9, 30, "| \\  \\ |");
  mvprintw(10, 30, "|  \\  \\|");
  mvprintw(14, 0, "Use arrow keys to get the flags and dodge the trees");
  getch();
  newlev();
  play();
  exit(endwin());
}


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    $0x0,%al
call   1050 <init@plt>
xor    %esi,%esi
lea    0xe6a(%rip),%rdx
mov    %esi,%edi
call   1090 <mvprintw@plt>
mov    $0x5,%edi
mov    $0x1e,%esi
lea    0xe7c(%rip),%rdx
call   1090 <mvprintw@plt>
mov    $0x6,%edi
mov    $0x1e,%esi
lea    0xe6f(%rip),%rdx
call   1090 <mvprintw@plt>
mov    $0x7,%edi
mov    $0x1e,%esi
lea    0xe62(%rip),%rdx
call   1090 <mvprintw@plt>
mov    $0x8,%edi
mov    $0x1e,%esi
lea    0xe55(%rip),%rdx
call   1090 <mvprintw@plt>
mov    $0x9,%edi
mov    $0x1e,%esi
lea    0xe48(%rip),%rdx
call   1090 <mvprintw@plt>
mov    $0xa,%edi
mov    $0x1e,%esi
lea    0xe3b(%rip),%rdx
call   1090 <mvprintw@plt>
mov    $0xe,%edi
xor    %esi,%esi
lea    0xe31(%rip),%rdx
call   1090 <mvprintw@plt>
mov    $0x0,%al
call   1060 <getch@plt>
mov    $0x0,%al
call   1030 <newlev@plt>
mov    $0x0,%al
call   1040 <play@plt>
mov    $0x0,%al
call   1070 <endwin@plt>
mov    %eax,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init@plt>
lea    0xe81(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1090 <mvprintw@plt>
lea    0xe9b(%rip),%rdx
mov    $0x5,%edi
mov    $0x1e,%esi
call   1090 <mvprintw@plt>
lea    0xe8e(%rip),%rdx
mov    $0x6,%edi
mov    $0x1e,%esi
call   1090 <mvprintw@plt>
lea    0xe81(%rip),%rdx
mov    $0x7,%edi
mov    $0x1e,%esi
call   1090 <mvprintw@plt>
lea    0xe74(%rip),%rdx
mov    $0x8,%edi
mov    $0x1e,%esi
call   1090 <mvprintw@plt>
lea    0xe67(%rip),%rdx
mov    $0x9,%edi
mov    $0x1e,%esi
call   1090 <mvprintw@plt>
lea    0xe5a(%rip),%rdx
mov    $0xa,%edi
mov    $0x1e,%esi
call   1090 <mvprintw@plt>
lea    0xe4d(%rip),%rdx
mov    $0xe,%edi
xor    %esi,%esi
call   1090 <mvprintw@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
call   1030 <newlev@plt>
xor    %eax,%eax
call   1040 <play@plt>
xor    %eax,%eax
call   1070 <endwin@plt>
mov    %eax,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Downhill ASCII\0ABy James E. Ward June 2009\00"
@.str.1 = [9 x i8] c" 0 \00"
@.str.2 = [9 x i8] c" _|_ \00"
@.str.3 = [9 x i8] c" / | \\ \00"
@.str.4 = [9 x i8] c"/ / \\ \\ \00"
@.str.5 = [9 x i8] c"| \\ \\ |\00"
@.str.6 = [9 x i8] c"| \\ \\|\00"
@.str.7 = [52 x i8] c"Use arrow keys to get the flags and dodge the trees\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 = call i32 (...) @init()
%7 = call i32 @mvprintw(i32 0, i32 0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @mvprintw(i32 5, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @mvprintw(i32 6, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @mvprintw(i32 7, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @mvprintw(i32 8, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @mvprintw(i32 9, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @mvprintw(i32 10, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @mvprintw(i32 14, i32 0, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 (...) @getch()
%16 = call i32 (...) @newlev()
%17 = call i32 (...) @play()
%18 = call i32 (...) @endwin()
%19 = call i32 @exit(i32 %18)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Downhill ASCII\0ABy James E. Ward June 2009\00"
@.str.1 = [9 x i8] c" 0 \00"
@.str.2 = [9 x i8] c" _|_ \00"
@.str.3 = [9 x i8] c" / | \\ \00"
@.str.4 = [9 x i8] c"/ / \\ \\ \00"
@.str.5 = [9 x i8] c"| \\ \\ |\00"
@.str.6 = [9 x i8] c"| \\ \\|\00"
@.str.7 = [52 x i8] c"Use arrow keys to get the flags and dodge the trees\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init()
%4 = tail call i32 @mvprintw(i32 0, i32 0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @mvprintw(i32 5, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @mvprintw(i32 6, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @mvprintw(i32 7, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @mvprintw(i32 8, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%9 = tail call i32 @mvprintw(i32 9, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%10 = tail call i32 @mvprintw(i32 10, i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%11 = tail call i32 @mvprintw(i32 14, i32 0, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0))
%12 = tail call i32 (...) @getch()
%13 = tail call i32 (...) @newlev()
%14 = tail call i32 (...) @play()
%15 = tail call i32 (...) @endwin()
%16 = tail call i32 @exit(i32 %15)
unreachable
}