#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 printMenu(void) {
  printf("###################################\n");
  printf("# Push to stack ********** %d #\n", 1);
  printf("# Pop from stack ********* %d #\n", 2);
  printf("# Print stack ************ %d #\n", 3);
  printf("# Push to queue ********** %d #\n", 4);
  printf("# Pop from queue ********* %d #\n", 5);
  printf("# Print queue ************ %d #\n", 6);
  printf("# Close the application ** %d #\n", 7);
  printf("###################################\n\n");
  printf("Enter your command:\t");
}


x86 assembly (clang, -O0):
<printMenu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf18(%rip),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf26(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf34(%rip),%rdi
mov    $0x5,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf42(%rip),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf50(%rip),%rdi
mov    $0x7,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMenu>:
push   %rax
lea    0xfd4(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf04(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf12(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf67(%rip),%rdi
call   1030 <puts@plt>
lea    0xf22(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"###################################\0A\00"
@.str.1 = [33 x i8] c"# Push to stack ********** %d #\0A\00"
@.str.2 = [33 x i8] c"# Pop from stack ********* %d #\0A\00"
@.str.3 = [33 x i8] c"# Print stack ************ %d #\0A\00"
@.str.4 = [33 x i8] c"# Push to queue ********** %d #\0A\00"
@.str.5 = [33 x i8] c"# Pop from queue ********* %d #\0A\00"
@.str.6 = [33 x i8] c"# Print queue ************ %d #\0A\00"
@.str.7 = [33 x i8] c"# Close the application ** %d #\0A\00"
@.str.8 = [38 x i8] c"###################################\0A\0A\00"
@.str.9 = [21 x i8] c"Enter your command:\09\00"
define void @printMenu() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 2)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i32 7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [33 x i8] c"# Push to stack ********** %d #\0A\00"
@.str.2 = [33 x i8] c"# Pop from stack ********* %d #\0A\00"
@.str.3 = [33 x i8] c"# Print stack ************ %d #\0A\00"
@.str.4 = [33 x i8] c"# Push to queue ********** %d #\0A\00"
@.str.5 = [33 x i8] c"# Pop from queue ********* %d #\0A\00"
@.str.6 = [33 x i8] c"# Print queue ************ %d #\0A\00"
@.str.7 = [33 x i8] c"# Close the application ** %d #\0A\00"
@.str.9 = [21 x i8] c"Enter your command:\09\00"
@str = [36 x i8] c"###################################\00"
@str.10 = [37 x i8] c"###################################\0A\00"
define void @printMenu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 5)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 6)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i32 7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.10, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
ret void
}