// File: /workspace/github_cpp_makefile_star2_O3/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 0x2af74
movl %ecx, %ebx
movq %rsi, %r12
movq %rdi, %r11
testl %ecx, %ecx
je 0x2af80
movl (%r12), %eax
movl %eax, %ecx
andl $0x1, %ecx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x1, %ebx
jne 0x2b016
movl %eax, %ebp
sarl %ebp
decl %ebp
jmp 0x2b016
movq (%rdx), %rbx
movq 0x8(%rdx), %r15
jmp 0x2b66f
movl (%r12), %eax
cmpl $0x2, %eax
jae 0x2af9c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x2afd8
movl $0x1, %eax
jmp 0x2b204
movl %eax, %ecx
sarl %ecx
testl %ecx, %ecx
jle 0x2afdc
movq (%rdx), %rsi
leaq 0x4(%r12), %rdi
xorl %r14d, %r14d
movl %ecx, %r8d
leal (%r14,%r8), %r9d
sarl %r9d
movslq %r9d, %r10
shlq $0x4, %r10
cmpq %rsi, (%rdi,%r10)
jl 0x2afcb
movl %r9d, %r8d
jmp 0x2afd1
incl %r9d
movl %r9d, %r14d
cmpl %r8d, %r14d
jl 0x2afb2
jmp 0x2afdf
xorl %eax, %eax
jmp 0x2b01a
xorl %r14d, %r14d
cmpl %ecx, %r14d
jne 0x2afed
leal -0x1(%rcx), %ebp
testb $0x1, %al
je 0x2b01e
jmp 0x2b06a
movslq %r14d, %rcx
shlq $0x4, %rcx
movq 0x4(%r12,%rcx), %rsi
movq (%rdx), %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
cmpq %rdi, %rsi
setl %cl
setg %r8b
subl %r8d, %ecx
movl %ecx, %ebp
sarl $0x1f, %ebp
addl %r14d, %ebp
testb $0x1, %al
jne 0x2b062
sarl %eax
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x2, %ebx
sete %al
addl %ebp, %eax
cltq
movq %rax, %rdx
shlq $0x4, %rdx
leaq (%r12,%rdx), %rdi
addq $0x4, %rdi
movq (%rdi), %rbx
movq 0x8(%rdi), %r15
leaq (%r12,%rdx), %rsi
addq $0x14, %rsi
notl %eax
addl %ecx, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x7570
addl $-0x2, (%r12)
jmp 0x2b66f
testl %ecx, %ecx
je 0x2b204
movslq %ebp, %r10
movslq 0xc(%r11), %rsi
addq %r12, %rsi
movq 0x8(%rsi,%r10,8), %r9
movl (%r9), %r14d
movl %r14d, %ecx
sarl %ecx
movl 0x1c(%r11), %edi
leal -0x1(%rdi), %r8d
cmpl %r8d, %ecx
jne 0x2b65c
movq %rdx, 0x8(%rsp)
testl %ebp, %ebp
js 0x2b0b2
movl %ebp, %r15d
movq (%rsi,%r15,8), %r13
movl (%r13), %r8d
sarl %r8d
cmpl %edi, %r8d
jge 0x2b448
leaq 0x1(%r10), %r13
sarl %eax
cmpl %eax, %r13d
jge 0x2b0d1
movq 0x10(%rsi,%r10,8), %rdx
movl (%rdx), %r8d
sarl %r8d
cmpl %edi, %r8d
jge 0x2b4f8
testl %ebp, %ebp
js 0x2b3b5
movl %ebp, %edi
movq (%rsi,%rdi,8), %r15
movl (%r15), %r8d
movq %r9, %rdx
movl %r8d, %r9d
sarl %r9d
cmpl %ecx, %r9d
movq %rdx, %r9
jne 0x2b3b5
movq %r13, %rbp
movq %r15, %r14
movq %r11, %r15
leaq 0x4(%r12), %rax
movq %rax, (%rsp)
shlq $0x4, %rdi
addl $0x2, %r8d
movl %r8d, (%r14)
movslq %ecx, %rax
shlq $0x4, %rax
movups 0x4(%r12,%rdi), %xmm0
movups %xmm0, 0x4(%r14,%rax)
movl (%r14), %eax
sarl %eax
cltq
shlq $0x4, %rax
leaq (%r14,%rax), %rdi
addq $0x4, %rdi
leaq 0x4(%r9), %rsi
movl (%r9), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x4, %rdx
movq %r9, %r13
callq 0x7570
movl (%r14), %eax
xorl %ecx, %ecx
testb $0x1, %al
je 0x2b18b
movslq 0xc(%r15), %rsi
leaq (%r14,%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
movl (%r14), %eax
movl %eax, %ecx
andl $0x1, %ecx
andl $-0x2, %eax
addl (%r13), %eax
andl $-0x2, %eax
orl %ecx, %eax
movl %eax, (%r14)
movq %rbp, %rax
shlq $0x4, %rax
movq (%rsp), %rcx
leaq (%rcx,%rax), %rsi
leaq (%rcx,%rax), %rdi
addq $-0x10, %rdi
movl (%r12), %eax
sarl %eax
subl %ebp, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x7570
movslq 0xc(%r15), %rax
addq %r12, %rax
leaq (%rax,%rbp,8), %rdi
leaq (%rax,%rbp,8), %rsi
addq $0x8, %rsi
movl (%r12), %eax
sarl %eax
subl %ebp, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x7570
addl $-0x2, (%r12)
movq %r13, %rdi
callq 0x7380
movq %r14, %r9
movq %r15, %r11
jmp 0x2b657
movslq 0xc(%r11), %rdi
addq %r12, %rdi
movslq %ebp, %r14
movq (%rdi,%r14,8), %r13
movl (%r13), %ecx
movl %ecx, %r8d
sarl %r8d
movl 0x1c(%r11), %esi
cmpl %esi, %r8d
jge 0x2b369
movq 0x8(%rdi,%r14,8), %r9
movl (%r9), %edi
sarl %edi
cmpl %esi, %edi
jge 0x2b386
decl %esi
cmpl %esi, %r8d
jne 0x2b06a
cmpl %esi, %edi
jne 0x2b06a
movq %r11, %rbp
addl $0x2, %ecx
movl %ecx, (%r13)
movslq %r8d, %rax
shlq $0x4, %rax
movq %rdx, 0x8(%rsp)
movups (%rdx), %xmm0
movups %xmm0, 0x4(%r13,%rax)
movl (%r13), %eax
sarl %eax
cltq
shlq $0x4, %rax
leaq (%rax,%r13), %rdi
addq $0x4, %rdi
leaq 0x4(%r9), %rsi
movl (%r9), %eax
sarl %eax
movslq %eax, %rdx
shlq $0x4, %rdx
movq %r9, %r15
callq 0x7570
movl (%r13), %eax
xorl %ecx, %ecx
testb $0x1, %al
movq %rbp, 0x10(%rsp)
je 0x2b2d8
movslq 0xc(%rbp), %rsi
leaq (%rsi,%r13), %rcx
sarl %eax
cltq
leaq (%rcx,%rax,8), %rdi
addq %r15, %rsi
movl (%r15), %eax
sarl %eax
cltq
leaq 0x8(,%rax,8), %rdx
callq 0x7570
movl (%r13), %eax
movl %eax, %ecx
andl $0x1, %ecx
movq %r15, (%rsp)
andl $-0x2, %eax
addl (%r15), %eax
andl $-0x2, %eax
orl %ecx, %eax
movl %eax, (%r13)
movq %r14, %rax
shlq $0x4, %rax
leaq (%r12,%rax), %rdi
addq $0x4, %rdi
leaq (%r12,%rax), %rsi
addq $0x14, %rsi
movl (%r12), %eax
sarl %eax
movl %r14d, %ebp
notl %ebp
addl %ebp, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x7570
movq 0x10(%rsp), %r15
movslq 0xc(%r15), %rax
addq %r12, %rax
leaq (%rax,%r14,8), %rdi
addq $0x8, %rdi
leaq (%rax,%r14,8), %rsi
addq $0x10, %rsi
movl (%r12), %eax
sarl %eax
addl %ebp, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x7570
addl $-0x2, (%r12)
movq (%rsp), %rdi
callq 0x7380
movq %r15, %rdi
movq %r13, %rsi
movq 0x8(%rsp), %rdx
jmp 0x2b662
shlq $0x4, %r14
movq 0x4(%r12,%r14), %rbx
movq 0xc(%r12,%r14), %r15
movq %r11, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0x1, %ecx
jmp 0x2b3a1
shlq $0x4, %r14
movq 0x4(%r12,%r14), %rbx
movq 0xc(%r12,%r14), %r15
movq %r11, %rdi
movq %r9, %rsi
xorl %edx, %edx
movl $0x2, %ecx
callq 0x2af33
movq %rax, 0x4(%r12,%r14)
movq %rdx, 0xc(%r12,%r14)
jmp 0x2b66f
cmpl %eax, %r13d
jge 0x2b657
movq 0x10(%rsi,%r10,8), %rdx
movl (%rdx), %eax
sarl %eax
cmpl %ecx, %eax
jne 0x2b657
movq %r11, %r15
movq %r13, 0x18(%rsp)
movq %r13, %rax
shlq $0x4, %rax
leaq (%r12,%rax), %rsi
addq $0x4, %rsi
addl $0x2, %r14d
movl %r14d, (%r9)
movslq %ecx, %rax
shlq $0x4, %rax
movq %rsi, 0x20(%rsp)
movups (%rsi), %xmm0
movups %xmm0, 0x4(%r9,%rax)
movl (%r9), %eax
sarl %eax
cltq
shlq $0x4, %rax
leaq (%r9,%rax), %rdi
addq $0x4, %rdi
leaq 0x4(%rdx), %rsi
movl (%rdx), %eax
sarl %eax
movq %rdx, %r13
movslq %eax, %rdx
shlq $0x4, %rdx
movq %r9, (%rsp)
callq 0x7570
movq (%rsp), %rdx
movl (%rdx), %eax
xorl %ecx, %ecx
testb $0x1, %al
jne 0x2b5ac
movq %r15, %r14
jmp 0x2b5e2
movq %r11, 0x10(%rsp)
leaq 0x4(%r9), %rsi
leaq 0x14(%r9), %rdi
movslq %ecx, %rdx
movq %rdx, 0x18(%rsp)
shlq $0x4, %rdx
movq %rsi, (%rsp)
movq %r9, %rbp
callq 0x7570
testb $0x1, %r14b
je 0x2b49a
movq 0x10(%rsp), %rax
movslq 0xc(%rax), %rax
leaq (%rax,%rbp), %rsi
leaq (%rax,%rbp), %rdi
addq $0x8, %rdi
movq 0x18(%rsp), %rax
leaq 0x8(,%rax,8), %rdx
callq 0x7570
shlq $0x4, %r15
movups 0x4(%r12,%r15), %xmm0
movq (%rsp), %rax
movups %xmm0, (%rax)
movl (%r13), %eax
sarl %eax
cltq
shlq $0x4, %rax
movups -0xc(%r13,%rax), %xmm0
movups %xmm0, 0x4(%r12,%r15)
testb $0x1, (%rbp)
movq 0x10(%rsp), %r11
movq %rbp, %r9
je 0x2b4ea
movslq 0xc(%r11), %rax
leaq (%rax,%r13), %rcx
movl (%r13), %edx
sarl %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, (%r9,%rax)
addl $-0x2, (%r13)
addl $0x2, (%r9)
jmp 0x2b657
shlq $0x4, %r13
addl $0x2, %r14d
movl %r14d, (%r9)
movslq %ecx, %rax
shlq $0x4, %rax
movups 0x4(%r12,%r13), %xmm0
movups %xmm0, 0x4(%r9,%rax)
leaq 0x4(%rdx), %rdi
movups 0x4(%rdx), %xmm0
movups %xmm0, 0x4(%r12,%r13)
movl (%r9), %eax
testb $0x1, %al
movq %rdx, %rbp
je 0x2b545
movslq 0xc(%r11), %rcx
movq (%rbp,%rcx), %rdx
addq %r9, %rcx
sarl %eax
cltq
movq %rdx, (%rcx,%rax,8)
movq %rbp, %rdx
movq %r9, %r13
movq %r11, %r12
movl (%rdx), %r15d
movl %r15d, %eax
andl $-0x2, %eax
andl $0x1, %r15d
leal (%rax,%r15), %ecx
addl $-0x2, %ecx
addl $-0x2, %eax
movl %ecx, (%rdx)
leaq 0x14(%rdx), %rsi
sarl %eax
movslq %eax, %r14
movq %r14, %rdx
shlq $0x4, %rdx
callq 0x7570
testl %r15d, %r15d
je 0x2b59c
movslq 0xc(%r12), %rax
leaq (%rax,%rbp), %rdi
leaq (%rax,%rbp), %rsi
addq $0x8, %rsi
leaq 0x8(,%r14,8), %rdx
callq 0x7570
movq %r12, %r11
movq 0x8(%rsp), %rdx
movq %r13, %r9
jmp 0x2b65c
movq %r15, %r14
movslq 0xc(%r15), %rsi
leaq (%rdx,%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 (%rsp), %rdx
movl (%rdx), %eax
movl %eax, %ecx
andl $0x1, %ecx
andl $-0x2, %eax
addl (%r13), %eax
andl $-0x2, %eax
orl %ecx, %eax
movl %eax, (%rdx)
movq 0x20(%rsp), %rdi
leaq 0x10(%rdi), %rsi
movl (%r12), %eax
sarl %eax
subl %ebp, %eax
addl $-0x2, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x7570
movslq 0xc(%r14), %rax
addq %r12, %rax
movq 0x18(%rsp), %rcx
leaq (%rax,%rcx,8), %rdi
addq $0x8, %rdi
leaq (%rax,%rcx,8), %rsi
addq $0x10, %rsi
movl (%r12), %eax
sarl %eax
subl %ebp, %eax
addl $-0x2, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x7570
addl $-0x2, (%r12)
movq %r13, %rdi
callq 0x7380
movq (%rsp), %r9
movq %r14, %r11
movq 0x8(%rsp), %rdx
movq %r11, %rdi
movq %r9, %rsi
movl %ebx, %ecx
callq 0x2af33
movq %rax, %rbx
movq %rdx, %r15
movq %rbx, %rax
movq %r15, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq