#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*/ create();
int /*<<< orphan*/ deletevalue();
int /*<<< orphan*/ display();
int /*<<< orphan*/ insertat();
int /*<<< orphan*/ insertbefore();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
char toupper(int);
int main() {
  int opt;
  int ch;
  do {
    printf("\n**********************");
    printf("\n1. Create ");
    printf("\n2. Display ");
    printf("\n3. Insert at ");
    printf("\n4. Insert before ");
    printf("\n5. delete by value ");
    printf("\n**********************");
    printf("\nEnter choice : ");
    scanf("%d", &opt);
    printf("\n");
    switch (opt) {
    case 1:
      create();
      break;
    case 2:
      display();
      break;
    case 3:
      insertat();
      break;
    case 4:
      insertbefore();
      break;
    case 5:
      deletevalue();
      break;
    }
    printf("\ndo you want to continue : ");
    scanf(" %c", &ch);
  } while (toupper(ch) == 'Y');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7e(%rip),%rdi
mov    %rdi,-0x20(%rbp)
call   1060 <printf@plt>
lea    0xe86(%rip),%rdi
call   1060 <printf@plt>
lea    0xe86(%rip),%rdi
call   1060 <printf@plt>
lea    0xe87(%rip),%rdi
call   1060 <printf@plt>
lea    0xe8a(%rip),%rdi
call   1060 <printf@plt>
lea    0xe91(%rip),%rdi
call   1060 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <printf@plt>
lea    0xe91(%rip),%rdi
call   1060 <printf@plt>
lea    0xe96(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   10a0 <scanf@plt>
lea    0xe89(%rip),%rdi
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x4,%eax
ja     126c <main+0xec>
mov    -0x18(%rbp),%rax
lea    0xdd4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1080 <create@plt>
jmp    126c <main+0xec>
mov    $0x0,%al
call   1050 <display@plt>
jmp    126c <main+0xec>
mov    $0x0,%al
call   1090 <insertat@plt>
jmp    126c <main+0xec>
mov    $0x0,%al
call   1070 <insertbefore@plt>
jmp    126c <main+0xec>
mov    $0x0,%al
call   1040 <deletevalue@plt>
lea    0xe1f(%rip),%rdi
call   1060 <printf@plt>
lea    0xe2f(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0xc(%rbp),%edi
call   1030 <toupper@plt>
movsbl %al,%eax
cmp    $0x59,%eax
je     118f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe72(%rip),%rbx
lea    0x4(%rsp),%r12
lea    0xee2(%rip),%r13
lea    0xef7(%rip),%rbp
mov    %rsp,%r14
lea    0xe41(%rip),%r15
jmp    11f3 <main+0x63>
xor    %eax,%eax
call   1050 <deletevalue@plt>
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1070 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   10b0 <scanf@plt>
mov    (%rsp),%edi
call   1040 <toupper@plt>
cmp    $0x59,%al
jne    12ad <main+0x11d>
mov    %rbx,%rdi
call   1070 <printf@plt>
lea    0xe2a(%rip),%rdi
call   1070 <printf@plt>
lea    0xe2a(%rip),%rdi
call   1070 <printf@plt>
lea    0xe2b(%rip),%rdi
call   1070 <printf@plt>
lea    0xe2e(%rip),%rdi
call   1070 <printf@plt>
lea    0xe35(%rip),%rdi
call   1070 <printf@plt>
mov    %rbx,%rdi
call   1070 <printf@plt>
lea    0xe36(%rip),%rdi
call   1070 <printf@plt>
lea    0xe3b(%rip),%rdi
mov    %r12,%rsi
call   10b0 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x4,%eax
ja     11d0 <main+0x40>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
xor    %eax,%eax
call   1090 <create@plt>
jmp    11d0 <main+0x40>
xor    %eax,%eax
call   1060 <display@plt>
jmp    11d0 <main+0x40>
xor    %eax,%eax
call   10a0 <insertat@plt>
jmp    11d0 <main+0x40>
xor    %eax,%eax
call   1080 <insertbefore@plt>
jmp    11d0 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"\0A**********************\00"
@.str.1 = [12 x i8] c"\0A1. Create \00"
@.str.2 = [13 x i8] c"\0A2. Display \00"
@.str.3 = [15 x i8] c"\0A3. Insert at \00"
@.str.4 = [19 x i8] c"\0A4. Insert before \00"
@.str.5 = [21 x i8] c"\0A5. delete by value \00"
@.str.6 = [17 x i8] c"\0AEnter choice : \00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [28 x i8] c"\0Ado you want to continue : \00"
@.str.10 = [4 x i8] c" %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %29, %0
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %2)
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%15 = load i32, i32* %2
switch i32 %15, label %26 [
i32 1, label %16
i32 2, label %18
i32 3, label %20
i32 4, label %22
i32 5, label %24
]
16: ; preds = %4
%17 = call i32 (...) @create()
br label %26
18: ; preds = %4
%19 = call i32 (...) @display()
br label %26
20: ; preds = %4
%21 = call i32 (...) @insertat()
br label %26
22: ; preds = %4
%23 = call i32 (...) @insertbefore()
br label %26
24: ; preds = %4
%25 = call i32 (...) @deletevalue()
br label %26
26: ; preds = %4, %24, %22, %20, %18, %16
%27 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
%28 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32* %3)
br label %29
29: ; preds = %26
%30 = load i32, i32* %3
%31 = call signext i8 @toupper(i32 %30)
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 89
br i1 %33, label %4, label %34
34: ; preds = %29
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0A**********************\00"
@.str.1 = [12 x i8] c"\0A1. Create \00"
@.str.2 = [13 x i8] c"\0A2. Display \00"
@.str.3 = [15 x i8] c"\0A3. Insert at \00"
@.str.4 = [19 x i8] c"\0A4. Insert before \00"
@.str.5 = [21 x i8] c"\0A5. delete by value \00"
@.str.6 = [17 x i8] c"\0AEnter choice : \00"
@.str.7 = [3 x i8] c"%d\00"
@.str.9 = [28 x i8] c"\0Ado you want to continue : \00"
@.str.10 = [4 x i8] c" %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
br label %5
5: ; preds = %27, %0
%6 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %1)
%15 = call i32 @putchar(i32 10)
%16 = load i32, i32* %1
switch i32 %16, label %27 [
i32 1, label %17
i32 2, label %19
i32 3, label %21
i32 4, label %23
i32 5, label %25
]
17: ; preds = %5
%18 = call i32 (...) @create()
br label %27
19: ; preds = %5
%20 = call i32 (...) @display()
br label %27
21: ; preds = %5
%22 = call i32 (...) @insertat()
br label %27
23: ; preds = %5
%24 = call i32 (...) @insertbefore()
br label %27
25: ; preds = %5
%26 = call i32 (...) @deletevalue()
br label %27
27: ; preds = %5, %25, %23, %21, %19, %17
%28 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
%29 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32* %2)
%30 = load i32, i32* %2
%31 = call signext i8 @toupper(i32 %30)
%32 = icmp eq i8 %31, 89
br i1 %32, label %5, label %33
33: ; preds = %27
ret i32 0
}