// File: /workspace/github_c_makefile_star2_O3/attractivechaos[P]rb-eval/btree-c.c
// Function: test_int
int test_int(int n)
{
	int i, cnt = 0;
	uint64_t x = 11;
	intmap_t d;
	kbtree_t(bt) *h;

	h = kb_init(bt, KB_DEFAULT_SIZE);
	for (i = 0; i < n; ++i) {
		unsigned y = x % (n>>1);
		x = kad_splitmix64(x);
		d.key = y, d.value = i;
		if (kb_getp(bt, h, &d) == 0)
			kb_putp(bt, h, &d);
		else kb_delp(bt, h, &d);
	}
	cnt = kb_size(h);
	kb_destroy(bt, h);
	return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebp
movl $0x200, %edi            # imm = 0x200
callq 0x11dc
movq %rax, %rbx
movl %ebp, 0xc(%rsp)
testl %ebp, %ebp
jle 0x155b
movl 0xc(%rsp), %eax
shrl %eax
movq %rax, 0x20(%rsp)
movl $0xb, %r15d
xorl %r14d, %r14d
movq %r15, %rax
xorl %edx, %edx
divq 0x20(%rsp)
movq %rdx, %r13
movl %r13d, 0x18(%rsp)
movl %r14d, 0x1c(%rsp)
movq (%rbx), %r12
testq %r12, %r12
je 0x1345
movq %r12, %rax
movl (%rax), %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpl $0x2, %ecx
jb 0x132c
movl %ecx, %edx
sarl %edx
xorl %esi, %esi
testl %edx, %edx
jle 0x12fe
movl %edx, %edi
leal (%rsi,%rdi), %r8d
sarl %r8d
movslq %r8d, %r9
cmpl %r13d, 0x4(%rax,%r9,8)
jb 0x12f4
movl %r8d, %edi
jmp 0x12fa
incl %r8d
movl %r8d, %esi
cmpl %edi, %esi
jl 0x12de
cmpl %edx, %esi
jne 0x1306
decl %edx
jmp 0x132c
movslq %esi, %rdx
xorl %edi, %edi
cmpl %r13d, 0x4(%rax,%rdx,8)
seta %dil
sbbl $0x0, %edi
negl %edi
movl %edi, %edx
sarl $0x1f, %edx
addl %esi, %edx
testl %edi, %edi
jne 0x132c
testl %edx, %edx
jns 0x1526
testb $0x1, %cl
je 0x1345
movslq 0xc(%rbx), %rcx
addq %rcx, %rax
movslq %edx, %rcx
movq 0x8(%rax,%rcx,8), %rax
testq %rax, %rax
jne 0x12c6
incl 0x20(%rbx)
movl (%r12), %eax
movl %eax, %ecx
sarl %ecx
movl 0x1c(%rbx), %edx
leal -0x1(,%rdx,2), %edx
cmpl %edx, %ecx
movq %r14, 0x10(%rsp)
jne 0x143f
incl 0x24(%rbx)
movslq 0x10(%rbx), %rsi
movl $0x1, %edi
callq 0x1040
movq %rax, %r14
movq %rax, (%rbx)
movl $0x1, (%rax)
movslq 0xc(%rbx), %rax
movq %r12, (%r14,%rax)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x1660
movl (%r14), %eax
movq %r14, %r12
jmp 0x143f
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x2, %eax
jb 0x13eb
sarl %eax
xorl %ecx, %ecx
testl %eax, %eax
jle 0x13d6
movl %eax, %edx
leal (%rcx,%rdx), %esi
sarl %esi
movslq %esi, %rdi
cmpl %r13d, 0x4(%r12,%rdi,8)
jb 0x13ce
movl %esi, %edx
jmp 0x13d2
incl %esi
movl %esi, %ecx
cmpl %edx, %ecx
jl 0x13bb
cmpl %eax, %ecx
jne 0x13e0
decl %eax
movl %eax, %ecx
jmp 0x13eb
movslq %ecx, %rax
cmpl 0x4(%r12,%rax,8), %r13d
sbbl $0x0, %ecx
movslq %ecx, %rbp
movslq 0xc(%rbx), %rax
addq %r12, %rax
movq 0x8(%rax,%rbp,8), %rcx
movl (%rcx), %eax
movl %eax, %edx
sarl %edx
movl 0x1c(%rbx), %esi
leal -0x1(,%rsi,2), %esi
cmpl %esi, %edx
jne 0x143c
leaq 0x1(%rbp), %r14
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x1660
addl $0x2, %ebp
cmpl %r13d, 0x4(%r12,%r14,8)
cmovael %r14d, %ebp
movslq 0xc(%rbx), %rax
movslq %ebp, %rcx
addq %r12, %rax
movq (%rax,%rcx,8), %rcx
movl (%rcx), %eax
movq %rcx, %r12
testb $0x1, %al
jne 0x13a7
cmpl $0x2, %eax
jae 0x1455
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %eax, %eax
jmp 0x148e
sarl %eax
xorl %ecx, %ecx
testl %eax, %eax
jle 0x147a
movl %eax, %edx
leal (%rcx,%rdx), %esi
sarl %esi
movslq %esi, %rdi
cmpl %r13d, 0x4(%r12,%rdi,8)
jb 0x1472
movl %esi, %edx
jmp 0x1476
incl %esi
movl %esi, %ecx
cmpl %edx, %ecx
jl 0x145f
cmpl %eax, %ecx
jne 0x1483
leal -0x1(%rax), %ecx
jmp 0x148e
movslq %ecx, %rdx
cmpl 0x4(%r12,%rdx,8), %r13d
sbbl $0x0, %ecx
leal -0x1(%rax), %edx
movslq %ecx, %r14
cmpl %edx, %ecx
je 0x14bb
leaq (%r12,%r14,8), %rdi
addq $0x14, %rdi
leaq (%r12,%r14,8), %rsi
addq $0xc, %rsi
movl %r14d, %ecx
notl %ecx
addl %ecx, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
movq 0x18(%rsp), %rax
movq %rax, 0xc(%r12,%r14,8)
addl $0x2, (%r12)
movq 0x10(%rsp), %r14
movabsq $-0x61c8864680b583eb, %rax # imm = 0x9E3779B97F4A7C15
addq %rax, %r15
movq %r15, %rax
shrq $0x1e, %rax
xorq %r15, %rax
movabsq $-0x40a7b892e31b1a47, %rcx # imm = 0xBF58476D1CE4E5B9
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x1b, %rcx
xorq %rax, %rcx
movabsq $-0x6b2fb644ecceee15, %rax # imm = 0x94D049BB133111EB
imulq %rax, %rcx
movq %rcx, %r15
shrq $0x1f, %r15
xorq %rcx, %r15
incl %r14d
cmpl 0xc(%rsp), %r14d
jne 0x12a0
jmp 0x155b
movq %rbx, %rdi
movq %r12, %rsi
leaq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x1773
decl 0x20(%rbx)
movq (%rbx), %rdi
cmpl $0x1, (%rdi)
jne 0x14cf
decl 0x24(%rbx)
movslq 0xc(%rbx), %rax
movq (%rdi,%rax), %rax
movq %rax, (%rbx)
callq 0x1030
jmp 0x14cf
movl 0x20(%rbx), %ebp
movl $0x8, %edi
movl $0x8, %esi
callq 0x1040
movq %rax, %r14
movq (%rbx), %rax
movq %rax, (%r14)
movq %r14, %r13
addq $0x8, %r13
movl $0x8, %r12d
addq $-0x8, %r13
movq (%r13), %r15
movl (%r15), %ecx
testb $0x1, %cl
jne 0x15ac
movq %r15, %rdi
callq 0x1030
leaq -0x8(%r13), %rax
cmpq %r14, %r13
movq %rax, %r13
jne 0x1587
jmp 0x163f
movl %ebp, 0x10(%rsp)
testl %ecx, %ecx
js 0x162a
movl 0xc(%rbx), %eax
movq $-0x1, %rbp
movslq %eax, %rdx
addq %r15, %rdx
cmpq $0x0, 0x8(%rdx,%rbp,8)
je 0x161b
movq %r13, %rcx
subq %r14, %rcx
sarq $0x3, %rcx
movslq %r12d, %rdx
cmpq %rdx, %rcx
jne 0x1605
movq %r12, %r13
addl %r12d, %r12d
movslq %r12d, %rsi
shlq $0x3, %rsi
movq %r14, %rdi
callq 0x1070
movq %rax, %r14
shlq $0x21, %r13
sarq $0x21, %r13
leaq (%rax,%r13,8), %r13
movl 0xc(%rbx), %eax
movslq %eax, %rcx
addq %r15, %rcx
movq 0x8(%rcx,%rbp,8), %rcx
movq %rcx, (%r13)
addq $0x8, %r13
movl (%r15), %ecx
movl %ecx, %edx
sarl %edx
movslq %edx, %rdx
incq %rbp
cmpq %rdx, %rbp
jl 0x15be
movq %r15, %rdi
callq 0x1030
cmpq %r14, %r13
movl 0x10(%rsp), %ebp
jne 0x1583
movq %rbx, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq