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


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
mov    $0x0,%al
call   1060 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   10b0 <noecho@plt>
mov    0x2e18(%rip),%rax
mov    (%rax),%edi
mov    0x2e07(%rip),%rax
mov    (%rax),%esi
call   10a0 <nodelay@plt>
mov    0x2e01(%rip),%rax
mov    (%rax),%edi
mov    0x2df0(%rip),%rax
mov    (%rax),%esi
call   1050 <keypad@plt>
xor    %edi,%edi
call   10c0 <curs_set@plt>
mov    $0x0,%al
call   1070 <start_color@plt>
mov    0x2d9c(%rip),%rax
mov    (%rax),%esi
mov    0x2d93(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1040 <init_pair@plt>
mov    0x2da8(%rip),%rax
mov    (%rax),%esi
mov    0x2d9f(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
call   1040 <init_pair@plt>
mov    0x2d74(%rip),%rax
mov    (%rax),%esi
mov    0x2d6b(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
call   1040 <init_pair@plt>
mov    0x2d50(%rip),%rax
mov    (%rax),%esi
mov    0x2d47(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
call   1040 <init_pair@plt>
mov    0x2d44(%rip),%rax
mov    (%rax),%esi
mov    0x2d3b(%rip),%rax
mov    (%rax),%edx
mov    $0x5,%edi
call   1040 <init_pair@plt>
mov    0x2d40(%rip),%rax
mov    (%rax),%esi
mov    0x2d37(%rip),%rax
mov    (%rax),%edx
mov    $0x6,%edi
call   1040 <init_pair@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %r14
push   %rbx
push   %rax
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
xor    %eax,%eax
call   1060 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   10b0 <noecho@plt>
mov    0x2e1a(%rip),%r14
mov    (%r14),%edi
mov    0x2e08(%rip),%rbx
mov    (%rbx),%esi
call   10a0 <nodelay@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
call   1050 <keypad@plt>
xor    %edi,%edi
call   10c0 <curs_set@plt>
xor    %eax,%eax
call   1070 <start_color@plt>
mov    0x2daa(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
mov    %edx,%esi
call   1040 <init_pair@plt>
mov    0x2dbd(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
mov    %edx,%esi
call   1040 <init_pair@plt>
mov    0x2d90(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
mov    %edx,%esi
call   1040 <init_pair@plt>
mov    0x2d73(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
mov    %edx,%esi
call   1040 <init_pair@plt>
mov    0x2d6e(%rip),%rax
mov    (%rax),%edx
mov    $0x5,%edi
mov    %edx,%esi
call   1040 <init_pair@plt>
mov    0x2d71(%rip),%rax
mov    (%rax),%edx
mov    $0x6,%edi
mov    %edx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <init_pair@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = 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
define void @init() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
%3 = call i32 (...) @initscr()
%4 = call i32 (...) @cbreak()
%5 = call i32 (...) @noecho()
%6 = load i32, i32* @stdscr
%7 = load i32, i32* @TRUE
%8 = call i32 @nodelay(i32 %6, i32 %7)
%9 = load i32, i32* @stdscr
%10 = load i32, i32* @TRUE
%11 = call i32 @keypad(i32 %9, i32 %10)
%12 = call i32 @curs_set(i32 0)
%13 = call i32 (...) @start_color()
%14 = load i32, i32* @COLOR_RED
%15 = load i32, i32* @COLOR_RED
%16 = call i32 @init_pair(i32 1, i32 %14, i32 %15)
%17 = load i32, i32* @COLOR_GREEN
%18 = load i32, i32* @COLOR_GREEN
%19 = call i32 @init_pair(i32 2, i32 %17, i32 %18)
%20 = load i32, i32* @COLOR_YELLOW
%21 = load i32, i32* @COLOR_YELLOW
%22 = call i32 @init_pair(i32 3, i32 %20, i32 %21)
%23 = load i32, i32* @COLOR_BLUE
%24 = load i32, i32* @COLOR_BLUE
%25 = call i32 @init_pair(i32 4, i32 %23, i32 %24)
%26 = load i32, i32* @COLOR_MAGENTA
%27 = load i32, i32* @COLOR_MAGENTA
%28 = call i32 @init_pair(i32 5, i32 %26, i32 %27)
%29 = load i32, i32* @COLOR_CYAN
%30 = load i32, i32* @COLOR_CYAN
%31 = call i32 @init_pair(i32 6, i32 %29, i32 %30)
ret void
}

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