#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_PAIR(int);
int /*<<< orphan*/ COLOR_RED;
int /*<<< orphan*/ COLOR_WHITE;
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ bkgd(int /*<<< orphan*/);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ init_pair(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ salir();
int /*<<< orphan*/ start_color();
int main(void) {
  initscr();
  start_color();
  init_pair(1, COLOR_WHITE, COLOR_BLUE);
  init_pair(2, COLOR_BLUE, COLOR_WHITE);
  init_pair(3, COLOR_RED, COLOR_WHITE);
  bkgd(COLOR_PAIR(1));
  attron(COLOR_PAIR(3));
  move(2, 1);
  printw("Olá mundo!!!");
  attroff(COLOR_PAIR(3));
  attron(COLOR_PAIR(2));
  move(3, 1);
  printw("Cualquier tecla para salir");
  attroff(COLOR_PAIR(2));
  refresh();
  getch();
  salir();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1070 <start_color@plt>
mov    0x2e07(%rip),%rax
mov    (%rax),%esi
mov    0x2df6(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1040 <init_pair@plt>
mov    0x2de3(%rip),%rax
mov    (%rax),%esi
mov    0x2de2(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
call   1040 <init_pair@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%esi
mov    0x2dc6(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
call   1040 <init_pair@plt>
mov    $0x1,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   10d0 <bkgd@plt>
mov    $0x3,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1080 <attron@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   10e0 <move@plt>
lea    0xda2(%rip),%rdi
call   1090 <printw@plt>
mov    $0x3,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x2,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1080 <attron@plt>
mov    $0x3,%edi
mov    $0x1,%esi
call   10e0 <move@plt>
lea    0xd73(%rip),%rdi
call   1090 <printw@plt>
mov    $0x2,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x0,%al
call   10b0 <refresh@plt>
mov    $0x0,%al
call   10c0 <getch@plt>
mov    $0x0,%al
call   1060 <salir@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1070 <start_color@plt>
mov    0x2e07(%rip),%r14
mov    (%r14),%esi
mov    0x2df5(%rip),%rbx
mov    (%rbx),%edx
mov    $0x1,%edi
call   1040 <init_pair@plt>
mov    (%rbx),%esi
mov    (%r14),%edx
mov    $0x2,%edi
call   1040 <init_pair@plt>
mov    0x2dcb(%rip),%rax
mov    (%rax),%esi
mov    (%r14),%edx
mov    $0x3,%edi
call   1040 <init_pair@plt>
mov    $0x1,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   10d0 <bkgd@plt>
mov    $0x3,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1080 <attron@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   10e0 <move@plt>
lea    0xdb4(%rip),%rdi
call   1090 <printw@plt>
mov    $0x3,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x2,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1080 <attron@plt>
mov    $0x3,%edi
mov    $0x1,%esi
call   10e0 <move@plt>
lea    0xd85(%rip),%rdi
call   1090 <printw@plt>
mov    $0x2,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
xor    %eax,%eax
call   10b0 <refresh@plt>
xor    %eax,%eax
call   10c0 <getch@plt>
xor    %eax,%eax
call   1060 <salir@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@COLOR_WHITE = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_RED = global i32 0
@.str = [14 x i8] c"Ol\C3\A1 mundo!!!\00"
@.str.1 = [27 x i8] c"Cualquier tecla para salir\00"
define i32 @main() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @start_color()
%3 = load i32, i32* @COLOR_WHITE
%4 = load i32, i32* @COLOR_BLUE
%5 = call i32 @init_pair(i32 1, i32 %3, i32 %4)
%6 = load i32, i32* @COLOR_BLUE
%7 = load i32, i32* @COLOR_WHITE
%8 = call i32 @init_pair(i32 2, i32 %6, i32 %7)
%9 = load i32, i32* @COLOR_RED
%10 = load i32, i32* @COLOR_WHITE
%11 = call i32 @init_pair(i32 3, i32 %9, i32 %10)
%12 = call i32 @COLOR_PAIR(i32 1)
%13 = call i32 @bkgd(i32 %12)
%14 = call i32 @COLOR_PAIR(i32 3)
%15 = call i32 @attron(i32 %14)
%16 = call i32 @move(i32 2, i32 1)
%17 = call i32 @printw(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @COLOR_PAIR(i32 3)
%19 = call i32 @attroff(i32 %18)
%20 = call i32 @COLOR_PAIR(i32 2)
%21 = call i32 @attron(i32 %20)
%22 = call i32 @move(i32 3, i32 1)
%23 = call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 @COLOR_PAIR(i32 2)
%25 = call i32 @attroff(i32 %24)
%26 = call i32 (...) @refresh()
%27 = call i32 (...) @getch()
%28 = call i32 (...) @salir()
ret i32 0
}

LLVM IR (-O2):
@COLOR_WHITE = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_RED = global i32 0
@.str = [14 x i8] c"Ol\C3\A1 mundo!!!\00"
@.str.1 = [27 x i8] c"Cualquier tecla para salir\00"
define i32 @main() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @start_color()
%3 = load i32, i32* @COLOR_WHITE
%4 = load i32, i32* @COLOR_BLUE
%5 = tail call i32 @init_pair(i32 1, i32 %3, i32 %4)
%6 = load i32, i32* @COLOR_BLUE
%7 = load i32, i32* @COLOR_WHITE
%8 = tail call i32 @init_pair(i32 2, i32 %6, i32 %7)
%9 = load i32, i32* @COLOR_RED
%10 = load i32, i32* @COLOR_WHITE
%11 = tail call i32 @init_pair(i32 3, i32 %9, i32 %10)
%12 = tail call i32 @COLOR_PAIR(i32 1)
%13 = tail call i32 @bkgd(i32 %12)
%14 = tail call i32 @COLOR_PAIR(i32 3)
%15 = tail call i32 @attron(i32 %14)
%16 = tail call i32 @move(i32 2, i32 1)
%17 = tail call i32 @printw(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%18 = tail call i32 @COLOR_PAIR(i32 3)
%19 = tail call i32 @attroff(i32 %18)
%20 = tail call i32 @COLOR_PAIR(i32 2)
%21 = tail call i32 @attron(i32 %20)
%22 = tail call i32 @move(i32 3, i32 1)
%23 = tail call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%24 = tail call i32 @COLOR_PAIR(i32 2)
%25 = tail call i32 @attroff(i32 %24)
%26 = tail call i32 (...) @refresh()
%27 = tail call i32 (...) @getch()
%28 = tail call i32 (...) @salir()
ret i32 0
}