#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 queue {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
struct queue *destroy_queue(struct queue *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
struct queue *init_queue(int);
int insert_at_rear(struct queue *, int);
int peek(struct queue *);
int /*<<< orphan*/ print_queue(struct queue *);
int /*<<< orphan*/ printf(char *, ...);
int remove_from_front(struct queue *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  printf("\nQueue\n\n");
  int option;
  struct queue *q = NULL;
  while (1) {
    printf("\nOptions:\n");
    printf("1. Initialize queue \n");
    printf("2. Push data \n");
    printf("3. Pop data \n");
    printf("4. Peek\n");
    printf("5. Destroy queue\n");
    printf("6. Print queue contents\n");
    printf("7. Exit\n");
    printf("\n\n");
    printf("Enter the option number: ");
    scanf("%d", &option);
    int data, position, ret;
    switch (option) {
    case 1:
      if (q) {
        printf("Queue already exists\n");
        continue;
      }
      printf("Enter the size of the queue: ");
      scanf(" %d", &data);
      q = init_queue(data);
      if (!q) {
        printf("Not enough memory");
        exit(EXIT_FAILURE);
      }
      printf("Created a queue\n");
      break;
    case 2:
      printf("Enter data to be pushed: ");
      scanf("%d", &data);
      ret = insert_at_rear(q, data);
      if (ret == -1)
        printf("queue if full\n");
      break;
    case 3:
      data = remove_from_front(q);
      printf("Popped Value: %d", data);
      break;
    case 4:
      data = peek(q);
      printf("Value at the front of the queue: %d", data);
      break;
    case 5:
      q = destroy_queue(q);
      printf("Destroyed the queue\n");
      break;
    case 6:
      print_queue(q);
      break;
    case 7:
      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    0xe76(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movq   $0x0,-0x10(%rbp)
lea    0xe69(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x29(%rbp)
call   1060 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe60(%rip),%rdi
call   1060 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe67(%rip),%rdi
call   1060 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe67(%rip),%rdi
call   1060 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe66(%rip),%rdi
call   1060 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe60(%rip),%rdi
call   1060 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe63(%rip),%rdi
call   1060 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe6d(%rip),%rdi
call   1060 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xde9(%rip),%rdi
call   1060 <printf@plt>
mov    -0x29(%rbp),%al
lea    0xe58(%rip),%rdi
call   1060 <printf@plt>
lea    0xf18(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1080 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x6,%eax
ja     13d2 <main+0x242>
mov    -0x28(%rbp),%rax
lea    0xd83(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpq   $0x0,-0x10(%rbp)
je     12a4 <main+0x114>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    11b5 <main+0x25>
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xeb2(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1080 <scanf@plt>
mov    -0x14(%rbp),%edi
call   1030 <init_queue@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    12f5 <main+0x165>
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2cf2(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13e0 <main+0x250>
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe4f(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1080 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <insert_at_rear@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    134d <main+0x1bd>
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13e0 <main+0x250>
mov    -0x10(%rbp),%rdi
call   1070 <remove_from_front@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13e0 <main+0x250>
mov    -0x10(%rbp),%rdi
call   1050 <peek@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13e0 <main+0x250>
mov    -0x10(%rbp),%rdi
call   1090 <destroy_queue@plt>
mov    %rax,-0x10(%rbp)
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13e0 <main+0x250>
mov    -0x10(%rbp),%rdi
call   10b0 <print_queue@plt>
jmp    13e0 <main+0x250>
mov    0x2c0d(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
lea    0xdab(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    11b5 <main+0x25>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xf03(%rip),%rdi
call   1060 <puts@plt>
lea    0xefd(%rip),%r12
lea    0xe57(%rip),%r13
lea    0xee6(%rip),%rbx
lea    0x4(%rsp),%rbp
lea    0xe28(%rip),%r15
xor    %r14d,%r14d
jmp    11f0 <main+0x50>
mov    %r14,%rdi
call   10c0 <print_queue@plt>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xec6(%rip),%rdi
call   1060 <puts@plt>
lea    0xec4(%rip),%rdi
call   1060 <puts@plt>
lea    0xecd(%rip),%rdi
call   1060 <puts@plt>
lea    0xecf(%rip),%rdi
call   1060 <puts@plt>
lea    0xed0(%rip),%rdi
call   1060 <puts@plt>
lea    0xecc(%rip),%rdi
call   1060 <puts@plt>
lea    0xed1(%rip),%rdi
call   1060 <puts@plt>
lea    0xedd(%rip),%rdi
call   1060 <puts@plt>
mov    %r12,%rdi
call   1060 <puts@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1090 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x6,%eax
ja     129c <main+0xfc>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
test   %r14,%r14
je     133b <main+0x19b>
lea    0xed0(%rip),%rdi
call   1060 <puts@plt>
jmp    11f0 <main+0x50>
lea    0xed4(%rip),%rdi
call   1060 <puts@plt>
jmp    11f0 <main+0x50>
lea    0xdb2(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
mov    %rsp,%rsi
call   1090 <scanf@plt>
mov    (%rsp),%esi
mov    %r14,%rdi
call   1040 <insert_at_rear@plt>
cmp    $0xffffffff,%eax
jne    11f0 <main+0x50>
lea    0xe63(%rip),%rdi
call   1060 <puts@plt>
jmp    11f0 <main+0x50>
mov    %r14,%rdi
call   1080 <remove_from_front@plt>
mov    %eax,(%rsp)
lea    0xd83(%rip),%rdi
jmp    1311 <main+0x171>
mov    %r14,%rdi
call   1050 <peek@plt>
mov    %eax,(%rsp)
lea    0xd80(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    11f0 <main+0x50>
mov    %r14,%rdi
call   10a0 <destroy_queue@plt>
mov    %rax,%r14
lea    0xdff(%rip),%rdi
call   1060 <puts@plt>
jmp    11f0 <main+0x50>
lea    0xcf4(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd61(%rip),%rdi
mov    %rsp,%rsi
call   1090 <scanf@plt>
mov    (%rsp),%edi
call   1030 <init_queue@plt>
test   %rax,%rax
je     1387 <main+0x1e7>
mov    %rax,%r14
lea    0xde3(%rip),%rdi
call   1060 <puts@plt>
jmp    11f0 <main+0x50>
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
lea    0xcc6(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2c44(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
%struct.queue = type { i32 }
@.str = [9 x i8] c"\0AQueue\0A\0A\00"
@.str.1 = [11 x i8] c"\0AOptions:\0A\00"
@.str.2 = [22 x i8] c"1. Initialize queue \0A\00"
@.str.3 = [15 x i8] c"2. Push data \0A\00"
@.str.4 = [14 x i8] c"3. Pop data \0A\00"
@.str.5 = [9 x i8] c"4. Peek\0A\00"
@.str.6 = [18 x i8] c"5. Destroy queue\0A\00"
@.str.7 = [25 x i8] c"6. Print queue contents\0A\00"
@.str.8 = [9 x i8] c"7. Exit\0A\00"
@.str.9 = [3 x i8] c"\0A\0A\00"
@.str.10 = [26 x i8] c"Enter the option number: \00"
@.str.11 = [3 x i8] c"%d\00"
@.str.12 = [22 x i8] c"Queue already exists\0A\00"
@.str.13 = [30 x i8] c"Enter the size of the queue: \00"
@.str.14 = [4 x i8] c" %d\00"
@.str.15 = [18 x i8] c"Not enough memory\00"
@EXIT_FAILURE = global i32 0
@.str.16 = [17 x i8] c"Created a queue\0A\00"
@.str.17 = [26 x i8] c"Enter data to be pushed: \00"
@.str.18 = [15 x i8] c"queue if full\0A\00"
@.str.19 = [17 x i8] c"Popped Value: %d\00"
@.str.20 = [36 x i8] c"Value at the front of the queue: %d\00"
@.str.21 = [21 x i8] c"Destroyed the queue\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.22 = [16 x i8] c"Invalid Option\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.queue*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store %struct.queue* null, %struct.queue** %3
br label %8
8: ; preds = %0, %24, %72
%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 ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %2)
%20 = load i32, i32* %2
switch i32 %20, label %70 [
i32 1, label %21
i32 2, label %39
i32 3, label %50
i32 4, label %55
i32 5, label %60
i32 6, label %64
i32 7, label %67
]
21: ; preds = %8
%22 = load %struct.queue*, %struct.queue** %3
%23 = icmp ne %struct.queue* %22, null
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
br label %8
26: ; preds = %21
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
%28 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32* %4)
%29 = load i32, i32* %4
%30 = call %struct.queue* @init_queue(i32 %29)
store %struct.queue* %30, %struct.queue** %3
%31 = load %struct.queue*, %struct.queue** %3
%32 = icmp ne %struct.queue* %31, null
br i1 %32, label %37, label %33
33: ; preds = %26
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0))
%35 = load i32, i32* @EXIT_FAILURE
%36 = call i32 @exit(i32 %35)
unreachable
37: ; preds = %26
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0))
br label %72
39: ; preds = %8
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.17, i64 0, i64 0))
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %4)
%42 = load %struct.queue*, %struct.queue** %3
%43 = load i32, i32* %4
%44 = call i32 @insert_at_rear(%struct.queue* %42, i32 %43)
store i32 %44, i32* %6
%45 = load i32, i32* %6
%46 = icmp eq i32 %45, -1
br i1 %46, label %47, label %49
47: ; preds = %39
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0))
br label %49
49: ; preds = %47, %39
br label %72
50: ; preds = %8
%51 = load %struct.queue*, %struct.queue** %3
%52 = call i32 @remove_from_front(%struct.queue* %51)
store i32 %52, i32* %4
%53 = load i32, i32* %4
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i32 %53)
br label %72
55: ; preds = %8
%56 = load %struct.queue*, %struct.queue** %3
%57 = call i32 @peek(%struct.queue* %56)
store i32 %57, i32* %4
%58 = load i32, i32* %4
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0), i32 %58)
br label %72
60: ; preds = %8
%61 = load %struct.queue*, %struct.queue** %3
%62 = call %struct.queue* @destroy_queue(%struct.queue* %61)
store %struct.queue* %62, %struct.queue** %3
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0))
br label %72
64: ; preds = %8
%65 = load %struct.queue*, %struct.queue** %3
%66 = call i32 @print_queue(%struct.queue* %65)
br label %72
67: ; preds = %8
%68 = load i32, i32* @EXIT_SUCCESS
%69 = call i32 @exit(i32 %68)
unreachable
70: ; preds = %8
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.22, i64 0, i64 0))
br label %72
72: ; preds = %70, %64, %60, %55, %50, %49, %37
br label %8
}

LLVM IR (-O2):
%struct.queue = type { i32 }
@.str.10 = [26 x i8] c"Enter the option number: \00"
@.str.11 = [3 x i8] c"%d\00"
@.str.13 = [30 x i8] c"Enter the size of the queue: \00"
@.str.14 = [4 x i8] c" %d\00"
@.str.15 = [18 x i8] c"Not enough memory\00"
@EXIT_FAILURE = global i32 0
@.str.17 = [26 x i8] c"Enter data to be pushed: \00"
@.str.19 = [17 x i8] c"Popped Value: %d\00"
@.str.20 = [36 x i8] c"Value at the front of the queue: %d\00"
@EXIT_SUCCESS = global i32 0
@str = [8 x i8] c"\0AQueue\0A\00"
@str.23 = [10 x i8] c"\0AOptions:\00"
@str.24 = [21 x i8] c"1. Initialize queue \00"
@str.25 = [14 x i8] c"2. Push data \00"
@str.26 = [13 x i8] c"3. Pop data \00"
@str.27 = [8 x i8] c"4. Peek\00"
@str.28 = [17 x i8] c"5. Destroy queue\00"
@str.29 = [24 x i8] c"6. Print queue contents\00"
@str.30 = [8 x i8] c"7. Exit\00"
@str.31 = [2 x i8] c"\0A\00"
@str.32 = [20 x i8] c"Destroyed the queue\00"
@str.33 = [14 x i8] c"queue if full\00"
@str.34 = [16 x i8] c"Created a queue\00"
@str.35 = [21 x i8] c"Queue already exists\00"
@str.36 = [15 x i8] c"Invalid Option\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
br label %6
6: ; preds = %60, %0
%7 = phi %struct.queue* [ null, %0 ], [ %61, %60 ]
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.23, i64 0, i64 0))
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.24, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.25, i64 0, i64 0))
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.26, i64 0, i64 0))
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.27, i64 0, i64 0))
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.28, i64 0, i64 0))
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.29, i64 0, i64 0))
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.30, i64 0, i64 0))
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.31, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %1)
%19 = load i32, i32* %1
switch i32 %19, label %58 [
i32 1, label %20
i32 2, label %36
i32 3, label %44
i32 4, label %47
i32 5, label %50
i32 6, label %53
i32 7, label %55
]
20: ; preds = %6
%21 = icmp eq %struct.queue* %7, null
br i1 %21, label %24, label %22
22: ; preds = %20
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.35, i64 0, i64 0))
br label %60
24: ; preds = %20
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32* %2)
%27 = load i32, i32* %2
%28 = call %struct.queue* @init_queue(i32 %27)
%29 = icmp eq %struct.queue* %28, null
br i1 %29, label %30, label %34
30: ; preds = %24
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0))
%32 = load i32, i32* @EXIT_FAILURE
%33 = call i32 @exit(i32 %32)
unreachable
34: ; preds = %24
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.34, i64 0, i64 0))
br label %60
36: ; preds = %6
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.17, i64 0, i64 0))
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %2)
%39 = load i32, i32* %2
%40 = call i32 @insert_at_rear(%struct.queue* %7, i32 %39)
%41 = icmp eq i32 %40, -1
br i1 %41, label %42, label %60
42: ; preds = %36
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.33, i64 0, i64 0))
br label %60
44: ; preds = %6
%45 = call i32 @remove_from_front(%struct.queue* %7)
store i32 %45, i32* %2
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i32 %45)
br label %60
47: ; preds = %6
%48 = call i32 @peek(%struct.queue* %7)
store i32 %48, i32* %2
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0), i32 %48)
br label %60
50: ; preds = %6
%51 = call %struct.queue* @destroy_queue(%struct.queue* %7)
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.32, i64 0, i64 0))
br label %60
53: ; preds = %6
%54 = call i32 @print_queue(%struct.queue* %7)
br label %60
55: ; preds = %6
%56 = load i32, i32* @EXIT_SUCCESS
%57 = call i32 @exit(i32 %56)
unreachable
58: ; preds = %6
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.36, i64 0, i64 0))
br label %60
60: ; preds = %34, %44, %47, %50, %53, %58, %42, %36, %22
%61 = phi %struct.queue* [ %7, %22 ], [ %7, %58 ], [ %7, %53 ], [ %51, %50 ], [ %7, %47 ], [ %7, %44 ], [ %7, %42 ], [ %7, %36 ], [ %28, %34 ]
br label %6
}