#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*/ anykey(int, int);
int /*<<< orphan*/ border(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ mvprintw(int, int, char *);
void displayHelp() {
  clear();
  border(0, 0, 0, 0, 0, 0, 0, 0);
  mvprintw(2, 2, "w - moves up");
  mvprintw(4, 2, "s - moves down");
  mvprintw(6, 2, "a - moves left");
  mvprintw(8, 2, "d - moves right");
  mvprintw(10, 2, "x - (un)hold die");
  mvprintw(12, 2, "r - roll dice");
  mvprintw(14, 2, "e - score dice (or press enter)");
  mvprintw(16, 2, "v - view score");
  mvprintw(18, 2, "h - view help");
  anykey(20, 2);
}


x86 assembly (clang, -O0):
<displayHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <clear@plt>
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <border@plt>
mov    $0x2,%esi
lea    0xe7f(%rip),%rdx
mov    %esi,%edi
call   1060 <mvprintw@plt>
mov    $0x4,%edi
mov    $0x2,%esi
lea    0xe74(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0x6,%edi
mov    $0x2,%esi
lea    0xe6d(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0x8,%edi
mov    $0x2,%esi
lea    0xe66(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0xa,%edi
mov    $0x2,%esi
lea    0xe60(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0xc,%edi
mov    $0x2,%esi
lea    0xe5b(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0xe,%edi
mov    $0x2,%esi
lea    0xe53(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0x10,%edi
mov    $0x2,%esi
lea    0xe5d(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0x12,%edi
mov    $0x2,%esi
lea    0xe56(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0x14,%edi
mov    $0x2,%esi
call   1040 <anykey@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayHelp>:
push   %rax
xor    %eax,%eax
call   1050 <clear@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1030 <border@plt>
add    $0x10,%rsp
lea    0xe96(%rip),%rdx
mov    $0x2,%edi
mov    $0x2,%esi
call   1060 <mvprintw@plt>
lea    0xe8d(%rip),%rdx
mov    $0x4,%edi
mov    $0x2,%esi
call   1060 <mvprintw@plt>
lea    0xe86(%rip),%rdx
mov    $0x6,%edi
mov    $0x2,%esi
call   1060 <mvprintw@plt>
lea    0xe7f(%rip),%rdx
mov    $0x8,%edi
mov    $0x2,%esi
call   1060 <mvprintw@plt>
lea    0xe79(%rip),%rdx
mov    $0xa,%edi
mov    $0x2,%esi
call   1060 <mvprintw@plt>
lea    0xe74(%rip),%rdx
mov    $0xc,%edi
mov    $0x2,%esi
call   1060 <mvprintw@plt>
lea    0xe6c(%rip),%rdx
mov    $0xe,%edi
mov    $0x2,%esi
call   1060 <mvprintw@plt>
lea    0xe76(%rip),%rdx
mov    $0x10,%edi
mov    $0x2,%esi
call   1060 <mvprintw@plt>
lea    0xe6f(%rip),%rdx
mov    $0x12,%edi
mov    $0x2,%esi
call   1060 <mvprintw@plt>
mov    $0x14,%edi
mov    $0x2,%esi
pop    %rax
jmp    1040 <anykey@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"w - moves up\00"
@.str.1 = [15 x i8] c"s - moves down\00"
@.str.2 = [15 x i8] c"a - moves left\00"
@.str.3 = [16 x i8] c"d - moves right\00"
@.str.4 = [17 x i8] c"x - (un)hold die\00"
@.str.5 = [14 x i8] c"r - roll dice\00"
@.str.6 = [32 x i8] c"e - score dice (or press enter)\00"
@.str.7 = [15 x i8] c"v - view score\00"
@.str.8 = [14 x i8] c"h - view help\00"
define void @displayHelp() {
%1 = call i32 (...) @clear()
%2 = call i32 @border(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%3 = call i32 @mvprintw(i32 2, i32 2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @mvprintw(i32 4, i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @mvprintw(i32 6, i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @mvprintw(i32 8, i32 2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @mvprintw(i32 10, i32 2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @mvprintw(i32 12, i32 2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @mvprintw(i32 14, i32 2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @mvprintw(i32 16, i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @mvprintw(i32 18, i32 2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @anykey(i32 20, i32 2)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"w - moves up\00"
@.str.1 = [15 x i8] c"s - moves down\00"
@.str.2 = [15 x i8] c"a - moves left\00"
@.str.3 = [16 x i8] c"d - moves right\00"
@.str.4 = [17 x i8] c"x - (un)hold die\00"
@.str.5 = [14 x i8] c"r - roll dice\00"
@.str.6 = [32 x i8] c"e - score dice (or press enter)\00"
@.str.7 = [15 x i8] c"v - view score\00"
@.str.8 = [14 x i8] c"h - view help\00"
define void @displayHelp() {
%1 = tail call i32 (...) @clear()
%2 = tail call i32 @border(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%3 = tail call i32 @mvprintw(i32 2, i32 2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @mvprintw(i32 4, i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @mvprintw(i32 6, i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @mvprintw(i32 8, i32 2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @mvprintw(i32 10, i32 2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @mvprintw(i32 12, i32 2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 @mvprintw(i32 14, i32 2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%10 = tail call i32 @mvprintw(i32 16, i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 @mvprintw(i32 18, i32 2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%12 = tail call i32 @anykey(i32 20, i32 2)
ret void
}