// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qf_insert
bool qf_insert(QF *qf, uint64_t key, uint64_t value, uint64_t count, bool
							 lock, bool spin)
{
	/*uint64_t hash = (key << qf->metadata->value_bits) | (value & BITMASK(qf->metadata->value_bits));*/
	if (count == 1)
		return insert1(qf, key, lock, spin);
	else
		return insert(qf, key, count, lock, spin);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movzbl %r9b, %ebp
cmpq $0x1, %rcx
jne 0xdc97
movq 0x8(%rbx), %rax
movq 0x38(%rax), %rcx
pushq $-0x1
popq %rdx
movq %rdx, %rax
shlq %cl, %rax
cmpq $0x40, %rcx
notq %rax
cmoveq %rdx, %rax
movq %rax, 0x18(%rsp)
movzbl %cl, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x21a0
movq %rax, %r13
andl $0xfff, %eax            # imm = 0xFFF
movq %rax, 0x38(%rsp)
movl %r15d, 0x2c(%rsp)
testb %r15b, %r15b
je 0xdc2d
movq (%rbx), %rax
movq %r13, 0x8(%rsp)
movq %r13, %r12
shrq $0xc, %r12
leaq (,%r12,4), %r15
movq 0x8(%rax), %rdi
addq %r15, %rdi
movl %ebp, %esi
callq 0xf805
testb %al, %al
je 0xdd03
cmpl $0xf01, 0x38(%rsp)      # imm = 0xF01
movq 0x8(%rsp), %r13
jb 0xdc2d
movq (%rbx), %rax
movq 0x8(%rax), %rax
leaq (%rax,%r12,4), %rdi
addq $0x4, %rdi
movl %ebp, %esi
callq 0xf805
testb %al, %al
je 0xdda9
movq 0x18(%rsp), %r12
andq %r14, %r12
movl %r13d, %r15d
andl $0x3f, %r15d
movabsq $0x1ffffffffffffff8, %rbp # imm = 0x1FFFFFFFFFFFFFF8
movq %rbx, %rdi
movq %r13, %rsi
callq 0xfb74
testl %eax, %eax
je 0xdcbc
movq %r12, 0x18(%rsp)
movq %r15, 0x40(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xec56
movq %rax, %r15
movq $0x0, 0x20(%rsp)
testq %r13, %r13
movq %r13, %r12
je 0xdd0a
leaq -0x1(%r12), %rsi
movq %rbx, %rdi
callq 0xec56
movq %rax, %rbp
incq %rbp
jmp 0xdd0c
movzbl %r15b, %eax
movq %rbx, %rdi
movq %r14, %rsi
movq %rcx, %rdx
movl %eax, %ecx
movl %ebp, %r8d
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe17f
pushq $0x1
popq %r14
movl %r15d, %ecx
shlq %cl, %r14
movq %r13, %r15
shrq $0x6, %r15
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq 0x38(%rax), %rax
shlq $0x3, %rax
andq %rbp, %rax
addq $0x11, %rax
imulq %r15, %rax
orq %r14, 0x9(%rcx,%rax)
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xf826
movq %r13, %r12
jmp 0xe112
xorl %eax, %eax
jmp 0xe170
xorl %ebp, %ebp
movq 0x18(%rsp), %r13
leaq 0x1(%r15), %r14
movq %rbx, %rdi
movq %r12, %rsi
callq 0xec1e
testl %eax, %eax
je 0xdd49
movq %r14, 0x10(%rsp)
movq %r12, 0x8(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xf891
testq %rax, %rax
je 0xdd51
movq %rax, %r14
movq %rbp, %r12
jmp 0xddca
movq %r14, %rbp
jmp 0xde3d
leaq 0x1(%rbp), %r14
movq %r14, %r12
cmpq %r15, %r12
jae 0xdd80
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf891
incq %r12
testq %rax, %rax
jne 0xdd58
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf891
testq %rax, %rax
je 0xdd9d
movq %rbp, %r12
cmpq %r15, %rbp
jae 0xdd9d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf891
testq %rax, %rax
cmovneq %rbp, %r14
movq %r14, %r12
testq %r13, %r13
je 0xddb7
leaq 0x1(%r12), %rbp
jmp 0xddbc
movq (%rbx), %rax
addq 0x8(%rax), %r15
xorl %eax, %eax
jmp 0xe169
xorl %r14d, %r14d
jmp 0xddca
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xf891
movq %rax, %r14
cmpq %r15, %rbp
ja 0xde22
cmpq %r13, %r14
jae 0xde22
cmpq %r15, %rbp
jae 0xde1d
leaq 0x1(%rbp), %rsi
movq %rbx, %rdi
callq 0xf891
cmpq %r14, %rax
jae 0xde1d
movq %rbp, %r13
addq $0x2, %r13
cmpq %r13, %r15
movq %r13, %rbp
cmovaq %r15, %rbp
cmpq %r15, %r13
jae 0xde18
movq %rbx, %rdi
movq %r13, %rsi
callq 0xf891
cmpq %r14, %rax
je 0xde15
incq %r13
jmp 0xddfb
movq %r13, %rbp
movq 0x18(%rsp), %r13
incq %rbp
jmp 0xddbc
cmpq %r15, %rbp
jbe 0xdfa5
pushq $0x1
popq %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf8f1
movq %rax, %r15
movq %rbx, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0xf91a
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0xf826
leaq -0x1(%r15), %rdx
pushq $0x1
popq %r14
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rcx
callq 0xfa1b
movq 0x20(%rsp), %rax
cmpl $0x2, %eax
je 0xdeeb
cmpl $0x1, %eax
jne 0xdf23
leaq -0x1(%rbp), %rcx
pushq $-0x2
popq %rax
rolq %cl, %rax
shrq $0x6, %rcx
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
movq 0x38(%rdx), %rdi
shlq $0x3, %rdi
movabsq $0x1ffffffffffffff8, %r8 # imm = 0x1FFFFFFFFFFFFFF8
andq %r8, %rdi
addq $0x11, %rdi
imulq %rcx, %rdi
andq %rax, 0x9(%rsi,%rdi)
movl %ebp, %ecx
shlq %cl, %r14
shrq $0x6, %rbp
movq 0x38(%rdx), %rax
shlq $0x3, %rax
andq %r8, %rax
addq $0x11, %rax
imulq %rbp, %rax
orq %r14, 0x9(%rsi,%rax)
jmp 0xdf56
pushq $-0x2
popq %rax
movl %ebp, %ecx
rolq %cl, %rax
shrq $0x6, %rbp
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rdx
movq 0x38(%rcx), %rcx
shlq $0x3, %rcx
movabsq $0x1ffffffffffffff8, %rsi # imm = 0x1FFFFFFFFFFFFFF8
andq %rsi, %rcx
addq $0x11, %rcx
imulq %rbp, %rcx
andq %rax, 0x9(%rdx,%rcx)
jmp 0xdf56
movl %ebp, %ecx
shlq %cl, %r14
shrq $0x6, %rbp
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq 0x38(%rax), %rax
shlq $0x3, %rax
movabsq $0x1ffffffffffffff8, %rdx # imm = 0x1FFFFFFFFFFFFFF8
andq %rdx, %rax
addq $0x11, %rax
imulq %rbp, %rax
orq %r14, 0x9(%rcx,%rax)
movq %r12, %rax
shrq $0x6, %rax
shrq $0x6, %r15
movabsq $0x1ffffffffffffff8, %rbp # imm = 0x1FFFFFFFFFFFFFF8
cmpq %r15, %rax
jae 0xe0ff
incq %rax
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rcx
movq 0x38(%rdx), %rdx
shlq $0x3, %rdx
andq %rbp, %rdx
addq $0x11, %rdx
imulq %rax, %rdx
movb (%rcx,%rdx), %sil
cmpb $-0x1, %sil
je 0xdf6b
incb %sil
movb %sil, (%rcx,%rdx)
jmp 0xdf6b
pushq $0x2
popq %rax
movq %rax, 0x20(%rsp)
je 0xde33
cmpq %r13, %r14
jne 0xde33
testq %r13, %r13
je 0xdff0
leaq 0x1(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf891
cmpq %r13, %rax
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %r14
ja 0xde3d
jne 0xe01e
xorl %r13d, %r13d
movq %r15, %rbp
jmp 0xde3d
cmpq %rbp, %r12
je 0xdffe
leaq 0x1(%rbp), %r15
cmpq %r15, %r12
jne 0xe009
xorl %r13d, %r13d
movq %r12, %rbp
jmp 0xde33
leaq 0x2(%rbp), %rax
cmpq %rax, %r12
jne 0xe01e
movq %r15, %rbp
pushq $0x1
popq %r13
jmp 0xde33
movq %r15, 0x30(%rsp)
leaq -0x1(%r15), %r12
leaq 0x2(%r12), %rsi
movq %rbx, %rdi
callq 0xf891
incq %r12
cmpq %r13, %rax
jne 0xe027
xorl %r15d, %r15d
cmpq $0x1, %r13
sete %r15b
incq %r15
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf891
testq %rax, %rax
cmoveq %r15, %rax
incq %rax
movq 0x8(%rbx), %rcx
movq 0x38(%rcx), %rcx
pushq $-0x1
popq %rsi
movq %rsi, %rdx
shlq %cl, %rdx
cmpq $0x40, %rcx
notq %rdx
cmoveq %rsi, %rdx
andq %rdx, %rax
sete %cl
cmpq $0x1, %rax
adcq $0x0, %rax
leaq 0x1(%rax), %r14
andq %rdx, %r14
cmpq 0x18(%rsp), %rax
cmovneq %rax, %r14
testq %r14, %r14
sete %r13b
cmpq $0x1, %r14
adcq $0x0, %r14
orb %cl, %r13b
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xf826
decq %r12
cmpq %rbp, %r12
jbe 0xe0c6
testb %r13b, %r13b
jne 0xe04a
cmpq %r12, %rbp
movq 0x8(%rsp), %r12
movabsq $0x1ffffffffffffff8, %rbp # imm = 0x1FFFFFFFFFFFFFF8
jne 0xe0ff
testb %r13b, %r13b
je 0xe0e5
pushq $0x2
popq %r13
jmp 0xe0f5
movq 0x18(%rsp), %rax
decq %rax
cmpq %r14, %rax
jae 0xe0ff
xorl %r13d, %r13d
movq 0x30(%rsp), %rbp
jmp 0xde38
pushq $0x1
popq %r14
movq 0x40(%rsp), %rcx
shlq %cl, %r14
movq %r12, %r15
shrq $0x6, %r15
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq 0x38(%rax), %rax
shlq $0x3, %rax
andq %rbp, %rax
addq $0x11, %rax
imulq %r15, %rax
orq %r14, 0x1(%rcx,%rax)
movb $0x1, %al
cmpb $0x0, 0x2c(%rsp)
je 0xe170
movq (%rbx), %rcx
movq 0x8(%rcx), %rcx
shrq $0xc, %r12
movl $0x0, (%rcx,%r12,4)
cmpl $0xf01, 0x38(%rsp)      # imm = 0xF01
jb 0xe170
movq (%rbx), %rax
movq 0x8(%rax), %rax
leaq (%rax,%r12,4), %r15
addq $0x4, %r15
movb $0x1, %al
movl $0x0, (%r15)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq