// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/mapper.cpp
// Function: _kb_delp_aux_qCov(kbtree_qCov_t*, kbnode_t*, q_cov_t const*, int)
bool hasUnique(const lis_t & lis, kbtree_t(qCov) *tree){
    const vector<match_t> & seeds = lis.matches;
    bool unique = false;
    for(size_t i = 0; i < seeds.size(); i++){
        q_cov_t seed;
        seed.q = seeds[i].query;
        seed.l = seeds[i].len;
        if (kb_size(tree)) {
            q_cov_t *lower, *upper;
            kb_interval(qCov, tree, seed, &lower, &upper); // find the closest read pos that is already covered
            if(!lower || lower->q+lower->l < seed.q+seed.l){
                if(lower && lower->q == seed.q) kb_del(qCov, tree, *lower);
                kb_put(qCov, tree, seed);
                unique = true;
            }
        }
        else{
            kb_put(qCov, tree, seed);
            unique = true;
        }
    }
    return unique;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x2af02
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r10
testl %ecx, %ecx
je 0x2af0e
movl (%r15), %eax
testb $0x1, %al
sete %cl
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpl $0x1, %ebp
jne 0x2af92
sarl %eax
decl %eax
movl %eax, %r13d
jmp 0x2af92
movq (%rdx), %rbp
movq 0x8(%rdx), %r14
jmp 0x2b5fa
movl (%r15), %r13d
cmpl $0x2, %r13d
jae 0x2af21
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movb $0x1, %cl
jmp 0x2af92
sarl %r13d
testl %r13d, %r13d
jle 0x2af55
movq (%rdx), %rcx
leaq 0x4(%r15), %r9
xorl %eax, %eax
movl %r13d, %esi
leal (%rax,%rsi), %edi
sarl %edi
movslq %edi, %r8
shlq $0x4, %r8
cmpq %rcx, (%r9,%r8)
jl 0x2af4b
movl %edi, %esi
jmp 0x2af4f
incl %edi
movl %edi, %eax
cmpl %esi, %eax
jl 0x2af35
jmp 0x2af57
xorl %eax, %eax
cmpl %r13d, %eax
jne 0x2af63
decl %r13d
xorl %ecx, %ecx
jmp 0x2af92
movslq %eax, %rcx
shlq $0x4, %rcx
movq 0x4(%r15,%rcx), %rcx
movq (%rdx), %r8
xorl %esi, %esi
xorl %edi, %edi
cmpq %r8, %rcx
setl %sil
setg %dil
subl %edi, %esi
movl %esi, %r13d
sarl $0x1f, %r13d
addl %eax, %r13d
testl %esi, %esi
sete %cl
movl (%r15), %eax
testb $0x1, %al
jne 0x2afe0
xorl %ecx, %ecx
cmpl $0x2, %ebp
sete %cl
addl %ecx, %r13d
movslq %r13d, %rcx
movq %rcx, %rdx
shlq $0x4, %rdx
leaq (%r15,%rdx), %rdi
addq $0x4, %rdi
movq (%rdi), %rbp
movq 0x8(%rdi), %r14
leaq (%r15,%rdx), %rsi
addq $0x14, %rsi
sarl %eax
notl %ecx
addl %eax, %ecx
movslq %ecx, %rdx
shlq $0x4, %rdx
callq 0x7570
addl $-0x2, (%r15)
jmp 0x2b5fa
movslq %r13d, %rbx
testb %cl, %cl
je 0x2b14c
movslq 0xc(%r10), %rdi
addq %r15, %rdi
movq (%rdi,%rbx,8), %r12
movl (%r12), %ecx
movl %ecx, %r8d
sarl %r8d
movl 0x1c(%r10), %esi
cmpl %esi, %r8d
jge 0x2b2fa
movq 0x8(%rdi,%rbx,8), %r9
movl (%r9), %edi
sarl %edi
cmpl %esi, %edi
jge 0x2b317
decl %esi
cmpl %esi, %r8d
jne 0x2b14c
cmpl %esi, %edi
jne 0x2b14c
movq %r10, 0x10(%rsp)
addl $0x2, %ecx
movl %ecx, (%r12)
movslq %r8d, %rax
shlq $0x4, %rax
movq %rdx, 0x18(%rsp)
movups (%rdx), %xmm0
movups %xmm0, 0x4(%r12,%rax)
movl (%r12), %eax
sarl %eax
cltq
shlq $0x4, %rax
leaq (%r12,%rax), %rdi
addq $0x4, %rdi
leaq 0x4(%r9), %rsi
movl (%r9), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x4, %rdx
movq %r9, %r14
callq 0x7570
movl (%r12), %eax
testb $0x1, %al
je 0x2b0b3
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rsi
leaq (%r12,%rsi), %rcx
sarl %eax
cltq
leaq (%rcx,%rax,8), %rdi
addq %r14, %rsi
movl (%r14), %eax
sarl %eax
cltq
leaq 0x8(,%rax,8), %rdx
callq 0x7570
movl (%r12), %eax
movl %eax, %ecx
andl $-0x2, %ecx
movq %r14, 0x8(%rsp)
addl (%r14), %ecx
andl $-0x2, %ecx
andl $0x1, %eax
orl %ecx, %eax
movl %eax, (%r12)
movq %rbx, %rax
shlq $0x4, %rax
leaq (%r15,%rax), %rdi
addq $0x4, %rdi
leaq (%r15,%rax), %rsi
addq $0x14, %rsi
movl (%r15), %eax
sarl %eax
notl %r13d
addl %r13d, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x7570
movq 0x10(%rsp), %r14
movslq 0xc(%r14), %rax
addq %r15, %rax
leaq (%rax,%rbx,8), %rdi
addq $0x8, %rdi
leaq (%rax,%rbx,8), %rsi
addq $0x10, %rsi
movl (%r15), %eax
sarl %eax
addl %r13d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x7570
addl $-0x2, (%r15)
movq 0x8(%rsp), %rdi
callq 0x7380
movq %r14, %rdi
movq %r12, %rsi
movq 0x18(%rsp), %rdx
jmp 0x2b5ed
movslq 0xc(%r10), %r11
addq %r15, %r11
movq 0x8(%r11,%rbx,8), %r9
movl (%r9), %r12d
movl %r12d, %ecx
sarl %ecx
movl 0x1c(%r10), %edi
leal -0x1(%rdi), %esi
cmpl %esi, %ecx
jne 0x2b5e7
testl %r13d, %r13d
js 0x2b18f
movl %r13d, %r14d
movq (%r11,%r14,8), %r8
movq %r8, 0x8(%rsp)
movl (%r8), %r8d
sarl %r8d
cmpl %edi, %r8d
jge 0x2b480
leaq 0x1(%rbx), %r14
sarl %eax
cmpl %eax, %r14d
movq %r9, 0x8(%rsp)
jge 0x2b1b8
movq 0x10(%r11,%rbx,8), %r8
movq %r8, 0x10(%rsp)
movl (%r8), %r8d
sarl %r8d
cmpl %edi, %r8d
jge 0x2b534
testl %r13d, %r13d
js 0x2b346
movl %r13d, %edi
movq (%r11,%rdi,8), %r8
movq %r8, 0x20(%rsp)
movl (%r8), %r9d
movl %r9d, %r8d
sarl %r8d
cmpl %esi, %r8d
jne 0x2b346
movq %r14, %r12
movq %rdx, 0x18(%rsp)
movq %r10, 0x10(%rsp)
leaq 0x4(%r15), %r14
shlq $0x4, %rdi
addl $0x2, %r9d
movq 0x20(%rsp), %rbx
movl %r9d, (%rbx)
movslq %r8d, %rax
shlq $0x4, %rax
movups 0x4(%r15,%rdi), %xmm0
movups %xmm0, 0x4(%rbx,%rax)
movl (%rbx), %eax
sarl %eax
cltq
shlq $0x4, %rax
leaq (%rbx,%rax), %rdi
addq $0x4, %rdi
movq 0x8(%rsp), %r13
leaq 0x4(%r13), %rsi
movl (%r13), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x7570
movl (%rbx), %eax
testb $0x1, %al
je 0x2b276
movq 0x10(%rsp), %rcx
movslq 0xc(%rcx), %rsi
movq 0x20(%rsp), %rcx
addq %rsi, %rcx
sarl %eax
cltq
leaq (%rcx,%rax,8), %rdi
addq %r13, %rsi
movl (%r13), %eax
sarl %eax
cltq
leaq 0x8(,%rax,8), %rdx
callq 0x7570
movq 0x20(%rsp), %rbx
movl (%rbx), %eax
movl %eax, %ecx
andl $-0x2, %ecx
addl (%r13), %ecx
andl $-0x2, %ecx
andl $0x1, %eax
orl %ecx, %eax
movl %eax, (%rbx)
movq %r12, %rax
shlq $0x4, %rax
leaq (%r14,%rax), %rsi
leaq (%r14,%rax), %rdi
addq $-0x10, %rdi
movl (%r15), %eax
sarl %eax
subl %r12d, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x7570
movq 0x10(%rsp), %r14
movslq 0xc(%r14), %rax
addq %r15, %rax
leaq (%rax,%r12,8), %rdi
leaq (%rax,%r12,8), %rsi
addq $0x8, %rsi
movl (%r15), %eax
sarl %eax
subl %r12d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x7570
addl $-0x2, (%r15)
movq %r13, %rdi
callq 0x7380
movq %r14, %r10
movq %rbx, %r9
jmp 0x2b52a
shlq $0x4, %rbx
movq 0x4(%r15,%rbx), %rbp
movq 0xc(%r15,%rbx), %r14
movq %r10, %rdi
movq %r12, %rsi
xorl %edx, %edx
movl $0x1, %ecx
jmp 0x2b332
shlq $0x4, %rbx
movq 0x4(%r15,%rbx), %rbp
movq 0xc(%r15,%rbx), %r14
movq %r10, %rdi
movq %r9, %rsi
xorl %edx, %edx
movl $0x2, %ecx
callq 0x2aec0
movq %rax, 0x4(%r15,%rbx)
movq %rdx, 0xc(%r15,%rbx)
jmp 0x2b5fa
cmpl %eax, %r14d
jge 0x2b5e2
movq 0x10(%r11,%rbx,8), %rax
movq %rax, %r8
movl (%rax), %eax
sarl %eax
cmpl %esi, %eax
movq 0x8(%rsp), %r9
jne 0x2b5e7
movq %r14, %rax
movq %rdx, 0x18(%rsp)
movq %r10, %rbx
movq %r14, 0x10(%rsp)
shlq $0x4, %rax
leaq (%r15,%rax), %rdx
addq $0x4, %rdx
addl $0x2, %r12d
movl %r12d, (%r9)
movslq %ecx, %rax
shlq $0x4, %rax
movq %rdx, %r14
movups (%rdx), %xmm0
movups %xmm0, 0x4(%r9,%rax)
movl (%r9), %eax
sarl %eax
cltq
shlq $0x4, %rax
leaq (%r9,%rax), %rdi
addq $0x4, %rdi
movq %r8, %r12
leaq 0x4(%r8), %rsi
movl (%r8), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x7570
movq 0x8(%rsp), %rdx
movl (%rdx), %eax
testb $0x1, %al
je 0x2b401
movslq 0xc(%rbx), %rsi
leaq (%rdx,%rsi), %rcx
sarl %eax
cltq
leaq (%rcx,%rax,8), %rdi
addq %r12, %rsi
movl (%r12), %eax
sarl %eax
cltq
leaq 0x8(,%rax,8), %rdx
callq 0x7570
movq 0x8(%rsp), %rdx
movl (%rdx), %eax
movl %eax, %ecx
andl $-0x2, %ecx
addl (%r12), %ecx
andl $-0x2, %ecx
andl $0x1, %eax
orl %ecx, %eax
movl %eax, (%rdx)
leaq 0x10(%r14), %rsi
movl (%r15), %eax
sarl %eax
subl %r13d, %eax
addl $-0x2, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
movq %r14, %rdi
callq 0x7570
movslq 0xc(%rbx), %rax
addq %r15, %rax
movq 0x10(%rsp), %r14
leaq (%rax,%r14,8), %rdi
addq $0x8, %rdi
leaq (%rax,%r14,8), %rsi
addq $0x10, %rsi
movl (%r15), %eax
sarl %eax
subl %r13d, %eax
addl $-0x2, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x7570
addl $-0x2, (%r15)
movq %r12, %rdi
callq 0x7380
movq 0x8(%rsp), %r9
movq %rbx, %r10
jmp 0x2b52a
movq %rdx, 0x18(%rsp)
movq %r10, 0x10(%rsp)
leaq 0x4(%r9), %rsi
leaq 0x14(%r9), %rdi
movslq %ecx, %rbx
movq %rbx, %rdx
shlq $0x4, %rdx
movq %rsi, 0x20(%rsp)
movq %r9, %r13
callq 0x7570
testb $0x1, %r12b
je 0x2b4d1
movq 0x10(%rsp), %rax
movslq 0xc(%rax), %rax
leaq (%rax,%r13), %rsi
leaq (%rax,%r13), %rdi
addq $0x8, %rdi
leaq 0x8(,%rbx,8), %rdx
callq 0x7570
shlq $0x4, %r14
movups 0x4(%r15,%r14), %xmm0
movq 0x20(%rsp), %rax
movups %xmm0, (%rax)
movq 0x8(%rsp), %rsi
movl (%rsi), %eax
sarl %eax
cltq
shlq $0x4, %rax
movups -0xc(%rsi,%rax), %xmm0
movups %xmm0, 0x4(%r15,%r14)
testb $0x1, (%r13)
movq 0x10(%rsp), %r10
movq %r13, %r9
je 0x2b523
movslq 0xc(%r10), %rax
leaq (%rsi,%rax), %rcx
movl (%rsi), %edx
sarl %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, (%r9,%rax)
addl $-0x2, (%rsi)
addl $0x2, (%r9)
movq 0x18(%rsp), %rdx
jmp 0x2b5e7
movq %rdx, %r13
shlq $0x4, %r14
addl $0x2, %r12d
movl %r12d, (%r9)
movslq %ecx, %rax
shlq $0x4, %rax
movups 0x4(%r15,%r14), %xmm0
movups %xmm0, 0x4(%r9,%rax)
movq 0x10(%rsp), %r12
leaq 0x4(%r12), %rdi
movups 0x4(%r12), %xmm0
movups %xmm0, 0x4(%r15,%r14)
movl (%r9), %eax
testb $0x1, %al
je 0x2b585
movslq 0xc(%r10), %rcx
movq (%r12,%rcx), %rdx
addq %r9, %rcx
sarl %eax
cltq
movq %rdx, (%rcx,%rax,8)
movq %r10, %r15
movl (%r12), %r14d
movl %r14d, %eax
andl $-0x2, %eax
andl $0x1, %r14d
leal (%rax,%r14), %ecx
addl $-0x2, %ecx
addl $-0x2, %eax
movl %ecx, (%r12)
leaq 0x14(%r12), %rsi
sarl %eax
movslq %eax, %rbx
movq %rbx, %rdx
shlq $0x4, %rdx
callq 0x7570
testl %r14d, %r14d
je 0x2b5dc
movslq 0xc(%r15), %rax
leaq (%r12,%rax), %rdi
leaq (%r12,%rax), %rsi
addq $0x8, %rsi
leaq 0x8(,%rbx,8), %rdx
callq 0x7570
movq %r15, %r10
movq %r13, %rdx
movq 0x8(%rsp), %r9
movq %r10, %rdi
movq %r9, %rsi
movl %ebp, %ecx
callq 0x2aec0
movq %rax, %rbp
movq %rdx, %r14
movq %rbp, %rax
movq %r14, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq