#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*/ FALSE;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ clear();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ intrflush(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ nonl();
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ scrollok(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdscr;
void init_screen() {
  initscr();
  cbreak();
  noecho();
  nonl();
  intrflush(stdscr, FALSE);
  keypad(stdscr, TRUE);
  scrollok(stdscr, TRUE);
  clear();
  refresh();
}


x86 assembly (clang, -O0):
<init_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   10a0 <noecho@plt>
mov    $0x0,%al
call   1070 <nonl@plt>
mov    0x2e31(%rip),%rax
mov    (%rax),%edi
mov    0x2e10(%rip),%rax
mov    (%rax),%esi
call   1060 <intrflush@plt>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
mov    0x2e09(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
mov    0x2e03(%rip),%rax
mov    (%rax),%edi
mov    0x2df2(%rip),%rax
mov    (%rax),%esi
call   1090 <scrollok@plt>
mov    $0x0,%al
call   10b0 <clear@plt>
mov    $0x0,%al
call   1080 <refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_screen>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   10a0 <noecho@plt>
xor    %eax,%eax
call   1070 <nonl@plt>
mov    0x2e31(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e10(%rip),%rax
mov    (%rax),%esi
call   1060 <intrflush@plt>
mov    (%rbx),%edi
mov    0x2e10(%rip),%r14
mov    (%r14),%esi
call   1040 <keypad@plt>
mov    (%rbx),%edi
mov    (%r14),%esi
call   1090 <scrollok@plt>
xor    %eax,%eax
call   10b0 <clear@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1080 <refresh@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@FALSE = global i32 0
@TRUE = global i32 0
define void @init_screen() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @cbreak()
%3 = call i32 (...) @noecho()
%4 = call i32 (...) @nonl()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @FALSE
%7 = call i32 @intrflush(i32 %5, i32 %6)
%8 = load i32, i32* @stdscr
%9 = load i32, i32* @TRUE
%10 = call i32 @keypad(i32 %8, i32 %9)
%11 = load i32, i32* @stdscr
%12 = load i32, i32* @TRUE
%13 = call i32 @scrollok(i32 %11, i32 %12)
%14 = call i32 (...) @clear()
%15 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@FALSE = global i32 0
@TRUE = global i32 0
define void @init_screen() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = tail call i32 (...) @noecho()
%4 = tail call i32 (...) @nonl()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @FALSE
%7 = tail call i32 @intrflush(i32 %5, i32 %6)
%8 = load i32, i32* @stdscr
%9 = load i32, i32* @TRUE
%10 = tail call i32 @keypad(i32 %8, i32 %9)
%11 = load i32, i32* @stdscr
%12 = load i32, i32* @TRUE
%13 = tail call i32 @scrollok(i32 %11, i32 %12)
%14 = tail call i32 (...) @clear()
%15 = tail call i32 (...) @refresh()
ret void
}