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

/* Variables and functions */
int /*<<< orphan*/ back();
struct Deque *createDeque(struct Deque *, int);
int /*<<< orphan*/ displayTheDeque();
int /*<<< orphan*/ front();
int /*<<< orphan*/ isEmpty();
int /*<<< orphan*/ pop_back();
int /*<<< orphan*/ pop_front();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ push_back(struct Deque *, int);
int /*<<< orphan*/ push_front(struct Deque *, int);
int main() {
  struct Deque *root = NULL;
  root = createDeque(root, 4);
  push_front(root, 6);
  push_back(root, 5);
  push_front(root, 61);
  push_front(root, 6);
  push_front(root, 12);
  push_front(root, 60);
  push_back(root, 68);
  displayTheDeque();
  pop_front();
  printf("After removing from front, ");
  displayTheDeque();
  pop_back();
  printf("After removing from back, ");
  displayTheDeque();
  front();
  back();
  isEmpty();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1060 <createDeque@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
call   1090 <push_front@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5,%esi
call   10a0 <push_back@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3d,%esi
call   1090 <push_front@plt>
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
call   1090 <push_front@plt>
mov    -0x8(%rbp),%rdi
mov    $0xc,%esi
call   1090 <push_front@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3c,%esi
call   1090 <push_front@plt>
mov    -0x8(%rbp),%rdi
mov    $0x44,%esi
call   10a0 <push_back@plt>
mov    $0x0,%al
call   1050 <displayTheDeque@plt>
mov    $0x0,%al
call   10b0 <pop_front@plt>
lea    0xdc7(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <displayTheDeque@plt>
mov    $0x0,%al
call   10c0 <pop_back@plt>
lea    0xdc9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <displayTheDeque@plt>
mov    $0x0,%al
call   1070 <front@plt>
mov    $0x0,%al
call   1030 <back@plt>
mov    $0x0,%al
call   1080 <isEmpty@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
mov    $0x4,%esi
call   1060 <createDeque@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x6,%esi
call   1090 <push_front@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   10a0 <push_back@plt>
mov    %rbx,%rdi
mov    $0x3d,%esi
call   1090 <push_front@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1090 <push_front@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
call   1090 <push_front@plt>
mov    %rbx,%rdi
mov    $0x3c,%esi
call   1090 <push_front@plt>
mov    %rbx,%rdi
mov    $0x44,%esi
call   10a0 <push_back@plt>
xor    %eax,%eax
call   1050 <displayTheDeque@plt>
xor    %eax,%eax
call   10b0 <pop_front@plt>
lea    0xde0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <displayTheDeque@plt>
xor    %eax,%eax
call   10c0 <pop_back@plt>
lea    0xde2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <displayTheDeque@plt>
xor    %eax,%eax
call   1070 <front@plt>
xor    %eax,%eax
call   1030 <back@plt>
xor    %eax,%eax
call   1080 <isEmpty@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.Deque = type { i32 }
@.str = [28 x i8] c"After removing from front, \00"
@.str.1 = [27 x i8] c"After removing from back, \00"
define i32 @main() {
%1 = alloca %struct.Deque*
store %struct.Deque* null, %struct.Deque** %1
%2 = load %struct.Deque*, %struct.Deque** %1
%3 = call %struct.Deque* @createDeque(%struct.Deque* %2, i32 4)
store %struct.Deque* %3, %struct.Deque** %1
%4 = load %struct.Deque*, %struct.Deque** %1
%5 = call i32 @push_front(%struct.Deque* %4, i32 6)
%6 = load %struct.Deque*, %struct.Deque** %1
%7 = call i32 @push_back(%struct.Deque* %6, i32 5)
%8 = load %struct.Deque*, %struct.Deque** %1
%9 = call i32 @push_front(%struct.Deque* %8, i32 61)
%10 = load %struct.Deque*, %struct.Deque** %1
%11 = call i32 @push_front(%struct.Deque* %10, i32 6)
%12 = load %struct.Deque*, %struct.Deque** %1
%13 = call i32 @push_front(%struct.Deque* %12, i32 12)
%14 = load %struct.Deque*, %struct.Deque** %1
%15 = call i32 @push_front(%struct.Deque* %14, i32 60)
%16 = load %struct.Deque*, %struct.Deque** %1
%17 = call i32 @push_back(%struct.Deque* %16, i32 68)
%18 = call i32 (...) @displayTheDeque()
%19 = call i32 (...) @pop_front()
%20 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%21 = call i32 (...) @displayTheDeque()
%22 = call i32 (...) @pop_back()
%23 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 (...) @displayTheDeque()
%25 = call i32 (...) @front()
%26 = call i32 (...) @back()
%27 = call i32 (...) @isEmpty()
ret i32 0
}

LLVM IR (-O2):
%struct.Deque = type { i32 }
@.str = [28 x i8] c"After removing from front, \00"
@.str.1 = [27 x i8] c"After removing from back, \00"
define i32 @main() {
%1 = tail call %struct.Deque* @createDeque(%struct.Deque* null, i32 4)
%2 = tail call i32 @push_front(%struct.Deque* %1, i32 6)
%3 = tail call i32 @push_back(%struct.Deque* %1, i32 5)
%4 = tail call i32 @push_front(%struct.Deque* %1, i32 61)
%5 = tail call i32 @push_front(%struct.Deque* %1, i32 6)
%6 = tail call i32 @push_front(%struct.Deque* %1, i32 12)
%7 = tail call i32 @push_front(%struct.Deque* %1, i32 60)
%8 = tail call i32 @push_back(%struct.Deque* %1, i32 68)
%9 = tail call i32 (...) @displayTheDeque()
%10 = tail call i32 (...) @pop_front()
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 (...) @displayTheDeque()
%13 = tail call i32 (...) @pop_back()
%14 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%15 = tail call i32 (...) @displayTheDeque()
%16 = tail call i32 (...) @front()
%17 = tail call i32 (...) @back()
%18 = tail call i32 (...) @isEmpty()
ret i32 0
}