#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*/ inputdeque2();
int /*<<< orphan*/ outputdeque2();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
void Deques2() {
  int option;
  printf("\n\t\t\t\t\t\t\t\t\t1. Input restricted deque");
  printf("\n\t\t\t\t\t\t\t\t\t2. Output restricted deque");
  printf("\n\t\t\t\t\t\t\t\t\t   Enter your option: ");
  scanf("%d", &option);
  switch (option) {
  case 1:
    inputdeque2();
    break;
  case 2:
    outputdeque2();
    break;
  }
}


x86 assembly (clang, -O0):
<Deques2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1050 <printf@plt>
lea    0xec9(%rip),%rdi
call   1050 <printf@plt>
lea    0xee2(%rip),%rdi
call   1050 <printf@plt>
lea    0xef7(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     11a1 <Deques2+0x61>
jmp    1190 <Deques2+0x50>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     11ad <Deques2+0x6d>
jmp    11b4 <Deques2+0x74>
mov    $0x0,%al
call   1040 <inputdeque2@plt>
jmp    11b4 <Deques2+0x74>
mov    $0x0,%al
call   1030 <outputdeque2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Deques2>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <printf@plt>
lea    0xed0(%rip),%rdi
call   1050 <printf@plt>
lea    0xee9(%rip),%rdi
call   1050 <printf@plt>
lea    0xefe(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
je     118d <Deques2+0x4d>
cmp    $0x1,%eax
jne    1194 <Deques2+0x54>
xor    %eax,%eax
call   1040 <inputdeque2@plt>
pop    %rax
ret
xor    %eax,%eax
call   1030 <outputdeque2@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [36 x i8] c"\0A\09\09\09\09\09\09\09\09\091. Input restricted deque\00"
@.str.1 = [37 x i8] c"\0A\09\09\09\09\09\09\09\09\092. Output restricted deque\00"
@.str.2 = [33 x i8] c"\0A\09\09\09\09\09\09\09\09\09 Enter your option: \00"
@.str.3 = [3 x i8] c"%d\00"
define void @Deques2() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
switch i32 %6, label %11 [
i32 1, label %7
i32 2, label %9
]
7: ; preds = %0
%8 = call i32 (...) @inputdeque2()
br label %11
9: ; preds = %0
%10 = call i32 (...) @outputdeque2()
br label %11
11: ; preds = %0, %9, %7
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"\0A\09\09\09\09\09\09\09\09\091. Input restricted deque\00"
@.str.1 = [37 x i8] c"\0A\09\09\09\09\09\09\09\09\092. Output restricted deque\00"
@.str.2 = [33 x i8] c"\0A\09\09\09\09\09\09\09\09\09 Enter your option: \00"
@.str.3 = [3 x i8] c"%d\00"
define void @Deques2() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
switch i32 %7, label %12 [
i32 1, label %8
i32 2, label %10
]
8: ; preds = %0
%9 = call i32 (...) @inputdeque2()
br label %12
10: ; preds = %0
%11 = call i32 (...) @outputdeque2()
br label %12
12: ; preds = %0, %10, %8
ret void
}