// File: /workspace/github_cpp_makefile_star2_O3/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
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0xb73(%rip), %rax       # 0x20d6
movq %rax, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
testl %edi, %edi
jne 0x1582
callq 0x13b8
xorl %r15d, %r15d
jmp 0x1947
movl %edi, %eax
shrl $0x2, %eax
movl %eax, 0x30(%rsp)
xorl %r15d, %r15d
leaq 0x88(%rsp), %rbp
leaq 0x38(%rsp), %r14
xorl %eax, %eax
movl $0x0, 0xc(%rsp)
movl %edi, (%rsp)
movl %eax, 0x4(%rsp)
movq %r15, 0x58(%rsp)
movl %esi, %eax
shll $0xf, %eax
notl %eax
addl %esi, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %edx
shll $0xb, %edx
notl %edx
addl %ecx, %edx
movl %edx, %eax
shrl $0x10, %eax
xorl %edx, %eax
movl %eax, 0x8(%rsp)
xorl %edx, %edx
divl 0x30(%rsp)
movl %edx, %eax
shll $0xf, %eax
notl %eax
addl %edx, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %ebx
shrl $0x10, %ebx
xorl %eax, %ebx
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x195c
movq 0x70(%rsp), %r13
cmpq 0x78(%rsp), %r13
jne 0x178e
movl %ebx, 0x34(%rsp)
movq %r13, 0x60(%rsp)
movq %r14, %r13
movq %rbp, %r14
movq 0x18(%rsp), %rbx
leaq (%rbx,%rbx), %rbp
testq %rbx, %rbx
movl $0x8, %eax
cmoveq %rax, %rbp
movq $0x0, 0x38(%rsp)
movq %rbp, 0x40(%rsp)
leaq 0x8(,%rbp,2), %rdi
callq 0x1070
movq %rax, %r15
movq %rax, 0x48(%rsp)
leaq (,%rbp,8), %rdi
callq 0x1070
movq %rax, %r12
movq %rax, 0x50(%rsp)
testq %r15, %r15
je 0x1773
testq %r12, %r12
je 0x1773
leaq (,%rbp,2), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x1050
movq $-0x1, (%r15,%rbp,2)
testq %rbx, %rbx
movq %r14, %rbp
movq %r13, %r14
je 0x1735
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %r15
xorl %r13d, %r13d
cmpw $0x0, (%r12,%r13,2)
je 0x171d
movl (%r15,%r13,8), %edx
movl 0x4(%r15,%r13,8), %ecx
movq %rbp, %rdi
movq %r14, %rsi
movl $0x1, %r8d
callq 0x195c
movq 0x90(%rsp), %rax
cmpq 0x98(%rsp), %rax
jne 0x171d
movq 0x48(%rsp), %rdi
callq 0x1030
movq 0x50(%rsp), %rdi
callq 0x1030
incq %r13
cmpq %r13, %rbx
jne 0x16d5
movq %r12, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
movups 0x38(%rsp), %xmm0
movups 0x48(%rsp), %xmm1
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl 0x34(%rsp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x195c
movq 0x70(%rsp), %r13
cmpq 0x78(%rsp), %r13
je 0x1639
jmp 0x178e
movq %r15, %rdi
callq 0x1030
movq %r12, %rdi
callq 0x1030
movq %r14, %rbp
movq %r13, %r14
movq 0x60(%rsp), %r13
movq 0x10(%rsp), %rax
movq 0x58(%rsp), %r15
cmpq %r15, %rax
jne 0x17e1
movq 0x80(%rsp), %rsi
decq %r15
movq %r15, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %r13, %rcx
subq %rax, %rcx
movzwl (%r13), %r8d
movl %r8d, %edx
notl %edx
testl $0xfff, %edx            # imm = 0xFFF
je 0x1861
movq %rcx, %rdx
sarq %rdx
cmpq $-0x1, %rsi
je 0x17f8
movq 0x18(%rsp), %rdi
jmp 0x1815
incl 0xc(%rsp)
movq %rax, %r15
movl (%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x4(%rsp), %eax
jmp 0x1888
btl $0xb, %r8d
movq 0x18(%rsp), %rdi
jb 0x1812
movq 0x28(%rsp), %r9
leal -0x1(%rdi), %esi
andl (%r9,%rdx,8), %esi
jmp 0x1815
movq %rdx, %rsi
movl %r8d, %r10d
notl %r10d
decq %rdi
movq %rdx, %r9
testl $0x7ff, %r10d           # imm = 0x7FF
jne 0x1894
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 0x182d
orl $0x7ff, %r9d            # imm = 0x7FF
movw %r9w, (%rax,%r8,2)
movw $0x0, (%rax,%rcx)
cmpq $0x0, 0x2(%r13)
movl (%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x4(%rsp), %eax
jne 0x1888
addq $0xa, %r13
cmpq $0x0, (%r13)
leaq 0x8(%r13), %r13
je 0x187d
incl %eax
cmpl %edi, %eax
jne 0x15a8
jmp 0x1907
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
testl $0x7ff, %r11d           # imm = 0x7FF
jne 0x1894
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
movw $0x0, (%rax,%r9,2)
cmpq %rdx, %r9
ja 0x17e8
jmp 0x1867
movq 0x18(%rsp), %rbx
movq 0x26e5(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x788(%rip), %rsi       # 0x20a5
movq %r15, %rdx
movl 0xc(%rsp), %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0x1060
testq %rbx, %rbx
je 0x1947
movq 0x20(%rsp), %rdi
callq 0x1030
movq 0x28(%rsp), %rdi
callq 0x1030
movl %r15d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq