// File: /workspace/github_cpp_makefile_star2_O3/readmapping[P]alfalfa/src/mapper.cpp
// Function: unpairedMatch(sparseSA const&, read_t&, align_opt const&)
void unpairedMatch(const sparseSA& sa, read_t & read,const align_opt & alnOptions){
    /////////////////////////
    //FIND CANDIDATE REGIONS
    /////////////////////////
    vector<lis_t> lisIntervals;
    calculateCandRegions(sa, read, alnOptions, lisIntervals, alnOptions.errorPercent);
    if(!lisIntervals.empty()){
        //FILTER LIS WITH EXISTING ALIGNMENTS
        if(!read.alignments.empty())
            filterLISwithAlignments(read, lisIntervals);
        int Plength = read.sequence.length();
        int editDist = (int)(alnOptions.errorPercent*Plength)+1;
        int minScore = (int) (Plength*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*editDist);
        processLisIntervals(sa, read, alnOptions, lisIntervals, editDist, alnOptions.maxAlnCount, Plength*alnOptions.minCoverage, minScore);
        if(read.alignments.empty() && alnOptions.rescue){
            if(alnOptions.print >= 2) cerr << "#RESCUE" << endl;
            minScore = max(0,(int)(Plength*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*0.2*Plength));
            int maxAlignmentCount = 20;
            int minCoverage = Plength*0.01;
            processLisIntervals(sa, read, alnOptions, lisIntervals, editDist, maxAlignmentCount, minCoverage, minScore);
        }
        if(read.alignments.empty() && alnOptions.rescue){
            if(alnOptions.print >= 2) cerr << "#RESCUE2" << endl;
            lisIntervals.clear();
            calculateCandRegions(sa, read, alnOptions, lisIntervals, 2.0*alnOptions.errorPercent);
            if(!lisIntervals.empty()){
                minScore = max(0,(int)(Plength*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*0.2*Plength));
                int maxAlignmentCount = 20;
                int minCoverage = Plength*0.01;
                processLisIntervals(sa, read, alnOptions, lisIntervals, editDist, maxAlignmentCount, minCoverage, minScore);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
movsd 0x30(%rdx), %xmm0
callq 0x24d8b
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x253f9
movq 0xb0(%r14), %rax
cmpq 0xb8(%r14), %rax
je 0x2518b
movq %rsp, %rsi
movq %r14, %rdi
callq 0x24ceb
movl 0x28(%r14), %r13d
cvtsi2sd %r13d, %xmm1
movsd 0x30(%rbx), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ebp
incl %ebp
movl (%rbx), %eax
movl 0x4(%rbx), %r10d
subl %eax, %r10d
imull %r13d, %eax
imull %ebp, %r10d
addl %eax, %r10d
movl 0x60(%rbx), %r9d
movsd 0x68(%rbx), %xmm0
movsd %xmm1, 0x28(%rsp)
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movq %rsp, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %r8d
pushq %r10
pushq %rax
callq 0x24297
addq $0x10, %rsp
movq 0xb0(%r14), %rax
movq 0xb8(%r14), %rcx
cmpq %rcx, %rax
jne 0x252d2
cmpb $0x1, 0x71(%rbx)
jne 0x252db
cmpl $0x2, 0x78(%rbx)
jl 0x25257
movq 0x2edd1(%rip), %r12     # 0x53fe8
leaq 0x20018(%rip), %rsi     # 0x45236
movl $0x7, %edx
movq %r12, %rdi
callq 0x7340
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x2ed9e(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
subl %eax, %ecx
imull %r13d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd 0x1f910(%rip), %xmm1    # 0x44b88
movsd 0x28(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
xorl %r10d, %r10d
testl %eax, %eax
cmovgl %eax, %r10d
movsd 0x1b605(%rip), %xmm0    # 0x408a0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %eax
movq %rsp, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %r8d
movl $0x14, %r9d
pushq %r10
pushq %rax
callq 0x24297
addq $0x10, %rsp
movq 0xb0(%r14), %rax
movq 0xb8(%r14), %rcx
cmpq %rcx, %rax
jne 0x253f9
cmpb $0x1, 0x71(%rbx)
jne 0x253f9
cmpl $0x2, 0x78(%rbx)
jl 0x25332
movq 0x2ecf6(%rip), %r12     # 0x53fe8
leaq 0x1ff45(%rip), %rsi     # 0x4523e
movl $0x8, %edx
movq %r12, %rdi
callq 0x7340
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq 0x2ecc3(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl %r13d, 0x24(%rsp)
movq %r15, 0x30(%rsp)
movq (%rsp), %r13
movq 0x8(%rsp), %r15
cmpq %r13, %r15
je 0x25363
movq %r13, %r12
movq %r12, %rdi
callq 0x2b91c
addq $0x38, %r12
cmpq %r15, %r12
jne 0x2534d
movq %r13, 0x8(%rsp)
movsd 0x30(%rbx), %xmm0
addsd %xmm0, %xmm0
movq %rsp, %rcx
movq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x24d8b
movl 0x24(%rsp), %edx
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x253f9
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
imull %eax, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
subl %eax, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd 0x1f7d7(%rip), %xmm1    # 0x44b88
movsd 0x28(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
xorl %r10d, %r10d
testl %eax, %eax
cmovgl %eax, %r10d
mulsd 0x1b4cc(%rip), %xmm2    # 0x408a0
cvttsd2si %xmm2, %eax
movq %rsp, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %r8d
movl $0x14, %r9d
pushq %r10
pushq %rax
callq 0x24297
addq $0x10, %rsp
movq %rsp, %rdi
callq 0x2c640
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x25416
jmp 0x25416
jmp 0x25416
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2c640
movq %rbx, %rdi
callq 0x7600