#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 *, int);
int /*<<< orphan*/ addFrontCirListDeque(struct cirListDeque *, int);
int /*<<< orphan*/ assertTrue(int, char *);
int backCirListDeque(struct cirListDeque *);
struct cirListDeque *createCirListDeque();
int /*<<< orphan*/ deleteCirListDeque(struct cirListDeque *);
int frontCirListDeque(struct cirListDeque *);
scalar_t__ isEmptyCirListDeque(struct cirListDeque *);
int /*<<< orphan*/ printCirListDeque(struct cirListDeque *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ removeBackCirListDeque(struct cirListDeque *);
int /*<<< orphan*/ removeFrontCirListDeque(struct cirListDeque *);
int /*<<< orphan*/ reverseCirListDeque(struct cirListDeque *);
int main(int argc, char *argv[]) {
  printf("Welcome to the test for cirListDeque!\n");
  struct cirListDeque *q = createCirListDeque();
  printf("\nAfter initializing, we first print this Deque:\n");
  printCirListDeque(q);
  addFrontCirListDeque(q, 2);
  addBackCirListDeque(q, 3);
  addFrontCirListDeque(q, 1);
  addBackCirListDeque(q, 4);
  printf("\nNow we test add front 2, add back 3, add front 1 and add back 4, "
         "we get:\n");
  printCirListDeque(q);
  assertTrue(((frontCirListDeque(q)) == (1)), "The front value should be 1");
  assertTrue(((backCirListDeque(q)) == (4)), "The back value should be 4");
  reverseCirListDeque(q);
  printf("\nBy reversing the Deque:\n");
  printCirListDeque(q);
  assertTrue(((frontCirListDeque(q)) == (4)), "The front value should be 4");
  assertTrue(((backCirListDeque(q)) == (1)), "The back value should be 1");
  printf("\nBy removing the front:\n");
  removeFrontCirListDeque(q);
  printCirListDeque(q);
  printf("By removing the back:\n");
  removeBackCirListDeque(q);
  printCirListDeque(q);
  assertTrue(((frontCirListDeque(q)) == (3)), "The front value should be 3");
  assertTrue(((backCirListDeque(q)) == (2)), "The back value should be 2");
  printf("\nNow check if the Deque is empty:\n");
  if (isEmptyCirListDeque(q))
    printf("The Deque is empty!\n");
  else
    printf("The Deque is not empty!\n");
  printf("\nNow we add back 6 and add front 5 to check again:\n");
  addFrontCirListDeque(q, 5);
  addBackCirListDeque(q, 6);
  printCirListDeque(q);
  assertTrue(((frontCirListDeque(q)) == (5)), "The front value should be 5");
  assertTrue(((backCirListDeque(q)) == (6)), "The back value should be 6");
  printf("\nNow we use four remove front to remove all of the elements,\nand "
         "check if it's empty again:\n");
  removeFrontCirListDeque(q);
  removeFrontCirListDeque(q);
  removeFrontCirListDeque(q);
  removeFrontCirListDeque(q);
  if (isEmptyCirListDeque(q))
    printf("The Deque is empty!\n");
  else
    printf("The Deque is not empty!\n");
  printf("\nNow we print this deque again, the result is...\n");
  printCirListDeque(q);
  printf("\nFinally, we add front 7:\n");
  addFrontCirListDeque(q, 7);
  printCirListDeque(q);
  assertTrue(((frontCirListDeque(q)) == (7)), "The front value should be 7");
  assertTrue(((backCirListDeque(q)) == (7)), "The back value should be 7");
  printf("\nThe end of the test. Thank you very much!\n\n");
  deleteCirListDeque(q);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe13(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10b0 <createCirListDeque@plt>
mov    %rax,-0x18(%rbp)
lea    0xe23(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printCirListDeque@plt>
mov    -0x18(%rbp),%rdi
mov    $0x2,%esi
call   1060 <addFrontCirListDeque@plt>
mov    -0x18(%rbp),%rdi
mov    $0x3,%esi
call   1090 <addBackCirListDeque@plt>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
call   1060 <addFrontCirListDeque@plt>
mov    -0x18(%rbp),%rdi
mov    $0x4,%esi
call   1090 <addBackCirListDeque@plt>
lea    0xe07(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   10d0 <frontCirListDeque@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe29(%rip),%rsi
call   1070 <assertTrue@plt>
mov    -0x18(%rbp),%rdi
call   1080 <backCirListDeque@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe25(%rip),%rsi
call   1070 <assertTrue@plt>
mov    -0x18(%rbp),%rdi
call   10c0 <reverseCirListDeque@plt>
lea    0xe2b(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   10d0 <frontCirListDeque@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe1c(%rip),%rsi
call   1070 <assertTrue@plt>
mov    -0x18(%rbp),%rdi
call   1080 <backCirListDeque@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe18(%rip),%rsi
call   1070 <assertTrue@plt>
lea    0xe27(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10e0 <removeFrontCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printCirListDeque@plt>
lea    0xe22(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <removeBackCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   10d0 <frontCirListDeque@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe07(%rip),%rsi
call   1070 <assertTrue@plt>
mov    -0x18(%rbp),%rdi
call   1080 <backCirListDeque@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe03(%rip),%rsi
call   1070 <assertTrue@plt>
lea    0xe12(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10f0 <isEmptyCirListDeque@plt>
cmp    $0x0,%rax
je     13a9 <main+0x1d9>
lea    0xe16(%rip),%rdi
call   1050 <printf@plt>
jmp    13b5 <main+0x1e5>
lea    0xe1a(%rip),%rdi
call   1050 <printf@plt>
lea    0xe27(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    $0x5,%esi
call   1060 <addFrontCirListDeque@plt>
mov    -0x18(%rbp),%rdi
mov    $0x6,%esi
call   1090 <addBackCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   10d0 <frontCirListDeque@plt>
cmp    $0x5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe16(%rip),%rsi
call   1070 <assertTrue@plt>
mov    -0x18(%rbp),%rdi
call   1080 <backCirListDeque@plt>
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe12(%rip),%rsi
call   1070 <assertTrue@plt>
lea    0xe21(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10e0 <removeFrontCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   10e0 <removeFrontCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   10e0 <removeFrontCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   10e0 <removeFrontCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   10f0 <isEmptyCirListDeque@plt>
cmp    $0x0,%rax
je     147a <main+0x2aa>
lea    0xd45(%rip),%rdi
call   1050 <printf@plt>
jmp    1486 <main+0x2b6>
lea    0xd49(%rip),%rdi
call   1050 <printf@plt>
lea    0xe1e(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printCirListDeque@plt>
lea    0xe3b(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    $0x7,%esi
call   1060 <addFrontCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printCirListDeque@plt>
mov    -0x18(%rbp),%rdi
call   10d0 <frontCirListDeque@plt>
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe1f(%rip),%rsi
call   1070 <assertTrue@plt>
mov    -0x18(%rbp),%rdi
call   1080 <backCirListDeque@plt>
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe1b(%rip),%rsi
call   1070 <assertTrue@plt>
lea    0xe2a(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10a0 <deleteCirListDeque@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xf37(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   10b0 <createCirListDeque@plt>
mov    %rax,%rbx
lea    0xf47(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1050 <printCirListDeque@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1060 <addFrontCirListDeque@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1090 <addBackCirListDeque@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1060 <addFrontCirListDeque@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1090 <addBackCirListDeque@plt>
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1050 <printCirListDeque@plt>
mov    %rbx,%rdi
call   10d0 <frontCirListDeque@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
lea    0xda1(%rip),%rsi
call   1070 <assertTrue@plt>
mov    %rbx,%rdi
call   1080 <backCirListDeque@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
lea    0xda0(%rip),%rsi
call   1070 <assertTrue@plt>
mov    %rbx,%rdi
call   10c0 <reverseCirListDeque@plt>
lea    0xf23(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1050 <printCirListDeque@plt>
mov    %rbx,%rdi
call   10d0 <frontCirListDeque@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
lea    0xd82(%rip),%rsi
call   1070 <assertTrue@plt>
mov    %rbx,%rdi
call   1080 <backCirListDeque@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
lea    0xd81(%rip),%rsi
call   1070 <assertTrue@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   10e0 <removeFrontCirListDeque@plt>
mov    %rbx,%rdi
call   1050 <printCirListDeque@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <removeBackCirListDeque@plt>
mov    %rbx,%rdi
call   1050 <printCirListDeque@plt>
mov    %rbx,%rdi
call   10d0 <frontCirListDeque@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
lea    0xd47(%rip),%rsi
call   1070 <assertTrue@plt>
mov    %rbx,%rdi
call   1080 <backCirListDeque@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xd46(%rip),%rsi
call   1070 <assertTrue@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   10f0 <isEmptyCirListDeque@plt>
test   %rax,%rax
lea    0xf44(%rip),%r15
lea    0xfcc(%rip),%r14
mov    %r14,%rdi
cmove  %r15,%rdi
call   1030 <puts@plt>
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1060 <addFrontCirListDeque@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1090 <addBackCirListDeque@plt>
mov    %rbx,%rdi
call   1050 <printCirListDeque@plt>
mov    %rbx,%rdi
call   10d0 <frontCirListDeque@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
lea    0xce5(%rip),%rsi
call   1070 <assertTrue@plt>
mov    %rbx,%rdi
call   1080 <backCirListDeque@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
lea    0xce4(%rip),%rsi
call   1070 <assertTrue@plt>
lea    0xe66(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   10e0 <removeFrontCirListDeque@plt>
mov    %rbx,%rdi
call   10e0 <removeFrontCirListDeque@plt>
mov    %rbx,%rdi
call   10e0 <removeFrontCirListDeque@plt>
mov    %rbx,%rdi
call   10e0 <removeFrontCirListDeque@plt>
mov    %rbx,%rdi
call   10f0 <isEmptyCirListDeque@plt>
test   %rax,%rax
cmove  %r15,%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1050 <printCirListDeque@plt>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1060 <addFrontCirListDeque@plt>
mov    %rbx,%rdi
call   1050 <printCirListDeque@plt>
mov    %rbx,%rdi
call   10d0 <frontCirListDeque@plt>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
lea    0xc6a(%rip),%rsi
call   1070 <assertTrue@plt>
mov    %rbx,%rdi
call   1080 <backCirListDeque@plt>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
lea    0xc69(%rip),%rsi
call   1070 <assertTrue@plt>
lea    0xe73(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   10a0 <deleteCirListDeque@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.cirListDeque = type { i32 }
@.str = [39 x i8] c"Welcome to the test for cirListDeque!\0A\00"
@.str.1 = [49 x i8] c"\0AAfter initializing, we first print this Deque:\0A\00"
@.str.2 = [75 x i8] c"\0ANow we test add front 2, add back 3, add front 1 and add back 4, we get:\0A\00"
@.str.3 = [28 x i8] c"The front value should be 1\00"
@.str.4 = [27 x i8] c"The back value should be 4\00"
@.str.5 = [26 x i8] c"\0ABy reversing the Deque:\0A\00"
@.str.6 = [28 x i8] c"The front value should be 4\00"
@.str.7 = [27 x i8] c"The back value should be 1\00"
@.str.8 = [25 x i8] c"\0ABy removing the front:\0A\00"
@.str.9 = [23 x i8] c"By removing the back:\0A\00"
@.str.10 = [28 x i8] c"The front value should be 3\00"
@.str.11 = [27 x i8] c"The back value should be 2\00"
@.str.12 = [35 x i8] c"\0ANow check if the Deque is empty:\0A\00"
@.str.13 = [21 x i8] c"The Deque is empty!\0A\00"
@.str.14 = [25 x i8] c"The Deque is not empty!\0A\00"
@.str.15 = [52 x i8] c"\0ANow we add back 6 and add front 5 to check again:\0A\00"
@.str.16 = [28 x i8] c"The front value should be 5\00"
@.str.17 = [27 x i8] c"The back value should be 6\00"
@.str.18 = [93 x i8] c"\0ANow we use four remove front to remove all of the elements,\0Aand check if it's empty again:\0A\00"
@.str.19 = [50 x i8] c"\0ANow we print this deque again, the result is...\0A\00"
@.str.20 = [27 x i8] c"\0AFinally, we add front 7:\0A\00"
@.str.21 = [28 x i8] c"The front value should be 7\00"
@.str.22 = [27 x i8] c"The back value should be 7\00"
@.str.23 = [45 x i8] c"\0AThe end of the test. Thank you very much!\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.cirListDeque*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%8 = call %struct.cirListDeque* (...) @createCirListDeque()
store %struct.cirListDeque* %8, %struct.cirListDeque** %6
%9 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%10 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%11 = call i32 @printCirListDeque(%struct.cirListDeque* %10)
%12 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%13 = call i32 @addFrontCirListDeque(%struct.cirListDeque* %12, i32 2)
%14 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%15 = call i32 @addBackCirListDeque(%struct.cirListDeque* %14, i32 3)
%16 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%17 = call i32 @addFrontCirListDeque(%struct.cirListDeque* %16, i32 1)
%18 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%19 = call i32 @addBackCirListDeque(%struct.cirListDeque* %18, i32 4)
%20 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0))
%21 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%22 = call i32 @printCirListDeque(%struct.cirListDeque* %21)
%23 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%24 = call i32 @frontCirListDeque(%struct.cirListDeque* %23)
%25 = icmp eq i32 %24, 1
%26 = zext i1 %25 to i32
%27 = call i32 @assertTrue(i32 %26, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%28 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%29 = call i32 @backCirListDeque(%struct.cirListDeque* %28)
%30 = icmp eq i32 %29, 4
%31 = zext i1 %30 to i32
%32 = call i32 @assertTrue(i32 %31, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%33 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%34 = call i32 @reverseCirListDeque(%struct.cirListDeque* %33)
%35 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%36 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%37 = call i32 @printCirListDeque(%struct.cirListDeque* %36)
%38 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%39 = call i32 @frontCirListDeque(%struct.cirListDeque* %38)
%40 = icmp eq i32 %39, 4
%41 = zext i1 %40 to i32
%42 = call i32 @assertTrue(i32 %41, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%43 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%44 = call i32 @backCirListDeque(%struct.cirListDeque* %43)
%45 = icmp eq i32 %44, 1
%46 = zext i1 %45 to i32
%47 = call i32 @assertTrue(i32 %46, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%48 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%49 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%50 = call i32 @removeFrontCirListDeque(%struct.cirListDeque* %49)
%51 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%52 = call i32 @printCirListDeque(%struct.cirListDeque* %51)
%53 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0))
%54 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%55 = call i32 @removeBackCirListDeque(%struct.cirListDeque* %54)
%56 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%57 = call i32 @printCirListDeque(%struct.cirListDeque* %56)
%58 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%59 = call i32 @frontCirListDeque(%struct.cirListDeque* %58)
%60 = icmp eq i32 %59, 3
%61 = zext i1 %60 to i32
%62 = call i32 @assertTrue(i32 %61, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0))
%63 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%64 = call i32 @backCirListDeque(%struct.cirListDeque* %63)
%65 = icmp eq i32 %64, 2
%66 = zext i1 %65 to i32
%67 = call i32 @assertTrue(i32 %66, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0))
%68 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0))
%69 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%70 = call i64 @isEmptyCirListDeque(%struct.cirListDeque* %69)
%71 = icmp ne i64 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %2
%73 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
br label %76
74: ; preds = %2
%75 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
br label %76
76: ; preds = %74, %72
%77 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.15, i64 0, i64 0))
%78 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%79 = call i32 @addFrontCirListDeque(%struct.cirListDeque* %78, i32 5)
%80 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%81 = call i32 @addBackCirListDeque(%struct.cirListDeque* %80, i32 6)
%82 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%83 = call i32 @printCirListDeque(%struct.cirListDeque* %82)
%84 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%85 = call i32 @frontCirListDeque(%struct.cirListDeque* %84)
%86 = icmp eq i32 %85, 5
%87 = zext i1 %86 to i32
%88 = call i32 @assertTrue(i32 %87, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))
%89 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%90 = call i32 @backCirListDeque(%struct.cirListDeque* %89)
%91 = icmp eq i32 %90, 6
%92 = zext i1 %91 to i32
%93 = call i32 @assertTrue(i32 %92, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0))
%94 = call i32 @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.18, i64 0, i64 0))
%95 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%96 = call i32 @removeFrontCirListDeque(%struct.cirListDeque* %95)
%97 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%98 = call i32 @removeFrontCirListDeque(%struct.cirListDeque* %97)
%99 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%100 = call i32 @removeFrontCirListDeque(%struct.cirListDeque* %99)
%101 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%102 = call i32 @removeFrontCirListDeque(%struct.cirListDeque* %101)
%103 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%104 = call i64 @isEmptyCirListDeque(%struct.cirListDeque* %103)
%105 = icmp ne i64 %104, 0
br i1 %105, label %106, label %108
106: ; preds = %76
%107 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
br label %110
108: ; preds = %76
%109 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
br label %110
110: ; preds = %108, %106
%111 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.19, i64 0, i64 0))
%112 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%113 = call i32 @printCirListDeque(%struct.cirListDeque* %112)
%114 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.20, i64 0, i64 0))
%115 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%116 = call i32 @addFrontCirListDeque(%struct.cirListDeque* %115, i32 7)
%117 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%118 = call i32 @printCirListDeque(%struct.cirListDeque* %117)
%119 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%120 = call i32 @frontCirListDeque(%struct.cirListDeque* %119)
%121 = icmp eq i32 %120, 7
%122 = zext i1 %121 to i32
%123 = call i32 @assertTrue(i32 %122, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.21, i64 0, i64 0))
%124 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%125 = call i32 @backCirListDeque(%struct.cirListDeque* %124)
%126 = icmp eq i32 %125, 7
%127 = zext i1 %126 to i32
%128 = call i32 @assertTrue(i32 %127, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.22, i64 0, i64 0))
%129 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0))
%130 = load %struct.cirListDeque*, %struct.cirListDeque** %6
%131 = call i32 @deleteCirListDeque(%struct.cirListDeque* %130)
ret i32 0
}

LLVM IR (-O2):
%struct.cirListDeque = type { i32 }
@.str.3 = [28 x i8] c"The front value should be 1\00"
@.str.4 = [27 x i8] c"The back value should be 4\00"
@.str.6 = [28 x i8] c"The front value should be 4\00"
@.str.7 = [27 x i8] c"The back value should be 1\00"
@.str.10 = [28 x i8] c"The front value should be 3\00"
@.str.11 = [27 x i8] c"The back value should be 2\00"
@.str.16 = [28 x i8] c"The front value should be 5\00"
@.str.17 = [27 x i8] c"The back value should be 6\00"
@.str.21 = [28 x i8] c"The front value should be 7\00"
@.str.22 = [27 x i8] c"The back value should be 7\00"
@str = [38 x i8] c"Welcome to the test for cirListDeque!\00"
@str.24 = [48 x i8] c"\0AAfter initializing, we first print this Deque:\00"
@str.25 = [74 x i8] c"\0ANow we test add front 2, add back 3, add front 1 and add back 4, we get:\00"
@str.26 = [25 x i8] c"\0ABy reversing the Deque:\00"
@str.27 = [24 x i8] c"\0ABy removing the front:\00"
@str.28 = [22 x i8] c"By removing the back:\00"
@str.29 = [34 x i8] c"\0ANow check if the Deque is empty:\00"
@str.31 = [51 x i8] c"\0ANow we add back 6 and add front 5 to check again:\00"
@str.32 = [92 x i8] c"\0ANow we use four remove front to remove all of the elements,\0Aand check if it's empty again:\00"
@str.33 = [24 x i8] c"The Deque is not empty!\00"
@str.34 = [49 x i8] c"\0ANow we print this deque again, the result is...\00"
@str.35 = [26 x i8] c"\0AFinally, we add front 7:\00"
@str.36 = [44 x i8] c"\0AThe end of the test. Thank you very much!\0A\00"
@str.38 = [20 x i8] c"The Deque is empty!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%4 = tail call %struct.cirListDeque* (...) @createCirListDeque()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.24, i64 0, i64 0))
%6 = tail call i32 @printCirListDeque(%struct.cirListDeque* %4)
%7 = tail call i32 @addFrontCirListDeque(%struct.cirListDeque* %4, i32 2)
%8 = tail call i32 @addBackCirListDeque(%struct.cirListDeque* %4, i32 3)
%9 = tail call i32 @addFrontCirListDeque(%struct.cirListDeque* %4, i32 1)
%10 = tail call i32 @addBackCirListDeque(%struct.cirListDeque* %4, i32 4)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.25, i64 0, i64 0))
%12 = tail call i32 @printCirListDeque(%struct.cirListDeque* %4)
%13 = tail call i32 @frontCirListDeque(%struct.cirListDeque* %4)
%14 = icmp eq i32 %13, 1
%15 = zext i1 %14 to i32
%16 = tail call i32 @assertTrue(i32 %15, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%17 = tail call i32 @backCirListDeque(%struct.cirListDeque* %4)
%18 = icmp eq i32 %17, 4
%19 = zext i1 %18 to i32
%20 = tail call i32 @assertTrue(i32 %19, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%21 = tail call i32 @reverseCirListDeque(%struct.cirListDeque* %4)
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.26, i64 0, i64 0))
%23 = tail call i32 @printCirListDeque(%struct.cirListDeque* %4)
%24 = tail call i32 @frontCirListDeque(%struct.cirListDeque* %4)
%25 = icmp eq i32 %24, 4
%26 = zext i1 %25 to i32
%27 = tail call i32 @assertTrue(i32 %26, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%28 = tail call i32 @backCirListDeque(%struct.cirListDeque* %4)
%29 = icmp eq i32 %28, 1
%30 = zext i1 %29 to i32
%31 = tail call i32 @assertTrue(i32 %30, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.27, i64 0, i64 0))
%33 = tail call i32 @removeFrontCirListDeque(%struct.cirListDeque* %4)
%34 = tail call i32 @printCirListDeque(%struct.cirListDeque* %4)
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.28, i64 0, i64 0))
%36 = tail call i32 @removeBackCirListDeque(%struct.cirListDeque* %4)
%37 = tail call i32 @printCirListDeque(%struct.cirListDeque* %4)
%38 = tail call i32 @frontCirListDeque(%struct.cirListDeque* %4)
%39 = icmp eq i32 %38, 3
%40 = zext i1 %39 to i32
%41 = tail call i32 @assertTrue(i32 %40, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0))
%42 = tail call i32 @backCirListDeque(%struct.cirListDeque* %4)
%43 = icmp eq i32 %42, 2
%44 = zext i1 %43 to i32
%45 = tail call i32 @assertTrue(i32 %44, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0))
%46 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.29, i64 0, i64 0))
%47 = tail call i64 @isEmptyCirListDeque(%struct.cirListDeque* %4)
%48 = icmp eq i64 %47, 0
%49 = select i1 %48, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.33, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.38, i64 0, i64 0)
%50 = tail call i32 @puts(i8* dereferenceable(1) %49)
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.31, i64 0, i64 0))
%52 = tail call i32 @addFrontCirListDeque(%struct.cirListDeque* %4, i32 5)
%53 = tail call i32 @addBackCirListDeque(%struct.cirListDeque* %4, i32 6)
%54 = tail call i32 @printCirListDeque(%struct.cirListDeque* %4)
%55 = tail call i32 @frontCirListDeque(%struct.cirListDeque* %4)
%56 = icmp eq i32 %55, 5
%57 = zext i1 %56 to i32
%58 = tail call i32 @assertTrue(i32 %57, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))
%59 = tail call i32 @backCirListDeque(%struct.cirListDeque* %4)
%60 = icmp eq i32 %59, 6
%61 = zext i1 %60 to i32
%62 = tail call i32 @assertTrue(i32 %61, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0))
%63 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([92 x i8], [92 x i8]* @str.32, i64 0, i64 0))
%64 = tail call i32 @removeFrontCirListDeque(%struct.cirListDeque* %4)
%65 = tail call i32 @removeFrontCirListDeque(%struct.cirListDeque* %4)
%66 = tail call i32 @removeFrontCirListDeque(%struct.cirListDeque* %4)
%67 = tail call i32 @removeFrontCirListDeque(%struct.cirListDeque* %4)
%68 = tail call i64 @isEmptyCirListDeque(%struct.cirListDeque* %4)
%69 = icmp eq i64 %68, 0
%70 = select i1 %69, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.33, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.38, i64 0, i64 0)
%71 = tail call i32 @puts(i8* dereferenceable(1) %70)
%72 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.34, i64 0, i64 0))
%73 = tail call i32 @printCirListDeque(%struct.cirListDeque* %4)
%74 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.35, i64 0, i64 0))
%75 = tail call i32 @addFrontCirListDeque(%struct.cirListDeque* %4, i32 7)
%76 = tail call i32 @printCirListDeque(%struct.cirListDeque* %4)
%77 = tail call i32 @frontCirListDeque(%struct.cirListDeque* %4)
%78 = icmp eq i32 %77, 7
%79 = zext i1 %78 to i32
%80 = tail call i32 @assertTrue(i32 %79, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.21, i64 0, i64 0))
%81 = tail call i32 @backCirListDeque(%struct.cirListDeque* %4)
%82 = icmp eq i32 %81, 7
%83 = zext i1 %82 to i32
%84 = tail call i32 @assertTrue(i32 %83, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.22, i64 0, i64 0))
%85 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.36, i64 0, i64 0))
%86 = tail call i32 @deleteCirListDeque(%struct.cirListDeque* %4)
ret i32 0
}