// File: /workspace/github_cpp_makefile_star2_O1/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 0x4439
movq %rbx, %rdi
xorl %esi, %esi
callq 0x44d2
movq $-0x20, %rax
leaq 0x8691(%rip), %r15      # 0xae10
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x277f
movl $0x0, 0x8666(%rip)      # 0xae00
leaq 0x4aac(%rip), %rax      # 0x724d
movq %rax, 0x1008668(%rip)   # 0x100ae10
callq 0x12e3
movq %rax, 0x1008664(%rip)   # 0x100ae18
xorl %r12d, %r12d
leaq 0x8(%rsp), %rbx
cmpq $0x2faf080, %r12        # imm = 0x2FAF080
je 0x2825
leaq 0x1(%r12), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x44d2
cmpq %r12, 0x220(%rsp)
jbe 0x2991
movq %r12, %rax
shrq $0xc, %rax
cmpq %rax, 0x210(%rsp)
jbe 0x29b0
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 0x27bc
callq 0x1040
callq 0x1312
movq $-0x20, %rax
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x2831
movl $0x0, 0x85b4(%rip)      # 0xae00
leaq 0x4a08(%rip), %rax      # 0x725b
movq %rax, 0x10085b6(%rip)   # 0x100ae10
callq 0x12e3
movq %rax, 0x10085b2(%rip)   # 0x100ae18
movq 0x210(%rsp), %rax
movq 0x220(%rsp), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x2991
movq %rdx, %rsi
shrq $0xc, %rsi
cmpq %rsi, %rax
jbe 0x29b0
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 0x2878
callq 0x1312
movq $-0x20, %rax
incb 0x20(%rax,%r15)
addq $0x20, %rax
cmpq $0xffffe0, %rax         # imm = 0xFFFFE0
jb 0x28cc
movl $0x0, 0x8519(%rip)      # 0xae00
leaq 0x497a(%rip), %rax      # 0x7268
movq %rax, 0x100851b(%rip)   # 0x100ae10
callq 0x12e3
movq %rax, 0x1008517(%rip)   # 0x100ae18
movq 0x210(%rsp), %rax
movq 0x220(%rsp), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x2991
movq %rdx, %rsi
shrq $0xc, %rsi
cmpq %rsi, %rax
jbe 0x29b0
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 0x2820
incq %rdx
cmpq $0x2faf080, %rdx        # imm = 0x2FAF080
jne 0x2913
callq 0x1312
leaq 0x8(%rsp), %rdi
callq 0x4576
cmpq $0x17d783ff, %rax       # imm = 0x17D783FF
jbe 0x2820
leaq 0x8(%rsp), %rdi
callq 0x4488
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4975(%rip), %rdi      # 0x730d
leaq 0x4a1c(%rip), %rsi      # 0x73bb
leaq 0x4a2f(%rip), %rcx      # 0x73d5
movl $0x5b, %edx
callq 0x1090
leaq 0x4956(%rip), %rdi      # 0x730d
leaq 0x4962(%rip), %rsi      # 0x7320
leaq 0x4972(%rip), %rcx      # 0x7337
movl $0x5c, %edx
callq 0x1090