// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/verstable/test.c
// Function: test_int
uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0;
	intmap_t h;
	intmap_t_init(&h);
	for (i = 0, x = x0; i < n; ++i) {
		uint32_t key;
		x = hash32(x);
		key = get_key(n, x);
		size_t ori_size = intmap_t_size(&h);
		intmap_t_itr itr = intmap_t_get_or_insert(&h, key, 0);
#ifndef UDB2_TEST_DEL
		z += ++itr.data->val;
#else
		if (intmap_t_size(&h) == ori_size)
			intmap_t_erase_itr(&h, itr);
		else ++z;
#endif
	}
	fprintf(stderr, "# unique keys: %ld; checksum: %u; capacity: %lu\n",
			intmap_t_size(&h), z, intmap_t_bucket_count(&h));
	x = intmap_t_size(&h);
	intmap_t_cleanup(&h);
	return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rcx
movaps %xmm0, (%rcx)
leaq 0xc46(%rip), %rax       # 0x20d6
movq %rax, 0x10(%rcx)
andq $0x0, 0x18(%rcx)
xorl %edx, %edx
leaq 0x88(%rsp), %rbp
movl $0x0, 0xc(%rsp)
xorl %ecx, %ecx
movl %edi, (%rsp)
cmpl %ebx, %ecx
je 0x1787
movl %ecx, 0x4(%rsp)
movq %rdx, 0x60(%rsp)
movl %esi, %edi
callq 0x11fc
movl %ebx, %edi
movl %eax, 0x8(%rsp)
movl %eax, %esi
callq 0x1227
movl %eax, 0x3c(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl 0x3c(%rsp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x17dc
movq 0x70(%rsp), %rbx
cmpq 0x78(%rsp), %rbx
jne 0x161b
movq %rbp, %r15
movq 0x18(%rsp), %r12
leaq (%r12,%r12), %rbp
testq %r12, %r12
pushq $0x8
popq %rax
cmoveq %rax, %rbp
andq $0x0, 0x40(%rsp)
movq %rbp, 0x48(%rsp)
leaq 0x8(,%rbp,2), %rdi
callq 0x1070
movq %rax, %r14
movq %rax, 0x50(%rsp)
leaq (,%rbp,8), %rdi
callq 0x1070
movq %rax, %r13
movq %rax, 0x58(%rsp)
testq %r14, %r14
je 0x1608
testq %r13, %r13
je 0x1608
leaq (,%rbp,2), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1050
orq $-0x1, (%r14,%rbp,2)
movq 0x20(%rsp), %r13
movq 0x28(%rsp), %r14
xorl %ebx, %ebx
movq %r15, %rbp
leaq 0x40(%rsp), %r15
cmpq %rbx, %r12
je 0x15da
cmpw $0x0, (%r13,%rbx,2)
je 0x15d5
movl (%r14,%rbx,8), %edx
movl 0x4(%r14,%rbx,8), %ecx
movq %rbp, %rdi
movq %r15, %rsi
pushq $0x1
popq %r8
callq 0x17dc
movq 0x90(%rsp), %rax
cmpq 0x98(%rsp), %rax
jne 0x15d5
movq 0x50(%rsp), %rdi
callq 0x1030
movq 0x58(%rsp), %rdi
callq 0x1030
incq %rbx
jmp 0x1589
testq %r12, %r12
je 0x15ef
movq %r13, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
movups 0x40(%rsp), %xmm0
movups 0x50(%rsp), %xmm1
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
jmp 0x14d9
movq %r14, %rdi
callq 0x1030
movq %r13, %rdi
callq 0x1030
movq %r15, %rbp
movq 0x10(%rsp), %rax
movq 0x60(%rsp), %r14
cmpq %r14, %rax
jne 0x166c
movq 0x80(%rsp), %rsi
decq %r14
movq %r14, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rbx, %rcx
subq %rax, %rcx
movzwl (%rbx), %r8d
movl %r8d, %edx
notl %edx
testw $0xfff, %dx             # imm = 0xFFF
je 0x16e8
movq %rcx, %rdx
sarq %rdx
cmpq $-0x1, %rsi
je 0x1680
movq 0x18(%rsp), %rdi
jmp 0x169d
incl 0xc(%rsp)
movl (%rsp), %ebx
movl 0x8(%rsp), %esi
movl 0x4(%rsp), %ecx
jmp 0x1709
btl $0xb, %r8d
movq 0x18(%rsp), %rdi
jb 0x169a
movq 0x28(%rsp), %r9
leal -0x1(%rdi), %esi
andl (%r9,%rdx,8), %esi
jmp 0x169d
movq %rdx, %rsi
movl %r8d, %r10d
notl %r10d
decq %rdi
movq %rdx, %r9
testw $0x7ff, %r10w           # imm = 0x7FF
jne 0x1713
movq %rsi, %r10
movq %r10, %r8
movzwl (%rax,%r10,2), %r9d
movl %r9d, %r11d
andl $0x7ff, %r11d           # imm = 0x7FF
leal 0x1(%r11), %r10d
imull %r11d, %r10d
shrl %r10d
addq %rsi, %r10
andq %rdi, %r10
cmpq %rdx, %r10
jne 0x16b4
orl $0x7ff, %r9d            # imm = 0x7FF
movw %r9w, (%rax,%r8,2)
andw $0x0, (%rax,%rcx)
addq $0x2, %rbx
movl 0x8(%rsp), %esi
movl 0x4(%rsp), %ecx
cmpq $0x0, (%rbx)
leaq 0x8(%rbx), %rbx
je 0x16f9
movq %r14, %rax
movl (%rsp), %ebx
incl %ecx
movq %rax, %rdx
jmp 0x14b0
movq %r9, %r10
andl $0x7ff, %r8d            # imm = 0x7FF
leal 0x1(%r8), %r9d
imull %r8d, %r9d
shrl %r9d
addq %rsi, %r9
andq %rdi, %r9
movzwl (%rax,%r9,2), %r8d
movl %r8d, %r11d
notl %r11d
testw $0x7ff, %r11w           # imm = 0x7FF
jne 0x1713
movq 0x28(%rsp), %rsi
movq (%rsi,%r9,8), %rdi
movq %rdi, (%rsi,%rdx,8)
movzwl (%rax,%rcx), %esi
andl $0xfff, %esi            # imm = 0xFFF
movzwl (%rax,%r9,2), %edi
andl $0xfffff000, %edi       # imm = 0xFFFFF000
orl %esi, %edi
movw %di, (%rax,%rcx)
orw $0x7ff, (%rax,%r10,2)   # imm = 0x7FF
andw $0x0, (%rax,%r9,2)
cmpq %rdx, %r9
jbe 0x16ed
movq %r14, %rax
jmp 0x1670
movq 0x286a(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq 0x18(%rsp), %rbx
leaq 0x908(%rip), %rsi       # 0x20a5
movq %rdx, %r14
movl 0xc(%rsp), %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0x1060
testq %rbx, %rbx
je 0x17c7
movq 0x20(%rsp), %rdi
callq 0x1030
movq 0x28(%rsp), %rdi
callq 0x1030
movl %r14d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq