// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/ckh.c
// Function: ckh_try_insert
JEMALLOC_INLINE_C bool
ckh_try_insert(ckh_t *ckh, void const**argkey, void const**argdata)
{
	size_t hashes[2], bucket;
	const void *key = *argkey;
	const void *data = *argdata;

	ckh->hash(key, hashes);

	/* Try to insert in primary bucket. */
	bucket = hashes[0] & ((ZU(1) << ckh->lg_curbuckets) - 1);
	if (!ckh_try_bucket_insert(ckh, bucket, key, data))
		return (false);

	/* Try to insert in secondary bucket. */
	bucket = hashes[1] & ((ZU(1) << ckh->lg_curbuckets) - 1);
	if (!ckh_try_bucket_insert(ckh, bucket, key, data))
		return (false);

	/*
	 * Try to find a place for this item via iterative eviction/relocation.
	 */
	return (ckh_evict_reloc_insert(ckh, bucket, argkey, argdata));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movabsq $0x5851f42d4c957f2d, %r14 # imm = 0x5851F42D4C957F2D
movabsq $0x14057b7ef767814f, %rbp # imm = 0x14057B7EF767814F
movq %rsi, 0x10(%rsp)
movq (%rsi), %r12
movq %rdx, 0x18(%rsp)
movq (%rdx), %r15
leaq 0x30(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq *0x18(%rbx)
movb 0x14(%rbx), %cl
movq $-0x1, %r11
shlq %cl, %r11
notq %r11
movq (%r13), %rsi
andq %r11, %rsi
movq (%rbx), %rcx
imulq %r14, %rcx
addq %rbp, %rcx
movq %rcx, (%rbx)
movq 0x28(%rbx), %rax
movq %rsi, %rdi
shldq $0x2, %rcx, %rdi
shlq $0x4, %rdi
xorl %edx, %edx
cmpq $0x0, (%rax,%rdi)
je 0x379af
movq %rcx, %r8
shrq $0x3e, %r8
shlq $0x2, %rsi
incl %r8d
cmpl $-0x3, %edx
je 0x379bf
movl %r8d, %edi
andl $0x3, %edi
orq %rsi, %rdi
shlq $0x4, %rdi
decl %edx
incl %r8d
cmpq $0x0, (%rax,%rdi)
jne 0x37986
addq %rax, %rdi
cmpl $-0x3, %edx
setb %dl
jmp 0x379b2
addq %rax, %rdi
movq %r12, (%rdi)
movq %r15, 0x8(%rdi)
incq 0x8(%rbx)
jmp 0x379c7
negl %edx
cmpl $0x3, %edx
setae %dl
testb %dl, %dl
je 0x37b59
andq 0x38(%rsp), %r11
imulq %r14, %rcx
addq %rbp, %rcx
movq %rcx, (%rbx)
movq %r11, %rsi
shldq $0x2, %rcx, %rsi
shlq $0x4, %rsi
xorl %edx, %edx
cmpq $0x0, (%rax,%rsi)
je 0x37a28
shrq $0x3e, %rcx
leaq (,%r11,4), %rsi
incl %ecx
cmpl $-0x3, %edx
je 0x37a38
movl %ecx, %edi
andl $0x3, %edi
orq %rsi, %rdi
shlq $0x4, %rdi
decl %edx
incl %ecx
cmpq $0x0, (%rax,%rdi)
jne 0x37a01
addq %rdi, %rax
cmpl $-0x3, %edx
setb %dl
jmp 0x37a2b
addq %rsi, %rax
movq %r12, (%rax)
movq %r15, 0x8(%rax)
incq 0x8(%rbx)
jmp 0x37a40
negl %edx
cmpl $0x3, %edx
setae %dl
testb %dl, %dl
je 0x37b59
movq 0x10(%rsp), %rax
movq (%rax), %r13
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq %r11, %r15
movq %r13, %rax
movq (%rbx), %rdx
imulq %r14, %rdx
addq %rbp, %rdx
movq %rdx, (%rbx)
movq 0x28(%rbx), %rsi
shrdq $0x3e, %r15, %rdx
shlq $0x4, %rdx
movq (%rsi,%rdx), %r13
movq 0x8(%rsi,%rdx), %rdi
movq %rdi, 0x8(%rsp)
movq %rax, (%rsi,%rdx)
movq %rcx, 0x8(%rsi,%rdx)
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
movq %r11, %r12
callq *0x18(%rbx)
movb 0x14(%rbx), %cl
movq $-0x1, %rax
shlq %cl, %rax
notq %rax
movq 0x28(%rsp), %rcx
andq %rax, %rcx
andq 0x20(%rsp), %rax
cmpq %r15, %rcx
movq %rax, %r15
cmovneq %rcx, %r15
cmpq %r12, %r15
sete %al
je 0x37b6a
movq (%rbx), %rdx
imulq %r14, %rdx
addq %rbp, %rdx
movq %rdx, (%rbx)
movq %r15, %rsi
shldq $0x2, %rdx, %rsi
movq 0x28(%rbx), %rcx
shlq $0x4, %rsi
cmpq $0x0, (%rcx,%rsi)
je 0x37b81
movq %r12, %r11
shrq $0x3e, %rdx
leaq (,%r15,4), %rdi
incl %edx
movl $0x1, %esi
cmpl $-0x2, %esi
je 0x37b4f
movl %edx, %r8d
andl $0x3, %r8d
orq %rdi, %r8
shlq $0x4, %r8
decl %esi
incl %edx
cmpq $0x0, (%rcx,%r8)
jne 0x37b0e
addq %r8, %rcx
negl %esi
movq %r13, (%rcx)
movq 0x8(%rsp), %rdx
movq %rdx, 0x8(%rcx)
movq %rdx, %rcx
incq 0x8(%rbx)
cmpl $0x2, %esi
ja 0x37a5b
jmp 0x37b5b
movq 0x8(%rsp), %rcx
jmp 0x37a5b
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rcx
movq %r13, (%rcx)
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rdx
movq %rdx, (%rcx)
jmp 0x37b5b
addq %rsi, %rcx
movq %r13, (%rcx)
movq 0x8(%rsp), %rdx
movq %rdx, 0x8(%rcx)
incq 0x8(%rbx)
jmp 0x37b5b