// File: /workspace/github_cpp_makefile_star2_O3/amadvance[P]tommyds/check.c
// Function: test_arrayof
void test_arrayof(void)
{
	tommy_arrayof arrayof;
	unsigned i;
	const unsigned size = 50 * TOMMY_SIZE;

	tommy_arrayof_init(&arrayof, sizeof(unsigned));

	/* no op */
	tommy_arrayof_grow(&arrayof, 0);

	START("arrayof init");
	for(i=0;i<size;++i) {
		tommy_arrayof_grow(&arrayof, i + 1);
		unsigned* ref = tommy_arrayof_ref(&arrayof, i);
		if (*ref != 0)
			/* LCOV_EXCL_START */
			abort();
			/* LCOV_EXCL_STOP */
	}
	STOP();

	START("arrayof set");
	for(i=0;i<size;++i) {
		unsigned* ref = tommy_arrayof_ref(&arrayof, i);
		*ref = i;
	}
	STOP();

	START("arrayof get");
	for(i=0;i<size;++i) {
		unsigned* ref = tommy_arrayof_ref(&arrayof, i);
		if (*ref != i)
			/* LCOV_EXCL_START */
			abort();
			/* LCOV_EXCL_STOP */
	}
	STOP();

	if (tommy_arrayof_memory_usage(&arrayof) < size * sizeof(unsigned))
		/* LCOV_EXCL_START */
		abort();
		/* LCOV_EXCL_STOP */

	tommy_arrayof_done(&arrayof);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
leaq 0x8(%rsp), %rbx
movl $0x4, %esi
movq %rbx, %rdi
callq 0x4335
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4426
movq $-0x20, %rax
leaq 0x98e7(%rip), %r15      # 0xbe10
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x2529
movl $0x0, 0x98bc(%rip)      # 0xbe00
leaq 0x4cdd(%rip), %rax      # 0x7228
movq %rax, 0x10098be(%rip)   # 0x100be10
callq 0x12e3
movq %rax, 0x10098ba(%rip)   # 0x100be18
xorl %r12d, %r12d
leaq 0x8(%rsp), %rbx
cmpq $0x2faf080, %r12        # imm = 0x2FAF080
je 0x25b8
leaq 0x1(%r12), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4426
cmpq %r12, 0x218(%rsp)
jbe 0x26f7
movq %r12, %rax
orq $0x1, %rax
bsrq %rax, %rax
shll $0x3, %eax
imulq 0x208(%rsp), %r12
movq 0x8(%rsp,%rax), %rax
cmpl $0x0, (%rax,%r12)
movq %r14, %r12
je 0x2566
callq 0x1040
callq 0x1312
movq $-0x20, %rax
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x25c4
movl $0x0, 0x9821(%rip)      # 0xbe00
leaq 0x4c4f(%rip), %rax      # 0x7235
movq %rax, 0x1009823(%rip)   # 0x100be10
callq 0x12e3
movq %rax, 0x100981f(%rip)   # 0x100be18
movq 0x208(%rsp), %rax
movq 0x218(%rsp), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x26f7
movq %rsi, %rdi
orq $0x1, %rdi
bsrq %rdi, %rdi
shll $0x3, %edi
movq 0x8(%rsp,%rdi), %rdi
movl %esi, (%rdi,%rdx)
incq %rsi
addq %rax, %rdx
cmpq $0x2faf080, %rsi        # imm = 0x2FAF080
jne 0x260d
callq 0x1312
movq $-0x20, %rax
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x2647
movl $0x0, 0x979e(%rip)      # 0xbe00
leaq 0x4bd8(%rip), %rax      # 0x7241
movq %rax, 0x10097a0(%rip)   # 0x100be10
callq 0x12e3
movq %rax, 0x100979c(%rip)   # 0x100be18
movq 0x208(%rsp), %rax
movq 0x218(%rsp), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x26f7
movq %rsi, %rdi
orq $0x1, %rdi
bsrq %rdi, %rdi
shll $0x3, %edi
movq 0x8(%rsp,%rdi), %rdi
movl (%rdi,%rdx), %edi
cmpq %rdi, %rsi
jne 0x25b3
incq %rsi
addq %rax, %rdx
cmpq $0x2faf080, %rsi        # imm = 0x2FAF080
jne 0x2690
callq 0x1312
leaq 0x8(%rsp), %rdi
callq 0x449d
cmpq $0xbebc1ff, %rax        # imm = 0xBEBC1FF
jbe 0x25b3
leaq 0x8(%rsp), %rdi
callq 0x43dc
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4c0f(%rip), %rdi      # 0x730d
leaq 0x4c66(%rip), %rsi      # 0x736b
leaq 0x4c78(%rip), %rcx      # 0x7384
movl $0x60, %edx
callq 0x1090