#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 print_menu() {
  printf("*****************************************************************\n");
  printf("*\t\tWELCOME TO BOOK STORE DATA BASE\t\t\t*\n");
  printf("*\t\t\t\t\t\t\t\t*\n");
  printf("*  Supported operation to perform:\t\t\t\t*\n");
  printf("*\t\t\t\t\t\t\t\t*\n");
  printf("*    1. Add a book to store\t\t\t\t\t*\n");
  printf("*    2. Remove a book from store\t\t\t\t*\n");
  printf("*    3. Total number of books in store\t\t\t\t*\n");
  printf("*    4. Diaplay all books in store\t\t\t\t*\n");
  printf("*    5. Search store\t\t\t\t\t\t*\n");
  printf("*****************************************************************\n");
  printf("\nSelect a option to continue: [1-5] ");
}


x86 assembly (clang, -O0):
<print_menu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf38(%rip),%rdi
call   1030 <printf@plt>
lea    0xf38(%rip),%rdi
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
call   1030 <printf@plt>
lea    0xf49(%rip),%rdi
call   1030 <printf@plt>
lea    0xf60(%rip),%rdi
call   1030 <printf@plt>
lea    0xf7b(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9c(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbe(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_menu>:
push   %r14
push   %rbx
push   %rax
lea    0x100c(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2e(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf16(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf46(%rip),%rdi
call   1030 <puts@plt>
lea    0xf66(%rip),%rdi
call   1030 <puts@plt>
lea    0xf82(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xe53(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"*****************************************************************\0A\00"
@.str.1 = [40 x i8] c"*\09\09WELCOME TO BOOK STORE DATA BASE\09\09\09*\0A\00"
@.str.2 = [12 x i8] c"*\09\09\09\09\09\09\09\09*\0A\00"
@.str.3 = [41 x i8] c"* Supported operation to perform:\09\09\09\09*\0A\00"
@.str.4 = [35 x i8] c"* 1. Add a book to store\09\09\09\09\09*\0A\00"
@.str.5 = [39 x i8] c"* 2. Remove a book from store\09\09\09\09*\0A\00"
@.str.6 = [45 x i8] c"* 3. Total number of books in store\09\09\09\09*\0A\00"
@.str.7 = [41 x i8] c"* 4. Diaplay all books in store\09\09\09\09*\0A\00"
@.str.8 = [29 x i8] c"* 5. Search store\09\09\09\09\09\09*\0A\00"
@.str.9 = [37 x i8] c"\0ASelect a option to continue: [1-5] \00"
define void @print_menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.9 = [37 x i8] c"\0ASelect a option to continue: [1-5] \00"
@str.10 = [39 x i8] c"*\09\09WELCOME TO BOOK STORE DATA BASE\09\09\09*\00"
@str.12 = [40 x i8] c"* Supported operation to perform:\09\09\09\09*\00"
@str.13 = [11 x i8] c"*\09\09\09\09\09\09\09\09*\00"
@str.14 = [34 x i8] c"* 1. Add a book to store\09\09\09\09\09*\00"
@str.15 = [38 x i8] c"* 2. Remove a book from store\09\09\09\09*\00"
@str.16 = [44 x i8] c"* 3. Total number of books in store\09\09\09\09*\00"
@str.17 = [40 x i8] c"* 4. Diaplay all books in store\09\09\09\09*\00"
@str.18 = [28 x i8] c"* 5. Search store\09\09\09\09\09\09*\00"
@str.19 = [66 x i8] c"*****************************************************************\00"
define void @print_menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.19, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.10, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.13, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.12, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.13, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.14, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.15, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.16, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.17, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.18, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.19, i64 0, i64 0))
%12 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
ret void
}