// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/elasticarray/main.c
// Function: selftest
static int
test_intlist(void)
{
	INTLIST list;
	size_t i;
	int x;

	/* Allocate list. */
	if ((list = intlist_init(0)) == NULL)
		goto err0;

	/* Append some values. */
	for (i = 0; i < NUM_ELEM; i++) {
		x = (int)i;
		if (intlist_append(list, &x, 1))
			goto err1;
	}

	/* Use the list. */
	for (i = 0; i < intlist_getsize(list); i++) {
		x = *intlist_get(list, i);
		printf("int:\t%d\n", x);
	}

	/* Free memory. */
	intlist_free(list);

	/* Success! */
	return (0);

err1:
	intlist_free(list);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x1777
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x16d4
movq %rax, %r14
xorl %ecx, %ecx
movq %rsp, %r15
pushq $0x1
popq %r12
movq %rcx, %rbx
cmpq $0x2, %rcx
je 0x1510
movl %ebx, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1781
leaq 0x1(%rbx), %rcx
testl %eax, %eax
je 0x1445
movq %r14, %rdi
callq 0x1a97
cmpq $0x2, %rbx
jne 0x16d4
pushq $0x8
popq %rsi
xorl %edi, %edi
callq 0x1a00
testq %rax, %rax
je 0x16d4
movq %rax, %r14
xorl %ecx, %ecx
pushq $0x4
popq %r15
movq %rsp, %r12
pushq $0x1
popq %r13
pushq $0x8
popq %rbp
movq %rcx, %rbx
cmpq $0x2, %rcx
je 0x1622
movq %r15, %rdi
callq 0x1160
movq %rax, (%rsp)
testq %rax, %rax
je 0x14e5
movl %ebx, (%rax)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x1b5a
leaq 0x1(%rbx), %rcx
testl %eax, %eax
je 0x14a3
movq (%rsp), %rdi
callq 0x1030
xorl %r15d, %r15d
pushq $-0x1
popq %rbp
movq %r14, %rdi
callq 0x1791
cmpq %rax, %r15
jae 0x1551
movq %r14, %rdi
movq %r15, %rsi
callq 0x1799
movq (%rax), %rdi
callq 0x1030
incq %r15
jmp 0x14eb
pushq $0x4
popq %r15
leaq 0x1aef(%rip), %r12      # 0x300a
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x1789
cmpq %rax, %r13
jae 0x146b
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1c88
movl (%rax), %esi
movl %esi, (%rsp)
movq %r12, %rdi
xorl %eax, %eax
callq 0x10d0
incq %r13
jmp 0x151e
movq %r14, %rdi
callq 0x1a97
cmpq $0x2, %rbx
jne 0x16d4
pushq $0x8
popq %rsi
xorl %edi, %edi
callq 0x1a00
testq %rax, %rax
je 0x16d4
movq %rax, %r14
xorl %ecx, %ecx
pushq $0x8
popq %r15
pushq $0x4
popq %r12
movq %rsp, %rbx
movq %rcx, %rbp
cmpq $0x2, %rcx
je 0x16e5
movq %r15, %rdi
callq 0x1160
movq %rax, (%rsp)
testq %rax, %rax
je 0x15eb
movq %rax, %r13
movq %r12, %rdi
callq 0x1160
movq %rax, (%r13)
testq %rax, %rax
je 0x15e3
movl %ebp, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
pushq $0x1
popq %rdx
movq %r15, %rcx
callq 0x1b5a
leaq 0x1(%rbp), %rcx
testl %eax, %eax
je 0x1586
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x1030
movq (%rsp), %r13
movq %r13, %rdi
callq 0x1030
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x17a1
cmpq %rax, %r15
jae 0x1660
movq %r14, %rdi
movq %r15, %rsi
callq 0x17a9
movq %rax, %r12
movq (%rax), %rax
movq (%rax), %rdi
callq 0x1030
movq (%r12), %rdi
callq 0x1030
incq %r15
jmp 0x15ee
leaq 0x19ea(%rip), %r15      # 0x3013
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x1791
cmpq %rax, %r12
jae 0x14e5
movq %r14, %rdi
movq %r12, %rsi
callq 0x1799
movq (%rax), %rax
movq %rax, (%rsp)
movl (%rax), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x10d0
incq %r12
jmp 0x162c
movq %r14, %rdi
callq 0x1a97
cmpq $0x2, %rbp
jne 0x16d1
callq 0x1777
testq %rax, %rax
pushq $-0x1
popq %rbp
je 0x16d4
movq %rax, %r14
movq %rax, %rdi
callq 0x1789
testq %rax, %rax
jne 0x16c7
pushq $0x4
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1a65
testl %eax, %eax
jne 0x16c7
movq %r14, %rdi
callq 0x1789
testq %rax, %rax
jne 0x16c7
movq %rsp, %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x1781
testl %eax, %eax
jne 0x16c7
movq %r14, %rdi
callq 0x1789
testq %rax, %rax
je 0x1726
movq %r14, %rdi
callq 0x1a97
jmp 0x16d4
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1930(%rip), %r15      # 0x301c
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x17a1
cmpq %rax, %r12
jae 0x15eb
movq %r14, %rdi
movq %r12, %rsi
callq 0x17a9
movq (%rax), %rax
movq %rax, (%rsp)
movq (%rax), %rax
movl (%rax), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x10d0
incq %r12
jmp 0x16ef
movq %r14, %rdi
callq 0x1a97
xorl %ebp, %ebp
jmp 0x16d4