#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*/ COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ *newwin(int, int, int, int);
int /*<<< orphan*/ wborder(int /*<<< orphan*/ *, char, char, char, char, char,
                           char, char, char);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
WINDOW *create_side(int h, int w, int y, int x) {
  WINDOW *win;
  attron(COLOR_PAIR(1));
  win = newwin(h, w, y, x);
  wborder(win, '#', '#', '#', '#', '#', '#', '#', '#');
  wrefresh(win);
  attroff(COLOR_PAIR(1));
  return win;
}


x86 assembly (clang, -O0):
<create_side>:
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    $0x1,%edi
call   1080 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1060 <newwin@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x23,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x23,(%rsp)
movl   $0x23,0x8(%rsp)
movl   $0x23,0x10(%rsp)
call   1040 <wborder@plt>
mov    -0x18(%rbp),%rdi
call   1050 <wrefresh@plt>
mov    $0x1,%edi
call   1080 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_side>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x1,%edi
call   1080 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1060 <newwin@plt>
mov    %rax,%rbx
sub    $0x8,%rsp
mov    %rax,%rdi
mov    $0x23,%esi
mov    $0x23,%edx
mov    $0x23,%ecx
mov    $0x23,%r8d
mov    $0x23,%r9d
push   $0x23
push   $0x23
push   $0x23
call   1040 <wborder@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
call   1050 <wrefresh@plt>
mov    $0x1,%edi
call   1080 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32* @create_side(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 = call i32 @COLOR_PAIR(i32 1)
%11 = call i32 @attron(i32 %10)
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = call i32* @newwin(i32 %12, i32 %13, i32 %14, i32 %15)
store i32* %16, i32** %9
%17 = load i32*, i32** %9
%18 = call i32 @wborder(i32* %17, i8 signext 35, i8 signext 35, i8 signext 35, i8 signext 35, i8 signext 35, i8 signext 35, i8 signext 35, i8 signext 35)
%19 = load i32*, i32** %9
%20 = call i32 @wrefresh(i32* %19)
%21 = call i32 @COLOR_PAIR(i32 1)
%22 = call i32 @attroff(i32 %21)
%23 = load i32*, i32** %9
ret i32* %23
}

LLVM IR (-O2):
define i32* @create_side(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @COLOR_PAIR(i32 1)
%6 = tail call i32 @attron(i32 %5)
%7 = tail call i32* @newwin(i32 %0, i32 %1, i32 %2, i32 %3)
%8 = tail call i32 @wborder(i32* %7, i8 signext 35, i8 signext 35, i8 signext 35, i8 signext 35, i8 signext 35, i8 signext 35, i8 signext 35, i8 signext 35)
%9 = tail call i32 @wrefresh(i32* %7)
%10 = tail call i32 @COLOR_PAIR(i32 1)
%11 = tail call i32 @attroff(i32 %10)
ret i32* %7
}