#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_LLCORNER;
int /*<<< orphan*/ ACS_LRCORNER;
int /*<<< orphan*/ ACS_ULCORNER;
int /*<<< orphan*/ ACS_URCORNER;
int /*<<< orphan*/ ACS_VLINE;
int /*<<< orphan*/ *newwin(int, int, int, int);
int /*<<< orphan*/ wborder(int /*<<< orphan*/ *, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
WINDOW *create_newwin(int height, int width, int starty, int startx) {
  WINDOW *local_win;
  local_win = newwin(height, width, starty, startx);
  wborder(local_win, ACS_VLINE, ACS_VLINE, ACS_HLINE, ACS_HLINE, ACS_ULCORNER,
          ACS_URCORNER, ACS_LLCORNER, ACS_LRCORNER);
  return local_win;
}


x86 assembly (clang, -O0):
<create_newwin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <newwin@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e6c(%rip),%rax
mov    (%rax),%esi
mov    0x2e63(%rip),%rax
mov    (%rax),%edx
mov    0x2e62(%rip),%rax
mov    (%rax),%ecx
mov    0x2e59(%rip),%rax
mov    (%rax),%r8d
mov    0x2e6f(%rip),%rax
mov    (%rax),%r9d
mov    0x2e4d(%rip),%rax
mov    (%rax),%r11d
mov    0x2e23(%rip),%rax
mov    (%rax),%r10d
mov    0x2e49(%rip),%rax
mov    (%rax),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <wborder@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_newwin>:
push   %rbx
call   1040 <newwin@plt>
mov    %rax,%rbx
mov    0x2e90(%rip),%rax
mov    (%rax),%edx
mov    0x2e8f(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea6(%rip),%rax
mov    (%rax),%r9d
mov    0x2e84(%rip),%rax
mov    (%rax),%r10d
mov    0x2e5a(%rip),%rsi
mov    (%rsi),%r11d
mov    0x2e80(%rip),%rsi
mov    (%rsi),%eax
sub    $0x8,%rsp
mov    %rbx,%rdi
mov    %edx,%esi
mov    %ecx,%r8d
push   %rax
push   %r11
push   %r10
call   1030 <wborder@plt>
add    $0x20,%rsp
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ACS_VLINE = global i32 0
@ACS_HLINE = global i32 0
@ACS_ULCORNER = global i32 0
@ACS_URCORNER = global i32 0
@ACS_LLCORNER = global i32 0
@ACS_LRCORNER = global i32 0
define i32* @create_newwin(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32* @newwin(i32 %10, i32 %11, i32 %12, i32 %13)
store i32* %14, i32** %9
%15 = load i32*, i32** %9
%16 = load i32, i32* @ACS_VLINE
%17 = load i32, i32* @ACS_VLINE
%18 = load i32, i32* @ACS_HLINE
%19 = load i32, i32* @ACS_HLINE
%20 = load i32, i32* @ACS_ULCORNER
%21 = load i32, i32* @ACS_URCORNER
%22 = load i32, i32* @ACS_LLCORNER
%23 = load i32, i32* @ACS_LRCORNER
%24 = call i32 @wborder(i32* %15, i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21, i32 %22, i32 %23)
%25 = load i32*, i32** %9
ret i32* %25
}

LLVM IR (-O2):
@ACS_VLINE = global i32 0
@ACS_HLINE = global i32 0
@ACS_ULCORNER = global i32 0
@ACS_URCORNER = global i32 0
@ACS_LLCORNER = global i32 0
@ACS_LRCORNER = global i32 0
define i32* @create_newwin(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32* @newwin(i32 %0, i32 %1, i32 %2, i32 %3)
%6 = load i32, i32* @ACS_VLINE
%7 = load i32, i32* @ACS_HLINE
%8 = load i32, i32* @ACS_ULCORNER
%9 = load i32, i32* @ACS_URCORNER
%10 = load i32, i32* @ACS_LLCORNER
%11 = load i32, i32* @ACS_LRCORNER
%12 = tail call i32 @wborder(i32* %5, i32 %6, i32 %6, i32 %7, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11)
ret i32* %5
}