// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/ckh.c
// Function: ckh_try_insert
JEMALLOC_INLINE bool
ckh_try_insert(ckh_t *ckh, void const**argkey, void const**argdata)
{
	size_t hash1, hash2, bucket;
	const void *key = *argkey;
	const void *data = *argdata;

	ckh->hash(key, ckh->lg_curbuckets, &hash1, &hash2);

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

	/* Try to insert in secondary bucket. */
	bucket = hash2 & ((ZU(1) << ckh->lg_curbuckets) - 1);
	if (ckh_try_bucket_insert(ckh, bucket, key, data) == false)
		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 $0x38, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq (%rsi), %r12
movq (%rdx), %rbp
movl 0x14(%rdi), %esi
leaq 0x30(%rsp), %r13
leaq 0x18(%rsp), %rcx
movq %r12, %rdi
movq %r13, %rdx
callq *0x18(%rbx)
movb 0x14(%rbx), %cl
movq $-0x1, %r15
shlq %cl, %r15
notq %r15
movq (%r13), %rsi
andq %r15, %rsi
imull $0x41c64e69, (%rbx), %ecx # imm = 0x41C64E69
addl $0x303b, %ecx           # imm = 0x303B
movl %ecx, (%rbx)
movl %ecx, %edi
shrl $0x1e, %edi
movq 0x28(%rbx), %rax
leaq (%rdi,%rsi,4), %r8
shlq $0x4, %r8
xorl %edx, %edx
cmpq $0x0, (%rax,%r8)
je 0x930d2
shlq $0x2, %rsi
incl %edi
cmpl $-0x3, %edx
je 0x930e2
movl %edi, %r8d
andl $0x3, %r8d
orq %rsi, %r8
shlq $0x4, %r8
decl %edx
incl %edi
cmpq $0x0, (%rax,%r8)
jne 0x930a9
addq %rax, %r8
cmpl $-0x3, %edx
setb %dl
jmp 0x930d5
addq %rax, %r8
movq %r12, (%r8)
movq %rbp, 0x8(%r8)
incq 0x8(%rbx)
jmp 0x930ea
negl %edx
cmpl $0x3, %edx
setae %dl
testb %dl, %dl
je 0x93270
andq 0x18(%rsp), %r15
imull $0x41c64e69, %ecx, %edx # imm = 0x41C64E69
addl $0x303b, %edx           # imm = 0x303B
movl %edx, (%rbx)
shrl $0x1e, %edx
leaq (%rdx,%r15,4), %rsi
shlq $0x4, %rsi
xorl %ecx, %ecx
cmpq $0x0, (%rax,%rsi)
je 0x9314a
leaq (,%r15,4), %rsi
incl %edx
cmpl $-0x3, %ecx
je 0x9315a
movl %edx, %edi
andl $0x3, %edi
orq %rsi, %rdi
shlq $0x4, %rdi
decl %ecx
incl %edx
cmpq $0x0, (%rax,%rdi)
jne 0x93123
addq %rdi, %rax
cmpl $-0x3, %ecx
setb %cl
jmp 0x9314d
addq %rsi, %rax
movq %r12, (%rax)
movq %rbp, 0x8(%rax)
incq 0x8(%rbx)
jmp 0x93162
negl %ecx
cmpl $0x3, %ecx
setae %cl
testb %cl, %cl
je 0x93270
movq 0x8(%rsp), %rax
movq (%rax), %rbp
movq %r14, 0x10(%rsp)
movq (%r14), %r12
leaq 0x20(%rsp), %r13
movq %r15, %r14
movq %rbp, %rax
movq %r12, %rcx
imull $0x41c64e69, (%rbx), %edx # imm = 0x41C64E69
addl $0x303b, %edx           # imm = 0x303B
movl %edx, (%rbx)
movq 0x28(%rbx), %rsi
movq %r14, %rdi
shlq $0x6, %rdi
shrl $0x1a, %edx
andl $-0x10, %edx
orq %rdi, %rdx
movq (%rsi,%rdx), %rbp
movq 0x8(%rsi,%rdx), %r12
movq %rax, (%rsi,%rdx)
movq %rcx, 0x8(%rsi,%rdx)
movl 0x14(%rbx), %esi
movq %rbp, %rdi
leaq 0x28(%rsp), %rdx
movq %r13, %rcx
callq *0x18(%rbx)
movb 0x14(%rbx), %cl
movq $-0x1, %rax
shlq %cl, %rax
notq %rax
movq 0x20(%rsp), %rcx
andq %rax, %rcx
andq 0x28(%rsp), %rax
cmpq %r14, %rcx
movq %rax, %r14
cmovneq %rcx, %r14
cmpq %r15, %r14
sete %al
je 0x93281
imull $0x41c64e69, (%rbx), %edx # imm = 0x41C64E69
addl $0x303b, %edx           # imm = 0x303B
movl %edx, (%rbx)
shrl $0x1e, %edx
movq 0x28(%rbx), %rcx
leaq (%rdx,%r14,4), %rsi
shlq $0x4, %rsi
cmpq $0x0, (%rcx,%rsi)
je 0x93293
leaq (,%r14,4), %rdi
incl %edx
movl $0x1, %esi
cmpl $-0x2, %esi
je 0x93182
movl %edx, %r8d
andl $0x3, %r8d
orq %rdi, %r8
shlq $0x4, %r8
decl %esi
incl %edx
cmpq $0x0, (%rcx,%r8)
jne 0x93233
addq %r8, %rcx
negl %esi
movq %rbp, (%rcx)
movq %r12, 0x8(%rcx)
incq 0x8(%rbx)
cmpl $0x2, %esi
ja 0x93182
jmp 0x93272
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rcx
movq %rbp, (%rcx)
movq 0x10(%rsp), %rcx
movq %r12, (%rcx)
jmp 0x93272
addq %rsi, %rcx
movq %rbp, (%rcx)
movq %r12, 0x8(%rcx)
incq 0x8(%rbx)
jmp 0x93272