#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*/ COLOR_BLACK;
int /*<<< orphan*/ COLOR_CYAN;
int /*<<< orphan*/ COLOR_GREEN;
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ init_color(int /*<<< orphan*/, int, int, int);
int /*<<< orphan*/ init_pair(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ start_color();
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdscr;
void initncurses() {
  initscr();
  start_color();
  keypad(stdscr, stdin);
  curs_set(0);
  init_pair(1, COLOR_BLACK, COLOR_GREEN);
  init_pair(2, COLOR_GREEN, COLOR_BLACK);
  init_color(COLOR_CYAN, 85, 85, 85);
  init_pair(3, COLOR_CYAN, COLOR_BLACK);
}


x86 assembly (clang, -O0):
<initncurses>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <initscr@plt>
mov    $0x0,%al
call   1070 <start_color@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
mov    0x2e66(%rip),%rax
mov    (%rax),%esi
call   1050 <keypad@plt>
xor    %edi,%edi
call   1080 <curs_set@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%esi
mov    0x2e28(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1040 <init_pair@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%esi
mov    0x2e1c(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
call   1040 <init_pair@plt>
mov    0x2e01(%rip),%rax
mov    (%rax),%edi
mov    $0x55,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <init_color@plt>
mov    0x2dea(%rip),%rax
mov    (%rax),%esi
mov    0x2de9(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
call   1040 <init_pair@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initncurses>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <initscr@plt>
xor    %eax,%eax
call   1070 <start_color@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
mov    0x2e66(%rip),%rax
mov    (%rax),%esi
call   1050 <keypad@plt>
xor    %edi,%edi
call   1080 <curs_set@plt>
mov    0x2e41(%rip),%r14
mov    (%r14),%esi
mov    0x2e27(%rip),%rbx
mov    (%rbx),%edx
mov    $0x1,%edi
call   1040 <init_pair@plt>
mov    (%rbx),%esi
mov    (%r14),%edx
mov    $0x2,%edi
call   1040 <init_pair@plt>
mov    0x2e0d(%rip),%rbx
mov    (%rbx),%edi
mov    $0x55,%esi
mov    $0x55,%edx
mov    $0x55,%ecx
call   1030 <init_color@plt>
mov    (%rbx),%esi
mov    (%r14),%edx
mov    $0x3,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <init_pair@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@stdin = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_GREEN = global i32 0
@COLOR_CYAN = global i32 0
define void @initncurses() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @start_color()
%3 = load i32, i32* @stdscr
%4 = load i32, i32* @stdin
%5 = call i32 @keypad(i32 %3, i32 %4)
%6 = call i32 @curs_set(i32 0)
%7 = load i32, i32* @COLOR_BLACK
%8 = load i32, i32* @COLOR_GREEN
%9 = call i32 @init_pair(i32 1, i32 %7, i32 %8)
%10 = load i32, i32* @COLOR_GREEN
%11 = load i32, i32* @COLOR_BLACK
%12 = call i32 @init_pair(i32 2, i32 %10, i32 %11)
%13 = load i32, i32* @COLOR_CYAN
%14 = call i32 @init_color(i32 %13, i32 85, i32 85, i32 85)
%15 = load i32, i32* @COLOR_CYAN
%16 = load i32, i32* @COLOR_BLACK
%17 = call i32 @init_pair(i32 3, i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@stdin = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_GREEN = global i32 0
@COLOR_CYAN = global i32 0
define void @initncurses() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @start_color()
%3 = load i32, i32* @stdscr
%4 = load i32, i32* @stdin
%5 = tail call i32 @keypad(i32 %3, i32 %4)
%6 = tail call i32 @curs_set(i32 0)
%7 = load i32, i32* @COLOR_BLACK
%8 = load i32, i32* @COLOR_GREEN
%9 = tail call i32 @init_pair(i32 1, i32 %7, i32 %8)
%10 = load i32, i32* @COLOR_GREEN
%11 = load i32, i32* @COLOR_BLACK
%12 = tail call i32 @init_pair(i32 2, i32 %10, i32 %11)
%13 = load i32, i32* @COLOR_CYAN
%14 = tail call i32 @init_color(i32 %13, i32 85, i32 85, i32 85)
%15 = load i32, i32* @COLOR_CYAN
%16 = load i32, i32* @COLOR_BLACK
%17 = tail call i32 @init_pair(i32 3, i32 %15, i32 %16)
ret void
}