// File: /workspace/github_cpp_makefile_star2_O3/amadvance[P]tommyds/check.c
// Function: test_arrayblk
void test_arrayblk(void)
{
	tommy_arrayblk arrayblk;
	tommy_uintptr_t i;
	const unsigned size = 50 * TOMMY_SIZE;

	tommy_arrayblk_init(&arrayblk);

	/* no op */
	tommy_arrayblk_grow(&arrayblk, 0);

	START("arrayblk init");
	for(i=0;i<size;++i) {
		tommy_arrayblk_grow(&arrayblk, i + 1);
		if (tommy_arrayblk_get(&arrayblk, i) != 0)
			/* LCOV_EXCL_START */
			abort();
			/* LCOV_EXCL_STOP */
	}
	STOP();

	START("arrayblk set");
	for(i=0;i<size;++i) {
		tommy_arrayblk_set(&arrayblk, i, (void*)i);
	}
	STOP();

	START("arrayblk get");
	for(i=0;i<size;++i) {
		if (tommy_arrayblk_get(&arrayblk, i) != (void*)i)
			/* LCOV_EXCL_START */
			abort();
			/* LCOV_EXCL_STOP */
	}
	STOP();

	if (tommy_arrayblk_memory_usage(&arrayblk) < size * sizeof(void*))
		/* LCOV_EXCL_START */
		abort();
		/* LCOV_EXCL_STOP */

	tommy_arrayblk_done(&arrayblk);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x44ad
movq %rbx, %rdi
xorl %esi, %esi
callq 0x45a1
movq $-0x20, %rax
leaq 0x96c7(%rip), %r15      # 0xbe10
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x2749
movl $0x0, 0x969c(%rip)      # 0xbe00
leaq 0x4ae2(%rip), %rax      # 0x724d
movq %rax, 0x100969e(%rip)   # 0x100be10
callq 0x12e3
movq %rax, 0x100969a(%rip)   # 0x100be18
xorl %r12d, %r12d
leaq 0x8(%rsp), %rbx
cmpq $0x2faf080, %r12        # imm = 0x2FAF080
je 0x27ef
leaq 0x1(%r12), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x45a1
cmpq %r12, 0x220(%rsp)
jbe 0x295b
movq %r12, %rax
shrq $0xc, %rax
cmpq %rax, 0x210(%rsp)
jbe 0x297a
movq %rax, %rcx
orq $0x1, %rcx
bsrq %rcx, %rcx
shll $0x3, %ecx
movq 0x8(%rsp,%rcx), %rcx
movq (%rcx,%rax,8), %rax
andl $0xfff, %r12d           # imm = 0xFFF
cmpq $0x0, (%rax,%r12,8)
movq %r14, %r12
je 0x2786
callq 0x1040
callq 0x1312
movq $-0x20, %rax
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x27fb
movl $0x0, 0x95ea(%rip)      # 0xbe00
leaq 0x4a3e(%rip), %rax      # 0x725b
movq %rax, 0x10095ec(%rip)   # 0x100be10
callq 0x12e3
movq %rax, 0x10095e8(%rip)   # 0x100be18
movq 0x210(%rsp), %rax
movq 0x220(%rsp), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x295b
movq %rdx, %rsi
shrq $0xc, %rsi
cmpq %rsi, %rax
jbe 0x297a
movq %rsi, %rdi
orq $0x1, %rdi
bsrq %rdi, %rdi
shll $0x3, %edi
movq 0x8(%rsp,%rdi), %rdi
movq (%rdi,%rsi,8), %rsi
movl %edx, %edi
andl $0xfff, %edi            # imm = 0xFFF
movq %rdx, (%rsi,%rdi,8)
incq %rdx
cmpq $0x2faf080, %rdx        # imm = 0x2FAF080
jne 0x2842
callq 0x1312
movq $-0x20, %rax
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x2896
movl $0x0, 0x954f(%rip)      # 0xbe00
leaq 0x49b0(%rip), %rax      # 0x7268
movq %rax, 0x1009551(%rip)   # 0x100be10
callq 0x12e3
movq %rax, 0x100954d(%rip)   # 0x100be18
movq 0x210(%rsp), %rax
movq 0x220(%rsp), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x295b
movq %rdx, %rsi
shrq $0xc, %rsi
cmpq %rsi, %rax
jbe 0x297a
movq %rsi, %rdi
orq $0x1, %rdi
bsrq %rdi, %rdi
shll $0x3, %edi
movq 0x8(%rsp,%rdi), %rdi
movq (%rdi,%rsi,8), %rsi
movl %edx, %edi
andl $0xfff, %edi            # imm = 0xFFF
cmpq %rdx, (%rsi,%rdi,8)
jne 0x27ea
incq %rdx
cmpq $0x2faf080, %rdx        # imm = 0x2FAF080
jne 0x28dd
callq 0x1312
leaq 0x8(%rsp), %rdi
callq 0x4645
cmpq $0x17d783ff, %rax       # imm = 0x17D783FF
jbe 0x27ea
leaq 0x8(%rsp), %rdi
callq 0x4557
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x49ab(%rip), %rdi      # 0x730d
leaq 0x4a52(%rip), %rsi      # 0x73bb
leaq 0x4a65(%rip), %rcx      # 0x73d5
movl $0x5b, %edx
callq 0x1090
leaq 0x498c(%rip), %rdi      # 0x730d
leaq 0x4998(%rip), %rsi      # 0x7320
leaq 0x49a8(%rip), %rcx      # 0x7337
movl $0x5c, %edx
callq 0x1090