#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*/ waddstr(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ wattron(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ wbkgd(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ wmove(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
void make_menubar(WINDOW *menubar) {
  wbkgd(menubar, COLOR_PAIR(2));
  wattron(menubar, COLOR_PAIR(3));
  waddstr(menubar, "File");
  wattron(menubar, COLOR_PAIR(3));
  waddstr(menubar, "(a)");
  wmove(menubar, 0, 20);
  wattron(menubar, COLOR_PAIR(3));
  waddstr(menubar, "Help");
  wattron(menubar, COLOR_PAIR(3));
  waddstr(menubar, "(h)");
  wattron(menubar, COLOR_PAIR(3));
}


x86 assembly (clang, -O0):
<make_menubar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x2,%edi
call   1050 <COLOR_PAIR@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
call   1040 <wbkgd@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    $0x3,%edi
call   1050 <COLOR_PAIR@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%esi
call   1060 <wattron@plt>
mov    -0x8(%rbp),%rdi
lea    0xe5f(%rip),%rsi
call   1030 <waddstr@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x3,%edi
call   1050 <COLOR_PAIR@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1060 <wattron@plt>
mov    -0x8(%rbp),%rdi
lea    0xe37(%rip),%rsi
call   1030 <waddstr@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1070 <wmove@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x3,%edi
call   1050 <COLOR_PAIR@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1060 <wattron@plt>
mov    -0x8(%rbp),%rdi
lea    0xdfe(%rip),%rsi
call   1030 <waddstr@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x3,%edi
call   1050 <COLOR_PAIR@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1060 <wattron@plt>
mov    -0x8(%rbp),%rdi
lea    0xdd6(%rip),%rsi
call   1030 <waddstr@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x3,%edi
call   1050 <COLOR_PAIR@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1060 <wattron@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_menubar>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2,%edi
call   1050 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <wbkgd@plt>
mov    $0x3,%edi
call   1050 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <wattron@plt>
lea    0xe7d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <waddstr@plt>
mov    $0x3,%edi
call   1050 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <wattron@plt>
lea    0xe5f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <waddstr@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1070 <wmove@plt>
mov    $0x3,%edi
call   1050 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <wattron@plt>
lea    0xe31(%rip),%rsi
mov    %rbx,%rdi
call   1030 <waddstr@plt>
mov    $0x3,%edi
call   1050 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <wattron@plt>
lea    0xe13(%rip),%rsi
mov    %rbx,%rdi
call   1030 <waddstr@plt>
mov    $0x3,%edi
call   1050 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1060 <wattron@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"File\00"
@.str.1 = [4 x i8] c"(a)\00"
@.str.2 = [5 x i8] c"Help\00"
@.str.3 = [4 x i8] c"(h)\00"
define void @make_menubar(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @COLOR_PAIR(i32 2)
%5 = call i32 @wbkgd(i32* %3, i32 %4)
%6 = load i32*, i32** %2
%7 = call i32 @COLOR_PAIR(i32 3)
%8 = call i32 @wattron(i32* %6, i32 %7)
%9 = load i32*, i32** %2
%10 = call i32 @waddstr(i32* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%11 = load i32*, i32** %2
%12 = call i32 @COLOR_PAIR(i32 3)
%13 = call i32 @wattron(i32* %11, i32 %12)
%14 = load i32*, i32** %2
%15 = call i32 @waddstr(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%16 = load i32*, i32** %2
%17 = call i32 @wmove(i32* %16, i32 0, i32 20)
%18 = load i32*, i32** %2
%19 = call i32 @COLOR_PAIR(i32 3)
%20 = call i32 @wattron(i32* %18, i32 %19)
%21 = load i32*, i32** %2
%22 = call i32 @waddstr(i32* %21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%23 = load i32*, i32** %2
%24 = call i32 @COLOR_PAIR(i32 3)
%25 = call i32 @wattron(i32* %23, i32 %24)
%26 = load i32*, i32** %2
%27 = call i32 @waddstr(i32* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%28 = load i32*, i32** %2
%29 = call i32 @COLOR_PAIR(i32 3)
%30 = call i32 @wattron(i32* %28, i32 %29)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"File\00"
@.str.1 = [4 x i8] c"(a)\00"
@.str.2 = [5 x i8] c"Help\00"
@.str.3 = [4 x i8] c"(h)\00"
define void @make_menubar(i32* %0) {
%2 = tail call i32 @COLOR_PAIR(i32 2)
%3 = tail call i32 @wbkgd(i32* %0, i32 %2)
%4 = tail call i32 @COLOR_PAIR(i32 3)
%5 = tail call i32 @wattron(i32* %0, i32 %4)
%6 = tail call i32 @waddstr(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @COLOR_PAIR(i32 3)
%8 = tail call i32 @wattron(i32* %0, i32 %7)
%9 = tail call i32 @waddstr(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @wmove(i32* %0, i32 0, i32 20)
%11 = tail call i32 @COLOR_PAIR(i32 3)
%12 = tail call i32 @wattron(i32* %0, i32 %11)
%13 = tail call i32 @waddstr(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%14 = tail call i32 @COLOR_PAIR(i32 3)
%15 = tail call i32 @wattron(i32* %0, i32 %14)
%16 = tail call i32 @waddstr(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%17 = tail call i32 @COLOR_PAIR(i32 3)
%18 = tail call i32 @wattron(i32* %0, i32 %17)
ret void
}