// File: /workspace/github_cpp_makefile_star2_O1/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 $0xb8, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0xcfb(%rip), %rax       # 0x20d6
movq %rax, 0x20(%rsp)
andq $0x0, 0x28(%rsp)
movl $0x0, 0x8(%rsp)
movl %edi, 0x3c(%rsp)
testl %edi, %edi
je 0x174b
movl 0x3c(%rsp), %eax
shrl $0x2, %eax
movl %eax, 0x48(%rsp)
xorl %eax, %eax
movl $0x0, 0x8(%rsp)
movq %rax, 0x40(%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, 0xc(%rsp)
xorl %edx, %edx
divl 0x48(%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, %ecx
shrl $0x10, %ecx
xorl %eax, %ecx
movl %ecx, 0x4c(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl 0x4c(%rsp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1923
movq 0x80(%rsp), %r12
cmpq 0x88(%rsp), %r12
jne 0x15ca
movq 0x18(%rsp), %rbx
leaq (%rbx,%rbx), %rbp
testq %rbx, %rbx
pushq $0x8
popq %rax
cmoveq %rax, %rbp
andq $0x0, 0x50(%rsp)
movq %rbp, 0x58(%rsp)
leaq 0x8(,%rbp,2), %rdi
callq 0x1070
movq %rax, %r14
movq %rax, 0x60(%rsp)
leaq (,%rbp,8), %rdi
callq 0x1070
movq %rax, %r15
movq %rax, 0x68(%rsp)
testq %r14, %r14
setne %al
testq %r15, %r15
setne %r13b
andb %al, %r13b
je 0x15b1
leaq (,%rbp,2), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1050
orq $-0x1, (%r14,%rbp,2)
testq %rbx, %rbx
je 0x159b
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %r15
xorl %ebp, %ebp
cmpw $0x0, (%r14,%rbp,2)
je 0x1581
movl (%r15,%rbp,8), %edx
movl 0x4(%r15,%rbp,8), %ecx
leaq 0x98(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %r8
callq 0x1923
movq 0xa0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jne 0x1581
movq 0x60(%rsp), %rdi
callq 0x1030
movq 0x68(%rsp), %rdi
callq 0x1030
incq %rbp
cmpq %rbp, %rbx
jne 0x1534
movq %r14, %rdi
callq 0x1030
movq 0x28(%rsp), %rdi
callq 0x1030
movups 0x50(%rsp), %xmm0
movups 0x60(%rsp), %xmm1
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
jmp 0x15c1
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
testb %r13b, %r13b
jne 0x1480
movq 0x10(%rsp), %rax
cmpq 0x70(%rsp), %rax
jne 0x1612
movq 0x90(%rsp), %rdx
decq %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %r12, %rcx
subq %rax, %rcx
movzwl (%r12), %r8d
movl %r8d, %esi
notl %esi
testw $0xfff, %si             # imm = 0xFFF
movl $0x7ff, %r14d           # imm = 0x7FF
jne 0x161b
andw $0x0, (%rax,%rcx)
jmp 0x1715
incl 0x8(%rsp)
jmp 0x1736
movq %rcx, %rsi
sarq %rsi
cmpq $-0x1, %rdx
jne 0x163f
btl $0xb, %r8d
movq %rsi, %rdx
jb 0x163f
movq 0x28(%rsp), %rdi
movl 0x18(%rsp), %edx
decl %edx
andl (%rdi,%rsi,8), %edx
notl %r8d
movq 0x18(%rsp), %rdi
decq %rdi
movq %rdx, %r9
testw $0x7ff, %r8w            # imm = 0x7FF
jne 0x169b
movzwl (%rax,%r9,2), %r10d
movl %r10d, %r11d
andl $0x7ff, %r11d           # imm = 0x7FF
leal 0x1(%r11), %r8d
imull %r11d, %r8d
shrl %r8d
addq %rdx, %r8
andq %rdi, %r8
movq %r8, %r11
cmpq %rsi, %r8
jne 0x1691
orl $0x7ff, %r10d           # imm = 0x7FF
movw %r10w, (%rax,%r9,2)
andw $0x0, (%rax,%rcx)
movq %r9, %r11
movq %r11, %r9
cmpq %rsi, %r8
jne 0x1655
jmp 0x1715
movq 0x28(%rsp), %r8
movq %rsi, %r9
movzwl (%rax,%r9,2), %ebx
andl %r14d, %ebx
leal 0x1(%rbx), %r10d
imull %ebx, %r10d
shrl %r10d
addq %rdx, %r10
andq %rdi, %r10
movzwl (%rax,%r10,2), %ebx
andl %r14d, %ebx
cmpw $0x7ff, %bx             # imm = 0x7FF
jne 0x1705
movq (%r8,%r10,8), %r11
movq %r11, (%r8,%rsi,8)
movzwl (%rax,%rcx), %r11d
andl $0xfff, %r11d           # imm = 0xFFF
movzwl (%rax,%r10,2), %ebp
andl $0xfffff000, %ebp       # imm = 0xFFFFF000
orl %r11d, %ebp
movw %bp, (%rax,%rcx)
orw $0x7ff, (%rax,%r9,2)    # imm = 0x7FF
andw $0x0, (%rax,%r10,2)
cmpq %rsi, %r10
setbe %r11b
movq %r10, %r9
cmpw $0x7ff, %bx             # imm = 0x7FF
jne 0x16a3
testb $0x1, %r11b
je 0x1736
addq $0x2, %r12
movq (%r12), %rax
leaq 0x8(%r12), %rcx
bsfq %rax, %rdx
shrl $0x4, %edx
leaq (%r12,%rdx,2), %r12
testq %rax, %rax
cmoveq %rcx, %r12
je 0x1719
movq 0x40(%rsp), %rax
movl 0xc(%rsp), %esi
incl %eax
cmpl 0x3c(%rsp), %eax
jne 0x140f
movq 0x28a6(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
leaq 0x93f(%rip), %rsi       # 0x20a5
movq %rbx, %rdx
movl 0x8(%rsp), %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x1060
testq %r14, %r14
je 0x17aa
movq 0x20(%rsp), %rdi
callq 0x1030
movq 0x28(%rsp), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x937(%rip), %rax       # 0x20d6
movq %rax, 0x20(%rsp)
andq $0x0, 0x28(%rsp)
movl %ebx, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop