#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*/ erase();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ mvprintw(int, int /*<<< orphan*/, char *);
int /*<<< orphan*/ refresh();
void help_screen(void) {
  erase();
  mvprintw(0, 0, "- use the arrow/direction keys for movement");
  mvprintw(1, 0, "- melee attack by moving in monsters direction");
  mvprintw(2, 0, "- save with <S>");
  mvprintw(3, 0, "- quit with <Q>");
  refresh();
  getch();
}


x86 assembly (clang, -O0):
<help_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <erase@plt>
xor    %esi,%esi
lea    0xeac(%rip),%rdx
mov    %esi,%edi
call   1060 <mvprintw@plt>
mov    $0x1,%edi
xor    %esi,%esi
lea    0xec3(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0x2,%edi
xor    %esi,%esi
lea    0xedf(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0x3,%edi
xor    %esi,%esi
lea    0xedc(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    $0x0,%al
call   1050 <getch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_screen>:
push   %rax
xor    %eax,%eax
call   1030 <erase@plt>
lea    0xeb1(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1060 <mvprintw@plt>
lea    0xecd(%rip),%rdx
mov    $0x1,%edi
xor    %esi,%esi
call   1060 <mvprintw@plt>
lea    0xee9(%rip),%rdx
mov    $0x2,%edi
xor    %esi,%esi
call   1060 <mvprintw@plt>
lea    0xee6(%rip),%rdx
mov    $0x3,%edi
xor    %esi,%esi
call   1060 <mvprintw@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <getch@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"- use the arrow/direction keys for movement\00"
@.str.1 = [47 x i8] c"- melee attack by moving in monsters direction\00"
@.str.2 = [16 x i8] c"- save with <S>\00"
@.str.3 = [16 x i8] c"- quit with <Q>\00"
define void @help_screen() {
%1 = call i32 (...) @erase()
%2 = call i32 @mvprintw(i32 0, i32 0, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @mvprintw(i32 1, i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @mvprintw(i32 2, i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @mvprintw(i32 3, i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 (...) @refresh()
%7 = call i32 (...) @getch()
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"- use the arrow/direction keys for movement\00"
@.str.1 = [47 x i8] c"- melee attack by moving in monsters direction\00"
@.str.2 = [16 x i8] c"- save with <S>\00"
@.str.3 = [16 x i8] c"- quit with <Q>\00"
define void @help_screen() {
%1 = tail call i32 (...) @erase()
%2 = tail call i32 @mvprintw(i32 0, i32 0, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @mvprintw(i32 1, i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @mvprintw(i32 2, i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @mvprintw(i32 3, i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 (...) @refresh()
%7 = tail call i32 (...) @getch()
ret void
}