#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*/ clear();
char getch();
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ refresh();
void sendHelp() {
  clear();
  printw("# # # # # # # # # # # # # # #\n");
  printw("#                           #\n");
  printw("#       --HOW TO PLAY --    #\n");
  printw("#                           #\n");
  printw("#   Use j, k, l and i to    #\n");
  printw("# move Pacman, and eat all  #\n");
  printw("# the candy!!!              #\n");
  printw("#                           #\n");
  printw("#   BEWARE THE GHOSTS!!!!   #\n");
  printw("#                           #\n");
  printw("# # # # # # # # # # # # # # #\n");
  printw("\nPress 0 to return \n");
  refresh();
  char choice = 'a';
  while (choice != '0')
    choice = getch();
}


x86 assembly (clang, -O0):
<sendHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <clear@plt>
lea    0xeaa(%rip),%rdi
call   1030 <printw@plt>
lea    0xebd(%rip),%rdi
call   1030 <printw@plt>
lea    0xed0(%rip),%rdi
call   1030 <printw@plt>
lea    0xea5(%rip),%rdi
call   1030 <printw@plt>
lea    0xed7(%rip),%rdi
call   1030 <printw@plt>
lea    0xeea(%rip),%rdi
call   1030 <printw@plt>
lea    0xefd(%rip),%rdi
call   1030 <printw@plt>
lea    0xe75(%rip),%rdi
call   1030 <printw@plt>
lea    0xf04(%rip),%rdi
call   1030 <printw@plt>
lea    0xe5d(%rip),%rdi
call   1030 <printw@plt>
lea    0xe32(%rip),%rdi
call   1030 <printw@plt>
lea    0xeff(%rip),%rdi
call   1030 <printw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
movb   $0x61,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
je     1206 <sendHelp+0xc6>
mov    $0x0,%al
call   1050 <getch@plt>
mov    %al,-0x1(%rbp)
jmp    11ea <sendHelp+0xaa>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendHelp>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <clear@plt>
lea    0xeae(%rip),%r14
mov    %r14,%rdi
call   1030 <printw@plt>
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printw@plt>
lea    0xece(%rip),%rdi
call   1030 <printw@plt>
mov    %rbx,%rdi
call   1030 <printw@plt>
lea    0xed9(%rip),%rdi
call   1030 <printw@plt>
lea    0xeec(%rip),%rdi
call   1030 <printw@plt>
lea    0xeff(%rip),%rdi
call   1030 <printw@plt>
mov    %rbx,%rdi
call   1030 <printw@plt>
lea    0xf0a(%rip),%rdi
call   1030 <printw@plt>
mov    %rbx,%rdi
call   1030 <printw@plt>
mov    %r14,%rdi
call   1030 <printw@plt>
lea    0xf0d(%rip),%rdi
call   1030 <printw@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <getch@plt>
cmp    $0x30,%al
jne    11e0 <sendHelp+0xa0>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"# # # # # # # # # # # # # # #\0A\00"
@.str.1 = [31 x i8] c"# #\0A\00"
@.str.2 = [31 x i8] c"# --HOW TO PLAY -- #\0A\00"
@.str.3 = [31 x i8] c"# Use j, k, l and i to #\0A\00"
@.str.4 = [31 x i8] c"# move Pacman, and eat all #\0A\00"
@.str.5 = [31 x i8] c"# the candy!!! #\0A\00"
@.str.6 = [31 x i8] c"# BEWARE THE GHOSTS!!!! #\0A\00"
@.str.7 = [21 x i8] c"\0APress 0 to return \0A\00"
define void @sendHelp() {
%1 = alloca i8
%2 = call i32 (...) @clear()
%3 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @printw(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 (...) @refresh()
store i8 97, i8* %1
br label %16
16: ; preds = %20, %0
%17 = load i8, i8* %1
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 48
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call signext i8 (...) @getch()
store i8 %21, i8* %1
br label %16
22: ; preds = %16
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"# # # # # # # # # # # # # # #\0A\00"
@.str.1 = [31 x i8] c"# #\0A\00"
@.str.2 = [31 x i8] c"# --HOW TO PLAY -- #\0A\00"
@.str.3 = [31 x i8] c"# Use j, k, l and i to #\0A\00"
@.str.4 = [31 x i8] c"# move Pacman, and eat all #\0A\00"
@.str.5 = [31 x i8] c"# the candy!!! #\0A\00"
@.str.6 = [31 x i8] c"# BEWARE THE GHOSTS!!!! #\0A\00"
@.str.7 = [21 x i8] c"\0APress 0 to return \0A\00"
define void @sendHelp() {
%1 = tail call i32 (...) @clear()
%2 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
%11 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 @printw(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%14 = tail call i32 (...) @refresh()
br label %15
15: ; preds = %0, %15
%16 = tail call signext i8 (...) @getch()
%17 = icmp eq i8 %16, 48
br i1 %17, label %18, label %15
18: ; preds = %15
ret void
}