#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_GREEN;
int /*<<< orphan*/ COLOR_RED;
int /*<<< orphan*/ COLOR_WHITE;
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ init_pair(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int);
int /*<<< orphan*/ start_color();
int /*<<< orphan*/ stdscr;
void Q() {
  initscr();
  start_color();
  keypad(stdscr, 1);
  curs_set(0);
  init_pair(1, COLOR_RED, COLOR_RED);
  init_pair(2, COLOR_GREEN, COLOR_GREEN);
  init_pair(3, COLOR_WHITE, COLOR_WHITE);
}


x86 assembly (clang, -O0):
<Q>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1060 <start_color@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
xor    %edi,%edi
call   1070 <curs_set@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%esi
mov    0x2e3c(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1030 <init_pair@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%esi
mov    0x2e38(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
call   1030 <init_pair@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%esi
mov    0x2e0c(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
call   1030 <init_pair@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q>:
push   %rax
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1060 <start_color@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
xor    %edi,%edi
call   1070 <curs_set@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
mov    %edx,%esi
call   1030 <init_pair@plt>
mov    0x2e4b(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
mov    %edx,%esi
call   1030 <init_pair@plt>
mov    0x2e26(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
mov    %edx,%esi
pop    %rax
jmp    1030 <init_pair@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@COLOR_RED = global i32 0
@COLOR_GREEN = global i32 0
@COLOR_WHITE = global i32 0
define void @Q() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @start_color()
%3 = load i32, i32* @stdscr
%4 = call i32 @keypad(i32 %3, i32 1)
%5 = call i32 @curs_set(i32 0)
%6 = load i32, i32* @COLOR_RED
%7 = load i32, i32* @COLOR_RED
%8 = call i32 @init_pair(i32 1, i32 %6, i32 %7)
%9 = load i32, i32* @COLOR_GREEN
%10 = load i32, i32* @COLOR_GREEN
%11 = call i32 @init_pair(i32 2, i32 %9, i32 %10)
%12 = load i32, i32* @COLOR_WHITE
%13 = load i32, i32* @COLOR_WHITE
%14 = call i32 @init_pair(i32 3, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@COLOR_RED = global i32 0
@COLOR_GREEN = global i32 0
@COLOR_WHITE = global i32 0
define void @Q() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @start_color()
%3 = load i32, i32* @stdscr
%4 = tail call i32 @keypad(i32 %3, i32 1)
%5 = tail call i32 @curs_set(i32 0)
%6 = load i32, i32* @COLOR_RED
%7 = tail call i32 @init_pair(i32 1, i32 %6, i32 %6)
%8 = load i32, i32* @COLOR_GREEN
%9 = tail call i32 @init_pair(i32 2, i32 %8, i32 %8)
%10 = load i32, i32* @COLOR_WHITE
%11 = tail call i32 @init_pair(i32 3, i32 %10, i32 %10)
ret void
}