#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_GREEN;
int /*<<< orphan*/ COLOR_WHITE;
int /*<<< orphan*/ COLOR_YELLOW;
int /*<<< orphan*/ TRUE;
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*/ start_color();
int /*<<< orphan*/ stdscr;
void di_init() {
  initscr();
  noecho();
  keypad(stdscr, TRUE);
  curs_set(0);
  start_color();
  nodelay(stdscr, TRUE);
  init_pair(1, COLOR_WHITE, COLOR_BLUE);
  init_pair(2, COLOR_YELLOW, COLOR_BLACK);
  init_pair(3, COLOR_GREEN, COLOR_BLUE);
  init_pair(4, COLOR_GREEN, COLOR_BLACK);
}


x86 assembly (clang, -O0):
<di_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1080 <noecho@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
mov    0x2e4e(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
xor    %edi,%edi
call   1090 <curs_set@plt>
mov    $0x0,%al
call   1060 <start_color@plt>
mov    0x2e3a(%rip),%rax
mov    (%rax),%edi
mov    0x2e29(%rip),%rax
mov    (%rax),%esi
call   1070 <nodelay@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%esi
mov    0x2de2(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1030 <init_pair@plt>
mov    0x2dd7(%rip),%rax
mov    (%rax),%esi
mov    0x2dee(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
call   1030 <init_pair@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%esi
mov    0x2daa(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
call   1030 <init_pair@plt>
mov    0x2db7(%rip),%rax
mov    (%rax),%esi
mov    0x2db6(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
call   1030 <init_pair@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<di_init>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1080 <noecho@plt>
mov    0x2e5e(%rip),%r14
mov    (%r14),%edi
mov    0x2e4c(%rip),%rbx
mov    (%rbx),%esi
call   1040 <keypad@plt>
xor    %edi,%edi
call   1090 <curs_set@plt>
xor    %eax,%eax
call   1060 <start_color@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
call   1070 <nodelay@plt>
mov    0x2e06(%rip),%rax
mov    (%rax),%esi
mov    0x2ded(%rip),%r14
mov    (%r14),%edx
mov    $0x1,%edi
call   1030 <init_pair@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%esi
mov    0x2df8(%rip),%r15
mov    (%r15),%edx
mov    $0x2,%edi
call   1030 <init_pair@plt>
mov    0x2ddc(%rip),%rbx
mov    (%rbx),%esi
mov    (%r14),%edx
mov    $0x3,%edi
call   1030 <init_pair@plt>
mov    (%rbx),%esi
mov    (%r15),%edx
mov    $0x4,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <init_pair@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
@COLOR_WHITE = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_YELLOW = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_GREEN = global i32 0
define void @di_init() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @noecho()
%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 (...) @start_color()
%8 = load i32, i32* @stdscr
%9 = load i32, i32* @TRUE
%10 = call i32 @nodelay(i32 %8, i32 %9)
%11 = load i32, i32* @COLOR_WHITE
%12 = load i32, i32* @COLOR_BLUE
%13 = call i32 @init_pair(i32 1, i32 %11, i32 %12)
%14 = load i32, i32* @COLOR_YELLOW
%15 = load i32, i32* @COLOR_BLACK
%16 = call i32 @init_pair(i32 2, i32 %14, i32 %15)
%17 = load i32, i32* @COLOR_GREEN
%18 = load i32, i32* @COLOR_BLUE
%19 = call i32 @init_pair(i32 3, i32 %17, i32 %18)
%20 = load i32, i32* @COLOR_GREEN
%21 = load i32, i32* @COLOR_BLACK
%22 = call i32 @init_pair(i32 4, i32 %20, i32 %21)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
@COLOR_WHITE = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_YELLOW = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_GREEN = global i32 0
define void @di_init() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @noecho()
%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 (...) @start_color()
%8 = load i32, i32* @stdscr
%9 = load i32, i32* @TRUE
%10 = tail call i32 @nodelay(i32 %8, i32 %9)
%11 = load i32, i32* @COLOR_WHITE
%12 = load i32, i32* @COLOR_BLUE
%13 = tail call i32 @init_pair(i32 1, i32 %11, i32 %12)
%14 = load i32, i32* @COLOR_YELLOW
%15 = load i32, i32* @COLOR_BLACK
%16 = tail call i32 @init_pair(i32 2, i32 %14, i32 %15)
%17 = load i32, i32* @COLOR_GREEN
%18 = load i32, i32* @COLOR_BLUE
%19 = tail call i32 @init_pair(i32 3, i32 %17, i32 %18)
%20 = load i32, i32* @COLOR_GREEN
%21 = load i32, i32* @COLOR_BLACK
%22 = tail call i32 @init_pair(i32 4, i32 %20, i32 %21)
ret void
}