#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*/ A_NORMAL;
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_WHITE;
int /*<<< orphan*/ COLOR_YELLOW;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ clear();
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ init_pair(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ start_color();
int /*<<< orphan*/ stdscr;
int /*<<< orphan*/ use_default_colors();
void io_init() {
  initscr();
  clear();
  noecho();
  cbreak();
  curs_set(0);
  keypad(stdscr, TRUE);
  start_color();
  use_default_colors();
  init_pair(0, A_NORMAL, -1);
  init_pair(30, COLOR_BLACK, -1);
  init_pair(31, COLOR_RED, -1);
  init_pair(32, COLOR_GREEN, -1);
  init_pair(33, COLOR_YELLOW, -1);
  init_pair(34, COLOR_BLUE, -1);
  init_pair(35, COLOR_MAGENTA, -1);
  init_pair(36, COLOR_CYAN, -1);
  init_pair(37, COLOR_WHITE, -1);
}


x86 assembly (clang, -O0):
<io_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <initscr@plt>
mov    $0x0,%al
call   10a0 <clear@plt>
mov    $0x0,%al
call   1090 <noecho@plt>
mov    $0x0,%al
call   1040 <cbreak@plt>
xor    %edi,%edi
call   10b0 <curs_set@plt>
mov    0x2e22(%rip),%rax
mov    (%rax),%edi
mov    0x2e11(%rip),%rax
mov    (%rax),%esi
call   1060 <keypad@plt>
mov    $0x0,%al
call   1080 <start_color@plt>
mov    $0x0,%al
call   1030 <use_default_colors@plt>
mov    0x2e05(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2dd8(%rip),%rax
mov    (%rax),%esi
mov    $0x1e,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d80(%rip),%rax
mov    (%rax),%esi
mov    $0x1f,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d98(%rip),%rax
mov    (%rax),%esi
mov    $0x20,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%esi
mov    $0x21,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d40(%rip),%rax
mov    (%rax),%esi
mov    $0x22,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d40(%rip),%rax
mov    (%rax),%esi
mov    $0x23,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d40(%rip),%rax
mov    (%rax),%esi
mov    $0x24,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d08(%rip),%rax
mov    (%rax),%esi
mov    $0x25,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_init>:
push   %rax
xor    %eax,%eax
call   1070 <initscr@plt>
xor    %eax,%eax
call   10a0 <clear@plt>
xor    %eax,%eax
call   1090 <noecho@plt>
xor    %eax,%eax
call   1040 <cbreak@plt>
xor    %edi,%edi
call   10b0 <curs_set@plt>
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
mov    0x2e14(%rip),%rax
mov    (%rax),%esi
call   1060 <keypad@plt>
xor    %eax,%eax
call   1080 <start_color@plt>
xor    %eax,%eax
call   1030 <use_default_colors@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2ddb(%rip),%rax
mov    (%rax),%esi
mov    $0x1e,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%esi
mov    $0x1f,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d9b(%rip),%rax
mov    (%rax),%esi
mov    $0x20,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d63(%rip),%rax
mov    (%rax),%esi
mov    $0x21,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d43(%rip),%rax
mov    (%rax),%esi
mov    $0x22,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d43(%rip),%rax
mov    (%rax),%esi
mov    $0x23,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d43(%rip),%rax
mov    (%rax),%esi
mov    $0x24,%edi
mov    $0xffffffff,%edx
call   1050 <init_pair@plt>
mov    0x2d0b(%rip),%rax
mov    (%rax),%esi
mov    $0x25,%edi
mov    $0xffffffff,%edx
pop    %rax
jmp    1050 <init_pair@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
@A_NORMAL = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_RED = global i32 0
@COLOR_GREEN = global i32 0
@COLOR_YELLOW = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_MAGENTA = global i32 0
@COLOR_CYAN = global i32 0
@COLOR_WHITE = global i32 0
define void @io_init() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @clear()
%3 = call i32 (...) @noecho()
%4 = call i32 (...) @cbreak()
%5 = call i32 @curs_set(i32 0)
%6 = load i32, i32* @stdscr
%7 = load i32, i32* @TRUE
%8 = call i32 @keypad(i32 %6, i32 %7)
%9 = call i32 (...) @start_color()
%10 = call i32 (...) @use_default_colors()
%11 = load i32, i32* @A_NORMAL
%12 = call i32 @init_pair(i32 0, i32 %11, i32 -1)
%13 = load i32, i32* @COLOR_BLACK
%14 = call i32 @init_pair(i32 30, i32 %13, i32 -1)
%15 = load i32, i32* @COLOR_RED
%16 = call i32 @init_pair(i32 31, i32 %15, i32 -1)
%17 = load i32, i32* @COLOR_GREEN
%18 = call i32 @init_pair(i32 32, i32 %17, i32 -1)
%19 = load i32, i32* @COLOR_YELLOW
%20 = call i32 @init_pair(i32 33, i32 %19, i32 -1)
%21 = load i32, i32* @COLOR_BLUE
%22 = call i32 @init_pair(i32 34, i32 %21, i32 -1)
%23 = load i32, i32* @COLOR_MAGENTA
%24 = call i32 @init_pair(i32 35, i32 %23, i32 -1)
%25 = load i32, i32* @COLOR_CYAN
%26 = call i32 @init_pair(i32 36, i32 %25, i32 -1)
%27 = load i32, i32* @COLOR_WHITE
%28 = call i32 @init_pair(i32 37, i32 %27, i32 -1)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
@A_NORMAL = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_RED = global i32 0
@COLOR_GREEN = global i32 0
@COLOR_YELLOW = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_MAGENTA = global i32 0
@COLOR_CYAN = global i32 0
@COLOR_WHITE = global i32 0
define void @io_init() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @clear()
%3 = tail call i32 (...) @noecho()
%4 = tail call i32 (...) @cbreak()
%5 = tail call i32 @curs_set(i32 0)
%6 = load i32, i32* @stdscr
%7 = load i32, i32* @TRUE
%8 = tail call i32 @keypad(i32 %6, i32 %7)
%9 = tail call i32 (...) @start_color()
%10 = tail call i32 (...) @use_default_colors()
%11 = load i32, i32* @A_NORMAL
%12 = tail call i32 @init_pair(i32 0, i32 %11, i32 -1)
%13 = load i32, i32* @COLOR_BLACK
%14 = tail call i32 @init_pair(i32 30, i32 %13, i32 -1)
%15 = load i32, i32* @COLOR_RED
%16 = tail call i32 @init_pair(i32 31, i32 %15, i32 -1)
%17 = load i32, i32* @COLOR_GREEN
%18 = tail call i32 @init_pair(i32 32, i32 %17, i32 -1)
%19 = load i32, i32* @COLOR_YELLOW
%20 = tail call i32 @init_pair(i32 33, i32 %19, i32 -1)
%21 = load i32, i32* @COLOR_BLUE
%22 = tail call i32 @init_pair(i32 34, i32 %21, i32 -1)
%23 = load i32, i32* @COLOR_MAGENTA
%24 = tail call i32 @init_pair(i32 35, i32 %23, i32 -1)
%25 = load i32, i32* @COLOR_CYAN
%26 = tail call i32 @init_pair(i32 36, i32 %25, i32 -1)
%27 = load i32, i32* @COLOR_WHITE
%28 = tail call i32 @init_pair(i32 37, i32 %27, i32 -1)
ret void
}