#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_BLUE;
int /*<<< orphan*/ COLOR_CYAN;
int /*<<< orphan*/ COLOR_GREEN;
int /*<<< orphan*/ COLOR_MAGENTA;
int /*<<< orphan*/ COLOR_RED;
int /*<<< orphan*/ COLOR_YELLOW;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ init_pair(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ start_color();
int /*<<< orphan*/ stdscr;
int /*<<< orphan*/ timeout(int /*<<< orphan*/);
void init(void) {
  initscr();
  cbreak();
  keypad(stdscr, TRUE);
  noecho();
  timeout(0);
  start_color();
  init_pair(1, COLOR_RED, COLOR_BLACK);
  init_pair(2, COLOR_MAGENTA, COLOR_BLACK);
  init_pair(3, COLOR_CYAN, COLOR_BLACK);
  init_pair(4, COLOR_GREEN, COLOR_BLACK);
  init_pair(5, COLOR_BLUE, COLOR_BLACK);
  init_pair(6, COLOR_YELLOW, COLOR_BLACK);
  return;
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
mov    0x2e4e(%rip),%rax
mov    (%rax),%esi
call   1050 <keypad@plt>
mov    $0x0,%al
call   1090 <noecho@plt>
xor    %edi,%edi
call   1080 <timeout@plt>
mov    $0x0,%al
call   1070 <start_color@plt>
mov    0x2deb(%rip),%rax
mov    (%rax),%esi
mov    0x2e1a(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1040 <init_pair@plt>
mov    0x2de7(%rip),%rax
mov    (%rax),%esi
mov    0x2dfe(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
call   1040 <init_pair@plt>
mov    0x2de3(%rip),%rax
mov    (%rax),%esi
mov    0x2de2(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
call   1040 <init_pair@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%esi
mov    0x2dc6(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
call   1040 <init_pair@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%esi
mov    0x2daa(%rip),%rax
mov    (%rax),%edx
mov    $0x5,%edi
call   1040 <init_pair@plt>
mov    0x2d6f(%rip),%rax
mov    (%rax),%esi
mov    0x2d8e(%rip),%rax
mov    (%rax),%edx
mov    $0x6,%edi
call   1040 <init_pair@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbx
xor    %eax,%eax
call   1060 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%edi
mov    0x2e51(%rip),%rax
mov    (%rax),%esi
call   1050 <keypad@plt>
xor    %eax,%eax
call   1090 <noecho@plt>
xor    %edi,%edi
call   1080 <timeout@plt>
xor    %eax,%eax
call   1070 <start_color@plt>
mov    0x2dee(%rip),%rax
mov    (%rax),%esi
mov    0x2e1d(%rip),%rbx
mov    (%rbx),%edx
mov    $0x1,%edi
call   1040 <init_pair@plt>
mov    0x2dea(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
mov    $0x2,%edi
call   1040 <init_pair@plt>
mov    0x2ded(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
mov    $0x3,%edi
call   1040 <init_pair@plt>
mov    0x2dd0(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
mov    $0x4,%edi
call   1040 <init_pair@plt>
mov    0x2d9b(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
mov    $0x5,%edi
call   1040 <init_pair@plt>
mov    0x2d8e(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
mov    $0x6,%edi
pop    %rbx
jmp    1040 <init_pair@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
@COLOR_RED = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_MAGENTA = global i32 0
@COLOR_CYAN = global i32 0
@COLOR_GREEN = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_YELLOW = global i32 0
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 (...) @noecho()
%7 = call i32 @timeout(i32 0)
%8 = call i32 (...) @start_color()
%9 = load i32, i32* @COLOR_RED
%10 = load i32, i32* @COLOR_BLACK
%11 = call i32 @init_pair(i32 1, i32 %9, i32 %10)
%12 = load i32, i32* @COLOR_MAGENTA
%13 = load i32, i32* @COLOR_BLACK
%14 = call i32 @init_pair(i32 2, i32 %12, i32 %13)
%15 = load i32, i32* @COLOR_CYAN
%16 = load i32, i32* @COLOR_BLACK
%17 = call i32 @init_pair(i32 3, i32 %15, i32 %16)
%18 = load i32, i32* @COLOR_GREEN
%19 = load i32, i32* @COLOR_BLACK
%20 = call i32 @init_pair(i32 4, i32 %18, i32 %19)
%21 = load i32, i32* @COLOR_BLUE
%22 = load i32, i32* @COLOR_BLACK
%23 = call i32 @init_pair(i32 5, i32 %21, i32 %22)
%24 = load i32, i32* @COLOR_YELLOW
%25 = load i32, i32* @COLOR_BLACK
%26 = call i32 @init_pair(i32 6, i32 %24, i32 %25)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
@COLOR_RED = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_MAGENTA = global i32 0
@COLOR_CYAN = global i32 0
@COLOR_GREEN = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_YELLOW = global i32 0
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 (...) @noecho()
%7 = tail call i32 @timeout(i32 0)
%8 = tail call i32 (...) @start_color()
%9 = load i32, i32* @COLOR_RED
%10 = load i32, i32* @COLOR_BLACK
%11 = tail call i32 @init_pair(i32 1, i32 %9, i32 %10)
%12 = load i32, i32* @COLOR_MAGENTA
%13 = load i32, i32* @COLOR_BLACK
%14 = tail call i32 @init_pair(i32 2, i32 %12, i32 %13)
%15 = load i32, i32* @COLOR_CYAN
%16 = load i32, i32* @COLOR_BLACK
%17 = tail call i32 @init_pair(i32 3, i32 %15, i32 %16)
%18 = load i32, i32* @COLOR_GREEN
%19 = load i32, i32* @COLOR_BLACK
%20 = tail call i32 @init_pair(i32 4, i32 %18, i32 %19)
%21 = load i32, i32* @COLOR_BLUE
%22 = load i32, i32* @COLOR_BLACK
%23 = tail call i32 @init_pair(i32 5, i32 %21, i32 %22)
%24 = load i32, i32* @COLOR_YELLOW
%25 = load i32, i32* @COLOR_BLACK
%26 = tail call i32 @init_pair(i32 6, i32 %24, i32 %25)
ret void
}