#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 */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ box(int /*<<< orphan*/ *, char, char);
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ clear();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ lector(char *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *);
int /*<<< orphan*/ mvwaddstr(int /*<<< orphan*/ *, int /*<<< orphan*/, int,
                             char *);
int /*<<< orphan*/ mvwprintw(int /*<<< orphan*/ *, int, int, char *);
int /*<<< orphan*/ *stdscr;
int /*<<< orphan*/ *subwin(int /*<<< orphan*/ *, int, int, int, int);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  WINDOW *w, *np, *ctrl;
  int yy = 0, xx = 0;
  initscr();
  cbreak();
  keypad(stdscr, 1);
  system("sleep 1");
  getch();
  do {
    clear();
    getmaxyx(stdscr, yy, xx);
    box(stdscr, '*', '*');
    w = subwin(stdscr, yy - 10, xx - 8, 2, 4);
    box(w, 0, 0);
    np = subwin(stdscr, 7, xx - 8, yy - 8, 4);
    box(np, 0, 0);
    ctrl = subwin(stdscr, yy / 4, xx / 2, yy / 2, ((xx / 2) - (xx / 4)));
    box(ctrl, 0, 0);
    mvwprintw(stdscr, 0, xx / 2 - 12, "NoisyCurses - By Borregs");
    mvwprintw(np, 0, 4, "En Reproduccion:");
    mvwprintw(ctrl, 8, 4, ">");
    mvwprintw(ctrl, 7, 4, ">>");
    mvwprintw(ctrl, 1, 2, "-| Ingresa Pista a Reproducir |-");
    mvwaddstr(w, 0, 4, "Lista de Reproduccion:");
    lector("wav.lst", ctrl, np, w);
  } while (1);
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    $0x0,%al
call   1060 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%rdi
mov    $0x1,%esi
call   1050 <keypad@plt>
lea    0xde3(%rip),%rdi
call   1040 <system@plt>
mov    $0x0,%al
call   10b0 <getch@plt>
mov    $0x0,%al
call   10e0 <clear@plt>
mov    0x2db1(%rip),%rax
mov    (%rax),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
call   1090 <getmaxyx@plt>
mov    0x2d9c(%rip),%rax
mov    (%rax),%rdi
mov    $0x2a,%edx
mov    %edx,%esi
call   10a0 <box@plt>
mov    0x2d86(%rip),%rax
mov    (%rax),%rdi
mov    -0x2c(%rbp),%esi
sub    $0xa,%esi
mov    -0x30(%rbp),%edx
sub    $0x8,%edx
mov    $0x2,%ecx
mov    $0x4,%r8d
call   1070 <subwin@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   10a0 <box@plt>
mov    0x2d4f(%rip),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%edx
sub    $0x8,%edx
mov    -0x2c(%rbp),%ecx
sub    $0x8,%ecx
mov    $0x7,%esi
mov    $0x4,%r8d
call   1070 <subwin@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   10a0 <box@plt>
mov    0x2d18(%rip),%rax
mov    (%rax),%rdi
mov    -0x2c(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x30(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
mov    $0x2,%r8d
cltd
idiv   %r8d
mov    %eax,%r8d
mov    -0x30(%rbp),%eax
mov    $0x4,%r9d
cltd
idiv   %r9d
mov    -0x34(%rbp),%edx
sub    %eax,%r8d
call   1070 <subwin@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   10a0 <box@plt>
mov    0x2cad(%rip),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
sub    $0xc,%edx
xor    %esi,%esi
lea    0xcb1(%rip),%rcx
call   10d0 <mvwprintw@plt>
mov    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
lea    0xcb3(%rip),%rcx
call   10d0 <mvwprintw@plt>
mov    -0x28(%rbp),%rdi
mov    $0x8,%esi
mov    $0x4,%edx
lea    0xcab(%rip),%rcx
call   10d0 <mvwprintw@plt>
mov    -0x28(%rbp),%rdi
mov    $0x7,%esi
mov    $0x4,%edx
lea    0xc90(%rip),%rcx
call   10d0 <mvwprintw@plt>
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
lea    0xc79(%rip),%rcx
call   10d0 <mvwprintw@plt>
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
lea    0xc83(%rip),%rcx
call   10f0 <mvwaddstr@plt>
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xc82(%rip),%rdi
call   1080 <lector@plt>
mov    $0x1,%al
test   $0x1,%al
jne    1229 <main+0x59>
jmp    13ff <main+0x22f>
mov    $0x0,%al
call   10c0 <endwin@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
mov    0x2e08(%rip),%rbx
mov    (%rbx),%rdi
mov    $0x1,%esi
call   1050 <keypad@plt>
lea    0xe0c(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
call   10b0 <getch@plt>
lea    0xe4f(%rip),%rbp
lea    0xe5f(%rip),%r14
xchg   %ax,%ax
xor    %eax,%eax
call   10d0 <clear@plt>
mov    (%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1090 <getmaxyx@plt>
mov    (%rbx),%rdi
mov    $0x2a,%esi
mov    $0x2a,%edx
call   10a0 <box@plt>
mov    (%rbx),%rdi
mov    $0xfffffff6,%esi
mov    $0xfffffff8,%edx
mov    $0x2,%ecx
mov    $0x4,%r8d
call   1070 <subwin@plt>
mov    %rax,%r15
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10a0 <box@plt>
mov    (%rbx),%rdi
mov    $0x7,%esi
mov    $0xfffffff8,%edx
mov    $0xfffffff8,%ecx
mov    $0x4,%r8d
call   1070 <subwin@plt>
mov    %rax,%r12
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10a0 <box@plt>
mov    (%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <subwin@plt>
mov    %rax,%r13
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10a0 <box@plt>
mov    (%rbx),%rdi
xor    %esi,%esi
mov    $0xfffffff4,%edx
lea    0xd4a(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x4,%edx
lea    0xd4d(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    %r13,%rdi
mov    $0x8,%esi
mov    $0x4,%edx
lea    0xd46(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    %r13,%rdi
mov    $0x7,%esi
mov    $0x4,%edx
lea    0xd2c(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    %r13,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
lea    0xd16(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x4,%edx
mov    %rbp,%rcx
call   10e0 <mvwaddstr@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
call   1080 <lector@plt>
jmp    1210 <main+0x50>

LLVM IR (-O0):
@stdscr = global i32* null
@.str = [8 x i8] c"sleep 1\00"
@.str.1 = [25 x i8] c"NoisyCurses - By Borregs\00"
@.str.2 = [17 x i8] c"En Reproduccion:\00"
@.str.3 = [2 x i8] c">\00"
@.str.4 = [3 x i8] c">>\00"
@.str.5 = [33 x i8] c"-| Ingresa Pista a Reproducir |-\00"
@.str.6 = [23 x i8] c"Lista de Reproduccion:\00"
@.str.7 = [8 x i8] c"wav.lst\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
store i32 0, i32* %10
%11 = call i32 (...) @initscr()
%12 = call i32 (...) @cbreak()
%13 = load i32*, i32** @stdscr
%14 = call i32 @keypad(i32* %13, i32 1)
%15 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (...) @getch()
br label %17
17: ; preds = %75, %2
%18 = call i32 (...) @clear()
%19 = load i32*, i32** @stdscr
%20 = load i32, i32* %9
%21 = load i32, i32* %10
%22 = call i32 @getmaxyx(i32* %19, i32 %20, i32 %21)
%23 = load i32*, i32** @stdscr
%24 = call i32 @box(i32* %23, i8 signext 42, i8 signext 42)
%25 = load i32*, i32** @stdscr
%26 = load i32, i32* %9
%27 = sub nsw i32 %26, 10
%28 = load i32, i32* %10
%29 = sub nsw i32 %28, 8
%30 = call i32* @subwin(i32* %25, i32 %27, i32 %29, i32 2, i32 4)
store i32* %30, i32** %6
%31 = load i32*, i32** %6
%32 = call i32 @box(i32* %31, i8 signext 0, i8 signext 0)
%33 = load i32*, i32** @stdscr
%34 = load i32, i32* %10
%35 = sub nsw i32 %34, 8
%36 = load i32, i32* %9
%37 = sub nsw i32 %36, 8
%38 = call i32* @subwin(i32* %33, i32 7, i32 %35, i32 %37, i32 4)
store i32* %38, i32** %7
%39 = load i32*, i32** %7
%40 = call i32 @box(i32* %39, i8 signext 0, i8 signext 0)
%41 = load i32*, i32** @stdscr
%42 = load i32, i32* %9
%43 = sdiv i32 %42, 4
%44 = load i32, i32* %10
%45 = sdiv i32 %44, 2
%46 = load i32, i32* %9
%47 = sdiv i32 %46, 2
%48 = load i32, i32* %10
%49 = sdiv i32 %48, 2
%50 = load i32, i32* %10
%51 = sdiv i32 %50, 4
%52 = sub nsw i32 %49, %51
%53 = call i32* @subwin(i32* %41, i32 %43, i32 %45, i32 %47, i32 %52)
store i32* %53, i32** %8
%54 = load i32*, i32** %8
%55 = call i32 @box(i32* %54, i8 signext 0, i8 signext 0)
%56 = load i32*, i32** @stdscr
%57 = load i32, i32* %10
%58 = sdiv i32 %57, 2
%59 = sub nsw i32 %58, 12
%60 = call i32 @mvwprintw(i32* %56, i32 0, i32 %59, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%61 = load i32*, i32** %7
%62 = call i32 @mvwprintw(i32* %61, i32 0, i32 4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%63 = load i32*, i32** %8
%64 = call i32 @mvwprintw(i32* %63, i32 8, i32 4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%65 = load i32*, i32** %8
%66 = call i32 @mvwprintw(i32* %65, i32 7, i32 4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%67 = load i32*, i32** %8
%68 = call i32 @mvwprintw(i32* %67, i32 1, i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%69 = load i32*, i32** %6
%70 = call i32 @mvwaddstr(i32* %69, i32 0, i32 4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%71 = load i32*, i32** %8
%72 = load i32*, i32** %7
%73 = load i32*, i32** %6
%74 = call i32 @lector(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32* %71, i32* %72, i32* %73)
br label %75
75: ; preds = %17
br i1 true, label %17, label %76
76: ; preds = %75
%77 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@stdscr = global i32* null
@.str = [8 x i8] c"sleep 1\00"
@.str.1 = [25 x i8] c"NoisyCurses - By Borregs\00"
@.str.2 = [17 x i8] c"En Reproduccion:\00"
@.str.3 = [2 x i8] c">\00"
@.str.4 = [3 x i8] c">>\00"
@.str.5 = [33 x i8] c"-| Ingresa Pista a Reproducir |-\00"
@.str.6 = [23 x i8] c"Lista de Reproduccion:\00"
@.str.7 = [8 x i8] c"wav.lst\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @initscr()
%4 = tail call i32 (...) @cbreak()
%5 = load i32*, i32** @stdscr
%6 = tail call i32 @keypad(i32* %5, i32 1)
%7 = tail call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @getch()
br label %9
9: ; preds = %9, %2
%10 = tail call i32 (...) @clear()
%11 = load i32*, i32** @stdscr
%12 = tail call i32 @getmaxyx(i32* %11, i32 0, i32 0)
%13 = load i32*, i32** @stdscr
%14 = tail call i32 @box(i32* %13, i8 signext 42, i8 signext 42)
%15 = load i32*, i32** @stdscr
%16 = tail call i32* @subwin(i32* %15, i32 -10, i32 -8, i32 2, i32 4)
%17 = tail call i32 @box(i32* %16, i8 signext 0, i8 signext 0)
%18 = load i32*, i32** @stdscr
%19 = tail call i32* @subwin(i32* %18, i32 7, i32 -8, i32 -8, i32 4)
%20 = tail call i32 @box(i32* %19, i8 signext 0, i8 signext 0)
%21 = load i32*, i32** @stdscr
%22 = tail call i32* @subwin(i32* %21, i32 0, i32 0, i32 0, i32 0)
%23 = tail call i32 @box(i32* %22, i8 signext 0, i8 signext 0)
%24 = load i32*, i32** @stdscr
%25 = tail call i32 @mvwprintw(i32* %24, i32 0, i32 -12, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%26 = tail call i32 @mvwprintw(i32* %19, i32 0, i32 4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%27 = tail call i32 @mvwprintw(i32* %22, i32 8, i32 4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%28 = tail call i32 @mvwprintw(i32* %22, i32 7, i32 4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%29 = tail call i32 @mvwprintw(i32* %22, i32 1, i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%30 = tail call i32 @mvwaddstr(i32* %16, i32 0, i32 4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%31 = tail call i32 @lector(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32* %22, i32* %19, i32* %16)
br label %9
}