#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_PAIR(int);
int /*<<< orphan*/ COLOR_RED;
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ erase();
int /*<<< orphan*/ getch();
scalar_t__ has_colors();
int /*<<< orphan*/ init_pair(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ marco();
int /*<<< orphan*/ mvprintw(int, int, char *, ...);
int /*<<< orphan*/ mvscanw(int, int, char *, char *);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ start_color();
int main() {
  char nombre[30];
  char pass[30];
  initscr();
  if (has_colors()) {
    start_color();
    init_pair(1, COLOR_RED, COLOR_BLACK);
    attron(COLOR_PAIR(1));
    marco();
    mvprintw(2, 25, "Bienvenido - Inicio Session");
    mvprintw(4, 5, "Nombre:");
    mvscanw(4, 15, "%s", nombre);
    mvprintw(5, 5, "Password:");
    noecho();
    mvscanw(5, 15, "%s", pass);
    attroff(COLOR_PAIR(1));
    erase();
    mvprintw(2, 10, "Hola, %s", nombre);
  }
  refresh();
  getch();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <initscr@plt>
mov    $0x0,%al
call   1040 <has_colors@plt>
cmp    $0x0,%rax
je     1306 <main+0x116>
mov    $0x0,%al
call   10a0 <start_color@plt>
mov    0x2db3(%rip),%rax
mov    (%rax),%esi
mov    0x2dba(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1070 <init_pair@plt>
mov    $0x1,%edi
call   10c0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   10b0 <attron@plt>
mov    $0x0,%al
call   1050 <marco@plt>
mov    $0x2,%edi
mov    $0x19,%esi
lea    0xd9d(%rip),%rdx
mov    $0x0,%al
call   1110 <mvprintw@plt>
mov    $0x4,%edi
mov    $0x5,%esi
lea    0xda1(%rip),%rdx
mov    $0x0,%al
call   1110 <mvprintw@plt>
lea    -0x30(%rbp),%rcx
mov    $0x4,%edi
mov    $0xf,%esi
lea    0xd9d(%rip),%rdx
call   1060 <mvscanw@plt>
mov    $0x5,%esi
lea    0xd7c(%rip),%rdx
mov    %esi,%edi
mov    $0x0,%al
call   1110 <mvprintw@plt>
mov    $0x0,%al
call   1100 <noecho@plt>
lea    -0x50(%rbp),%rcx
mov    $0x5,%edi
mov    $0xf,%esi
lea    0xd67(%rip),%rdx
call   1060 <mvscanw@plt>
mov    $0x1,%edi
call   10c0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x0,%al
call   1090 <erase@plt>
lea    -0x30(%rbp),%rcx
mov    $0x2,%edi
mov    $0xa,%esi
lea    0xd2f(%rip),%rdx
mov    $0x0,%al
call   1110 <mvprintw@plt>
mov    $0x0,%al
call   10d0 <refresh@plt>
mov    $0x0,%al
call   10e0 <getch@plt>
mov    $0x0,%al
call   10f0 <endwin@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x48,%rsp
xor    %eax,%eax
call   1080 <initscr@plt>
xor    %eax,%eax
call   1040 <has_colors@plt>
test   %rax,%rax
je     1301 <main+0x111>
xor    %eax,%eax
call   10a0 <start_color@plt>
mov    0x2dbc(%rip),%rax
mov    (%rax),%esi
mov    0x2dc3(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1070 <init_pair@plt>
mov    $0x1,%edi
call   10c0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   10b0 <attron@plt>
xor    %eax,%eax
call   1050 <marco@plt>
lea    0xdb0(%rip),%rdx
mov    $0x2,%edi
mov    $0x19,%esi
xor    %eax,%eax
call   1110 <mvprintw@plt>
lea    0xdb4(%rip),%rdx
mov    $0x4,%edi
mov    $0x5,%esi
xor    %eax,%eax
call   1110 <mvprintw@plt>
lea    0xdb4(%rip),%rbx
lea    0x20(%rsp),%r14
mov    $0x4,%edi
mov    $0xf,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1060 <mvscanw@plt>
lea    0xd83(%rip),%rdx
mov    $0x5,%edi
mov    $0x5,%esi
xor    %eax,%eax
call   1110 <mvprintw@plt>
xor    %eax,%eax
call   1100 <noecho@plt>
mov    %rsp,%rcx
mov    $0x5,%edi
mov    $0xf,%esi
mov    %rbx,%rdx
call   1060 <mvscanw@plt>
mov    $0x1,%edi
call   10c0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
xor    %eax,%eax
call   1090 <erase@plt>
lea    0xd41(%rip),%rdx
mov    $0x2,%edi
mov    $0xa,%esi
mov    %r14,%rcx
xor    %eax,%eax
call   1110 <mvprintw@plt>
xor    %eax,%eax
call   10d0 <refresh@plt>
xor    %eax,%eax
call   10e0 <getch@plt>
xor    %eax,%eax
call   10f0 <endwin@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@COLOR_RED = global i32 0
@COLOR_BLACK = global i32 0
@.str = [28 x i8] c"Bienvenido - Inicio Session\00"
@.str.1 = [8 x i8] c"Nombre:\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [10 x i8] c"Password:\00"
@.str.4 = [9 x i8] c"Hola, %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x i8]
%3 = alloca [30 x i8]
store i32 0, i32* %1
%4 = call i32 (...) @initscr()
%5 = call i64 (...) @has_colors()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %28
7: ; preds = %0
%8 = call i32 (...) @start_color()
%9 = load i32, i32* @COLOR_RED
%10 = load i32, i32* @COLOR_BLACK
%11 = call i32 @init_pair(i32 1, i32 %9, i32 %10)
%12 = call i32 @COLOR_PAIR(i32 1)
%13 = call i32 @attron(i32 %12)
%14 = call i32 (...) @marco()
%15 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 2, i32 25, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 4, i32 5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%17 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%18 = call i32 @mvscanw(i32 4, i32 15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %17)
%19 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 5, i32 5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 (...) @noecho()
%21 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%22 = call i32 @mvscanw(i32 5, i32 15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %21)
%23 = call i32 @COLOR_PAIR(i32 1)
%24 = call i32 @attroff(i32 %23)
%25 = call i32 (...) @erase()
%26 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%27 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 2, i32 10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %26)
br label %28
28: ; preds = %7, %0
%29 = call i32 (...) @refresh()
%30 = call i32 (...) @getch()
%31 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@COLOR_RED = global i32 0
@COLOR_BLACK = global i32 0
@.str = [28 x i8] c"Bienvenido - Inicio Session\00"
@.str.1 = [8 x i8] c"Nombre:\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [10 x i8] c"Password:\00"
@.str.4 = [9 x i8] c"Hola, %s\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = alloca [30 x i8]
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (...) @initscr()
%6 = tail call i64 (...) @has_colors()
%7 = icmp eq i64 %6, 0
br i1 %7, label %26, label %8
8: ; preds = %0
%9 = tail call i32 (...) @start_color()
%10 = load i32, i32* @COLOR_RED
%11 = load i32, i32* @COLOR_BLACK
%12 = tail call i32 @init_pair(i32 1, i32 %10, i32 %11)
%13 = tail call i32 @COLOR_PAIR(i32 1)
%14 = tail call i32 @attron(i32 %13)
%15 = tail call i32 (...) @marco()
%16 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 2, i32 25, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%17 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 4, i32 5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%18 = call i32 @mvscanw(i32 4, i32 15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%19 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 5, i32 5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 (...) @noecho()
%21 = call i32 @mvscanw(i32 5, i32 15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%22 = call i32 @COLOR_PAIR(i32 1)
%23 = call i32 @attroff(i32 %22)
%24 = call i32 (...) @erase()
%25 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 2, i32 10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %3)
br label %26
26: ; preds = %8, %0
%27 = call i32 (...) @refresh()
%28 = call i32 (...) @getch()
%29 = call i32 (...) @endwin()
ret i32 0
}