#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 *, ...);
void printUserMenu(void) {
  printf("################################################\n");
  printf("# Add element to beginning ***************** %c #\n", 'B');
  printf("# Add element to end *********************** %c #\n", 'E');
  printf("# Print the entire list ******************** %c #\n", 'P');
  printf("# Delete an element ************************ %c #\n", 'D');
  printf("# Find an element ************************** %c #\n", 'F');
  printf("# Add element after another element ******** %c #\n", 'Z');
  printf("# Add element before another element ******* %c #\n", 'Z');
  printf("# Sort list ******************************** %c #\n", 'Z');
  printf("# Write list to file *********************** %c #\n", 'Z');
  printf("# Read list from file ********************** %c #\n", 'Z');
  printf("# Close the application ******************** %c #\n", 'Z');
  printf("################################################\n\n");
  printf("Enter your command:\t");
}


x86 assembly (clang, -O0):
<printUserMenu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
mov    $0x42,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf29(%rip),%rdi
mov    $0x45,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf49(%rip),%rdi
mov    $0x50,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf69(%rip),%rdi
mov    $0x44,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf89(%rip),%rdi
mov    $0x46,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa9(%rip),%rdi
mov    $0x5a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc9(%rip),%rdi
mov    $0x5a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe9(%rip),%rdi
mov    $0x5a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1009(%rip),%rdi
mov    $0x5a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1029(%rip),%rdi
mov    $0x5a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1049(%rip),%rdi
mov    $0x5a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1069(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x108e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUserMenu>:
push   %rax
lea    0x111e(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x42,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
mov    $0x45,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x50,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf2c(%rip),%rdi
mov    $0x44,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf4c(%rip),%rdi
mov    $0x46,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf6c(%rip),%rdi
mov    $0x5a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf8c(%rip),%rdi
mov    $0x5a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfac(%rip),%rdi
mov    $0x5a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfcc(%rip),%rdi
mov    $0x5a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfec(%rip),%rdi
mov    $0x5a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x100c(%rip),%rdi
mov    $0x5a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1072(%rip),%rdi
call   1030 <puts@plt>
lea    0x1020(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"################################################\0A\00"
@.str.1 = [51 x i8] c"# Add element to beginning ***************** %c #\0A\00"
@.str.2 = [51 x i8] c"# Add element to end *********************** %c #\0A\00"
@.str.3 = [51 x i8] c"# Print the entire list ******************** %c #\0A\00"
@.str.4 = [51 x i8] c"# Delete an element ************************ %c #\0A\00"
@.str.5 = [51 x i8] c"# Find an element ************************** %c #\0A\00"
@.str.6 = [51 x i8] c"# Add element after another element ******** %c #\0A\00"
@.str.7 = [51 x i8] c"# Add element before another element ******* %c #\0A\00"
@.str.8 = [51 x i8] c"# Sort list ******************************** %c #\0A\00"
@.str.9 = [51 x i8] c"# Write list to file *********************** %c #\0A\00"
@.str.10 = [51 x i8] c"# Read list from file ********************** %c #\0A\00"
@.str.11 = [51 x i8] c"# Close the application ******************** %c #\0A\00"
@.str.12 = [51 x i8] c"################################################\0A\0A\00"
@.str.13 = [21 x i8] c"Enter your command:\09\00"
define void @printUserMenu() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 66)
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i32 69)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i32 80)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0), i32 68)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), i32 70)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0), i32 90)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0), i32 90)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0), i32 90)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 90)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.10, i64 0, i64 0), i32 90)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.11, i64 0, i64 0), i32 90)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [51 x i8] c"# Add element to beginning ***************** %c #\0A\00"
@.str.2 = [51 x i8] c"# Add element to end *********************** %c #\0A\00"
@.str.3 = [51 x i8] c"# Print the entire list ******************** %c #\0A\00"
@.str.4 = [51 x i8] c"# Delete an element ************************ %c #\0A\00"
@.str.5 = [51 x i8] c"# Find an element ************************** %c #\0A\00"
@.str.6 = [51 x i8] c"# Add element after another element ******** %c #\0A\00"
@.str.7 = [51 x i8] c"# Add element before another element ******* %c #\0A\00"
@.str.8 = [51 x i8] c"# Sort list ******************************** %c #\0A\00"
@.str.9 = [51 x i8] c"# Write list to file *********************** %c #\0A\00"
@.str.10 = [51 x i8] c"# Read list from file ********************** %c #\0A\00"
@.str.11 = [51 x i8] c"# Close the application ******************** %c #\0A\00"
@.str.13 = [21 x i8] c"Enter your command:\09\00"
@str = [49 x i8] c"################################################\00"
@str.14 = [50 x i8] c"################################################\0A\00"
define void @printUserMenu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 66)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i32 69)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i32 80)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0), i32 68)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), i32 70)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0), i32 90)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0), i32 90)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0), i32 90)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 90)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.10, i64 0, i64 0), i32 90)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.11, i64 0, i64 0), i32 90)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.14, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
ret void
}