#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 */
struct node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ insert_at_head(struct node **, int);
int /*<<< orphan*/ insert_at_position(struct node **, int, int);
int /*<<< orphan*/ insert_at_tail(struct node **, int);
int /*<<< orphan*/ print_linked_list(struct node *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ remove_data(struct node **, int);
int /*<<< orphan*/ remove_node(struct node **, int);
int /*<<< orphan*/ scanf(char *, int *);
int search(struct node *, int);
int main() {
  printf("\nDoubly Linked List\n\n");
  int option;
  struct node *head = NULL;
  while (1) {
    printf("\nOptions:\n");
    printf("1. Insert at head \n");
    printf("2. Insert at tail \n");
    printf("3. Insert at position \n");
    printf("4. Search\n");
    printf("5. Remove data\n");
    printf("6. Remove node\n");
    printf("7. Print Linked List\n");
    printf("8. Exit\n");
    printf("\n\n");
    printf("Enter the option number: ");
    scanf("%d", &option);
    int data, position;
    switch (option) {
    case 1:
      printf("Enter data to be inserted: ");
      scanf("%d", &data);
      insert_at_head(&head, data);
      break;
    case 2:
      printf("Enter data to be inserted: ");
      scanf("%d", &data);
      insert_at_tail(&head, data);
      break;
    case 3:
      printf("Enter data to be inserted:");
      scanf(" %d", &data);
      printf("Enter position");
      scanf("%d", &position);
      insert_at_position(&head, data, position);
      break;
    case 4:
      printf("Enter data to be searched: ");
      scanf("%d", &data);
      int position;
      position = search(head, data);
      printf("position in list : %d", position);
      break;
    case 5:
      printf("Enter data to be removed: ");
      scanf("%d", &data);
      remove_data(&head, data);
      break;
    case 6:
      printf("Enter node number to be removed:");
      scanf("%d", &position);
      remove_node(&head, position);
      break;
    case 7:
      print_linked_list(head);
      break;
    case 8:
      exit(EXIT_SUCCESS);
      break;
    default:
      printf("Invalid Option\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x10(%rbp)
lea    0xe6a(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x29(%rbp)
call   1040 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe66(%rip),%rdi
call   1040 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe6b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe74(%rip),%rdi
call   1040 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe70(%rip),%rdi
call   1040 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xddb(%rip),%rdi
call   1040 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x7,%eax
ja     1410 <main+0x270>
mov    -0x28(%rbp),%rax
lea    0xd64(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea0(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0x14(%rbp),%esi
lea    -0x10(%rbp),%rdi
call   1070 <insert_at_head@plt>
jmp    141e <main+0x27e>
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe71(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0x14(%rbp),%esi
lea    -0x10(%rbp),%rdi
call   1060 <insert_at_tail@plt>
jmp    141e <main+0x27e>
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe41(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   10a0 <scanf@plt>
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe24(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    -0x10(%rbp),%rdi
call   1080 <insert_at_position@plt>
jmp    141e <main+0x27e>
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdf2(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <search@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    141e <main+0x27e>
lea    0xdc0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdaf(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0x14(%rbp),%esi
lea    -0x10(%rbp),%rdi
call   10b0 <remove_data@plt>
jmp    141e <main+0x27e>
lea    0xdac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd80(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0x1c(%rbp),%esi
lea    -0x10(%rbp),%rdi
call   1090 <remove_node@plt>
jmp    141e <main+0x27e>
mov    -0x10(%rbp),%rdi
call   1030 <print_linked_list@plt>
jmp    141e <main+0x27e>
mov    0x2bd7(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
lea    0xd82(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11c5 <main+0x25>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xf29(%rip),%rdi
call   1040 <puts@plt>
movq   $0x0,0x10(%rsp)
lea    0xfad(%rip),%r12
lea    0xf20(%rip),%r13
lea    0xe38(%rip),%rbx
lea    0xec0(%rip),%rbp
lea    0x24(%rsp),%r14
lea    0xe05(%rip),%r15
jmp    1210 <main+0x60>
mov    0x10(%rsp),%rdi
call   1030 <print_linked_list@plt>
nopw   0x0(%rax,%rax,1)
lea    0xeec(%rip),%rdi
call   1040 <puts@plt>
lea    0xeea(%rip),%rdi
call   1040 <puts@plt>
lea    0xef1(%rip),%rdi
call   1040 <puts@plt>
lea    0xef8(%rip),%rdi
call   1040 <puts@plt>
lea    0xf03(%rip),%rdi
call   1040 <puts@plt>
lea    0xf01(%rip),%rdi
call   1040 <puts@plt>
lea    0xf04(%rip),%rdi
call   1040 <puts@plt>
lea    0xf07(%rip),%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   10b0 <scanf@plt>
mov    0x24(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x7,%eax
ja     12d8 <main+0x128>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
lea    0xd89(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0xc(%rsp),%esi
lea    0x10(%rsp),%rdi
call   1080 <insert_at_head@plt>
jmp    1210 <main+0x60>
lea    0xeb0(%rip),%rdi
call   1040 <puts@plt>
jmp    1210 <main+0x60>
lea    0xd4a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0xc(%rsp),%esi
lea    0x10(%rsp),%rdi
call   1070 <insert_at_tail@plt>
jmp    1210 <main+0x60>
lea    0xd38(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd82(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
lea    0xd34(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
lea    0x20(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0xc(%rsp),%esi
mov    0x20(%rsp),%edx
lea    0x10(%rsp),%rdi
call   1090 <insert_at_position@plt>
jmp    1210 <main+0x60>
lea    0xd11(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0x10(%rsp),%rdi
mov    0xc(%rsp),%esi
call   1060 <search@plt>
mov    %eax,0x1c(%rsp)
lea    0xd00(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1210 <main+0x60>
lea    0xd01(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0xc(%rsp),%esi
lea    0x10(%rsp),%rdi
call   10c0 <remove_data@plt>
jmp    1210 <main+0x60>
lea    0xcee(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
lea    0x1c(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0x1c(%rsp),%esi
lea    0x10(%rsp),%rdi
call   10a0 <remove_node@plt>
jmp    1210 <main+0x60>
mov    0x2bd3(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
%struct.node = type { i32 }
@.str = [22 x i8] c"\0ADoubly Linked List\0A\0A\00"
@.str.1 = [11 x i8] c"\0AOptions:\0A\00"
@.str.2 = [20 x i8] c"1. Insert at head \0A\00"
@.str.3 = [20 x i8] c"2. Insert at tail \0A\00"
@.str.4 = [24 x i8] c"3. Insert at position \0A\00"
@.str.5 = [11 x i8] c"4. Search\0A\00"
@.str.6 = [16 x i8] c"5. Remove data\0A\00"
@.str.7 = [16 x i8] c"6. Remove node\0A\00"
@.str.8 = [22 x i8] c"7. Print Linked List\0A\00"
@.str.9 = [9 x i8] c"8. Exit\0A\00"
@.str.10 = [3 x i8] c"\0A\0A\00"
@.str.11 = [26 x i8] c"Enter the option number: \00"
@.str.12 = [3 x i8] c"%d\00"
@.str.13 = [28 x i8] c"Enter data to be inserted: \00"
@.str.14 = [27 x i8] c"Enter data to be inserted:\00"
@.str.15 = [4 x i8] c" %d\00"
@.str.16 = [15 x i8] c"Enter position\00"
@.str.17 = [28 x i8] c"Enter data to be searched: \00"
@.str.18 = [22 x i8] c"position in list : %d\00"
@.str.19 = [27 x i8] c"Enter data to be removed: \00"
@.str.20 = [33 x i8] c"Enter node number to be removed:\00"
@EXIT_SUCCESS = global i32 0
@.str.21 = [16 x i8] c"Invalid Option\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.node*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store %struct.node* null, %struct.node** %3
br label %8
8: ; preds = %0, %66
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %2)
%21 = load i32, i32* %2
switch i32 %21, label %64 [
i32 1, label %22
i32 2, label %27
i32 3, label %32
i32 4, label %40
i32 5, label %48
i32 6, label %53
i32 7, label %58
i32 8, label %61
]
22: ; preds = %8
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %4)
%25 = load i32, i32* %4
%26 = call i32 @insert_at_head(%struct.node** %3, i32 %25)
br label %66
27: ; preds = %8
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %4)
%30 = load i32, i32* %4
%31 = call i32 @insert_at_tail(%struct.node** %3, i32 %30)
br label %66
32: ; preds = %8
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0))
%34 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i32* %4)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0))
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %5)
%37 = load i32, i32* %4
%38 = load i32, i32* %5
%39 = call i32 @insert_at_position(%struct.node** %3, i32 %37, i32 %38)
br label %66
40: ; preds = %8
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.17, i64 0, i64 0))
%42 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %4)
%43 = load %struct.node*, %struct.node** %3
%44 = load i32, i32* %4
%45 = call i32 @search(%struct.node* %43, i32 %44)
store i32 %45, i32* %6
%46 = load i32, i32* %6
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0), i32 %46)
br label %66
48: ; preds = %8
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.19, i64 0, i64 0))
%50 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %4)
%51 = load i32, i32* %4
%52 = call i32 @remove_data(%struct.node** %3, i32 %51)
br label %66
53: ; preds = %8
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.20, i64 0, i64 0))
%55 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %6)
%56 = load i32, i32* %6
%57 = call i32 @remove_node(%struct.node** %3, i32 %56)
br label %66
58: ; preds = %8
%59 = load %struct.node*, %struct.node** %3
%60 = call i32 @print_linked_list(%struct.node* %59)
br label %66
61: ; preds = %8
%62 = load i32, i32* @EXIT_SUCCESS
%63 = call i32 @exit(i32 %62)
unreachable
64: ; preds = %8
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0))
br label %66
66: ; preds = %64, %58, %53, %48, %40, %32, %27, %22
br label %8
}

LLVM IR (-O2):
%struct.node = type { i32 }
@.str.11 = [26 x i8] c"Enter the option number: \00"
@.str.12 = [3 x i8] c"%d\00"
@.str.13 = [28 x i8] c"Enter data to be inserted: \00"
@.str.14 = [27 x i8] c"Enter data to be inserted:\00"
@.str.15 = [4 x i8] c" %d\00"
@.str.16 = [15 x i8] c"Enter position\00"
@.str.17 = [28 x i8] c"Enter data to be searched: \00"
@.str.18 = [22 x i8] c"position in list : %d\00"
@.str.19 = [27 x i8] c"Enter data to be removed: \00"
@.str.20 = [33 x i8] c"Enter node number to be removed:\00"
@EXIT_SUCCESS = global i32 0
@str = [21 x i8] c"\0ADoubly Linked List\0A\00"
@str.22 = [10 x i8] c"\0AOptions:\00"
@str.23 = [19 x i8] c"1. Insert at head \00"
@str.24 = [19 x i8] c"2. Insert at tail \00"
@str.25 = [23 x i8] c"3. Insert at position \00"
@str.26 = [10 x i8] c"4. Search\00"
@str.27 = [15 x i8] c"5. Remove data\00"
@str.28 = [15 x i8] c"6. Remove node\00"
@str.29 = [21 x i8] c"7. Print Linked List\00"
@str.30 = [8 x i8] c"8. Exit\00"
@str.31 = [2 x i8] c"\0A\00"
@str.32 = [15 x i8] c"Invalid Option\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.node*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%7 = bitcast i32* %1 to i8*
%8 = bitcast %struct.node** %2 to i8*
store %struct.node* null, %struct.node** %2
%9 = bitcast i32* %3 to i8*
%10 = bitcast i32* %4 to i8*
br label %11
11: ; preds = %68, %0
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.22, i64 0, i64 0))
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.23, i64 0, i64 0))
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.24, i64 0, i64 0))
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.25, i64 0, i64 0))
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.26, i64 0, i64 0))
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.27, i64 0, i64 0))
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.28, i64 0, i64 0))
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.29, i64 0, i64 0))
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.30, i64 0, i64 0))
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.31, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %1)
%24 = load i32, i32* %1
switch i32 %24, label %66 [
i32 1, label %25
i32 2, label %30
i32 3, label %35
i32 4, label %43
i32 5, label %50
i32 6, label %55
i32 7, label %60
i32 8, label %63
]
25: ; preds = %11
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %3)
%28 = load i32, i32* %3
%29 = call i32 @insert_at_head(%struct.node** %2, i32 %28)
br label %68
30: ; preds = %11
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %3)
%33 = load i32, i32* %3
%34 = call i32 @insert_at_tail(%struct.node** %2, i32 %33)
br label %68
35: ; preds = %11
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0))
%37 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i32* %3)
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0))
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %4)
%40 = load i32, i32* %3
%41 = load i32, i32* %4
%42 = call i32 @insert_at_position(%struct.node** %2, i32 %40, i32 %41)
br label %68
43: ; preds = %11
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.17, i64 0, i64 0))
%45 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %3)
%46 = load %struct.node*, %struct.node** %2
%47 = load i32, i32* %3
%48 = call i32 @search(%struct.node* %46, i32 %47)
store i32 %48, i32* %5
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0), i32 %48)
br label %68
50: ; preds = %11
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.19, i64 0, i64 0))
%52 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %3)
%53 = load i32, i32* %3
%54 = call i32 @remove_data(%struct.node** %2, i32 %53)
br label %68
55: ; preds = %11
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.20, i64 0, i64 0))
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %5)
%58 = load i32, i32* %5
%59 = call i32 @remove_node(%struct.node** %2, i32 %58)
br label %68
60: ; preds = %11
%61 = load %struct.node*, %struct.node** %2
%62 = call i32 @print_linked_list(%struct.node* %61)
br label %68
63: ; preds = %11
%64 = load i32, i32* @EXIT_SUCCESS
%65 = call i32 @exit(i32 %64)
unreachable
66: ; preds = %11
%67 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.32, i64 0, i64 0))
br label %68
68: ; preds = %66, %60, %55, %50, %43, %35, %30, %25
br label %11
}