// File: /workspace/github_cpp_makefile_star2_O2/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 $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
andq $0x0, 0x10(%rcx)
movsd 0x30(%rdx), %xmm0
callq 0x1d2c7
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x1d75a
movq 0xb0(%r14), %rax
cmpq 0xb8(%r14), %rax
je 0x1d587
movq %rsp, %rsi
movq %r14, %rdi
callq 0x1d232
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, 0x20(%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 0x1ca79
popq %rax
popq %rcx
movq 0xb0(%r14), %rax
movq 0xb8(%r14), %rcx
cmpq %rcx, %rax
jne 0x1d696
cmpb $0x1, 0x71(%rbx)
jne 0x1d69f
cmpl $0x2, 0x78(%rbx)
jl 0x1d625
movq 0x2c9d7(%rip), %rdi     # 0x49fe8
leaq 0x19bde(%rip), %rsi     # 0x371f6
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
subl %eax, %ecx
imull %r13d, %eax
cvtsi2sd %eax, %xmm0
cvtsi2sd %ecx, %xmm1
mulsd 0x19548(%rip), %xmm1    # 0x36b88
movsd 0x20(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
xorl %r10d, %r10d
testl %eax, %eax
cmovgl %eax, %r10d
movsd 0x152c5(%rip), %xmm0    # 0x32928
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %eax
movq %rsp, %rcx
pushq $0x14
popq %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %r8d
pushq %r10
pushq %rax
callq 0x1ca79
popq %rax
popq %rcx
movq 0xb0(%r14), %rax
movq 0xb8(%r14), %rcx
cmpq %rcx, %rax
jne 0x1d75a
cmpb $0x1, 0x71(%rbx)
jne 0x1d75a
cmpl $0x2, 0x78(%rbx)
jl 0x1d6ca
movq 0x2c932(%rip), %rdi     # 0x49fe8
leaq 0x19b41(%rip), %rsi     # 0x371fe
callq 0x72b0
movq %rax, %rdi
callq 0x7160
movq %rsp, %r12
movq %r12, %rdi
callq 0x22b8a
movsd 0x30(%rbx), %xmm0
addsd %xmm0, %xmm0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x1d2c7
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x1d75a
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
imull %eax, %r13d
cvtsi2sd %r13d, %xmm0
subl %eax, %ecx
cvtsi2sd %ecx, %xmm1
mulsd 0x19472(%rip), %xmm1    # 0x36b88
movsd 0x20(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
xorl %r10d, %r10d
testl %eax, %eax
cmovgl %eax, %r10d
mulsd 0x151ef(%rip), %xmm2    # 0x32928
cvttsd2si %xmm2, %eax
movq %rsp, %rcx
pushq $0x14
popq %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %r8d
pushq %r10
pushq %rax
callq 0x1ca79
popq %rax
popq %rcx
movq %rsp, %rdi
callq 0x22b92
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1d777
jmp 0x1d777
jmp 0x1d777
movq %rax, %rbx
movq %rsp, %rdi
callq 0x22b92
movq %rbx, %rdi
callq 0x75e0