// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0xc(%rbp)
movq $0xb, -0x18(%rbp)
movl $0x200, %edi            # imm = 0x200
callq 0x11a0
movq %rax, -0x28(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1356
movq -0x18(%rbp), %rax
movl -0x4(%rbp), %ecx
sarl %ecx
movslq %ecx, %rcx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x14d0
movq %rax, -0x18(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1550
cmpq $0x0, %rax
jne 0x1338
movq -0x28(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1610
jmp 0x1349
movq -0x28(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x16e0
movq %rax, -0x34(%rbp)
jmp 0x134b
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x12df
movq -0x28(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0xc(%rbp)
movl $0x8, -0x3c(%rbp)
movq $0x0, -0x58(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x14b3
movslq -0x3c(%rbp), %rdi
movl $0x8, %esi
callq 0x1040
movq %rax, -0x58(%rbp)
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x50(%rbp)
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x14b1
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, -0x50(%rbp)
movq -0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl (%rax), %eax
shll $0x1f, %eax
sarl $0x1f, %eax
cmpl $0x0, %eax
jne 0x13ea
movq -0x48(%rbp), %rdi
callq 0x1030
jmp 0x13a9
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
sarl %ecx
cmpl %ecx, %eax
jg 0x14a3
movq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
movslq 0xc(%rcx), %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x1493
movq -0x50(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movslq -0x3c(%rbp), %rcx
cmpq %rcx, %rax
jne 0x146a
movl -0x3c(%rbp), %eax
shll %eax
movl %eax, -0x3c(%rbp)
movq -0x58(%rbp), %rdi
movslq -0x3c(%rbp), %rsi
shlq $0x3, %rsi
callq 0x1070
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl -0x3c(%rbp), %ecx
sarl %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
movslq 0xc(%rcx), %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x50(%rbp)
movq %rcx, (%rax)
jmp 0x1495
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x13f1
movq -0x48(%rbp), %rdi
callq 0x1030
jmp 0x13a9
jmp 0x14b3
movq -0x28(%rbp), %rdi
callq 0x1030
movq -0x58(%rbp), %rdi
callq 0x1030
movl -0xc(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop