#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*/ displayhelp(char const **, int);
int /*<<< orphan*/ input();
void drawhelpscreen(void) {
  static char const *keys[] = {"h j k l\0move the selection blockwise",
                               "arrows\0move the selection cursorwise",
                               "H J K L\0move the selected block",
                               "g\0display the puzzle's goal",
                               "x\0undo move",
                               "X\0undo step",
                               "z\0redo undone move",
                               "Z\0redo undone step",
                               "R\0return to starting position",
                               "s\0save current position",
                               "r\0restore saved position",
                               "S\0save current position to disk",
                               "P\0previous level",
                               "N\0next level",
                               "Ctrl-L\0redraw screen",
                               "q\0quit"};
  displayhelp(keys, sizeof keys / sizeof *keys);
  input();
}


x86 assembly (clang, -O0):
<drawhelpscreen>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f15(%rip),%rdi
mov    $0x10,%esi
call   1040 <displayhelp@plt>
mov    $0x0,%al
call   1030 <input@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawhelpscreen>:
push   %rax
lea    0x2f18(%rip),%rdi
mov    $0x10,%esi
call   1040 <displayhelp@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <input@plt>

LLVM IR (-O0):
@drawhelpscreen.keys = internal global [16 x i8*] [i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i32 0, i32 0)]
@.str = [37 x i8] c"h j k l\00move the selection blockwise\00"
@.str.1 = [37 x i8] c"arrows\00move the selection cursorwise\00"
@.str.2 = [32 x i8] c"H J K L\00move the selected block\00"
@.str.3 = [28 x i8] c"g\00display the puzzle's goal\00"
@.str.4 = [12 x i8] c"x\00undo move\00"
@.str.5 = [12 x i8] c"X\00undo step\00"
@.str.6 = [19 x i8] c"z\00redo undone move\00"
@.str.7 = [19 x i8] c"Z\00redo undone step\00"
@.str.8 = [30 x i8] c"R\00return to starting position\00"
@.str.9 = [24 x i8] c"s\00save current position\00"
@.str.10 = [25 x i8] c"r\00restore saved position\00"
@.str.11 = [32 x i8] c"S\00save current position to disk\00"
@.str.12 = [17 x i8] c"P\00previous level\00"
@.str.13 = [13 x i8] c"N\00next level\00"
@.str.14 = [21 x i8] c"Ctrl-L\00redraw screen\00"
@.str.15 = [7 x i8] c"q\00quit\00"
define void @drawhelpscreen() {
%1 = call i32 @displayhelp(i8** getelementptr inbounds ([16 x i8*], [16 x i8*]* @drawhelpscreen.keys, i64 0, i64 0), i32 16)
%2 = call i32 (...) @input()
ret void
}

LLVM IR (-O2):
@drawhelpscreen.keys = internal global [16 x i8*] [i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i32 0, i32 0)]
@.str = [37 x i8] c"h j k l\00move the selection blockwise\00"
@.str.1 = [37 x i8] c"arrows\00move the selection cursorwise\00"
@.str.2 = [32 x i8] c"H J K L\00move the selected block\00"
@.str.3 = [28 x i8] c"g\00display the puzzle's goal\00"
@.str.4 = [12 x i8] c"x\00undo move\00"
@.str.5 = [12 x i8] c"X\00undo step\00"
@.str.6 = [19 x i8] c"z\00redo undone move\00"
@.str.7 = [19 x i8] c"Z\00redo undone step\00"
@.str.8 = [30 x i8] c"R\00return to starting position\00"
@.str.9 = [24 x i8] c"s\00save current position\00"
@.str.10 = [25 x i8] c"r\00restore saved position\00"
@.str.11 = [32 x i8] c"S\00save current position to disk\00"
@.str.12 = [17 x i8] c"P\00previous level\00"
@.str.13 = [13 x i8] c"N\00next level\00"
@.str.14 = [21 x i8] c"Ctrl-L\00redraw screen\00"
@.str.15 = [7 x i8] c"q\00quit\00"
define void @drawhelpscreen() {
%1 = tail call i32 @displayhelp(i8** getelementptr inbounds ([16 x i8*], [16 x i8*]* @drawhelpscreen.keys, i64 0, i64 0), i32 16)
%2 = tail call i32 (...) @input()
ret void
}