// File: /workspace/github_cpp_makefile_star2_O1/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 0x431c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x43b2
movq $-0x20, %rax
leaq 0x88b1(%rip), %r15      # 0xae10
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x255f
movl $0x0, 0x8886(%rip)      # 0xae00
leaq 0x4ca7(%rip), %rax      # 0x7228
movq %rax, 0x1008888(%rip)   # 0x100ae10
callq 0x12e3
movq %rax, 0x1008884(%rip)   # 0x100ae18
xorl %r12d, %r12d
leaq 0x8(%rsp), %rbx
cmpq $0x2faf080, %r12        # imm = 0x2FAF080
je 0x25ee
leaq 0x1(%r12), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x43b2
cmpq %r12, 0x218(%rsp)
jbe 0x272d
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 0x259c
callq 0x1040
callq 0x1312
movq $-0x20, %rax
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x25fa
movl $0x0, 0x87eb(%rip)      # 0xae00
leaq 0x4c19(%rip), %rax      # 0x7235
movq %rax, 0x10087ed(%rip)   # 0x100ae10
callq 0x12e3
movq %rax, 0x10087e9(%rip)   # 0x100ae18
movq 0x208(%rsp), %rax
movq 0x218(%rsp), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x272d
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 0x2643
callq 0x1312
movq $-0x20, %rax
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x267d
movl $0x0, 0x8768(%rip)      # 0xae00
leaq 0x4ba2(%rip), %rax      # 0x7241
movq %rax, 0x100876a(%rip)   # 0x100ae10
callq 0x12e3
movq %rax, 0x1008766(%rip)   # 0x100ae18
movq 0x208(%rsp), %rax
movq 0x218(%rsp), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x272d
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 0x25e9
incq %rsi
addq %rax, %rdx
cmpq $0x2faf080, %rsi        # imm = 0x2FAF080
jne 0x26c6
callq 0x1312
leaq 0x8(%rsp), %rdi
callq 0x4429
cmpq $0xbebc1ff, %rax        # imm = 0xBEBC1FF
jbe 0x25e9
leaq 0x8(%rsp), %rdi
callq 0x4368
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4bd9(%rip), %rdi      # 0x730d
leaq 0x4c30(%rip), %rsi      # 0x736b
leaq 0x4c42(%rip), %rcx      # 0x7384
movl $0x60, %edx
callq 0x1090