#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 frontList(struct linkedList *);
int /*<<< orphan*/ printList(struct linkedList *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ removeFrontList(struct linkedList *);
void frontListTest(struct linkedList *lst) {
  printf("\n\nTesting frontList...\nCalling frontList(lst)\n");
  assertTrue(((frontList(lst)) == (6)), "Testing the front link value == 6");
  printf("\nCall RemoveFrontList Function\n");
  removeFrontList(lst);
  printf("The list content should be: [5->10->4->3->2->5->7->1->9]\n");
  printList(lst);
  printf("\nCalling frontList(lst)\n");
  assertTrue(((frontList(lst)) == (5)), "Testing the front link value == 5");
  printf("\nCall RemoveFrontList Function\n");
  removeFrontList(lst);
  printf("The list content should be: [10->4->3->2->5->7->1->9]\n");
  printList(lst);
  printf("\nCalling frontList(lst)\n");
  assertTrue(((frontList(lst)) == (10)), "Testing the front link value == 10");
  printf("\nCall RemoveFrontList Function\n");
  removeFrontList(lst);
  printf("The list content should be: [4->3->2->5->7->1->9]\n");
  printList(lst);
  printf("\nCalling frontList(lst)\n");
  assertTrue(((frontList(lst)) == (4)), "Testing the front link value == 4");
  printf("\nCall RemoveFrontList Function\n");
  removeFrontList(lst);
  printf("The list content should be: [3->2->5->7->1->9]\n");
  printList(lst);
  printf("\nCalling frontList(lst)\n");
  assertTrue(((frontList(lst)) == (3)), "Testing the front link value == 3");
}


x86 assembly (clang, -O0):
<frontListTest>:
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   1030 <frontList@plt>
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xeac(%rip),%rsi
call   1050 <assertTrue@plt>
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <removeFrontList@plt>
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1070 <printList@plt>
lea    0xe5d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <frontList@plt>
cmp    $0x5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xed2(%rip),%rsi
call   1050 <assertTrue@plt>
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <removeFrontList@plt>
lea    0xed3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1070 <printList@plt>
lea    0xe07(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <frontList@plt>
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xed5(%rip),%rsi
call   1050 <assertTrue@plt>
lea    0xe16(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <removeFrontList@plt>
lea    0xed7(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1070 <printList@plt>
lea    0xdb1(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <frontList@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xed5(%rip),%rsi
call   1050 <assertTrue@plt>
lea    0xdc0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <removeFrontList@plt>
lea    0xed6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1070 <printList@plt>
lea    0xd5b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <frontList@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xed1(%rip),%rsi
call   1050 <assertTrue@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frontListTest>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xf4c(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <frontList@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
lea    0xe84(%rip),%rsi
call   1050 <assertTrue@plt>
lea    0xff2(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1060 <removeFrontList@plt>
lea    0xf3a(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1070 <printList@plt>
lea    0xf0e(%rip),%r15
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <frontList@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
lea    0xe4f(%rip),%rsi
call   1050 <assertTrue@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1060 <removeFrontList@plt>
lea    0xf23(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1070 <printList@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <frontList@plt>
xor    %edi,%edi
cmp    $0xa,%eax
sete   %dil
lea    0xe28(%rip),%rsi
call   1050 <assertTrue@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1060 <removeFrontList@plt>
lea    0xf10(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1070 <printList@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <frontList@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
lea    0xe02(%rip),%rsi
call   1050 <assertTrue@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1060 <removeFrontList@plt>
lea    0xf18(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1070 <printList@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <frontList@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
lea    0xddb(%rip),%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <assertTrue@plt>

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

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