#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*/ delete1();
int /*<<< orphan*/ enter();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ found();
int /*<<< orphan*/ found_tel();
int /*<<< orphan*/ init_list();
int /*<<< orphan*/ list();
char menu_select();
int /*<<< orphan*/ system(char *);
int main(void) {
  char choice;
  init_list();
  for (;;) {
    choice = menu_select();
    switch (choice) {
    case 1:
      enter();
      break;
    case 2:
      delete1();
      break;
    case 3:
      list();
      break;
    case 4:
      found();
      break;
    case 5:
      found_tel();
      break;
    case 0: {
      system("clear");
      exit(0);
    }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   10b0 <init_list@plt>
xor    %eax,%eax
call   1060 <menu_select@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5,%eax
ja     1226 <main+0x96>
mov    -0x10(%rbp),%rax
lea    0xe32(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1040 <enter@plt>
jmp    1226 <main+0x96>
mov    $0x0,%al
call   1050 <delete1@plt>
jmp    1226 <main+0x96>
mov    $0x0,%al
call   1070 <list@plt>
jmp    1226 <main+0x96>
mov    $0x0,%al
call   1080 <found@plt>
jmp    1226 <main+0x96>
mov    $0x0,%al
call   1090 <found_tel@plt>
jmp    1226 <main+0x96>
lea    0xdfe(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
jmp    11a6 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   10b0 <init_list@plt>
lea    0xe61(%rip),%rbx
jmp    11b0 <main+0x20>
xor    %eax,%eax
call   1090 <found_tel@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <menu_select@plt>
movsbl %al,%eax
cmp    $0x5,%eax
ja     11b0 <main+0x20>
movslq (%rbx,%rax,4),%rax
add    %rbx,%rax
jmp    *%rax
xor    %eax,%eax
call   1040 <enter@plt>
jmp    11b0 <main+0x20>
xor    %eax,%eax
call   1050 <delete1@plt>
jmp    11b0 <main+0x20>
xor    %eax,%eax
call   1070 <list@plt>
jmp    11b0 <main+0x20>
xor    %eax,%eax
call   1080 <found@plt>
jmp    11b0 <main+0x20>
lea    0xe25(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (...) @init_list()
br label %4
4: ; preds = %21, %0
%5 = call signext i8 (...) @menu_select()
store i8 %5, i8* %2
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
switch i32 %7, label %21 [
i32 1, label %8
i32 2, label %10
i32 3, label %12
i32 4, label %14
i32 5, label %16
i32 0, label %18
]
8: ; preds = %4
%9 = call i32 (...) @enter()
br label %21
10: ; preds = %4
%11 = call i32 (...) @delete1()
br label %21
12: ; preds = %4
%13 = call i32 (...) @list()
br label %21
14: ; preds = %4
%15 = call i32 (...) @found()
br label %21
16: ; preds = %4
%17 = call i32 (...) @found_tel()
br label %21
18: ; preds = %4
%19 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @exit(i32 0)
unreachable
21: ; preds = %4, %16, %14, %12, %10, %8
br label %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define i32 @main() {
%1 = tail call i32 (...) @init_list()
br label %2
2: ; preds = %5, %0
%3 = tail call signext i8 (...) @menu_select()
%4 = sext i8 %3 to i32
switch i32 %4, label %5 [
i32 1, label %6
i32 2, label %8
i32 3, label %10
i32 4, label %12
i32 5, label %14
i32 0, label %16
]
5: ; preds = %2, %14, %12, %10, %8, %6
br label %2
6: ; preds = %2
%7 = tail call i32 (...) @enter()
br label %5
8: ; preds = %2
%9 = tail call i32 (...) @delete1()
br label %5
10: ; preds = %2
%11 = tail call i32 (...) @list()
br label %5
12: ; preds = %2
%13 = tail call i32 (...) @found()
br label %5
14: ; preds = %2
%15 = tail call i32 (...) @found_tel()
br label %5
16: ; preds = %2
%17 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%18 = tail call i32 @exit(i32 0)
unreachable
}