// File: /workspace/github_c_makefile_star2_O2/attractivechaos[P]rb-eval/btree-c.c
// Function: _kb_delp_aux_bt
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 $0x38, %rsp
movq %rdx, %r14
andl $0x0, 0x24(%rsp)
testq %rsi, %rsi
je 0x179a
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
testl %ecx, %ecx
je 0x17a2
movl (%r15), %eax
movl %eax, %ecx
andl $0x1, %ecx
negl %ecx
xorl %edx, %edx
cmpl $0x1, %ebp
sete %dl
leal -0x1(,%rdx,2), %edx
andl %ecx, %edx
movl %edx, 0x24(%rsp)
cmpl $0x1, %ebp
jne 0x17ba
movl %eax, %r13d
sarl %r13d
decl %r13d
jmp 0x17be
movq (%r14), %r14
jmp 0x1cf6
leaq 0x24(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x15ca
movl %eax, %r13d
movl (%r15), %eax
jmp 0x17be
pushq $-0x1
popq %r13
testb $0x1, %al
jne 0x17fe
xorl %ecx, %ecx
cmpl $0x2, %ebp
sete %cl
addl %ecx, %r13d
movslq %r13d, %rcx
leaq (%r15,%rcx,8), %rdi
addq $0x4, %rdi
movq (%rdi), %r14
leaq (%r15,%rcx,8), %rsi
addq $0xc, %rsi
sarl %eax
notl %ecx
addl %eax, %ecx
movslq %ecx, %rdx
shlq $0x3, %rdx
callq 0x1080
addl $-0x2, (%r15)
jmp 0x1cf6
cmpl $0x0, 0x24(%rsp)
movslq 0xc(%rbx), %rcx
movslq %r13d, %r12
je 0x198a
movl 0x1c(%rbx), %esi
leal -0x1(%rsi), %r8d
movq %r14, 0x8(%rsp)
addq %r15, %rcx
movq 0x8(%rcx,%r12,8), %r9
movl (%r9), %r14d
movl %r14d, %edx
sarl %edx
cmpl %r8d, %edx
jne 0x1c1d
movq %rbx, 0x10(%rsp)
movl %r13d, %r11d
testl %r13d, %r13d
js 0x1852
movq (%rcx,%r11,8), %rbx
movl (%rbx), %edi
sarl %edi
cmpl %esi, %edi
jge 0x1c3a
leaq 0x1(%r12), %r8
sarl %eax
cmpl %eax, %r8d
jge 0x1870
movq 0x10(%rcx,%r12,8), %r10
movl (%r10), %edi
sarl %edi
cmpl %esi, %edi
jge 0x1d08
testl %r13d, %r13d
movq 0x10(%rsp), %rbx
js 0x1af8
movq (%rcx,%r11,8), %r10
movl (%r10), %esi
movl %esi, %edi
sarl %edi
cmpl %edx, %edi
jne 0x1af8
movq %r8, 0x18(%rsp)
addl $0x2, %esi
movl %esi, (%r10)
movslq %edx, %rax
leaq 0x4(%r15), %r14
movq 0x4(%r15,%r11,8), %rcx
movq %rcx, 0x4(%r10,%rax,8)
movl (%r10), %eax
sarl %eax
cltq
leaq (%r10,%rax,8), %rdi
addq $0x4, %rdi
leaq 0x4(%r9), %rsi
movl (%r9), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x3, %rdx
movq %r9, %r12
movq %r10, %r13
callq 0x1080
movq %r13, %r8
movl (%r13), %eax
xorl %ecx, %ecx
testb $0x1, %al
je 0x1918
movslq 0xc(%rbx), %rsi
leaq (%r8,%rsi), %rcx
sarl %eax
cltq
leaq (%rcx,%rax,8), %rdi
addq %r12, %rsi
movl (%r12), %eax
sarl %eax
cltq
leaq 0x8(,%rax,8), %rdx
callq 0x1080
movq %r13, %r8
movl (%r13), %eax
movl %eax, %ecx
andl $0x1, %ecx
andl $-0x2, %eax
addl (%r12), %eax
andl $-0x2, %eax
orl %ecx, %eax
movl %eax, (%r8)
movq 0x18(%rsp), %r13
leaq (%r14,%r13,8), %rsi
leaq (%r14,%r13,8), %rdi
addq $-0x8, %rdi
movl (%r15), %eax
sarl %eax
subl %r13d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
movq %r8, %r14
callq 0x1080
movslq 0xc(%rbx), %rax
addq %r15, %rax
leaq (%rax,%r13,8), %rdi
leaq (%rax,%r13,8), %rsi
addq $0x8, %rsi
movl (%r15), %eax
sarl %eax
subl %r13d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
addl $-0x2, (%r15)
movq %r12, %rdi
callq 0x1030
movq %r14, %r9
jmp 0x1c1d
leaq (%r15,%rcx), %r8
movq (%r8,%r12,8), %r10
movl (%r10), %edx
movl %edx, %edi
sarl %edi
movl 0x1c(%rbx), %esi
cmpl %esi, %edi
jge 0x1ae5
movq 0x8(%r8,%r12,8), %r11
movl (%r11), %r9d
sarl %r9d
cmpl %esi, %r9d
jge 0x1cdc
leal -0x1(%rsi), %r8d
cmpl %r8d, %edi
jne 0x1817
cmpl %r8d, %r9d
jne 0x1817
addl $0x2, %edx
movl %edx, (%r10)
movslq %edi, %rax
movq %r14, 0x8(%rsp)
movq (%r14), %rcx
movq %rcx, 0x4(%r10,%rax,8)
movl (%r10), %eax
sarl %eax
cltq
leaq (%r10,%rax,8), %rdi
addq $0x4, %rdi
leaq 0x4(%r11), %rsi
movl (%r11), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x3, %rdx
movq %r10, %r14
movq %r11, 0x18(%rsp)
callq 0x1080
movq %r14, %rdx
movl (%r14), %eax
xorl %ecx, %ecx
testb $0x1, %al
movq %rbx, 0x10(%rsp)
je 0x1a57
movslq 0xc(%rbx), %rsi
leaq (%rdx,%rsi), %rcx
sarl %eax
cltq
leaq (%rcx,%rax,8), %rdi
movq 0x18(%rsp), %rax
addq %rax, %rsi
movl (%rax), %eax
sarl %eax
cltq
leaq 0x8(,%rax,8), %rdx
callq 0x1080
movq %r14, %rdx
movl (%r14), %eax
movl %eax, %ecx
andl $0x1, %ecx
movq %rdx, 0x28(%rsp)
andl $-0x2, %eax
movq 0x18(%rsp), %r14
addl (%r14), %eax
andl $-0x2, %eax
orl %ecx, %eax
movl %eax, (%rdx)
leaq (%r15,%r12,8), %rbx
leaq (%r15,%r12,8), %rdi
addq $0x4, %rdi
leaq (%r15,%r12,8), %rsi
addq $0xc, %rsi
movl (%r15), %eax
sarl %eax
notl %r13d
addl %r13d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
movq 0x10(%rsp), %r12
movslq 0xc(%r12), %rax
leaq (%rax,%rbx), %rdi
addq $0x8, %rdi
leaq (%rax,%rbx), %rsi
addq $0x10, %rsi
movl (%r15), %eax
sarl %eax
addl %r13d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
addl $-0x2, (%r15)
movq %r14, %rdi
callq 0x1030
movq %r12, %rdi
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rdx
jmp 0x1c2b
movq 0x4(%r15,%r12,8), %r14
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r10, %rsi
jmp 0x1cea
cmpl %eax, %r8d
jge 0x1c1d
movq 0x10(%rcx,%r12,8), %r12
movl (%r12), %eax
sarl %eax
cmpl %edx, %eax
jne 0x1c1d
addl $0x2, %r14d
movl %r14d, (%r9)
movslq %edx, %rax
movq %r8, 0x18(%rsp)
leaq (%r15,%r8,8), %rcx
addq $0x4, %rcx
movq %rcx, 0x30(%rsp)
movq (%rcx), %rcx
movq %rcx, 0x4(%r9,%rax,8)
movl (%r9), %eax
sarl %eax
cltq
leaq (%r9,%rax,8), %rdi
addq $0x4, %rdi
leaq 0x4(%r12), %rsi
movl (%r12), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x3, %rdx
movq %r9, 0x28(%rsp)
callq 0x1080
movq 0x28(%rsp), %rdx
movl (%rdx), %eax
xorl %ecx, %ecx
testb $0x1, %al
je 0x1ba4
movslq 0xc(%rbx), %rsi
leaq (%rdx,%rsi), %rcx
sarl %eax
cltq
leaq (%rcx,%rax,8), %rdi
addq %r12, %rsi
movl (%r12), %eax
sarl %eax
cltq
leaq 0x8(,%rax,8), %rdx
callq 0x1080
movq 0x28(%rsp), %rdx
movl (%rdx), %eax
movl %eax, %ecx
andl $0x1, %ecx
movq 0x8(%rsp), %r14
andl $-0x2, %eax
addl (%r12), %eax
andl $-0x2, %eax
orl %ecx, %eax
movl %eax, (%rdx)
movq 0x30(%rsp), %rdi
leaq 0x8(%rdi), %rsi
movl (%r15), %eax
sarl %eax
subl %r13d, %eax
addl $-0x2, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
movslq 0xc(%rbx), %rax
addq %r15, %rax
movq 0x18(%rsp), %rcx
leaq (%rax,%rcx,8), %rdi
addq $0x8, %rdi
leaq (%rax,%rcx,8), %rsi
addq $0x10, %rsi
movl (%r15), %eax
sarl %eax
subl %r13d, %eax
addl $-0x2, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
addl $-0x2, (%r15)
movq %r12, %rdi
callq 0x1030
movq 0x28(%rsp), %r9
jmp 0x1c22
movq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r9, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1744
movq %rax, %r14
jmp 0x1cf6
movq %r11, 0x18(%rsp)
leaq 0x4(%r9), %rsi
leaq 0xc(%r9), %rdi
movslq %edx, %r12
leaq (,%r12,8), %rdx
movq %r9, %r13
callq 0x1080
testb $0x1, %r14b
je 0x1c82
movq 0x10(%rsp), %rax
movslq 0xc(%rax), %rax
leaq (%rax,%r13), %rsi
leaq (%rax,%r13), %rdi
addq $0x8, %rdi
leaq 0x8(,%r12,8), %rdx
callq 0x1080
movq 0x18(%rsp), %rcx
movq 0x4(%r15,%rcx,8), %rax
movq %rax, 0x4(%r13)
movl (%rbx), %eax
sarl %eax
cltq
movq -0x4(%rbx,%rax,8), %rax
movq %rax, 0x4(%r15,%rcx,8)
testb $0x1, (%r13)
movq 0x8(%rsp), %r14
movq %r13, %r9
je 0x1ccb
movq 0x10(%rsp), %rax
movslq 0xc(%rax), %rax
leaq (%rbx,%rax), %rcx
movl (%rbx), %edx
sarl %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, (%r9,%rax)
addl $-0x2, (%rbx)
addl $0x2, (%r9)
movq 0x10(%rsp), %rbx
jmp 0x1c22
movq 0x4(%r15,%r12,8), %r14
pushq $0x2
popq %rcx
movq %rbx, %rdi
movq %r11, %rsi
xorl %edx, %edx
callq 0x1744
movq %rax, 0x4(%r15,%r12,8)
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addl $0x2, %r14d
movl %r14d, (%r9)
movslq %edx, %rax
movq 0x4(%r15,%r8,8), %rcx
movq %rcx, 0x4(%r9,%rax,8)
leaq 0x4(%r10), %rdi
movq 0x4(%r10), %rax
movq %rax, 0x4(%r15,%r8,8)
movl (%r9), %eax
testb $0x1, %al
je 0x1d48
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movq (%r10,%rcx), %rdx
addq %r9, %rcx
sarl %eax
cltq
movq %rdx, (%rcx,%rax,8)
movq %r9, %r15
movl (%r10), %r14d
movl %r14d, %eax
andl $-0x2, %eax
andl $0x1, %r14d
leal (%rax,%r14), %ecx
addl $-0x2, %ecx
addl $-0x2, %eax
movl %ecx, (%r10)
movq %r10, %r12
leaq 0xc(%r10), %rsi
sarl %eax
movslq %eax, %rbx
leaq (,%rbx,8), %rdx
callq 0x1080
testl %r14d, %r14d
jne 0x1d8a
movq 0x10(%rsp), %rbx
jmp 0x1daf
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rax
leaq (%r12,%rax), %rdi
leaq (%r12,%rax), %rsi
addq $0x8, %rsi
leaq 0x8(,%rbx,8), %rdx
movq %rcx, %rbx
callq 0x1080
movq 0x8(%rsp), %r14
movq %r15, %r9
jmp 0x1c22