#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 Count();
int /*<<< orphan*/ addfirst(int);
int /*<<< orphan*/ addlast(int);
int /*<<< orphan*/ bubblesort();
int /*<<< orphan*/ initiate(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ removefirst(int);
int /*<<< orphan*/ removelast(int);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ searchbyvalue(int);
int /*<<< orphan*/ traverse();
int main() {
  int x, value, val1, val2;
  printf("WELCOME to my HOMEWORK!\n");
  printf("Press 1 to INITIATE the list\n");
  printf("Press 2 to ADD AN ELEMENT AT THE BEGINNING of the list\n");
  printf("Press 3 to ADD AN ELEMENT AT THE END of the list\n");
  printf("Press 4 to REMOVE AN ELEMENT FOROM THE BEGINNING of the list\n");
  printf("Press 5 to REMOVE AN ELEMENT FOROM THE END of the list\n");
  printf("Press 6 to SORT THE VALUES from the list\n");
  printf("Press 7 to SEARCH AN ELEMENT BY ITS VALUE in the list\n");
  printf("Press 8 to COUNT THE ELEMENTS  of the list\n");
  printf("Press 9 to TERMINATE THE PROGRAM\n");
  while (1) {
    scanf("%d", &x);
    if (x == 9) {
      break;
    }
    if (x == 1) {
      printf("Please insert the first two values of the list:\n");
      printf("value1= ");
      scanf("%d", &val1);
      printf("\nvalue1= ");
      scanf("%d", &val2);
      initiate(val1, val2);
      traverse();
    }
    if (x == 2) {
      printf(" Please insert the value you want to insert: ");
      scanf("%d", &value);
      addfirst(value);
      traverse();
    }
    if (x == 3) {
      printf(" Please insert the value you want to insert: ");
      scanf("%d", &value);
      addlast(value);
      traverse();
    }
    if (x == 4) {
      removefirst(value);
      traverse();
    }
    if (x == 5) {
      removelast(value);
      traverse();
    }
    if (x == 6) {
      printf(" The sorted values are: ");
      bubblesort();
    }
    if (x == 7) {
      printf(" Please insert the value you want to search for in the list: ");
      scanf("%d", &value);
      searchbyvalue(value);
    }
    if (x == 8) {
      printf("There are %d elements in the list\n", Count());
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf19(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf42(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf60(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf74(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   10b0 <scanf@plt>
cmpl   $0x9,-0x8(%rbp)
jne    126a <main+0xba>
jmp    13e5 <main+0x235>
cmpl   $0x1,-0x8(%rbp)
jne    12d0 <main+0x120>
lea    0xf4e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf72(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf2f(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   10b0 <scanf@plt>
lea    0xf53(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf11(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   10b0 <scanf@plt>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   10d0 <initiate@plt>
mov    $0x0,%al
call   1070 <traverse@plt>
cmpl   $0x2,-0x8(%rbp)
jne    1307 <main+0x157>
lea    0xf23(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   10b0 <scanf@plt>
mov    -0xc(%rbp),%edi
call   1030 <addfirst@plt>
mov    $0x0,%al
call   1070 <traverse@plt>
cmpl   $0x3,-0x8(%rbp)
jne    133e <main+0x18e>
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xea0(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   10b0 <scanf@plt>
mov    -0xc(%rbp),%edi
call   1050 <addlast@plt>
mov    $0x0,%al
call   1070 <traverse@plt>
cmpl   $0x4,-0x8(%rbp)
jne    1357 <main+0x1a7>
mov    -0xc(%rbp),%edi
call   1040 <removefirst@plt>
mov    $0x0,%al
call   1070 <traverse@plt>
cmpl   $0x5,-0x8(%rbp)
jne    1370 <main+0x1c0>
mov    -0xc(%rbp),%edi
call   1090 <removelast@plt>
mov    $0x0,%al
call   1070 <traverse@plt>
cmpl   $0x6,-0x8(%rbp)
jne    138f <main+0x1df>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   10c0 <bubblesort@plt>
cmpl   $0x7,-0x8(%rbp)
jne    13bf <main+0x20f>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe18(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   10b0 <scanf@plt>
mov    -0xc(%rbp),%edi
call   10a0 <searchbyvalue@plt>
cmpl   $0x8,-0x8(%rbp)
jne    13e0 <main+0x230>
mov    $0x0,%al
call   1080 <Count@plt>
mov    %eax,%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    124b <main+0x9b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xee0(%rip),%rdi
call   1040 <puts@plt>
lea    0xeec(%rip),%rdi
call   1040 <puts@plt>
lea    0xefd(%rip),%rdi
call   1040 <puts@plt>
lea    0xf28(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4d(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7e(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa9(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc6(%rip),%rdi
call   1040 <puts@plt>
lea    0xff0(%rip),%rdi
call   1040 <puts@plt>
lea    0x100f(%rip),%rdi
call   1040 <puts@plt>
lea    0xdb3(%rip),%rbx
lea    0x8(%rsp),%r14
lea    0xdb4(%rip),%r12
lea    0xc(%rsp),%r13
lea    0xdef(%rip),%r15
lea    0xe26(%rip),%rbp
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   10c0 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    $0x1,%eax
je     12d0 <main+0x110>
cmp    $0x9,%eax
je     1436 <main+0x276>
cmp    $0x2,%eax
je     1333 <main+0x173>
cmp    $0x3,%eax
je     1365 <main+0x1a5>
cmp    $0x4,%eax
je     1397 <main+0x1d7>
cmp    $0x5,%eax
je     13b4 <main+0x1f4>
cmp    $0x6,%eax
je     13d1 <main+0x211>
cmp    $0x7,%eax
je     13f3 <main+0x233>
cmp    $0x8,%eax
jne    1270 <main+0xb0>
jmp    141e <main+0x25e>
nopl   (%rax)
lea    0xf9a(%rip),%rdi
call   1040 <puts@plt>
lea    0xd21(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
lea    0x14(%rsp),%rsi
call   10c0 <scanf@plt>
lea    0xd05(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
lea    0x10(%rsp),%rsi
call   10c0 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
call   10e0 <initiate@plt>
xor    %eax,%eax
call   1080 <traverse@plt>
mov    0x8(%rsp),%eax
cmp    $0x2,%eax
jne    1296 <main+0xd6>
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   10c0 <scanf@plt>
mov    0xc(%rsp),%edi
call   1030 <addfirst@plt>
xor    %eax,%eax
call   1080 <traverse@plt>
mov    0x8(%rsp),%eax
cmp    $0x3,%eax
jne    129f <main+0xdf>
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   10c0 <scanf@plt>
mov    0xc(%rsp),%edi
call   1060 <addlast@plt>
xor    %eax,%eax
call   1080 <traverse@plt>
mov    0x8(%rsp),%eax
cmp    $0x4,%eax
jne    12a8 <main+0xe8>
mov    0xc(%rsp),%edi
call   1050 <removefirst@plt>
xor    %eax,%eax
call   1080 <traverse@plt>
mov    0x8(%rsp),%eax
cmp    $0x5,%eax
jne    12b1 <main+0xf1>
mov    0xc(%rsp),%edi
call   10a0 <removelast@plt>
xor    %eax,%eax
call   1080 <traverse@plt>
mov    0x8(%rsp),%eax
cmp    $0x6,%eax
jne    12ba <main+0xfa>
lea    0xc63(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10d0 <bubblesort@plt>
mov    0x8(%rsp),%eax
cmp    $0x7,%eax
jne    12c3 <main+0x103>
mov    %r15,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   10c0 <scanf@plt>
mov    0xc(%rsp),%edi
call   10b0 <searchbyvalue@plt>
mov    0x8(%rsp),%eax
cmp    $0x8,%eax
jne    1270 <main+0xb0>
xor    %eax,%eax
call   1090 <Count@plt>
mov    %rbp,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1270 <main+0xb0>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"WELCOME to my HOMEWORK!\0A\00"
@.str.1 = [30 x i8] c"Press 1 to INITIATE the list\0A\00"
@.str.2 = [56 x i8] c"Press 2 to ADD AN ELEMENT AT THE BEGINNING of the list\0A\00"
@.str.3 = [50 x i8] c"Press 3 to ADD AN ELEMENT AT THE END of the list\0A\00"
@.str.4 = [62 x i8] c"Press 4 to REMOVE AN ELEMENT FOROM THE BEGINNING of the list\0A\00"
@.str.5 = [56 x i8] c"Press 5 to REMOVE AN ELEMENT FOROM THE END of the list\0A\00"
@.str.6 = [42 x i8] c"Press 6 to SORT THE VALUES from the list\0A\00"
@.str.7 = [55 x i8] c"Press 7 to SEARCH AN ELEMENT BY ITS VALUE in the list\0A\00"
@.str.8 = [44 x i8] c"Press 8 to COUNT THE ELEMENTS of the list\0A\00"
@.str.9 = [34 x i8] c"Press 9 to TERMINATE THE PROGRAM\0A\00"
@.str.10 = [3 x i8] c"%d\00"
@.str.11 = [49 x i8] c"Please insert the first two values of the list:\0A\00"
@.str.12 = [9 x i8] c"value1= \00"
@.str.13 = [10 x i8] c"\0Avalue1= \00"
@.str.14 = [46 x i8] c" Please insert the value you want to insert: \00"
@.str.15 = [25 x i8] c" The sorted values are: \00"
@.str.16 = [62 x i8] c" Please insert the value you want to search for in the list: \00"
@.str.17 = [35 x i8] c"There are %d elements in the list\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
br label %16
16: ; preds = %0, %86
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %2)
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 9
br i1 %19, label %20, label %21
20: ; preds = %16
br label %87
21: ; preds = %16
%22 = load i32, i32* %2
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %34
24: ; preds = %21
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.11, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %4)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %5)
%30 = load i32, i32* %4
%31 = load i32, i32* %5
%32 = call i32 @initiate(i32 %30, i32 %31)
%33 = call i32 (...) @traverse()
br label %34
34: ; preds = %24, %21
%35 = load i32, i32* %2
%36 = icmp eq i32 %35, 2
br i1 %36, label %37, label %43
37: ; preds = %34
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.14, i64 0, i64 0))
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %3)
%40 = load i32, i32* %3
%41 = call i32 @addfirst(i32 %40)
%42 = call i32 (...) @traverse()
br label %43
43: ; preds = %37, %34
%44 = load i32, i32* %2
%45 = icmp eq i32 %44, 3
br i1 %45, label %46, label %52
46: ; preds = %43
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.14, i64 0, i64 0))
%48 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %3)
%49 = load i32, i32* %3
%50 = call i32 @addlast(i32 %49)
%51 = call i32 (...) @traverse()
br label %52
52: ; preds = %46, %43
%53 = load i32, i32* %2
%54 = icmp eq i32 %53, 4
br i1 %54, label %55, label %59
55: ; preds = %52
%56 = load i32, i32* %3
%57 = call i32 @removefirst(i32 %56)
%58 = call i32 (...) @traverse()
br label %59
59: ; preds = %55, %52
%60 = load i32, i32* %2
%61 = icmp eq i32 %60, 5
br i1 %61, label %62, label %66
62: ; preds = %59
%63 = load i32, i32* %3
%64 = call i32 @removelast(i32 %63)
%65 = call i32 (...) @traverse()
br label %66
66: ; preds = %62, %59
%67 = load i32, i32* %2
%68 = icmp eq i32 %67, 6
br i1 %68, label %69, label %72
69: ; preds = %66
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
%71 = call i32 (...) @bubblesort()
br label %72
72: ; preds = %69, %66
%73 = load i32, i32* %2
%74 = icmp eq i32 %73, 7
br i1 %74, label %75, label %80
75: ; preds = %72
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.16, i64 0, i64 0))
%77 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %3)
%78 = load i32, i32* %3
%79 = call i32 @searchbyvalue(i32 %78)
br label %80
80: ; preds = %75, %72
%81 = load i32, i32* %2
%82 = icmp eq i32 %81, 8
br i1 %82, label %83, label %86
83: ; preds = %80
%84 = call i32 (...) @Count()
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0), i32 %84)
br label %86
86: ; preds = %83, %80
br label %16
87: ; preds = %20
ret i32 0
}

LLVM IR (-O2):
@.str.10 = [3 x i8] c"%d\00"
@.str.12 = [9 x i8] c"value1= \00"
@.str.13 = [10 x i8] c"\0Avalue1= \00"
@.str.14 = [46 x i8] c" Please insert the value you want to insert: \00"
@.str.15 = [25 x i8] c" The sorted values are: \00"
@.str.16 = [62 x i8] c" Please insert the value you want to search for in the list: \00"
@.str.17 = [35 x i8] c"There are %d elements in the list\0A\00"
@str = [24 x i8] c"WELCOME to my HOMEWORK!\00"
@str.18 = [29 x i8] c"Press 1 to INITIATE the list\00"
@str.19 = [55 x i8] c"Press 2 to ADD AN ELEMENT AT THE BEGINNING of the list\00"
@str.20 = [49 x i8] c"Press 3 to ADD AN ELEMENT AT THE END of the list\00"
@str.21 = [61 x i8] c"Press 4 to REMOVE AN ELEMENT FOROM THE BEGINNING of the list\00"
@str.22 = [55 x i8] c"Press 5 to REMOVE AN ELEMENT FOROM THE END of the list\00"
@str.23 = [41 x i8] c"Press 6 to SORT THE VALUES from the list\00"
@str.24 = [54 x i8] c"Press 7 to SEARCH AN ELEMENT BY ITS VALUE in the list\00"
@str.25 = [43 x i8] c"Press 8 to COUNT THE ELEMENTS of the list\00"
@str.26 = [33 x i8] c"Press 9 to TERMINATE THE PROGRAM\00"
@str.27 = [48 x i8] c"Please insert the first two values of the list:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.18, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.19, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.20, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.21, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.22, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.23, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.24, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.25, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.26, i64 0, i64 0))
br label %19
19: ; preds = %91, %0
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %1)
%21 = load i32, i32* %1
switch i32 %21, label %33 [
i32 9, label %92
i32 1, label %22
]
22: ; preds = %19
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.27, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %3)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %4)
%28 = load i32, i32* %3
%29 = load i32, i32* %4
%30 = call i32 @initiate(i32 %28, i32 %29)
%31 = call i32 (...) @traverse()
%32 = load i32, i32* %1
br label %33
33: ; preds = %19, %22
%34 = phi i32 [ %21, %19 ], [ %32, %22 ]
%35 = icmp eq i32 %34, 2
br i1 %35, label %36, label %43
36: ; preds = %33
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.14, i64 0, i64 0))
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %2)
%39 = load i32, i32* %2
%40 = call i32 @addfirst(i32 %39)
%41 = call i32 (...) @traverse()
%42 = load i32, i32* %1
br label %43
43: ; preds = %36, %33
%44 = phi i32 [ %42, %36 ], [ %34, %33 ]
%45 = icmp eq i32 %44, 3
br i1 %45, label %46, label %53
46: ; preds = %43
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.14, i64 0, i64 0))
%48 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %2)
%49 = load i32, i32* %2
%50 = call i32 @addlast(i32 %49)
%51 = call i32 (...) @traverse()
%52 = load i32, i32* %1
br label %53
53: ; preds = %46, %43
%54 = phi i32 [ %52, %46 ], [ %44, %43 ]
%55 = icmp eq i32 %54, 4
br i1 %55, label %56, label %61
56: ; preds = %53
%57 = load i32, i32* %2
%58 = call i32 @removefirst(i32 %57)
%59 = call i32 (...) @traverse()
%60 = load i32, i32* %1
br label %61
61: ; preds = %56, %53
%62 = phi i32 [ %60, %56 ], [ %54, %53 ]
%63 = icmp eq i32 %62, 5
br i1 %63, label %64, label %69
64: ; preds = %61
%65 = load i32, i32* %2
%66 = call i32 @removelast(i32 %65)
%67 = call i32 (...) @traverse()
%68 = load i32, i32* %1
br label %69
69: ; preds = %64, %61
%70 = phi i32 [ %68, %64 ], [ %62, %61 ]
%71 = icmp eq i32 %70, 6
br i1 %71, label %72, label %76
72: ; preds = %69
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
%74 = call i32 (...) @bubblesort()
%75 = load i32, i32* %1
br label %76
76: ; preds = %72, %69
%77 = phi i32 [ %75, %72 ], [ %70, %69 ]
%78 = icmp eq i32 %77, 7
br i1 %78, label %79, label %85
79: ; preds = %76
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.16, i64 0, i64 0))
%81 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %2)
%82 = load i32, i32* %2
%83 = call i32 @searchbyvalue(i32 %82)
%84 = load i32, i32* %1
br label %85
85: ; preds = %79, %76
%86 = phi i32 [ %84, %79 ], [ %77, %76 ]
%87 = icmp eq i32 %86, 8
br i1 %87, label %88, label %91
88: ; preds = %85
%89 = call i32 (...) @Count()
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0), i32 %89)
br label %91
91: ; preds = %88, %85
br label %19
92: ; preds = %19
ret i32 0
}