// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movq %rdx, %r14
andl $0x0, 0x1c(%rsp)
testq %rsi, %rsi
je 0x2174b
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
testl %ecx, %ecx
je 0x21757
movl (%r15), %eax
movl %eax, %ecx
andl $0x1, %ecx
negl %ecx
xorl %edx, %edx
cmpl $0x1, %ebp
sete %dl
leal -0x1(,%rdx,2), %edx
andl %ecx, %edx
movl %edx, 0x1c(%rsp)
cmpl $0x1, %ebp
jne 0x2176f
movl %eax, %r13d
sarl %r13d
decl %r13d
jmp 0x21773
movq (%r14), %r13
movq 0x8(%r14), %r14
jmp 0x21dd8
leaq 0x1c(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x21677
movl %eax, %r13d
movl (%r15), %eax
jmp 0x21773
pushq $-0x1
popq %r13
testb $0x1, %al
jne 0x217be
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), %r13
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 0x21dd8
cmpl $0x0, 0x1c(%rsp)
movslq 0xc(%rbx), %rcx
movslq %r13d, %r12
je 0x218bc
movl 0x1c(%rbx), %esi
leal -0x1(%rsi), %r8d
movq %r14, 0x10(%rsp)
addq %r15, %rcx
movq 0x8(%rcx,%r12,8), %r9
movl (%r9), %r14d
movl %r14d, %edx
sarl %edx
cmpl %r8d, %edx
jne 0x21dbd
movq %rbx, 0x8(%rsp)
movl %r13d, %ebx
testl %r13d, %r13d
js 0x21813
movq (%rcx,%rbx,8), %r8
movl (%r8), %edi
sarl %edi
cmpl %esi, %edi
jge 0x21b6b
leaq 0x1(%r12), %r8
sarl %eax
cmpl %eax, %r8d
jge 0x21831
movq 0x10(%rcx,%r12,8), %r10
movl (%r10), %edi
sarl %edi
cmpl %esi, %edi
jge 0x21c51
testl %r13d, %r13d
js 0x21a2e
movq (%rcx,%rbx,8), %r10
movl (%r10), %esi
movl %esi, %edi
sarl %edi
cmpl %edx, %edi
jne 0x21a2e
movq %r8, 0x28(%rsp)
leaq 0x4(%r15), %r14
shlq $0x4, %rbx
addl $0x2, %esi
movl %esi, (%r10)
movslq %edx, %rax
shlq $0x4, %rax
movups 0x4(%r15,%rbx), %xmm0
movups %xmm0, 0x4(%r10,%rax)
movl (%r10), %eax
sarl %eax
cltq
shlq $0x4, %rax
leaq (%r10,%rax), %rdi
addq $0x4, %rdi
leaq 0x4(%r9), %rsi
movl (%r9), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x4, %rdx
movq %r9, %r12
movq %r10, %r13
callq 0x7570
movq %r13, %r8
movl (%r13), %eax
xorl %ecx, %ecx
testb $0x1, %al
jne 0x21d10
movq 0x8(%rsp), %rbx
jmp 0x21d49
leaq (%r15,%rcx), %r8
movq (%r8,%r12,8), %r10
movl (%r10), %edx
movl %edx, %edi
sarl %edi
movl 0x1c(%rbx), %esi
cmpl %esi, %edi
jge 0x21a12
movq 0x8(%r8,%r12,8), %r11
movl (%r11), %r9d
sarl %r9d
cmpl %esi, %r9d
jge 0x21c1a
leal -0x1(%rsi), %r8d
cmpl %r8d, %edi
jne 0x217d7
cmpl %r8d, %r9d
jne 0x217d7
addl $0x2, %edx
movl %edx, (%r10)
movslq %edi, %rax
shlq $0x4, %rax
movups (%r14), %xmm0
movups %xmm0, 0x4(%r10,%rax)
movl (%r10), %eax
sarl %eax
cltq
shlq $0x4, %rax
leaq (%r10,%rax), %rdi
addq $0x4, %rdi
leaq 0x4(%r11), %rsi
movl (%r11), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x4, %rdx
movq %r10, 0x10(%rsp)
movq %r11, 0x8(%rsp)
callq 0x7570
movq 0x10(%rsp), %rdi
movl (%rdi), %eax
xorl %ecx, %ecx
testb $0x1, %al
je 0x2198d
movslq 0xc(%rbx), %rsi
leaq (%rdi,%rsi), %rcx
sarl %eax
cltq
leaq (%rcx,%rax,8), %rdi
movq 0x8(%rsp), %rax
addq %rax, %rsi
movl (%rax), %eax
sarl %eax
cltq
leaq 0x8(,%rax,8), %rdx
callq 0x7570
movq 0x10(%rsp), %rdi
movl (%rdi), %eax
movl %eax, %ecx
andl $0x1, %ecx
andl $-0x2, %eax
movq 0x8(%rsp), %rdx
addl (%rdx), %eax
andl $-0x2, %eax
orl %ecx, %eax
movl %eax, (%rdi)
movq %r12, %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
movslq 0xc(%rbx), %rax
addq %r15, %rax
leaq (%rax,%r12,8), %rdi
addq $0x8, %rdi
leaq (%rax,%r12,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 0x7360
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
jmp 0x21dc8
shlq $0x4, %r12
movq 0x4(%r15,%r12), %r13
movq 0xc(%r15,%r12), %r14
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r10, %rsi
jmp 0x21c31
cmpl %eax, %r8d
jge 0x21c47
movq 0x10(%rcx,%r12,8), %r12
movl (%r12), %eax
sarl %eax
cmpl %edx, %eax
movq 0x8(%rsp), %rbx
jne 0x21dbd
movq %r8, 0x28(%rsp)
movq %r8, %rax
shlq $0x4, %rax
leaq (%r15,%rax), %rcx
addq $0x4, %rcx
addl $0x2, %r14d
movl %r14d, (%r9)
movslq %edx, %rax
shlq $0x4, %rax
movq %rcx, 0x30(%rsp)
movups (%rcx), %xmm0
movups %xmm0, 0x4(%r9,%rax)
movl (%r9), %eax
sarl %eax
cltq
shlq $0x4, %rax
leaq (%r9,%rax), %rdi
addq $0x4, %rdi
leaq 0x4(%r12), %rsi
movl (%r12), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x4, %rdx
movq %r9, 0x20(%rsp)
callq 0x7570
movq 0x20(%rsp), %rdx
movl (%rdx), %eax
xorl %ecx, %ecx
testb $0x1, %al
je 0x21aef
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 0x20(%rsp), %rdx
movl (%rdx), %eax
movl %eax, %ecx
andl $0x1, %ecx
movq 0x10(%rsp), %r14
andl $-0x2, %eax
addl (%r12), %eax
andl $-0x2, %eax
orl %ecx, %eax
movl %eax, (%rdx)
movq 0x30(%rsp), %rdi
leaq 0x10(%rdi), %rsi
movl (%r15), %eax
sarl %eax
subl %r13d, %eax
addl $-0x2, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x7570
movslq 0xc(%rbx), %rax
addq %r15, %rax
movq 0x28(%rsp), %rcx
leaq (%rax,%rcx,8), %rdi
addq $0x8, %rdi
leaq (%rax,%rcx,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 0x7360
movq 0x20(%rsp), %r9
jmp 0x21dc2
movq %r8, 0x28(%rsp)
leaq 0x4(%r9), %rsi
leaq 0x14(%r9), %rdi
movslq %edx, %r12
movq %r12, %rdx
shlq $0x4, %rdx
movq %rsi, 0x20(%rsp)
movq %r9, %r13
callq 0x7570
testb $0x1, %r14b
je 0x21bb7
movq 0x8(%rsp), %rax
movslq 0xc(%rax), %rax
leaq (%rax,%r13), %rsi
leaq (%rax,%r13), %rdi
addq $0x8, %rdi
leaq 0x8(,%r12,8), %rdx
callq 0x7570
shlq $0x4, %rbx
movups 0x4(%r15,%rbx), %xmm0
movq 0x20(%rsp), %rax
movups %xmm0, (%rax)
movq 0x28(%rsp), %rsi
movl (%rsi), %eax
sarl %eax
cltq
shlq $0x4, %rax
movups -0xc(%rsi,%rax), %xmm0
movups %xmm0, 0x4(%r15,%rbx)
testb $0x1, (%r13)
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r14
movq %r13, %r9
je 0x21c0e
movslq 0xc(%rbx), %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)
jmp 0x21dc2
shlq $0x4, %r12
movq 0x4(%r15,%r12), %r13
movq 0xc(%r15,%r12), %r14
pushq $0x2
popq %rcx
movq %rbx, %rdi
movq %r11, %rsi
xorl %edx, %edx
callq 0x216f5
movq %rax, 0x4(%r15,%r12)
movq %rdx, 0xc(%r15,%r12)
jmp 0x21dd8
movq 0x8(%rsp), %rbx
jmp 0x21dbd
shlq $0x4, %r8
addl $0x2, %r14d
movl %r14d, (%r9)
movslq %edx, %rax
shlq $0x4, %rax
movups 0x4(%r15,%r8), %xmm0
movups %xmm0, 0x4(%r9,%rax)
leaq 0x4(%r10), %rdi
movups 0x4(%r10), %xmm0
movups %xmm0, 0x4(%r15,%r8)
movl (%r9), %eax
testb $0x1, %al
je 0x21c9d
movq 0x8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movq (%r10,%rcx), %rdx
addq %r9, %rcx
sarl %eax
cltq
movq %rdx, (%rcx,%rax,8)
movq %r9, %r15
movl (%r10), %r14d
movl %r14d, %eax
andl $-0x2, %eax
andl $0x1, %r14d
leal (%rax,%r14), %ecx
addl $-0x2, %ecx
addl $-0x2, %eax
movl %ecx, (%r10)
movq %r10, %r12
leaq 0x14(%r10), %rsi
sarl %eax
movslq %eax, %rbx
movq %rbx, %rdx
shlq $0x4, %rdx
callq 0x7570
testl %r14d, %r14d
jne 0x21cde
movq 0x8(%rsp), %rbx
jmp 0x21d03
movq 0x8(%rsp), %rcx
movslq 0xc(%rcx), %rax
leaq (%r12,%rax), %rdi
leaq (%r12,%rax), %rsi
addq $0x8, %rsi
leaq 0x8(,%rbx,8), %rdx
movq %rcx, %rbx
callq 0x7570
movq 0x10(%rsp), %r14
movq %r15, %r9
jmp 0x21dc2
movq 0x8(%rsp), %rbx
movslq 0xc(%rbx), %rsi
leaq (%r8,%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 %r13, %r8
movl (%r13), %eax
movl %eax, %ecx
andl $0x1, %ecx
andl $-0x2, %eax
addl (%r12), %eax
andl $-0x2, %eax
orl %ecx, %eax
movl %eax, (%r8)
movq 0x28(%rsp), %r13
movq %r13, %rax
shlq $0x4, %rax
leaq (%r14,%rax), %rsi
leaq (%r14,%rax), %rdi
addq $-0x10, %rdi
movl (%r15), %eax
sarl %eax
subl %r13d, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
movq %r8, %r14
callq 0x7570
movslq 0xc(%rbx), %rax
addq %r15, %rax
leaq (%rax,%r13,8), %rdi
leaq (%rax,%r13,8), %rsi
addq $0x8, %rsi
movl (%r15), %eax
sarl %eax
subl %r13d, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x7570
addl $-0x2, (%r15)
movq %r12, %rdi
callq 0x7360
movq %r14, %r9
movq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r9, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x216f5
movq %rax, %r13
movq %rdx, %r14
movq %r13, %rax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq