#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*/ getch();
int /*<<< orphan*/ mvaddstr(int, int, char *);
int /*<<< orphan*/ nodelay(int /*<<< orphan*/, int);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ stdscr;
void info() {
  mvaddstr(8, 33, "Go Cart Racer");
  mvaddstr(9, 33, "by Joe Larson");
  mvaddstr(11, 33, "Instructions:");
  mvaddstr(12, 31, "Arrow Keys - Move");
  mvaddstr(13, 33, "] - Speed Up");
  mvaddstr(14, 33, "[ - Slow Down");
  mvaddstr(15, 31, "Press 'Q' to quit");
  mvaddstr(17, 26, "Try to beat your best time!");
  mvaddstr(18, 28, "Press any key to start");
  refresh();
  nodelay(stdscr, 0);
  getch();
  nodelay(stdscr, 1);
}


x86 assembly (clang, -O0):
<info>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0x21,%esi
lea    0xeab(%rip),%rdx
call   1060 <mvaddstr@plt>
mov    $0x9,%edi
mov    $0x21,%esi
lea    0xea3(%rip),%rdx
call   1060 <mvaddstr@plt>
mov    $0xb,%edi
mov    $0x21,%esi
lea    0xe9b(%rip),%rdx
call   1060 <mvaddstr@plt>
mov    $0xc,%edi
mov    $0x1f,%esi
lea    0xe93(%rip),%rdx
call   1060 <mvaddstr@plt>
mov    $0xd,%edi
mov    $0x21,%esi
lea    0xe8f(%rip),%rdx
call   1060 <mvaddstr@plt>
mov    $0xe,%edi
mov    $0x21,%esi
lea    0xe86(%rip),%rdx
call   1060 <mvaddstr@plt>
mov    $0xf,%edi
mov    $0x1f,%esi
lea    0xe7e(%rip),%rdx
call   1060 <mvaddstr@plt>
mov    $0x11,%edi
mov    $0x1a,%esi
lea    0xe7a(%rip),%rdx
call   1060 <mvaddstr@plt>
mov    $0x12,%edi
mov    $0x1c,%esi
lea    0xe80(%rip),%rdx
call   1060 <mvaddstr@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <nodelay@plt>
mov    $0x0,%al
call   1050 <getch@plt>
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1030 <nodelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<info>:
push   %rbx
lea    0xeb8(%rip),%rdx
mov    $0x8,%edi
mov    $0x21,%esi
call   1060 <mvaddstr@plt>
lea    0xeb0(%rip),%rdx
mov    $0x9,%edi
mov    $0x21,%esi
call   1060 <mvaddstr@plt>
lea    0xea8(%rip),%rdx
mov    $0xb,%edi
mov    $0x21,%esi
call   1060 <mvaddstr@plt>
lea    0xea0(%rip),%rdx
mov    $0xc,%edi
mov    $0x1f,%esi
call   1060 <mvaddstr@plt>
lea    0xe9c(%rip),%rdx
mov    $0xd,%edi
mov    $0x21,%esi
call   1060 <mvaddstr@plt>
lea    0xe93(%rip),%rdx
mov    $0xe,%edi
mov    $0x21,%esi
call   1060 <mvaddstr@plt>
lea    0xe8b(%rip),%rdx
mov    $0xf,%edi
mov    $0x1f,%esi
call   1060 <mvaddstr@plt>
lea    0xe87(%rip),%rdx
mov    $0x11,%edi
mov    $0x1a,%esi
call   1060 <mvaddstr@plt>
lea    0xe8d(%rip),%rdx
mov    $0x12,%edi
mov    $0x1c,%esi
call   1060 <mvaddstr@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    0x2dd3(%rip),%rbx
mov    (%rbx),%edi
xor    %esi,%esi
call   1030 <nodelay@plt>
xor    %eax,%eax
call   1050 <getch@plt>
mov    (%rbx),%edi
mov    $0x1,%esi
pop    %rbx
jmp    1030 <nodelay@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Go Cart Racer\00"
@.str.1 = [14 x i8] c"by Joe Larson\00"
@.str.2 = [14 x i8] c"Instructions:\00"
@.str.3 = [18 x i8] c"Arrow Keys - Move\00"
@.str.4 = [13 x i8] c"] - Speed Up\00"
@.str.5 = [14 x i8] c"[ - Slow Down\00"
@.str.6 = [18 x i8] c"Press 'Q' to quit\00"
@.str.7 = [28 x i8] c"Try to beat your best time!\00"
@.str.8 = [23 x i8] c"Press any key to start\00"
@stdscr = global i32 0
define void @info() {
%1 = call i32 @mvaddstr(i32 8, i32 33, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @mvaddstr(i32 9, i32 33, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @mvaddstr(i32 11, i32 33, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @mvaddstr(i32 12, i32 31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @mvaddstr(i32 13, i32 33, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @mvaddstr(i32 14, i32 33, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @mvaddstr(i32 15, i32 31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @mvaddstr(i32 17, i32 26, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @mvaddstr(i32 18, i32 28, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 (...) @refresh()
%11 = load i32, i32* @stdscr
%12 = call i32 @nodelay(i32 %11, i32 0)
%13 = call i32 (...) @getch()
%14 = load i32, i32* @stdscr
%15 = call i32 @nodelay(i32 %14, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Go Cart Racer\00"
@.str.1 = [14 x i8] c"by Joe Larson\00"
@.str.2 = [14 x i8] c"Instructions:\00"
@.str.3 = [18 x i8] c"Arrow Keys - Move\00"
@.str.4 = [13 x i8] c"] - Speed Up\00"
@.str.5 = [14 x i8] c"[ - Slow Down\00"
@.str.6 = [18 x i8] c"Press 'Q' to quit\00"
@.str.7 = [28 x i8] c"Try to beat your best time!\00"
@.str.8 = [23 x i8] c"Press any key to start\00"
@stdscr = global i32 0
define void @info() {
%1 = tail call i32 @mvaddstr(i32 8, i32 33, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @mvaddstr(i32 9, i32 33, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @mvaddstr(i32 11, i32 33, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @mvaddstr(i32 12, i32 31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @mvaddstr(i32 13, i32 33, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @mvaddstr(i32 14, i32 33, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @mvaddstr(i32 15, i32 31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @mvaddstr(i32 17, i32 26, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @mvaddstr(i32 18, i32 28, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 (...) @refresh()
%11 = load i32, i32* @stdscr
%12 = tail call i32 @nodelay(i32 %11, i32 0)
%13 = tail call i32 (...) @getch()
%14 = load i32, i32* @stdscr
%15 = tail call i32 @nodelay(i32 %14, i32 1)
ret void
}