#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 */
scalar_t__ LINES;
int /*<<< orphan*/ move(scalar_t__, int);
int /*<<< orphan*/ stdscr;
int /*<<< orphan*/ tx_printkeyhelp(char *, char *, int /*<<< orphan*/, int,
                                   int);
int /*<<< orphan*/ tx_wcoloreol(int /*<<< orphan*/);
void tx_listkeyhelp(int textattr, int highattr) {
  move(LINES - 1, 1);
  tx_printkeyhelp("Up/Down", "-move pointer  ", stdscr, highattr, textattr);
  tx_printkeyhelp("Enter", "-select  ", stdscr, highattr, textattr);
  tx_printkeyhelp("X/Ctrl+X", "-close list", stdscr, highattr, textattr);
  tx_wcoloreol(stdscr);
}


x86 assembly (clang, -O0):
<tx_listkeyhelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%rdi
sub    $0x1,%rdi
mov    $0x1,%esi
call   1050 <move@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%r8d
lea    0xe93(%rip),%rdi
lea    0xe94(%rip),%rsi
call   1040 <tx_printkeyhelp@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%r8d
lea    0xe88(%rip),%rdi
lea    0xe87(%rip),%rsi
call   1040 <tx_printkeyhelp@plt>
mov    0x2e3d(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%r8d
lea    0xe75(%rip),%rdi
lea    0xe77(%rip),%rsi
call   1040 <tx_printkeyhelp@plt>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
call   1030 <tx_wcoloreol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tx_listkeyhelp>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %edi,%ebx
mov    0x2ea9(%rip),%rax
mov    (%rax),%rdi
add    $0xffffffffffffffff,%rdi
mov    $0x1,%esi
call   1050 <move@plt>
mov    0x2e89(%rip),%r14
mov    (%r14),%edx
lea    0xe9f(%rip),%rdi
lea    0xea0(%rip),%rsi
mov    %ebp,%ecx
mov    %ebx,%r8d
call   1040 <tx_printkeyhelp@plt>
mov    (%r14),%edx
lea    0xe9c(%rip),%rdi
lea    0xe9b(%rip),%rsi
mov    %ebp,%ecx
mov    %ebx,%r8d
call   1040 <tx_printkeyhelp@plt>
mov    (%r14),%edx
lea    0xe91(%rip),%rdi
lea    0xe93(%rip),%rsi
mov    %ebp,%ecx
mov    %ebx,%r8d
call   1040 <tx_printkeyhelp@plt>
mov    (%r14),%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <tx_wcoloreol@plt>

LLVM IR (-O0):
@LINES = global i64 0
@.str = [8 x i8] c"Up/Down\00"
@.str.1 = [16 x i8] c"-move pointer \00"
@stdscr = global i32 0
@.str.2 = [6 x i8] c"Enter\00"
@.str.3 = [10 x i8] c"-select \00"
@.str.4 = [9 x i8] c"X/Ctrl+X\00"
@.str.5 = [12 x i8] c"-close list\00"
define void @tx_listkeyhelp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i64, i64* @LINES
%6 = sub nsw i64 %5, 1
%7 = call i32 @move(i64 %6, i32 1)
%8 = load i32, i32* @stdscr
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = call i32 @tx_printkeyhelp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
%12 = load i32, i32* @stdscr
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = call i32 @tx_printkeyhelp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
%16 = load i32, i32* @stdscr
%17 = load i32, i32* %4
%18 = load i32, i32* %3
%19 = call i32 @tx_printkeyhelp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %16, i32 %17, i32 %18)
%20 = load i32, i32* @stdscr
%21 = call i32 @tx_wcoloreol(i32 %20)
ret void
}

LLVM IR (-O2):
@LINES = global i64 0
@.str = [8 x i8] c"Up/Down\00"
@.str.1 = [16 x i8] c"-move pointer \00"
@stdscr = global i32 0
@.str.2 = [6 x i8] c"Enter\00"
@.str.3 = [10 x i8] c"-select \00"
@.str.4 = [9 x i8] c"X/Ctrl+X\00"
@.str.5 = [12 x i8] c"-close list\00"
define void @tx_listkeyhelp(i32 %0, i32 %1) {
%3 = load i64, i64* @LINES
%4 = add nsw i64 %3, -1
%5 = tail call i32 @move(i64 %4, i32 1)
%6 = load i32, i32* @stdscr
%7 = tail call i32 @tx_printkeyhelp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %1, i32 %0)
%8 = load i32, i32* @stdscr
%9 = tail call i32 @tx_printkeyhelp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %8, i32 %1, i32 %0)
%10 = load i32, i32* @stdscr
%11 = tail call i32 @tx_printkeyhelp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %10, i32 %1, i32 %0)
%12 = load i32, i32* @stdscr
%13 = tail call i32 @tx_wcoloreol(i32 %12)
ret void
}