#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 choice_menu() {
  int choice;
  printf("\n***************************\n");
  printf("1 : Print Linklist.\n");
  printf("2 : Print Linklist reverse.\n");
  printf("3 : Add node at start.\n");
  printf("4 : Add node at end.\n");
  printf("5 : Delete node from start.\n");
  printf("6 : Delete node from end.\n");
  printf("7 : Selected delete.\n");
  printf("8 : Match password.\n");
  printf("9 : Add node at n number.\n");
  printf("10 : Check linklist length.\n");
  printf("11 : Save linklist in file.\n");
  printf("12 : Retrive linklist form file.\n");
  printf("***************************");
  printf("\nEnter your choice : ");
  scanf("%d", &choice);
  return choice;
}


x86 assembly (clang, -O0):
<choice_menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
call   1030 <printf@plt>
lea    0xf24(%rip),%rdi
call   1030 <printf@plt>
lea    0xf33(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf46(%rip),%rdi
call   1030 <printf@plt>
lea    0xf55(%rip),%rdi
call   1030 <printf@plt>
lea    0xf66(%rip),%rdi
call   1030 <printf@plt>
lea    0xf77(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9d(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa7(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<choice_menu>:
push   %rax
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf15(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf45(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7b(%rip),%rdi
call   1030 <puts@plt>
lea    0xe46(%rip),%rdi
call   1040 <printf@plt>
lea    0xe20(%rip),%rdi
call   1040 <printf@plt>
lea    0xe2a(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"\0A***************************\0A\00"
@.str.1 = [21 x i8] c"1 : Print Linklist.\0A\00"
@.str.2 = [29 x i8] c"2 : Print Linklist reverse.\0A\00"
@.str.3 = [24 x i8] c"3 : Add node at start.\0A\00"
@.str.4 = [22 x i8] c"4 : Add node at end.\0A\00"
@.str.5 = [29 x i8] c"5 : Delete node from start.\0A\00"
@.str.6 = [27 x i8] c"6 : Delete node from end.\0A\00"
@.str.7 = [22 x i8] c"7 : Selected delete.\0A\00"
@.str.8 = [21 x i8] c"8 : Match password.\0A\00"
@.str.9 = [27 x i8] c"9 : Add node at n number.\0A\00"
@.str.10 = [29 x i8] c"10 : Check linklist length.\0A\00"
@.str.11 = [29 x i8] c"11 : Save linklist in file.\0A\00"
@.str.12 = [34 x i8] c"12 : Retrive linklist form file.\0A\00"
@.str.13 = [28 x i8] c"***************************\00"
@.str.14 = [22 x i8] c"\0AEnter your choice : \00"
@.str.15 = [3 x i8] c"%d\00"
define i32 @choice_menu() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.12, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i32* %1)
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@.str.13 = [28 x i8] c"***************************\00"
@.str.14 = [22 x i8] c"\0AEnter your choice : \00"
@.str.15 = [3 x i8] c"%d\00"
@str = [29 x i8] c"\0A***************************\00"
@str.16 = [20 x i8] c"1 : Print Linklist.\00"
@str.17 = [28 x i8] c"2 : Print Linklist reverse.\00"
@str.18 = [23 x i8] c"3 : Add node at start.\00"
@str.19 = [21 x i8] c"4 : Add node at end.\00"
@str.20 = [28 x i8] c"5 : Delete node from start.\00"
@str.21 = [26 x i8] c"6 : Delete node from end.\00"
@str.22 = [21 x i8] c"7 : Selected delete.\00"
@str.23 = [20 x i8] c"8 : Match password.\00"
@str.24 = [26 x i8] c"9 : Add node at n number.\00"
@str.25 = [28 x i8] c"10 : Check linklist length.\00"
@str.26 = [28 x i8] c"11 : Save linklist in file.\00"
@str.27 = [33 x i8] c"12 : Retrive linklist form file.\00"
define i32 @choice_menu() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.16, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.17, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.18, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.19, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.20, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.21, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.22, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.23, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.24, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%17 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i32* %1)
%19 = load i32, i32* %1
ret i32 %19
}