#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_YELLOW;
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ init_pair(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ raw();
int /*<<< orphan*/ start_color();
int /*<<< orphan*/ stdscr;
void create_newscreen(int main_row, int main_col) {
  initscr();
  raw();
  noecho();
  keypad(stdscr, true);
  curs_set(0);
  getmaxyx(stdscr, main_row, main_col);
  start_color();
  init_pair(1, COLOR_YELLOW, COLOR_BLUE);
}


x86 assembly (clang, -O0):
<create_newscreen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1060 <raw@plt>
mov    $0x0,%al
call   1090 <noecho@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
xor    %edi,%edi
call   10a0 <curs_set@plt>
mov    0x2e24(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1080 <getmaxyx@plt>
mov    $0x0,%al
call   1070 <start_color@plt>
mov    0x2df9(%rip),%rax
mov    (%rax),%esi
mov    0x2de8(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1030 <init_pair@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_newscreen>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1060 <raw@plt>
xor    %eax,%eax
call   1090 <noecho@plt>
mov    0x2e43(%rip),%rbx
mov    (%rbx),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
xor    %edi,%edi
call   10a0 <curs_set@plt>
mov    (%rbx),%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1080 <getmaxyx@plt>
xor    %eax,%eax
call   1070 <start_color@plt>
mov    0x2e06(%rip),%rax
mov    (%rax),%esi
mov    0x2df5(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <init_pair@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@COLOR_YELLOW = global i32 0
@COLOR_BLUE = global i32 0
define void @create_newscreen(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @initscr()
%6 = call i32 (...) @raw()
%7 = call i32 (...) @noecho()
%8 = load i32, i32* @stdscr
%9 = call i32 @keypad(i32 %8, i32 1)
%10 = call i32 @curs_set(i32 0)
%11 = load i32, i32* @stdscr
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @getmaxyx(i32 %11, i32 %12, i32 %13)
%15 = call i32 (...) @start_color()
%16 = load i32, i32* @COLOR_YELLOW
%17 = load i32, i32* @COLOR_BLUE
%18 = call i32 @init_pair(i32 1, i32 %16, i32 %17)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@COLOR_YELLOW = global i32 0
@COLOR_BLUE = global i32 0
define void @create_newscreen(i32 %0, i32 %1) {
%3 = tail call i32 (...) @initscr()
%4 = tail call i32 (...) @raw()
%5 = tail call i32 (...) @noecho()
%6 = load i32, i32* @stdscr
%7 = tail call i32 @keypad(i32 %6, i32 1)
%8 = tail call i32 @curs_set(i32 0)
%9 = load i32, i32* @stdscr
%10 = tail call i32 @getmaxyx(i32 %9, i32 %0, i32 %1)
%11 = tail call i32 (...) @start_color()
%12 = load i32, i32* @COLOR_YELLOW
%13 = load i32, i32* @COLOR_BLUE
%14 = tail call i32 @init_pair(i32 1, i32 %12, i32 %13)
ret void
}