#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 */

/* Variables and functions */
int /*<<< orphan*/ append_item(unsigned int, int);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ delete_item(unsigned int, int);
int get_item(unsigned int, int);
int /*<<< orphan*/ insert_item(unsigned int, int, int);
int len_list(unsigned int);
int /*<<< orphan*/ list_initialise();
unsigned int new_list();
int /*<<< orphan*/ set_item(unsigned int, int, int);
void main() {
  list_initialise();
  unsigned list = new_list();
  assert(len_list(list) == 0);
  append_item(list, 0);
  assert(len_list(list) == 1);
  assert(get_item(list, 0) == 0);
  append_item(list, 1);
  assert(len_list(list) == 2);
  assert(get_item(list, 0) == 0);
  assert(get_item(list, 1) == 1);
  append_item(list, 2);
  assert(len_list(list) == 3);
  assert(get_item(list, 0) == 0);
  assert(get_item(list, 1) == 1);
  assert(get_item(list, 2) == 2);
  delete_item(list, 1);
  assert(len_list(list) == 2);
  assert(get_item(list, 0) == 0);
  assert(get_item(list, 1) == 2);
  delete_item(list, 0);
  assert(len_list(list) == 1);
  assert(get_item(list, 1) == 2);
  delete_item(list, 0);
  assert(len_list(list) == 0);
  append_item(list, 0);
  append_item(list, 1);
  append_item(list, 2);
  append_item(list, 3);
  assert(get_item(list, 0) == 0);
  assert(get_item(list, 1) == 1);
  assert(get_item(list, 2) == 2);
  assert(get_item(list, 3) == 3);
  assert(len_list(list) == 4);
  set_item(list, 3, 0);
  set_item(list, 2, 1);
  set_item(list, 1, 2);
  set_item(list, 0, 3);
  assert(get_item(list, 0) == 3);
  assert(get_item(list, 1) == 2);
  assert(get_item(list, 2) == 1);
  assert(get_item(list, 3) == 0);
  insert_item(list, 3, 3);
  insert_item(list, 2, 2);
  insert_item(list, 1, 1);
  insert_item(list, 0, 0);
  assert(get_item(list, 0) == 0);
  assert(get_item(list, 1) == 3);
  assert(get_item(list, 2) == 1);
  assert(get_item(list, 3) == 2);
  assert(get_item(list, 4) == 2);
  assert(get_item(list, 5) == 1);
  assert(get_item(list, 6) == 3);
  assert(get_item(list, 7) == 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <list_initialise@plt>
mov    $0x0,%al
call   1090 <new_list@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <len_list@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   10b0 <append_item@plt>
mov    -0x4(%rbp),%edi
call   1040 <len_list@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <get_item@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   10b0 <append_item@plt>
mov    -0x4(%rbp),%edi
call   1040 <len_list@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <get_item@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   10b0 <append_item@plt>
mov    -0x4(%rbp),%edi
call   1040 <len_list@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <get_item@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1050 <get_item@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   10a0 <delete_item@plt>
mov    -0x4(%rbp),%edi
call   1040 <len_list@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <get_item@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   10a0 <delete_item@plt>
mov    -0x4(%rbp),%edi
call   1040 <len_list@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   10a0 <delete_item@plt>
mov    -0x4(%rbp),%edi
call   1040 <len_list@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   10b0 <append_item@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   10b0 <append_item@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   10b0 <append_item@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   10b0 <append_item@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <get_item@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1050 <get_item@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1050 <get_item@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
call   1040 <len_list@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1070 <set_item@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1070 <set_item@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
mov    $0x2,%edx
call   1070 <set_item@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x3,%edx
call   1070 <set_item@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <get_item@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1050 <get_item@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1050 <get_item@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%edx
mov    %edx,%esi
call   1080 <insert_item@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%edx
mov    %edx,%esi
call   1080 <insert_item@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1080 <insert_item@plt>
mov    -0x4(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1080 <insert_item@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <get_item@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1050 <get_item@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1050 <get_item@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1050 <get_item@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x5,%esi
call   1050 <get_item@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x6,%esi
call   1050 <get_item@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
call   1050 <get_item@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <list_initialise@plt>
xor    %eax,%eax
call   1090 <new_list@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <len_list@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   10b0 <append_item@plt>
mov    %ebx,%edi
call   1040 <len_list@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   10b0 <append_item@plt>
mov    %ebx,%edi
call   1040 <len_list@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   10b0 <append_item@plt>
mov    %ebx,%edi
call   1040 <len_list@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   10a0 <delete_item@plt>
mov    %ebx,%edi
call   1040 <len_list@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   10a0 <delete_item@plt>
mov    %ebx,%edi
call   1040 <len_list@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   10a0 <delete_item@plt>
mov    %ebx,%edi
call   1040 <len_list@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   10b0 <append_item@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   10b0 <append_item@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   10b0 <append_item@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   10b0 <append_item@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
call   1040 <len_list@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1070 <set_item@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1070 <set_item@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x2,%edx
call   1070 <set_item@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x3,%edx
call   1070 <set_item@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    $0x3,%edx
call   1080 <insert_item@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    $0x2,%edx
call   1080 <insert_item@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1080 <insert_item@plt>
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1080 <insert_item@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x4,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x5,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x6,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1060 <assert@plt>
mov    %ebx,%edi
mov    $0x7,%esi
call   1050 <get_item@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rbx
jmp    1060 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = call i32 (...) @list_initialise()
%3 = call i32 (...) @new_list()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @len_list(i32 %4)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %1
%10 = call i32 @append_item(i32 %9, i32 0)
%11 = load i32, i32* %1
%12 = call i32 @len_list(i32 %11)
%13 = icmp eq i32 %12, 1
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i32, i32* %1
%17 = call i32 @get_item(i32 %16, i32 0)
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = load i32, i32* %1
%22 = call i32 @append_item(i32 %21, i32 1)
%23 = load i32, i32* %1
%24 = call i32 @len_list(i32 %23)
%25 = icmp eq i32 %24, 2
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = load i32, i32* %1
%29 = call i32 @get_item(i32 %28, i32 0)
%30 = icmp eq i32 %29, 0
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = load i32, i32* %1
%34 = call i32 @get_item(i32 %33, i32 1)
%35 = icmp eq i32 %34, 1
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = load i32, i32* %1
%39 = call i32 @append_item(i32 %38, i32 2)
%40 = load i32, i32* %1
%41 = call i32 @len_list(i32 %40)
%42 = icmp eq i32 %41, 3
%43 = zext i1 %42 to i32
%44 = call i32 @assert(i32 %43)
%45 = load i32, i32* %1
%46 = call i32 @get_item(i32 %45, i32 0)
%47 = icmp eq i32 %46, 0
%48 = zext i1 %47 to i32
%49 = call i32 @assert(i32 %48)
%50 = load i32, i32* %1
%51 = call i32 @get_item(i32 %50, i32 1)
%52 = icmp eq i32 %51, 1
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
%55 = load i32, i32* %1
%56 = call i32 @get_item(i32 %55, i32 2)
%57 = icmp eq i32 %56, 2
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58)
%60 = load i32, i32* %1
%61 = call i32 @delete_item(i32 %60, i32 1)
%62 = load i32, i32* %1
%63 = call i32 @len_list(i32 %62)
%64 = icmp eq i32 %63, 2
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = load i32, i32* %1
%68 = call i32 @get_item(i32 %67, i32 0)
%69 = icmp eq i32 %68, 0
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
%72 = load i32, i32* %1
%73 = call i32 @get_item(i32 %72, i32 1)
%74 = icmp eq i32 %73, 2
%75 = zext i1 %74 to i32
%76 = call i32 @assert(i32 %75)
%77 = load i32, i32* %1
%78 = call i32 @delete_item(i32 %77, i32 0)
%79 = load i32, i32* %1
%80 = call i32 @len_list(i32 %79)
%81 = icmp eq i32 %80, 1
%82 = zext i1 %81 to i32
%83 = call i32 @assert(i32 %82)
%84 = load i32, i32* %1
%85 = call i32 @get_item(i32 %84, i32 1)
%86 = icmp eq i32 %85, 2
%87 = zext i1 %86 to i32
%88 = call i32 @assert(i32 %87)
%89 = load i32, i32* %1
%90 = call i32 @delete_item(i32 %89, i32 0)
%91 = load i32, i32* %1
%92 = call i32 @len_list(i32 %91)
%93 = icmp eq i32 %92, 0
%94 = zext i1 %93 to i32
%95 = call i32 @assert(i32 %94)
%96 = load i32, i32* %1
%97 = call i32 @append_item(i32 %96, i32 0)
%98 = load i32, i32* %1
%99 = call i32 @append_item(i32 %98, i32 1)
%100 = load i32, i32* %1
%101 = call i32 @append_item(i32 %100, i32 2)
%102 = load i32, i32* %1
%103 = call i32 @append_item(i32 %102, i32 3)
%104 = load i32, i32* %1
%105 = call i32 @get_item(i32 %104, i32 0)
%106 = icmp eq i32 %105, 0
%107 = zext i1 %106 to i32
%108 = call i32 @assert(i32 %107)
%109 = load i32, i32* %1
%110 = call i32 @get_item(i32 %109, i32 1)
%111 = icmp eq i32 %110, 1
%112 = zext i1 %111 to i32
%113 = call i32 @assert(i32 %112)
%114 = load i32, i32* %1
%115 = call i32 @get_item(i32 %114, i32 2)
%116 = icmp eq i32 %115, 2
%117 = zext i1 %116 to i32
%118 = call i32 @assert(i32 %117)
%119 = load i32, i32* %1
%120 = call i32 @get_item(i32 %119, i32 3)
%121 = icmp eq i32 %120, 3
%122 = zext i1 %121 to i32
%123 = call i32 @assert(i32 %122)
%124 = load i32, i32* %1
%125 = call i32 @len_list(i32 %124)
%126 = icmp eq i32 %125, 4
%127 = zext i1 %126 to i32
%128 = call i32 @assert(i32 %127)
%129 = load i32, i32* %1
%130 = call i32 @set_item(i32 %129, i32 3, i32 0)
%131 = load i32, i32* %1
%132 = call i32 @set_item(i32 %131, i32 2, i32 1)
%133 = load i32, i32* %1
%134 = call i32 @set_item(i32 %133, i32 1, i32 2)
%135 = load i32, i32* %1
%136 = call i32 @set_item(i32 %135, i32 0, i32 3)
%137 = load i32, i32* %1
%138 = call i32 @get_item(i32 %137, i32 0)
%139 = icmp eq i32 %138, 3
%140 = zext i1 %139 to i32
%141 = call i32 @assert(i32 %140)
%142 = load i32, i32* %1
%143 = call i32 @get_item(i32 %142, i32 1)
%144 = icmp eq i32 %143, 2
%145 = zext i1 %144 to i32
%146 = call i32 @assert(i32 %145)
%147 = load i32, i32* %1
%148 = call i32 @get_item(i32 %147, i32 2)
%149 = icmp eq i32 %148, 1
%150 = zext i1 %149 to i32
%151 = call i32 @assert(i32 %150)
%152 = load i32, i32* %1
%153 = call i32 @get_item(i32 %152, i32 3)
%154 = icmp eq i32 %153, 0
%155 = zext i1 %154 to i32
%156 = call i32 @assert(i32 %155)
%157 = load i32, i32* %1
%158 = call i32 @insert_item(i32 %157, i32 3, i32 3)
%159 = load i32, i32* %1
%160 = call i32 @insert_item(i32 %159, i32 2, i32 2)
%161 = load i32, i32* %1
%162 = call i32 @insert_item(i32 %161, i32 1, i32 1)
%163 = load i32, i32* %1
%164 = call i32 @insert_item(i32 %163, i32 0, i32 0)
%165 = load i32, i32* %1
%166 = call i32 @get_item(i32 %165, i32 0)
%167 = icmp eq i32 %166, 0
%168 = zext i1 %167 to i32
%169 = call i32 @assert(i32 %168)
%170 = load i32, i32* %1
%171 = call i32 @get_item(i32 %170, i32 1)
%172 = icmp eq i32 %171, 3
%173 = zext i1 %172 to i32
%174 = call i32 @assert(i32 %173)
%175 = load i32, i32* %1
%176 = call i32 @get_item(i32 %175, i32 2)
%177 = icmp eq i32 %176, 1
%178 = zext i1 %177 to i32
%179 = call i32 @assert(i32 %178)
%180 = load i32, i32* %1
%181 = call i32 @get_item(i32 %180, i32 3)
%182 = icmp eq i32 %181, 2
%183 = zext i1 %182 to i32
%184 = call i32 @assert(i32 %183)
%185 = load i32, i32* %1
%186 = call i32 @get_item(i32 %185, i32 4)
%187 = icmp eq i32 %186, 2
%188 = zext i1 %187 to i32
%189 = call i32 @assert(i32 %188)
%190 = load i32, i32* %1
%191 = call i32 @get_item(i32 %190, i32 5)
%192 = icmp eq i32 %191, 1
%193 = zext i1 %192 to i32
%194 = call i32 @assert(i32 %193)
%195 = load i32, i32* %1
%196 = call i32 @get_item(i32 %195, i32 6)
%197 = icmp eq i32 %196, 3
%198 = zext i1 %197 to i32
%199 = call i32 @assert(i32 %198)
%200 = load i32, i32* %1
%201 = call i32 @get_item(i32 %200, i32 7)
%202 = icmp eq i32 %201, 0
%203 = zext i1 %202 to i32
%204 = call i32 @assert(i32 %203)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @list_initialise()
%2 = tail call i32 (...) @new_list()
%3 = tail call i32 @len_list(i32 %2)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @append_item(i32 %2, i32 0)
%8 = tail call i32 @len_list(i32 %2)
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = tail call i32 @get_item(i32 %2, i32 0)
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
%15 = tail call i32 @assert(i32 %14)
%16 = tail call i32 @append_item(i32 %2, i32 1)
%17 = tail call i32 @len_list(i32 %2)
%18 = icmp eq i32 %17, 2
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i32 @get_item(i32 %2, i32 0)
%22 = icmp eq i32 %21, 0
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = tail call i32 @get_item(i32 %2, i32 1)
%26 = icmp eq i32 %25, 1
%27 = zext i1 %26 to i32
%28 = tail call i32 @assert(i32 %27)
%29 = tail call i32 @append_item(i32 %2, i32 2)
%30 = tail call i32 @len_list(i32 %2)
%31 = icmp eq i32 %30, 3
%32 = zext i1 %31 to i32
%33 = tail call i32 @assert(i32 %32)
%34 = tail call i32 @get_item(i32 %2, i32 0)
%35 = icmp eq i32 %34, 0
%36 = zext i1 %35 to i32
%37 = tail call i32 @assert(i32 %36)
%38 = tail call i32 @get_item(i32 %2, i32 1)
%39 = icmp eq i32 %38, 1
%40 = zext i1 %39 to i32
%41 = tail call i32 @assert(i32 %40)
%42 = tail call i32 @get_item(i32 %2, i32 2)
%43 = icmp eq i32 %42, 2
%44 = zext i1 %43 to i32
%45 = tail call i32 @assert(i32 %44)
%46 = tail call i32 @delete_item(i32 %2, i32 1)
%47 = tail call i32 @len_list(i32 %2)
%48 = icmp eq i32 %47, 2
%49 = zext i1 %48 to i32
%50 = tail call i32 @assert(i32 %49)
%51 = tail call i32 @get_item(i32 %2, i32 0)
%52 = icmp eq i32 %51, 0
%53 = zext i1 %52 to i32
%54 = tail call i32 @assert(i32 %53)
%55 = tail call i32 @get_item(i32 %2, i32 1)
%56 = icmp eq i32 %55, 2
%57 = zext i1 %56 to i32
%58 = tail call i32 @assert(i32 %57)
%59 = tail call i32 @delete_item(i32 %2, i32 0)
%60 = tail call i32 @len_list(i32 %2)
%61 = icmp eq i32 %60, 1
%62 = zext i1 %61 to i32
%63 = tail call i32 @assert(i32 %62)
%64 = tail call i32 @get_item(i32 %2, i32 1)
%65 = icmp eq i32 %64, 2
%66 = zext i1 %65 to i32
%67 = tail call i32 @assert(i32 %66)
%68 = tail call i32 @delete_item(i32 %2, i32 0)
%69 = tail call i32 @len_list(i32 %2)
%70 = icmp eq i32 %69, 0
%71 = zext i1 %70 to i32
%72 = tail call i32 @assert(i32 %71)
%73 = tail call i32 @append_item(i32 %2, i32 0)
%74 = tail call i32 @append_item(i32 %2, i32 1)
%75 = tail call i32 @append_item(i32 %2, i32 2)
%76 = tail call i32 @append_item(i32 %2, i32 3)
%77 = tail call i32 @get_item(i32 %2, i32 0)
%78 = icmp eq i32 %77, 0
%79 = zext i1 %78 to i32
%80 = tail call i32 @assert(i32 %79)
%81 = tail call i32 @get_item(i32 %2, i32 1)
%82 = icmp eq i32 %81, 1
%83 = zext i1 %82 to i32
%84 = tail call i32 @assert(i32 %83)
%85 = tail call i32 @get_item(i32 %2, i32 2)
%86 = icmp eq i32 %85, 2
%87 = zext i1 %86 to i32
%88 = tail call i32 @assert(i32 %87)
%89 = tail call i32 @get_item(i32 %2, i32 3)
%90 = icmp eq i32 %89, 3
%91 = zext i1 %90 to i32
%92 = tail call i32 @assert(i32 %91)
%93 = tail call i32 @len_list(i32 %2)
%94 = icmp eq i32 %93, 4
%95 = zext i1 %94 to i32
%96 = tail call i32 @assert(i32 %95)
%97 = tail call i32 @set_item(i32 %2, i32 3, i32 0)
%98 = tail call i32 @set_item(i32 %2, i32 2, i32 1)
%99 = tail call i32 @set_item(i32 %2, i32 1, i32 2)
%100 = tail call i32 @set_item(i32 %2, i32 0, i32 3)
%101 = tail call i32 @get_item(i32 %2, i32 0)
%102 = icmp eq i32 %101, 3
%103 = zext i1 %102 to i32
%104 = tail call i32 @assert(i32 %103)
%105 = tail call i32 @get_item(i32 %2, i32 1)
%106 = icmp eq i32 %105, 2
%107 = zext i1 %106 to i32
%108 = tail call i32 @assert(i32 %107)
%109 = tail call i32 @get_item(i32 %2, i32 2)
%110 = icmp eq i32 %109, 1
%111 = zext i1 %110 to i32
%112 = tail call i32 @assert(i32 %111)
%113 = tail call i32 @get_item(i32 %2, i32 3)
%114 = icmp eq i32 %113, 0
%115 = zext i1 %114 to i32
%116 = tail call i32 @assert(i32 %115)
%117 = tail call i32 @insert_item(i32 %2, i32 3, i32 3)
%118 = tail call i32 @insert_item(i32 %2, i32 2, i32 2)
%119 = tail call i32 @insert_item(i32 %2, i32 1, i32 1)
%120 = tail call i32 @insert_item(i32 %2, i32 0, i32 0)
%121 = tail call i32 @get_item(i32 %2, i32 0)
%122 = icmp eq i32 %121, 0
%123 = zext i1 %122 to i32
%124 = tail call i32 @assert(i32 %123)
%125 = tail call i32 @get_item(i32 %2, i32 1)
%126 = icmp eq i32 %125, 3
%127 = zext i1 %126 to i32
%128 = tail call i32 @assert(i32 %127)
%129 = tail call i32 @get_item(i32 %2, i32 2)
%130 = icmp eq i32 %129, 1
%131 = zext i1 %130 to i32
%132 = tail call i32 @assert(i32 %131)
%133 = tail call i32 @get_item(i32 %2, i32 3)
%134 = icmp eq i32 %133, 2
%135 = zext i1 %134 to i32
%136 = tail call i32 @assert(i32 %135)
%137 = tail call i32 @get_item(i32 %2, i32 4)
%138 = icmp eq i32 %137, 2
%139 = zext i1 %138 to i32
%140 = tail call i32 @assert(i32 %139)
%141 = tail call i32 @get_item(i32 %2, i32 5)
%142 = icmp eq i32 %141, 1
%143 = zext i1 %142 to i32
%144 = tail call i32 @assert(i32 %143)
%145 = tail call i32 @get_item(i32 %2, i32 6)
%146 = icmp eq i32 %145, 3
%147 = zext i1 %146 to i32
%148 = tail call i32 @assert(i32 %147)
%149 = tail call i32 @get_item(i32 %2, i32 7)
%150 = icmp eq i32 %149, 0
%151 = zext i1 %150 to i32
%152 = tail call i32 @assert(i32 %151)
ret void
}