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

/* Variables and functions */
int /*<<< orphan*/ addBackCirListDeque(struct cirListDeque *, double);
int /*<<< orphan*/ addFrontCirListDeque(struct cirListDeque *, double);
double backCirListDeque(struct cirListDeque *);
struct cirListDeque *createCirListDeque();
double frontCirListDeque(struct cirListDeque *);
int /*<<< orphan*/ printCirListDeque(struct cirListDeque *);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ removeBackCirListDeque(struct cirListDeque *);
int /*<<< orphan*/ removeFrontCirListDeque(struct cirListDeque *);
int /*<<< orphan*/ reverseCirListDeque(struct cirListDeque *);
int main() {
  struct cirListDeque *q = createCirListDeque();
  addBackCirListDeque(q, (double)1);
  addBackCirListDeque(q, (double)2);
  addBackCirListDeque(q, (double)3);
  addFrontCirListDeque(q, (double)4);
  addFrontCirListDeque(q, (double)5);
  addFrontCirListDeque(q, (double)6);
  printCirListDeque(q);
  printf("%g\n", frontCirListDeque(q));
  printf("%g\n", backCirListDeque(q));
  removeFrontCirListDeque(q);
  removeBackCirListDeque(q);
  printCirListDeque(q);
  reverseCirListDeque(q);
  printCirListDeque(q);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1090 <createCirListDeque@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  0xe62(%rip),%xmm0
call   1080 <addBackCirListDeque@plt>
mov    -0x10(%rbp),%rdi
movsd  0xe49(%rip),%xmm0
call   1080 <addBackCirListDeque@plt>
mov    -0x10(%rbp),%rdi
movsd  0xe30(%rip),%xmm0
call   1080 <addBackCirListDeque@plt>
mov    -0x10(%rbp),%rdi
movsd  0xe17(%rip),%xmm0
call   1060 <addFrontCirListDeque@plt>
mov    -0x10(%rbp),%rdi
movsd  0xdfe(%rip),%xmm0
call   1060 <addFrontCirListDeque@plt>
mov    -0x10(%rbp),%rdi
movsd  0xde5(%rip),%xmm0
call   1060 <addFrontCirListDeque@plt>
mov    -0x10(%rbp),%rdi
call   1040 <printCirListDeque@plt>
mov    -0x10(%rbp),%rdi
call   10b0 <frontCirListDeque@plt>
lea    0xdf7(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1070 <backCirListDeque@plt>
lea    0xde2(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   10c0 <removeFrontCirListDeque@plt>
mov    -0x10(%rbp),%rdi
call   1030 <removeBackCirListDeque@plt>
mov    -0x10(%rbp),%rdi
call   1040 <printCirListDeque@plt>
mov    -0x10(%rbp),%rdi
call   10a0 <reverseCirListDeque@plt>
mov    -0x10(%rbp),%rdi
call   1040 <printCirListDeque@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1090 <createCirListDeque@plt>
mov    %rax,%rbx
movsd  0xe4a(%rip),%xmm0
mov    %rax,%rdi
call   1080 <addBackCirListDeque@plt>
movsd  0xe42(%rip),%xmm0
mov    %rbx,%rdi
call   1080 <addBackCirListDeque@plt>
movsd  0xe3a(%rip),%xmm0
mov    %rbx,%rdi
call   1080 <addBackCirListDeque@plt>
movsd  0xe32(%rip),%xmm0
mov    %rbx,%rdi
call   1060 <addFrontCirListDeque@plt>
movsd  0xe2a(%rip),%xmm0
mov    %rbx,%rdi
call   1060 <addFrontCirListDeque@plt>
movsd  0xe22(%rip),%xmm0
mov    %rbx,%rdi
call   1060 <addFrontCirListDeque@plt>
mov    %rbx,%rdi
call   1040 <printCirListDeque@plt>
mov    %rbx,%rdi
call   10b0 <frontCirListDeque@plt>
lea    0xe0b(%rip),%r14
mov    %r14,%rdi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1070 <backCirListDeque@plt>
mov    %r14,%rdi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   10c0 <removeFrontCirListDeque@plt>
mov    %rbx,%rdi
call   1030 <removeBackCirListDeque@plt>
mov    %rbx,%rdi
call   1040 <printCirListDeque@plt>
mov    %rbx,%rdi
call   10a0 <reverseCirListDeque@plt>
mov    %rbx,%rdi
call   1040 <printCirListDeque@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.cirListDeque = type { i32 }
@.str = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.cirListDeque*
store i32 0, i32* %1
%3 = call %struct.cirListDeque* (...) @createCirListDeque()
store %struct.cirListDeque* %3, %struct.cirListDeque** %2
%4 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%5 = call i32 @addBackCirListDeque(%struct.cirListDeque* %4, double 1.000000e+00)
%6 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%7 = call i32 @addBackCirListDeque(%struct.cirListDeque* %6, double 2.000000e+00)
%8 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%9 = call i32 @addBackCirListDeque(%struct.cirListDeque* %8, double 3.000000e+00)
%10 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%11 = call i32 @addFrontCirListDeque(%struct.cirListDeque* %10, double 4.000000e+00)
%12 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%13 = call i32 @addFrontCirListDeque(%struct.cirListDeque* %12, double 5.000000e+00)
%14 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%15 = call i32 @addFrontCirListDeque(%struct.cirListDeque* %14, double 6.000000e+00)
%16 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%17 = call i32 @printCirListDeque(%struct.cirListDeque* %16)
%18 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%19 = call double @frontCirListDeque(%struct.cirListDeque* %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %19)
%21 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%22 = call double @backCirListDeque(%struct.cirListDeque* %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %22)
%24 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%25 = call i32 @removeFrontCirListDeque(%struct.cirListDeque* %24)
%26 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%27 = call i32 @removeBackCirListDeque(%struct.cirListDeque* %26)
%28 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%29 = call i32 @printCirListDeque(%struct.cirListDeque* %28)
%30 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%31 = call i32 @reverseCirListDeque(%struct.cirListDeque* %30)
%32 = load %struct.cirListDeque*, %struct.cirListDeque** %2
%33 = call i32 @printCirListDeque(%struct.cirListDeque* %32)
ret i32 0
}

LLVM IR (-O2):
%struct.cirListDeque = type { i32 }
@.str = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = tail call %struct.cirListDeque* (...) @createCirListDeque()
%2 = tail call i32 @addBackCirListDeque(%struct.cirListDeque* %1, double 1.000000e+00)
%3 = tail call i32 @addBackCirListDeque(%struct.cirListDeque* %1, double 2.000000e+00)
%4 = tail call i32 @addBackCirListDeque(%struct.cirListDeque* %1, double 3.000000e+00)
%5 = tail call i32 @addFrontCirListDeque(%struct.cirListDeque* %1, double 4.000000e+00)
%6 = tail call i32 @addFrontCirListDeque(%struct.cirListDeque* %1, double 5.000000e+00)
%7 = tail call i32 @addFrontCirListDeque(%struct.cirListDeque* %1, double 6.000000e+00)
%8 = tail call i32 @printCirListDeque(%struct.cirListDeque* %1)
%9 = tail call double @frontCirListDeque(%struct.cirListDeque* %1)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %9)
%11 = tail call double @backCirListDeque(%struct.cirListDeque* %1)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %11)
%13 = tail call i32 @removeFrontCirListDeque(%struct.cirListDeque* %1)
%14 = tail call i32 @removeBackCirListDeque(%struct.cirListDeque* %1)
%15 = tail call i32 @printCirListDeque(%struct.cirListDeque* %1)
%16 = tail call i32 @reverseCirListDeque(%struct.cirListDeque* %1)
%17 = tail call i32 @printCirListDeque(%struct.cirListDeque* %1)
ret i32 0
}