#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int menu(void) {
  int menu_num;
  printf("\n###############################################################\n");
  printf("#                                                             #\n");
  printf("#   1: Enter Your Numbers                                     #\n");
  printf("#   2: Display My Numbers                                     #\n");
  printf("#   3: My Numbers In Order                                    #\n");
  printf("#   4: Check My Numbers                                       #\n");
  printf("#   5: Display Frequency Of Numbers Entered                   #\n");
  printf("#   6: End Program                                            #\n");
  printf("#                                                             #\n");
  printf("###############################################################\n\n");
  printf(" Enter Number Of Chosen Option\n= ");
  scanf("%i", &menu_num);
  printf("\n\n");
  printf("---------------------------------------------------------------\n\n");
  return (menu_num);
}


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf71(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa6(%rip),%rdi
call   1030 <printf@plt>
lea    0xfdb(%rip),%rdi
call   1030 <printf@plt>
lea    0x1010(%rip),%rdi
call   1030 <printf@plt>
lea    0x1045(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
lea    0x106e(%rip),%rdi
call   1030 <printf@plt>
lea    0x10a4(%rip),%rdi
call   1030 <printf@plt>
lea    0x10ba(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0x1085(%rip),%rdi
call   1030 <printf@plt>
lea    0x10a1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
push   %rbx
sub    $0x10,%rsp
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0x109e(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf43(%rip),%rdi
call   1030 <puts@plt>
lea    0xf77(%rip),%rdi
call   1030 <puts@plt>
lea    0xfab(%rip),%rdi
call   1030 <puts@plt>
lea    0xfdf(%rip),%rdi
call   1030 <puts@plt>
lea    0x1013(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x107f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe4d(%rip),%rdi
call   1040 <printf@plt>
lea    0xe63(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
lea    0x1095(%rip),%rdi
call   1030 <puts@plt>
lea    0x108b(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [66 x i8] c"\0A###############################################################\0A\00"
@.str.1 = [65 x i8] c"# #\0A\00"
@.str.2 = [65 x i8] c"# 1: Enter Your Numbers #\0A\00"
@.str.3 = [65 x i8] c"# 2: Display My Numbers #\0A\00"
@.str.4 = [65 x i8] c"# 3: My Numbers In Order #\0A\00"
@.str.5 = [65 x i8] c"# 4: Check My Numbers #\0A\00"
@.str.6 = [65 x i8] c"# 5: Display Frequency Of Numbers Entered #\0A\00"
@.str.7 = [65 x i8] c"# 6: End Program #\0A\00"
@.str.8 = [66 x i8] c"###############################################################\0A\0A\00"
@.str.9 = [34 x i8] c" Enter Number Of Chosen Option\0A= \00"
@.str.10 = [3 x i8] c"%i\00"
@.str.11 = [3 x i8] c"\0A\0A\00"
@.str.12 = [66 x i8] c"---------------------------------------------------------------\0A\0A\00"
define i32 @menu() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %1)
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.12, i64 0, i64 0))
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str.9 = [34 x i8] c" Enter Number Of Chosen Option\0A= \00"
@.str.10 = [3 x i8] c"%i\00"
@str = [65 x i8] c"\0A###############################################################\00"
@str.14 = [64 x i8] c"# 1: Enter Your Numbers #\00"
@str.15 = [64 x i8] c"# 2: Display My Numbers #\00"
@str.16 = [64 x i8] c"# 3: My Numbers In Order #\00"
@str.17 = [64 x i8] c"# 4: Check My Numbers #\00"
@str.18 = [64 x i8] c"# 5: Display Frequency Of Numbers Entered #\00"
@str.19 = [64 x i8] c"# 6: End Program #\00"
@str.20 = [64 x i8] c"# #\00"
@str.21 = [65 x i8] c"###############################################################\0A\00"
@str.22 = [2 x i8] c"\0A\00"
@str.23 = [65 x i8] c"---------------------------------------------------------------\0A\00"
define i32 @menu() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.20, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.19, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.20, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.21, i64 0, i64 0))
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %1)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.22, i64 0, i64 0))
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.23, i64 0, i64 0))
%17 = load i32, i32* %1
ret i32 %17
}