// File: /workspace/github_c_makefile_star2_O1/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 $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, (%rsp)
movl %ecx, 0xc(%rsp)
testq %r15, %r15
je 0x1db8
movq %r15, %r13
testl %ecx, %ecx
je 0x1839
movl (%r13), %eax
testb $0x1, %al
sete %dl
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x1, %ecx
jne 0x18b4
sarl %eax
decl %eax
movl %eax, %r14d
jmp 0x18b4
movl (%r13), %r14d
cmpl $0x2, %r14d
jae 0x184d
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movb $0x1, %dl
jmp 0x18b4
sarl %r14d
testl %r14d, %r14d
jle 0x187f
movq 0x10(%rsp), %rax
movl (%rax), %r8d
xorl %eax, %eax
movl %r14d, %edx
leal (%rax,%rdx), %esi
sarl %esi
movslq %esi, %rdi
cmpl %r8d, 0x4(%r13,%rdi,8)
jb 0x1875
movl %esi, %edx
jmp 0x1879
incl %esi
movl %esi, %eax
cmpl %edx, %eax
jl 0x1862
jmp 0x1881
xorl %eax, %eax
cmpl %r14d, %eax
jne 0x188d
decl %r14d
xorl %edx, %edx
jmp 0x18b4
movq 0x10(%rsp), %rdx
movl (%rdx), %edi
movslq %eax, %rdx
xorl %esi, %esi
cmpl 0x4(%r13,%rdx,8), %edi
seta %sil
sbbl $0x0, %esi
movl %esi, %r14d
sarl $0x1f, %r14d
addl %eax, %r14d
testl %esi, %esi
sete %dl
movl (%r13), %eax
testb $0x1, %al
je 0x1dc2
movslq %r14d, %rbp
testb %dl, %dl
je 0x1a15
movq (%rsp), %rsi
movslq 0xc(%rsi), %rdi
addq %r13, %rdi
movq (%rdi,%rbp,8), %r15
movl (%r15), %r8d
movl %r8d, %edx
sarl %edx
movl 0x1c(%rsi), %esi
cmpl %esi, %edx
jge 0x1e02
movq 0x8(%rdi,%rbp,8), %r12
movl (%r12), %edi
sarl %edi
cmpl %esi, %edi
jge 0x1e17
decl %esi
cmpl %esi, %edx
jne 0x1a15
cmpl %esi, %edi
jne 0x1a15
addl $0x2, %r8d
movl %r8d, (%r15)
movslq %edx, %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
movq %rcx, 0x4(%r15,%rax,8)
movl (%r15), %eax
sarl %eax
cltq
leaq (%r15,%rax,8), %rdi
addq $0x4, %rdi
leaq 0x4(%r12), %rsi
movl (%r12), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
movl (%r15), %eax
testb $0x1, %al
je 0x1982
movq (%rsp), %rcx
movslq 0xc(%rcx), %rsi
leaq (%r15,%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
movl (%r15), %eax
movl %eax, %ecx
andl $-0x2, %ecx
addl (%r12), %ecx
andl $-0x2, %ecx
andl $0x1, %eax
orl %ecx, %eax
movl %eax, (%r15)
leaq (,%rbp,8), %rbx
addq %r13, %rbx
leaq 0x4(,%rbp,8), %rdi
addq %r13, %rdi
leaq 0xc(,%rbp,8), %rsi
addq %r13, %rsi
movl (%r13), %eax
sarl %eax
notl %r14d
addl %r14d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
movq (%rsp), %rax
movslq 0xc(%rax), %rax
leaq (%rax,%rbx), %rdi
addq $0x8, %rdi
leaq (%rax,%rbx), %rsi
addq $0x10, %rsi
movl (%r13), %eax
sarl %eax
addl %r14d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
addl $-0x2, (%r13)
movq %r12, %rdi
callq 0x1030
movl 0xc(%rsp), %ecx
jmp 0x1808
movq (%rsp), %rsi
movslq 0xc(%rsi), %rdx
addq %r13, %rdx
movq 0x8(%rdx,%rbp,8), %r15
movl (%r15), %r12d
movl %r12d, %r10d
sarl %r10d
movl 0x1c(%rsi), %edi
leal -0x1(%rdi), %esi
cmpl %esi, %r10d
jne 0x1808
testl %r14d, %r14d
js 0x1a58
movl %r14d, %r9d
movq (%rdx,%r9,8), %rbx
movl (%rbx), %r8d
sarl %r8d
cmpl %edi, %r8d
jge 0x1c87
leaq 0x1(%rbp), %r11
sarl %eax
cmpl %eax, %r11d
jge 0x1a77
movq 0x10(%rdx,%rbp,8), %rbx
movl (%rbx), %r8d
sarl %r8d
cmpl %edi, %r8d
jge 0x1d13
testl %r14d, %r14d
js 0x1b82
movl %r14d, %edi
movq (%rdx,%rdi,8), %rbx
movl (%rbx), %r9d
movl %r9d, %r8d
sarl %r8d
cmpl %esi, %r8d
jne 0x1b82
movq %r11, %r14
addl $0x2, %r9d
movl %r9d, (%rbx)
movslq %r8d, %rax
movq 0x4(%r13,%rdi,8), %rcx
movq %rcx, 0x4(%rbx,%rax,8)
movl (%rbx), %eax
sarl %eax
cltq
leaq (%rbx,%rax,8), %rdi
addq $0x4, %rdi
leaq 0x4(%r15), %rsi
movl (%r15), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
movl (%rbx), %eax
testb $0x1, %al
je 0x1b04
movq (%rsp), %rcx
movslq 0xc(%rcx), %rsi
leaq (%rbx,%rsi), %rcx
sarl %eax
cltq
leaq (%rcx,%rax,8), %rdi
addq %r15, %rsi
movl (%r15), %eax
sarl %eax
cltq
leaq 0x8(,%rax,8), %rdx
callq 0x1080
movl (%rbx), %eax
movl %eax, %ecx
andl $-0x2, %ecx
addl (%r15), %ecx
leaq 0x4(%r13), %rdx
andl $-0x2, %ecx
andl $0x1, %eax
orl %ecx, %eax
movl %eax, (%rbx)
leaq (%rdx,%r14,8), %rsi
leaq (%rdx,%r14,8), %rdi
addq $-0x8, %rdi
movl (%r13), %eax
sarl %eax
subl %r14d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
movq (%rsp), %rax
movslq 0xc(%rax), %rax
addq %r13, %rax
leaq (%rax,%r14,8), %rdi
leaq (%rax,%r14,8), %rsi
addq $0x8, %rsi
movl (%r13), %eax
sarl %eax
subl %r14d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
addl $-0x2, (%r13)
movq %r15, %rdi
callq 0x1030
movq %rbx, %r15
movl 0xc(%rsp), %ecx
jmp 0x1808
cmpl %eax, %r11d
jge 0x1808
movq 0x10(%rdx,%rbp,8), %rbp
movl (%rbp), %eax
sarl %eax
cmpl %esi, %eax
jne 0x1808
addl $0x2, %r12d
movl %r12d, (%r15)
movslq %r10d, %rax
movq %r11, %rbx
movq 0x4(%r13,%r11,8), %rcx
movq %rcx, 0x4(%r15,%rax,8)
movl (%r15), %eax
sarl %eax
cltq
leaq (%r15,%rax,8), %rdi
addq $0x4, %rdi
leaq 0x4(%rbp), %rsi
movl (%rbp), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
movl (%r15), %eax
testb $0x1, %al
je 0x1c0a
movq (%rsp), %rcx
movslq 0xc(%rcx), %rsi
leaq (%r15,%rsi), %rcx
sarl %eax
cltq
leaq (%rcx,%rax,8), %rdi
addq %rbp, %rsi
movl (%rbp), %eax
sarl %eax
cltq
leaq 0x8(,%rax,8), %rdx
callq 0x1080
movl (%r15), %eax
movl %eax, %ecx
andl $-0x2, %ecx
addl (%rbp), %ecx
leaq 0x4(,%rbx,8), %rdi
addq %r13, %rdi
andl $-0x2, %ecx
andl $0x1, %eax
orl %ecx, %eax
movl %eax, (%r15)
leaq 0x8(%rdi), %rsi
movl (%r13), %eax
sarl %eax
subl %r14d, %eax
addl $-0x2, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
movq (%rsp), %rax
movslq 0xc(%rax), %rax
addq %r13, %rax
leaq (%rax,%rbx,8), %rdi
addq $0x8, %rdi
leaq (%rax,%rbx,8), %rsi
addq $0x10, %rsi
movl (%r13), %eax
sarl %eax
subl %r14d, %eax
addl $-0x2, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x1080
addl $-0x2, (%r13)
movq %rbp, %rdi
jmp 0x1a07
movq %r9, %rbp
leaq 0x4(%r15), %rsi
leaq 0xc(%r15), %rdi
movslq %r10d, %r14
leaq (,%r14,8), %rdx
callq 0x1080
testb $0x1, %r12b
je 0x1cc9
movq (%rsp), %rax
movslq 0xc(%rax), %rax
leaq (%r15,%rax), %rsi
leaq (%r15,%rax), %rdi
addq $0x8, %rdi
leaq 0x8(,%r14,8), %rdx
callq 0x1080
movq 0x4(%r13,%rbp,8), %rax
movq %rax, 0x4(%r15)
movl (%rbx), %eax
sarl %eax
cltq
movq -0x4(%rbx,%rax,8), %rax
movq %rax, 0x4(%r13,%rbp,8)
testb $0x1, (%r15)
movl 0xc(%rsp), %ecx
je 0x1d07
movq (%rsp), %rax
movslq 0xc(%rax), %rax
leaq (%rbx,%rax), %rsi
movl (%rbx), %edx
sarl %edx
movslq %edx, %rdx
movq (%rsi,%rdx,8), %rdx
movq %rdx, (%r15,%rax)
addl $-0x2, (%rbx)
addl $0x2, (%r15)
jmp 0x1808
addl $0x2, %r12d
movl %r12d, (%r15)
movslq %r10d, %rax
movq 0x4(%r13,%r11,8), %rcx
movq %rcx, 0x4(%r15,%rax,8)
movq 0x4(%rbx), %rax
movq %rax, 0x4(%r13,%r11,8)
movl (%r15), %eax
testb $0x1, %al
je 0x1d4e
movq (%rsp), %rcx
movslq 0xc(%rcx), %rcx
movq (%rbx,%rcx), %rdx
addq %r15, %rcx
sarl %eax
cltq
movq %rdx, (%rcx,%rax,8)
leaq 0x4(%rbx), %rdi
movl (%rbx), %r12d
movl %r12d, %eax
andl $-0x2, %eax
andl $0x1, %r12d
leal (%rax,%r12), %ecx
addl $-0x2, %ecx
addl $-0x2, %eax
movl %ecx, (%rbx)
leaq 0xc(%rbx), %rsi
sarl %eax
movslq %eax, %r14
leaq (,%r14,8), %rdx
callq 0x1080
testl %r12d, %r12d
movl 0xc(%rsp), %ecx
je 0x1808
movq (%rsp), %rax
movslq 0xc(%rax), %rax
leaq (%rbx,%rax), %rdi
leaq (%rbx,%rax), %rsi
addq $0x8, %rsi
leaq 0x8(,%r14,8), %rdx
callq 0x1080
movl 0xc(%rsp), %ecx
jmp 0x1808
movq 0x10(%rsp), %rax
movq (%rax), %r14
jmp 0x1e34
xorl %edx, %edx
cmpl $0x2, %ecx
sete %dl
addl %edx, %r14d
movslq %r14d, %rcx
leaq 0x4(,%rcx,8), %rdi
addq %r13, %rdi
movq (%rdi), %r14
leaq 0xc(,%rcx,8), %rsi
addq %r13, %rsi
sarl %eax
notl %ecx
addl %eax, %ecx
movslq %ecx, %rdx
shlq $0x3, %rdx
callq 0x1080
addl $-0x2, (%r13)
jmp 0x1e34
movq 0x4(%r13,%rbp,8), %r14
movq (%rsp), %rdi
movq %r15, %rsi
xorl %edx, %edx
movl $0x1, %ecx
jmp 0x1e2a
movq 0x4(%r13,%rbp,8), %r14
movq (%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movl $0x2, %ecx
callq 0x17ea
movq %rax, 0x4(%r13,%rbp,8)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq