#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*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mvprintw(int, int /*<<< orphan*/, char *);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ stdscr;
void init() {
  initscr();
  cbreak();
  keypad(stdscr, TRUE);
  curs_set(0);
  mvprintw(0, 0, "(i)nsert, (d)elete, or (g)et?");
  mvprintw(1, 0, "Key: ");
  mvprintw(2, 0, "Value: ");
  noecho();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
mov    0x2e5e(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
xor    %edi,%edi
call   1070 <curs_set@plt>
xor    %esi,%esi
lea    0xe67(%rip),%rdx
mov    %esi,%edi
call   1080 <mvprintw@plt>
mov    $0x1,%edi
xor    %esi,%esi
lea    0xe70(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0x2,%edi
xor    %esi,%esi
lea    0xe63(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0x0,%al
call   1060 <noecho@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
mov    0x2e61(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
xor    %edi,%edi
call   1070 <curs_set@plt>
lea    0xe6c(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1080 <mvprintw@plt>
lea    0xe7a(%rip),%rdx
mov    $0x1,%edi
xor    %esi,%esi
call   1080 <mvprintw@plt>
lea    0xe6d(%rip),%rdx
mov    $0x2,%edi
xor    %esi,%esi
call   1080 <mvprintw@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <noecho@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
@.str = [30 x i8] c"(i)nsert, (d)elete, or (g)et?\00"
@.str.1 = [6 x i8] c"Key: \00"
@.str.2 = [8 x i8] c"Value: \00"
define void @init() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @cbreak()
%3 = load i32, i32* @stdscr
%4 = load i32, i32* @TRUE
%5 = call i32 @keypad(i32 %3, i32 %4)
%6 = call i32 @curs_set(i32 0)
%7 = call i32 @mvprintw(i32 0, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @mvprintw(i32 1, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @mvprintw(i32 2, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (...) @noecho()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
@.str = [30 x i8] c"(i)nsert, (d)elete, or (g)et?\00"
@.str.1 = [6 x i8] c"Key: \00"
@.str.2 = [8 x i8] c"Value: \00"
define void @init() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = load i32, i32* @stdscr
%4 = load i32, i32* @TRUE
%5 = tail call i32 @keypad(i32 %3, i32 %4)
%6 = tail call i32 @curs_set(i32 0)
%7 = tail call i32 @mvprintw(i32 0, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @mvprintw(i32 1, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @mvprintw(i32 2, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 (...) @noecho()
ret void
}