// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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 $0x38, %rsp
movq %rdx, %r15
movq %rdi, %rbx
movq %rsi, (%rsp)
movq (%rsi), %r12
movq (%rdx), %r14
leaq 0x20(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq *0x18(%rbx)
movb 0x14(%rbx), %cl
movq $-0x1, %rbp
shlq %cl, %rbp
notq %rbp
movq (%r13), %rdx
andq %rbp, %rdx
imull $0x41c64e69, (%rbx), %eax # imm = 0x41C64E69
addl $0x303b, %eax           # imm = 0x303B
movl %eax, (%rbx)
movl %eax, %esi
shrl $0x1e, %esi
movq 0x28(%rbx), %rcx
leaq (%rsi,%rdx,4), %rdi
shlq $0x4, %rdi
cmpq $0x0, (%rcx,%rdi)
je 0x3f014
shlq $0x2, %rdx
incl %esi
movl $0x1, %edi
cmpl $-0x2, %edi
je 0x3eea4
movl %esi, %r8d
andl $0x3, %r8d
orq %rdx, %r8
shlq $0x4, %r8
decl %edi
incl %esi
cmpq $0x0, (%rcx,%r8)
jne 0x3ee6d
addq %rcx, %r8
negl %edi
movq %r12, (%r8)
movq %r14, 0x8(%r8)
incq 0x8(%rbx)
cmpl $0x3, %edi
jb 0x3f027
andq 0x28(%rsp), %rbp
imull $0x41c64e69, %eax, %edx # imm = 0x41C64E69
addl $0x303b, %edx           # imm = 0x303B
movl %edx, (%rbx)
movl %edx, %eax
shrl $0x1e, %eax
leaq (%rax,%rbp,4), %rsi
shlq $0x4, %rsi
cmpq $0x0, (%rcx,%rsi)
je 0x3f019
leaq (,%rbp,4), %rdi
incl %eax
movl $0x1, %esi
cmpl $-0x2, %esi
je 0x3ef15
movl %eax, %r8d
andl $0x3, %r8d
orq %rdi, %r8
shlq $0x4, %r8
decl %esi
incl %eax
cmpq $0x0, (%rcx,%r8)
jne 0x3eede
addq %rcx, %r8
negl %esi
movq %r12, (%r8)
movq %r14, 0x8(%r8)
incq 0x8(%rbx)
cmpl $0x3, %esi
jb 0x3f027
movq (%rsp), %rax
movq (%rax), %r13
movq %r15, 0x8(%rsp)
movq (%r15), %r15
leaq 0x10(%rsp), %r12
movq %rbp, %r14
movq %r13, %rax
movq %r15, %rsi
imull $0x41c64e69, %edx, %edx # imm = 0x41C64E69
addl $0x303b, %edx           # imm = 0x303B
movl %edx, (%rbx)
movq %r14, %rdi
shlq $0x6, %rdi
shrl $0x1a, %edx
andl $-0x10, %edx
orq %rdi, %rdx
movq (%rcx,%rdx), %r13
movq 0x8(%rcx,%rdx), %r15
movq %rax, (%rcx,%rdx)
movq %rsi, 0x8(%rcx,%rdx)
movq %r13, %rdi
movq %r12, %rsi
callq *0x18(%rbx)
movb 0x14(%rbx), %cl
movq $-0x1, %rax
shlq %cl, %rax
notq %rax
movq 0x18(%rsp), %rcx
andq %rax, %rcx
andq 0x10(%rsp), %rax
cmpq %r14, %rcx
movq %rax, %r14
cmovneq %rcx, %r14
cmpq %rbp, %r14
sete %al
je 0x3f038
imull $0x41c64e69, (%rbx), %edx # imm = 0x41C64E69
addl $0x303b, %edx           # imm = 0x303B
movl %edx, (%rbx)
movl %edx, %esi
shrl $0x1e, %esi
movq 0x28(%rbx), %rcx
leaq (%rsi,%r14,4), %rdi
shlq $0x4, %rdi
cmpq $0x0, (%rcx,%rdi)
je 0x3f049
leaq (,%r14,4), %r8
incl %esi
movl $0x1, %edi
cmpl $-0x2, %edi
je 0x3ef2c
movl %esi, %r9d
andl $0x3, %r9d
orq %r8, %r9
shlq $0x4, %r9
decl %edi
incl %esi
cmpq $0x0, (%rcx,%r9)
jne 0x3efd7
addq %rcx, %r9
negl %edi
movq %r13, (%r9)
movq %r15, 0x8(%r9)
incq 0x8(%rbx)
cmpl $0x2, %edi
ja 0x3ef2c
jmp 0x3f029
addq %rdi, %rcx
jmp 0x3f01c
addq %rsi, %rcx
movq %r12, (%rcx)
movq %r14, 0x8(%rcx)
incq 0x8(%rbx)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rcx
movq %r13, (%rcx)
movq 0x8(%rsp), %rcx
movq %r15, (%rcx)
jmp 0x3f029
addq %rdi, %rcx
movq %r13, (%rcx)
movq %r15, 0x8(%rcx)
incq 0x8(%rbx)
jmp 0x3f029