// File: /workspace/github_cpp_makefile_star2_O1/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 0x24e89
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x254ee
movq 0xb0(%r14), %rax
cmpq 0xb8(%r14), %rax
je 0x25289
movq %rsp, %rsi
movq %r14, %rdi
callq 0x24df1
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 0x243ca
addq $0x10, %rsp
movq 0xb0(%r14), %rax
cmpq 0xb8(%r14), %rax
jne 0x253bf
cmpb $0x1, 0x71(%rbx)
jne 0x253bf
cmpl $0x2, 0x78(%rbx)
jl 0x25352
movq 0x2ecd6(%rip), %r12     # 0x53fe8
leaq 0x1ff1d(%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 0x2eca3(%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 0x1f815(%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 0x1b50a(%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 0x243ca
addq $0x10, %rsp
movq 0xb0(%r14), %rax
cmpq 0xb8(%r14), %rax
jne 0x254ee
cmpb $0x1, 0x71(%rbx)
jne 0x254ee
cmpl $0x2, 0x78(%rbx)
jl 0x2542a
movq 0x2ebfe(%rip), %r12     # 0x53fe8
leaq 0x1fe4d(%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 0x2ebcb(%rip), %rdi     # 0x53fe8
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl %r13d, 0x24(%rsp)
movq (%rsp), %r12
movq 0x8(%rsp), %r13
cmpq %r12, %r13
je 0x2545d
movq %r12, 0x30(%rsp)
movq %r12, %rdi
callq 0x2ba50
addq $0x38, %r12
cmpq %r13, %r12
jne 0x25442
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0x30(%rbx), %xmm0
addsd %xmm0, %xmm0
movq %rsp, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x24e89
movl 0x24(%rsp), %edx
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x254ee
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 0x1f6e2(%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 0x1b3d7(%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 0x243ca
addq $0x10, %rsp
movq %rsp, %rdi
callq 0x2c768
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2550b
jmp 0x2550b
jmp 0x2550b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2c768
movq %rbx, %rdi
callq 0x7600