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

/* Variables and functions */
int /*<<< orphan*/ assertTrue(int, char *);
int backList(struct linkedList *);
int /*<<< orphan*/ printList(struct linkedList *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ removeBackList(struct linkedList *);
void backListTest(struct linkedList *lst) {
  printf("\n\nTesting backList...\nCalling backList(lst)\n");
  assertTrue(((backList(lst)) == (9)), "Testing the last link value == 9");
  printf("\nCall RemoveBackList Function\n");
  removeBackList(lst);
  printf("The list content should be: [3<=>2<=>5<=>7<=>1]\n");
  printf("Call printList function...\n");
  printList(lst);
  printf("\nCalling backList(lst)\n");
  assertTrue(((backList(lst)) == (1)), "Testing the last link value == 1");
  printf("\nCall RemoveBackList Function\n");
  removeBackList(lst);
  printf("The list content should be: [3<=>2<=>5<=>7]\n");
  printf("Call printList function...\n");
  printList(lst);
  printf("\nCalling backList(lst)\n");
  assertTrue(((backList(lst)) == (7)), "Testing the last link value == 7");
  printf("\nCall RemoveBackList Function\n");
  removeBackList(lst);
  printf("The list content should be: [3<=>2<=>5]\n");
  printf("Call printList function...\n");
  printList(lst);
  printf("\nCalling backList(lst)\n");
  assertTrue(((backList(lst)) == (5)), "Testing the last link value == 5");
  printf("\nCall RemoveBackList Function\n");
  removeBackList(lst);
  printf("The list content should be: [3<=>2]\n");
  printf("Call printList function...\n");
  printList(lst);
  printf("\nCalling backList(lst)\n");
  assertTrue(((backList(lst)) == (2)), "Testing the last link value == 2");
}


x86 assembly (clang, -O0):
<backListTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <backList@plt>
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xeaa(%rip),%rsi
call   1050 <assertTrue@plt>
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <removeBackList@plt>
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1070 <printList@plt>
lea    0xe50(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <backList@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xed5(%rip),%rsi
call   1050 <assertTrue@plt>
lea    0xe5d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <removeBackList@plt>
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1070 <printList@plt>
lea    0xdee(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <backList@plt>
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec1(%rip),%rsi
call   1050 <assertTrue@plt>
lea    0xdfb(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <removeBackList@plt>
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0xe2a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1070 <printList@plt>
lea    0xd8c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <backList@plt>
cmp    $0x5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xea9(%rip),%rsi
call   1050 <assertTrue@plt>
lea    0xd99(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <removeBackList@plt>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
lea    0xdc8(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1070 <printList@plt>
lea    0xd2a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <backList@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe8d(%rip),%rsi
call   1050 <assertTrue@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backListTest>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xf43(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1060 <backList@plt>
xor    %edi,%edi
cmp    $0x9,%eax
sete   %dil
lea    0xe81(%rip),%rsi
call   1050 <assertTrue@plt>
lea    0xfca(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <removeBackList@plt>
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe9(%rip),%r15
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1070 <printList@plt>
lea    0xef5(%rip),%r12
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1060 <backList@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
lea    0xe3c(%rip),%rsi
call   1050 <assertTrue@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <removeBackList@plt>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1070 <printList@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1060 <backList@plt>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
lea    0xe0c(%rip),%rsi
call   1050 <assertTrue@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <removeBackList@plt>
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1070 <printList@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1060 <backList@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
lea    0xddc(%rip),%rsi
call   1050 <assertTrue@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <removeBackList@plt>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1070 <printList@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1060 <backList@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xdac(%rip),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1050 <assertTrue@plt>

LLVM IR (-O0):
%struct.linkedList = type { i32 }
@.str = [45 x i8] c"\0A\0ATesting backList...\0ACalling backList(lst)\0A\00"
@.str.1 = [33 x i8] c"Testing the last link value == 9\00"
@.str.2 = [31 x i8] c"\0ACall RemoveBackList Function\0A\00"
@.str.3 = [49 x i8] c"The list content should be: [3<=>2<=>5<=>7<=>1]\0A\00"
@.str.4 = [28 x i8] c"Call printList function...\0A\00"
@.str.5 = [24 x i8] c"\0ACalling backList(lst)\0A\00"
@.str.6 = [33 x i8] c"Testing the last link value == 1\00"
@.str.7 = [45 x i8] c"The list content should be: [3<=>2<=>5<=>7]\0A\00"
@.str.8 = [33 x i8] c"Testing the last link value == 7\00"
@.str.9 = [41 x i8] c"The list content should be: [3<=>2<=>5]\0A\00"
@.str.10 = [33 x i8] c"Testing the last link value == 5\00"
@.str.11 = [37 x i8] c"The list content should be: [3<=>2]\0A\00"
@.str.12 = [33 x i8] c"Testing the last link value == 2\00"
define void @backListTest(%struct.linkedList* %0) {
%2 = alloca %struct.linkedList*
store %struct.linkedList* %0, %struct.linkedList** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%4 = load %struct.linkedList*, %struct.linkedList** %2
%5 = call i32 @backList(%struct.linkedList* %4)
%6 = icmp eq i32 %5, 9
%7 = zext i1 %6 to i32
%8 = call i32 @assertTrue(i32 %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%10 = load %struct.linkedList*, %struct.linkedList** %2
%11 = call i32 @removeBackList(%struct.linkedList* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%14 = load %struct.linkedList*, %struct.linkedList** %2
%15 = call i32 @printList(%struct.linkedList* %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%17 = load %struct.linkedList*, %struct.linkedList** %2
%18 = call i32 @backList(%struct.linkedList* %17)
%19 = icmp eq i32 %18, 1
%20 = zext i1 %19 to i32
%21 = call i32 @assertTrue(i32 %20, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%23 = load %struct.linkedList*, %struct.linkedList** %2
%24 = call i32 @removeBackList(%struct.linkedList* %23)
%25 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%27 = load %struct.linkedList*, %struct.linkedList** %2
%28 = call i32 @printList(%struct.linkedList* %27)
%29 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%30 = load %struct.linkedList*, %struct.linkedList** %2
%31 = call i32 @backList(%struct.linkedList* %30)
%32 = icmp eq i32 %31, 7
%33 = zext i1 %32 to i32
%34 = call i32 @assertTrue(i32 %33, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
%35 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%36 = load %struct.linkedList*, %struct.linkedList** %2
%37 = call i32 @removeBackList(%struct.linkedList* %36)
%38 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0))
%39 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%40 = load %struct.linkedList*, %struct.linkedList** %2
%41 = call i32 @printList(%struct.linkedList* %40)
%42 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%43 = load %struct.linkedList*, %struct.linkedList** %2
%44 = call i32 @backList(%struct.linkedList* %43)
%45 = icmp eq i32 %44, 5
%46 = zext i1 %45 to i32
%47 = call i32 @assertTrue(i32 %46, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0))
%48 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%49 = load %struct.linkedList*, %struct.linkedList** %2
%50 = call i32 @removeBackList(%struct.linkedList* %49)
%51 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
%52 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%53 = load %struct.linkedList*, %struct.linkedList** %2
%54 = call i32 @printList(%struct.linkedList* %53)
%55 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%56 = load %struct.linkedList*, %struct.linkedList** %2
%57 = call i32 @backList(%struct.linkedList* %56)
%58 = icmp eq i32 %57, 2
%59 = zext i1 %58 to i32
%60 = call i32 @assertTrue(i32 %59, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.linkedList = type { i32 }
@.str.1 = [33 x i8] c"Testing the last link value == 9\00"
@.str.6 = [33 x i8] c"Testing the last link value == 1\00"
@.str.8 = [33 x i8] c"Testing the last link value == 7\00"
@.str.10 = [33 x i8] c"Testing the last link value == 5\00"
@.str.12 = [33 x i8] c"Testing the last link value == 2\00"
@str = [44 x i8] c"\0A\0ATesting backList...\0ACalling backList(lst)\00"
@str.14 = [48 x i8] c"The list content should be: [3<=>2<=>5<=>7<=>1]\00"
@str.18 = [44 x i8] c"The list content should be: [3<=>2<=>5<=>7]\00"
@str.22 = [40 x i8] c"The list content should be: [3<=>2<=>5]\00"
@str.25 = [30 x i8] c"\0ACall RemoveBackList Function\00"
@str.26 = [36 x i8] c"The list content should be: [3<=>2]\00"
@str.27 = [27 x i8] c"Call printList function...\00"
@str.28 = [23 x i8] c"\0ACalling backList(lst)\00"
define void @backListTest(%struct.linkedList* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @backList(%struct.linkedList* %0)
%4 = icmp eq i32 %3, 9
%5 = zext i1 %4 to i32
%6 = tail call i32 @assertTrue(i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.25, i64 0, i64 0))
%8 = tail call i32 @removeBackList(%struct.linkedList* %0)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.14, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.27, i64 0, i64 0))
%11 = tail call i32 @printList(%struct.linkedList* %0)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.28, i64 0, i64 0))
%13 = tail call i32 @backList(%struct.linkedList* %0)
%14 = icmp eq i32 %13, 1
%15 = zext i1 %14 to i32
%16 = tail call i32 @assertTrue(i32 %15, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.25, i64 0, i64 0))
%18 = tail call i32 @removeBackList(%struct.linkedList* %0)
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.18, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.27, i64 0, i64 0))
%21 = tail call i32 @printList(%struct.linkedList* %0)
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.28, i64 0, i64 0))
%23 = tail call i32 @backList(%struct.linkedList* %0)
%24 = icmp eq i32 %23, 7
%25 = zext i1 %24 to i32
%26 = tail call i32 @assertTrue(i32 %25, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.25, i64 0, i64 0))
%28 = tail call i32 @removeBackList(%struct.linkedList* %0)
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.22, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.27, i64 0, i64 0))
%31 = tail call i32 @printList(%struct.linkedList* %0)
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.28, i64 0, i64 0))
%33 = tail call i32 @backList(%struct.linkedList* %0)
%34 = icmp eq i32 %33, 5
%35 = zext i1 %34 to i32
%36 = tail call i32 @assertTrue(i32 %35, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0))
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.25, i64 0, i64 0))
%38 = tail call i32 @removeBackList(%struct.linkedList* %0)
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.26, i64 0, i64 0))
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.27, i64 0, i64 0))
%41 = tail call i32 @printList(%struct.linkedList* %0)
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.28, i64 0, i64 0))
%43 = tail call i32 @backList(%struct.linkedList* %0)
%44 = icmp eq i32 %43, 2
%45 = zext i1 %44 to i32
%46 = tail call i32 @assertTrue(i32 %45, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0))
ret void
}