// File: /workspace/github_c_makefile_star2_O3/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/ckh.c
// Function: ckh_remove
bool
ckh_remove(ckh_t *ckh, const void *searchkey, void **key, void **data)
{
	size_t cell;

	assert(ckh != NULL);

	cell = ckh_isearch(ckh, searchkey);
	if (cell != SIZE_T_MAX) {
		if (key != NULL)
			*key = (void *)ckh->tab[cell].key;
		if (data != NULL)
			*data = (void *)ckh->tab[cell].data;
		ckh->tab[cell].key = NULL;
		ckh->tab[cell].data = NULL; /* Not necessary. */

		ckh->count--;
		/* Try to halve the table if it is less than 1/4 full. */
		if (ckh->count < (ZU(1) << (ckh->lg_curbuckets
		    + LG_CKH_BUCKET_CELLS - 2)) && ckh->lg_curbuckets
		    > ckh->lg_minbuckets) {
			/* Ignore error due to OOM. */
			ckh_shrink(ckh);
		}

		return (false);
	}

	return (true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, (%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movl 0x14(%rdi), %esi
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rcx
movq %r12, %rdi
movq %r13, %rdx
callq *0x18(%rbx)
movb 0x14(%rbx), %cl
movq $-0x1, %rbp
shlq %cl, %rbp
notq %rbp
andq (%r13), %rbp
leaq (,%rbp,4), %r13
shlq $0x6, %rbp
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%rbp), %rsi
testq %rsi, %rsi
je 0x9370f
movq %r12, %rdi
callq *0x20(%rbx)
testb %al, %al
jne 0x9371e
decq %r14
addq $0x10, %rbp
cmpq $-0x4, %r14
jne 0x936f8
jmp 0x93727
leaq 0x1(%r13), %rax
cmpq %r14, %rax
jne 0x93785
movb 0x14(%rbx), %cl
movq $-0x1, %rbp
shlq %cl, %rbp
notq %rbp
andq 0x8(%rsp), %rbp
leaq (,%rbp,4), %r13
shlq $0x6, %rbp
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%rbp), %rsi
testq %rsi, %rsi
je 0x93762
movq %r12, %rdi
callq *0x20(%rbx)
testb %al, %al
jne 0x93776
decq %r14
addq $0x10, %rbp
cmpq $-0x4, %r14
jne 0x9374b
movb $0x1, %al
jmp 0x93931
leaq 0x1(%r13), %rcx
movb $0x1, %al
cmpq %r14, %rcx
je 0x93931
subq %r14, %r13
testq %r15, %r15
movq (%rsp), %rdx
je 0x937a3
movq 0x28(%rbx), %rax
movq %r13, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rax
movq %rax, (%r15)
testq %rdx, %rdx
je 0x937bb
movq 0x28(%rbx), %rax
movq %r13, %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rax
movq %rax, (%rdx)
movq 0x28(%rbx), %rax
shlq $0x4, %r13
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%r13)
movq 0x8(%rbx), %rax
decq %rax
movq %rax, 0x8(%rbx)
movl 0x14(%rbx), %r14d
movl %r14d, %ecx
shrq %cl, %rax
testq %rax, %rax
jne 0x9392f
cmpl 0x10(%rbx), %r14d
jbe 0x9392f
leal 0x1(%r14), %ecx
movl $0x10, %eax
shlq %cl, %rax
leaq 0x3f(%rax), %rdi
andq $-0x40, %rdi
cmpq %rax, %rdi
jb 0x9392f
leaq 0x4c119(%rip), %rcx     # 0xdf930
movq (%rcx), %rcx
cmpq %rcx, %rdi
jbe 0x93850
leaq 0xfff(%rax), %rdi
andq $-0x1000, %rdi          # imm = 0xF000
cmpq %rax, %rdi
jb 0x9392f
cmpq %rcx, %rdi
jbe 0x9388a
leaq 0x4c03e(%rip), %rax     # 0xdf880
movq (%rax), %rax
addq %rax, %rdi
notq %rax
andq %rax, %rdi
jmp 0x9388a
cmpq $0xe00, %rdi            # imm = 0xE00
ja 0x9387c
decq %rdi
shrq $0x3, %rdi
leaq 0xf959(%rip), %rax      # 0xa31c0
movzbl (%rax,%rdi), %eax
imulq $0x68, %rax, %rax
leaq 0x4b38a(%rip), %rcx     # 0xdec00
movq (%rcx,%rax), %rdi
jmp 0x9388a
addq $0xfff, %rdi            # imm = 0xFFF
andq $-0x1000, %rdi          # imm = 0xF000
testq %rdi, %rdi
je 0x9392f
callq 0x92c1a
testq %rax, %rax
je 0x9392f
movq 0x28(%rbx), %rcx
movq %rcx, (%rsp)
movq %rax, 0x28(%rbx)
leal -0x1(%r14), %eax
movl %eax, 0x14(%rbx)
movq 0x8(%rbx), %rbp
movq $0x0, 0x8(%rbx)
testq %rbp, %rbp
je 0x9390b
movq (%rsp), %rax
leaq 0x8(%rax), %r15
xorl %r12d, %r12d
leaq 0x8(%rsp), %r13
movq -0x8(%r15), %rax
testq %rax, %rax
je 0x93902
movq %rax, 0x10(%rsp)
movq (%r15), %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x93425
testb %al, %al
jne 0x93916
incq %r12
addq $0x10, %r15
cmpq %rbp, %r12
jb 0x938d5
movq (%rsp), %rdi
callq 0x92f20
jmp 0x9392f
movq %rbp, 0x8(%rbx)
movq 0x28(%rbx), %rdi
callq 0x92f20
movq (%rsp), %rax
movq %rax, 0x28(%rbx)
movl %r14d, 0x14(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq