#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 */

/* Variables and functions */
int /*<<< orphan*/ clear();
char *gettext(char *);
int /*<<< orphan*/ mvaddstr(int, int, char *);
void menu_create(void) {
  clear();
  mvaddstr(3, 30, "TypeRacer v1.0 ");
  mvaddstr(5, 30, gettext("1. Start a Server"));
  mvaddstr(6, 30, gettext("2. Connect to Server"));
  mvaddstr(7, 30, gettext("3. Quit"));
  mvaddstr(13, 30, gettext("Choose: "));
}


x86 assembly (clang, -O0):
<menu_create>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <clear@plt>
mov    $0x3,%edi
mov    $0x1e,%esi
lea    0xeb4(%rip),%rdx
call   1040 <mvaddstr@plt>
lea    0xeb8(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdx
mov    $0x5,%edi
mov    $0x1e,%esi
call   1040 <mvaddstr@plt>
lea    0xeac(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdx
mov    $0x6,%edi
mov    $0x1e,%esi
call   1040 <mvaddstr@plt>
lea    0xea3(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdx
mov    $0x7,%edi
mov    $0x1e,%esi
call   1040 <mvaddstr@plt>
lea    0xe8d(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdx
mov    $0xd,%edi
mov    $0x1e,%esi
call   1040 <mvaddstr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_create>:
push   %rax
xor    %eax,%eax
call   1050 <clear@plt>
lea    0xec1(%rip),%rdx
mov    $0x3,%edi
mov    $0x1e,%esi
call   1040 <mvaddstr@plt>
lea    0xebb(%rip),%rdi
call   1030 <gettext@plt>
mov    $0x5,%edi
mov    $0x1e,%esi
mov    %rax,%rdx
call   1040 <mvaddstr@plt>
lea    0xeaf(%rip),%rdi
call   1030 <gettext@plt>
mov    $0x6,%edi
mov    $0x1e,%esi
mov    %rax,%rdx
call   1040 <mvaddstr@plt>
lea    0xea6(%rip),%rdi
call   1030 <gettext@plt>
mov    $0x7,%edi
mov    $0x1e,%esi
mov    %rax,%rdx
call   1040 <mvaddstr@plt>
lea    0xe90(%rip),%rdi
call   1030 <gettext@plt>
mov    $0xd,%edi
mov    $0x1e,%esi
mov    %rax,%rdx
pop    %rax
jmp    1040 <mvaddstr@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"TypeRacer v1.0 \00"
@.str.1 = [18 x i8] c"1. Start a Server\00"
@.str.2 = [21 x i8] c"2. Connect to Server\00"
@.str.3 = [8 x i8] c"3. Quit\00"
@.str.4 = [9 x i8] c"Choose: \00"
define void @menu_create() {
%1 = call i32 (...) @clear()
%2 = call i32 @mvaddstr(i32 3, i32 30, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i8* @gettext(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @mvaddstr(i32 5, i32 30, i8* %3)
%5 = call i8* @gettext(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @mvaddstr(i32 6, i32 30, i8* %5)
%7 = call i8* @gettext(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @mvaddstr(i32 7, i32 30, i8* %7)
%9 = call i8* @gettext(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @mvaddstr(i32 13, i32 30, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"TypeRacer v1.0 \00"
@.str.1 = [18 x i8] c"1. Start a Server\00"
@.str.2 = [21 x i8] c"2. Connect to Server\00"
@.str.3 = [8 x i8] c"3. Quit\00"
@.str.4 = [9 x i8] c"Choose: \00"
define void @menu_create() {
%1 = tail call i32 (...) @clear()
%2 = tail call i32 @mvaddstr(i32 3, i32 30, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @gettext(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @mvaddstr(i32 5, i32 30, i8* %3)
%5 = tail call i8* @gettext(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @mvaddstr(i32 6, i32 30, i8* %5)
%7 = tail call i8* @gettext(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @mvaddstr(i32 7, i32 30, i8* %7)
%9 = tail call i8* @gettext(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @mvaddstr(i32 13, i32 30, i8* %9)
ret void
}