#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*/ ACS_HLINE;
int /*<<< orphan*/ ACS_VLINE;
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ box(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ delwin(int /*<<< orphan*/ *);
int /*<<< orphan*/ *newwin(int, int, int, int);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ wbkgd(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ wgetch(int /*<<< orphan*/ *);
int /*<<< orphan*/ wmove(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ wprintw(int /*<<< orphan*/ *, char *);
void about_window() {
  WINDOW *about;
  about = newwin(6, 40, 5, 10);
  box(about, ACS_VLINE, ACS_HLINE);
  wmove(about, 1, 2);
  wprintw(about, "Ncurses Test Verson 0.1");
  wmove(about, 2, 2);
  wprintw(about, "Made : yundream");
  wmove(about, 3, 2);
  wprintw(about, "Date : 2001.5.2");
  wmove(about, 4, 2);
  wprintw(about, "Press any key.. ");
  wbkgd(about, COLOR_PAIR(3));
  refresh();
  wgetch(about);
  delwin(about);
}


x86 assembly (clang, -O0):
<about_window>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6,%edi
mov    $0x28,%esi
mov    $0x5,%edx
mov    $0xa,%ecx
call   1040 <newwin@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e18(%rip),%rax
mov    (%rax),%esi
mov    0x2e17(%rip),%rax
mov    (%rax),%edx
call   1050 <box@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   10b0 <wmove@plt>
mov    -0x8(%rbp),%rdi
lea    0xe12(%rip),%rsi
call   1080 <wprintw@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2,%edx
mov    %edx,%esi
call   10b0 <wmove@plt>
mov    -0x8(%rbp),%rdi
lea    0xe0a(%rip),%rsi
call   1080 <wprintw@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
mov    $0x2,%edx
call   10b0 <wmove@plt>
mov    -0x8(%rbp),%rdi
lea    0xdf7(%rip),%rsi
call   1080 <wprintw@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
mov    $0x2,%edx
call   10b0 <wmove@plt>
mov    -0x8(%rbp),%rdi
lea    0xde4(%rip),%rsi
call   1080 <wprintw@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x3,%edi
call   1070 <COLOR_PAIR@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <wbkgd@plt>
mov    $0x0,%al
call   1090 <refresh@plt>
mov    -0x8(%rbp),%rdi
call   10a0 <wgetch@plt>
mov    -0x8(%rbp),%rdi
call   1060 <delwin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<about_window>:
push   %rbx
mov    $0x6,%edi
mov    $0x28,%esi
mov    $0x5,%edx
mov    $0xa,%ecx
call   1040 <newwin@plt>
mov    %rax,%rbx
mov    0x2e24(%rip),%rax
mov    (%rax),%esi
mov    0x2e23(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
call   1050 <box@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   10b0 <wmove@plt>
lea    0xe20(%rip),%rsi
mov    %rbx,%rdi
call   1080 <wprintw@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
call   10b0 <wmove@plt>
lea    0xe17(%rip),%rsi
mov    %rbx,%rdi
call   1080 <wprintw@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
call   10b0 <wmove@plt>
lea    0xe06(%rip),%rsi
mov    %rbx,%rdi
call   1080 <wprintw@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x2,%edx
call   10b0 <wmove@plt>
lea    0xdf5(%rip),%rsi
mov    %rbx,%rdi
call   1080 <wprintw@plt>
mov    $0x3,%edi
call   1070 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <wbkgd@plt>
xor    %eax,%eax
call   1090 <refresh@plt>
mov    %rbx,%rdi
call   10a0 <wgetch@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1060 <delwin@plt>

LLVM IR (-O0):
@ACS_VLINE = global i32 0
@ACS_HLINE = global i32 0
@.str = [24 x i8] c"Ncurses Test Verson 0.1\00"
@.str.1 = [16 x i8] c"Made : yundream\00"
@.str.2 = [16 x i8] c"Date : 2001.5.2\00"
@.str.3 = [17 x i8] c"Press any key.. \00"
define void @about_window() {
%1 = alloca i32*
%2 = call i32* @newwin(i32 6, i32 40, i32 5, i32 10)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = load i32, i32* @ACS_VLINE
%5 = load i32, i32* @ACS_HLINE
%6 = call i32 @box(i32* %3, i32 %4, i32 %5)
%7 = load i32*, i32** %1
%8 = call i32 @wmove(i32* %7, i32 1, i32 2)
%9 = load i32*, i32** %1
%10 = call i32 @wprintw(i32* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%11 = load i32*, i32** %1
%12 = call i32 @wmove(i32* %11, i32 2, i32 2)
%13 = load i32*, i32** %1
%14 = call i32 @wprintw(i32* %13, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32*, i32** %1
%16 = call i32 @wmove(i32* %15, i32 3, i32 2)
%17 = load i32*, i32** %1
%18 = call i32 @wprintw(i32* %17, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%19 = load i32*, i32** %1
%20 = call i32 @wmove(i32* %19, i32 4, i32 2)
%21 = load i32*, i32** %1
%22 = call i32 @wprintw(i32* %21, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%23 = load i32*, i32** %1
%24 = call i32 @COLOR_PAIR(i32 3)
%25 = call i32 @wbkgd(i32* %23, i32 %24)
%26 = call i32 (...) @refresh()
%27 = load i32*, i32** %1
%28 = call i32 @wgetch(i32* %27)
%29 = load i32*, i32** %1
%30 = call i32 @delwin(i32* %29)
ret void
}

LLVM IR (-O2):
@ACS_VLINE = global i32 0
@ACS_HLINE = global i32 0
@.str = [24 x i8] c"Ncurses Test Verson 0.1\00"
@.str.1 = [16 x i8] c"Made : yundream\00"
@.str.2 = [16 x i8] c"Date : 2001.5.2\00"
@.str.3 = [17 x i8] c"Press any key.. \00"
define void @about_window() {
%1 = tail call i32* @newwin(i32 6, i32 40, i32 5, i32 10)
%2 = load i32, i32* @ACS_VLINE
%3 = load i32, i32* @ACS_HLINE
%4 = tail call i32 @box(i32* %1, i32 %2, i32 %3)
%5 = tail call i32 @wmove(i32* %1, i32 1, i32 2)
%6 = tail call i32 @wprintw(i32* %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @wmove(i32* %1, i32 2, i32 2)
%8 = tail call i32 @wprintw(i32* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @wmove(i32* %1, i32 3, i32 2)
%10 = tail call i32 @wprintw(i32* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%11 = tail call i32 @wmove(i32* %1, i32 4, i32 2)
%12 = tail call i32 @wprintw(i32* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%13 = tail call i32 @COLOR_PAIR(i32 3)
%14 = tail call i32 @wbkgd(i32* %1, i32 %13)
%15 = tail call i32 (...) @refresh()
%16 = tail call i32 @wgetch(i32* %1)
%17 = tail call i32 @delwin(i32* %1)
ret void
}