#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*/ dele();
int /*<<< orphan*/ insert();
int /*<<< orphan*/ menu();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i = 1, choice;
  do {
    menu();
    printf("\nenter Your choice:");
    scanf("%d", &choice);
    if (choice == 1) {
      insert();
    } else if (choice == 2) {
      dele();
    } else
      i = 0;
  } while (i);
  printf("\n\nProgram Ends\n\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <menu@plt>
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
lea    0xe94(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1060 <scanf@plt>
cmpl   $0x1,-0xc(%rbp)
jne    119f <main+0x4f>
mov    $0x0,%al
call   1070 <insert@plt>
jmp    11c1 <main+0x71>
cmpl   $0x2,-0xc(%rbp)
jne    11b5 <main+0x65>
mov    $0x0,%al
call   1050 <dele@plt>
jmp    11bc <main+0x6c>
movl   $0x0,-0x8(%rbp)
jmp    11c1 <main+0x71>
jmp    11c6 <main+0x76>
cmpl   $0x0,-0x8(%rbp)
jne    1166 <main+0x16>
lea    0xe40(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xe90(%rip),%r14
lea    0xe9d(%rip),%r15
lea    0xc(%rsp),%rbx
jmp    1187 <main+0x27>
xchg   %ax,%ax
xor    %eax,%eax
call   1060 <dele@plt>
xor    %eax,%eax
call   1040 <menu@plt>
mov    %r14,%rdi
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1070 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
je     1180 <main+0x20>
cmp    $0x1,%eax
jne    11b8 <main+0x58>
xor    %eax,%eax
call   1080 <insert@plt>
jmp    1187 <main+0x27>
lea    0xe58(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\0Aenter Your choice:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [17 x i8] c"\0A\0AProgram Ends\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %4
4: ; preds = %20, %0
%5 = call i32 (...) @menu()
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %4
%11 = call i32 (...) @insert()
br label %19
12: ; preds = %4
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 (...) @dele()
br label %18
17: ; preds = %12
store i32 0, i32* %2
br label %18
18: ; preds = %17, %15
br label %19
19: ; preds = %18, %10
br label %20
20: ; preds = %19
%21 = load i32, i32* %2
%22 = icmp ne i32 %21, 0
br i1 %22, label %4, label %23
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0Aenter Your choice:\00"
@.str.1 = [3 x i8] c"%d\00"
@str = [16 x i8] c"\0A\0AProgram Ends\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %10, %0
%4 = call i32 (...) @menu()
%5 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
switch i32 %7, label %13 [
i32 1, label %8
i32 2, label %11
]
8: ; preds = %3
%9 = call i32 (...) @insert()
br label %10
10: ; preds = %8, %11
br label %3
11: ; preds = %3
%12 = call i32 (...) @dele()
br label %10
13: ; preds = %3
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}