#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*/ input_restricted();
int /*<<< orphan*/ output_restricted();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int choice;
  printf("\n----------Double Ended Queue operations-----------");
  printf("\n1: Input Restricted queue");
  printf("\n2: Output Restricted queue");
  printf("\n-------------------------------------------------");
  printf("\nEnter choice : ");
  scanf("%d", &choice);
  switch (choice) {
  case 1:
    input_restricted();
    break;
  case 2:
    output_restricted();
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
call   1040 <printf@plt>
lea    0xef1(%rip),%rdi
call   1040 <printf@plt>
lea    0xf18(%rip),%rdi
call   1040 <printf@plt>
lea    0xf1d(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     11c0 <main+0x80>
jmp    11af <main+0x6f>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     11cc <main+0x8c>
jmp    11d3 <main+0x93>
mov    $0x0,%al
call   1050 <input_restricted@plt>
jmp    11d3 <main+0x93>
mov    $0x0,%al
call   1030 <output_restricted@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
call   1040 <printf@plt>
lea    0xeef(%rip),%rdi
call   1040 <printf@plt>
lea    0xeff(%rip),%rdi
call   1040 <printf@plt>
lea    0xf26(%rip),%rdi
call   1040 <printf@plt>
lea    0xf2b(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
je     11a5 <main+0x65>
cmp    $0x1,%eax
jne    11ac <main+0x6c>
xor    %eax,%eax
call   1050 <input_restricted@plt>
jmp    11ac <main+0x6c>
xor    %eax,%eax
call   1030 <output_restricted@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"\0A----------Double Ended Queue operations-----------\00"
@.str.1 = [27 x i8] c"\0A1: Input Restricted queue\00"
@.str.2 = [28 x i8] c"\0A2: Output Restricted queue\00"
@.str.3 = [51 x i8] c"\0A-------------------------------------------------\00"
@.str.4 = [17 x i8] c"\0AEnter choice : \00"
@.str.5 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %2
switch i32 %9, label %14 [
i32 1, label %10
i32 2, label %12
]
10: ; preds = %0
%11 = call i32 (...) @input_restricted()
br label %14
12: ; preds = %0
%13 = call i32 (...) @output_restricted()
br label %14
14: ; preds = %0, %12, %10
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [52 x i8] c"\0A----------Double Ended Queue operations-----------\00"
@.str.1 = [27 x i8] c"\0A1: Input Restricted queue\00"
@.str.2 = [28 x i8] c"\0A2: Output Restricted queue\00"
@.str.3 = [51 x i8] c"\0A-------------------------------------------------\00"
@.str.4 = [17 x i8] c"\0AEnter choice : \00"
@.str.5 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
switch i32 %9, label %14 [
i32 1, label %10
i32 2, label %12
]
10: ; preds = %0
%11 = call i32 (...) @input_restricted()
br label %14
12: ; preds = %0
%13 = call i32 (...) @output_restricted()
br label %14
14: ; preds = %0, %12, %10
ret i32 0
}