// File: 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:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
leaq 0x78(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x4e460
movq 0x38(%rsp), %rcx
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0x90(%rsp), %rdx
movsd 0x30(%rdx), %xmm0
callq 0x429c0
jmp 0x42ea7
leaq 0x78(%rsp), %rdi
callq 0x4e470
testb $0x1, %al
jne 0x4326f
movq 0x98(%rsp), %rdi
addq $0xb0, %rdi
callq 0xbe60
testb $0x1, %al
jne 0x42f04
movq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x42840
jmp 0x42ee5
jmp 0x42f04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x4e4e0
jmp 0x43281
movq 0x98(%rsp), %rdi
addq $0x20, %rdi
callq 0x8630
movl %eax, 0x68(%rsp)
movq 0x90(%rsp), %rax
movsd 0x30(%rax), %xmm0
cvtsi2sdl 0x68(%rsp), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
incl %eax
movl %eax, 0x64(%rsp)
movl 0x68(%rsp), %eax
movq 0x90(%rsp), %rcx
movl (%rcx), %edx
movl 0x4(%rcx), %ecx
imull %edx, %eax
subl %edx, %ecx
movl 0x64(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, 0x60(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0x90(%rsp), %rdx
movl 0x64(%rsp), %r8d
movl 0x60(%rdx), %r9d
cvtsi2sdl 0x68(%rsp), %xmm0
movsd 0x68(%rdx), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movl 0x60(%rsp), %r10d
movq %rsp, %rax
movl %r10d, 0x8(%rax)
movl %ecx, (%rax)
leaq 0x78(%rsp), %rcx
callq 0x41a60
jmp 0x42fab
movq 0x98(%rsp), %rdi
addq $0xb0, %rdi
callq 0xbe60
testb $0x1, %al
jne 0x42fc8
jmp 0x430e4
movq 0x90(%rsp), %rax
testb $0x1, 0x71(%rax)
je 0x430e4
movq 0x90(%rsp), %rax
cmpl $0x2, 0x78(%rax)
jl 0x43017
movq 0x54001(%rip), %rdi     # 0x96ff0
leaq 0x3b0a0(%rip), %rsi     # 0x7e096
callq 0x8360
movq %rax, 0x30(%rsp)
jmp 0x43002
movq 0x30(%rsp), %rdi
movq 0x53fa2(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0x43015
jmp 0x43017
movl $0x0, 0x5c(%rsp)
movl 0x68(%rsp), %eax
movq 0x90(%rsp), %rcx
movl (%rcx), %edx
movl 0x4(%rcx), %ecx
movl %eax, %esi
imull %edx, %esi
cvtsi2sd %esi, %xmm1
subl %edx, %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x3ab11(%rip), %xmm2    # 0x7db58
mulsd %xmm2, %xmm0
cvtsi2sd %eax, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x58(%rsp)
leaq 0x5c(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x14d40
movq %rax, 0x28(%rsp)
jmp 0x43075
movq 0x28(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x60(%rsp)
movl $0x14, 0x54(%rsp)
cvtsi2sdl 0x68(%rsp), %xmm0
movsd 0x36852(%rip), %xmm1    # 0x798e8
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x50(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0x90(%rsp), %rdx
movl 0x64(%rsp), %r8d
movl 0x54(%rsp), %r9d
movl 0x50(%rsp), %ecx
movl 0x60(%rsp), %r10d
movq %rsp, %rax
movl %r10d, 0x8(%rax)
movl %ecx, (%rax)
leaq 0x78(%rsp), %rcx
callq 0x41a60
jmp 0x430e2
jmp 0x430e4
movq 0x98(%rsp), %rdi
addq $0xb0, %rdi
callq 0xbe60
testb $0x1, %al
jne 0x43101
jmp 0x4326d
movq 0x90(%rsp), %rax
testb $0x1, 0x71(%rax)
je 0x4326d
movq 0x90(%rsp), %rax
cmpl $0x2, 0x78(%rax)
jl 0x43150
movq 0x53ec8(%rip), %rdi     # 0x96ff0
leaq 0x3af6f(%rip), %rsi     # 0x7e09e
callq 0x8360
movq %rax, 0x20(%rsp)
jmp 0x4313b
movq 0x20(%rsp), %rdi
movq 0x53e69(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0x4314e
jmp 0x43150
leaq 0x78(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x4e4c0
movq 0x18(%rsp), %rcx
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0x90(%rsp), %rdx
movsd 0x30(%rdx), %xmm0
addsd %xmm0, %xmm0
callq 0x429c0
jmp 0x4318c
leaq 0x78(%rsp), %rdi
callq 0x4e470
testb $0x1, %al
jne 0x4326b
movl $0x0, 0x4c(%rsp)
movl 0x68(%rsp), %eax
movq 0x90(%rsp), %rcx
movl (%rcx), %edx
movl 0x4(%rcx), %ecx
movl %eax, %esi
imull %edx, %esi
cvtsi2sd %esi, %xmm1
subl %edx, %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x3a98a(%rip), %xmm2    # 0x7db58
mulsd %xmm2, %xmm0
cvtsi2sd %eax, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x48(%rsp)
leaq 0x4c(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x14d40
movq %rax, 0x10(%rsp)
jmp 0x431fc
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x60(%rsp)
movl $0x14, 0x44(%rsp)
cvtsi2sdl 0x68(%rsp), %xmm0
movsd 0x366cb(%rip), %xmm1    # 0x798e8
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x40(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0x90(%rsp), %rdx
movl 0x64(%rsp), %r8d
movl 0x44(%rsp), %r9d
movl 0x40(%rsp), %ecx
movl 0x60(%rsp), %r10d
movq %rsp, %rax
movl %r10d, 0x8(%rax)
movl %ecx, (%rax)
leaq 0x78(%rsp), %rcx
callq 0x41a60
jmp 0x43269
jmp 0x4326b
jmp 0x4326d
jmp 0x4326f
leaq 0x78(%rsp), %rdi
callq 0x4e4e0
addq $0xa8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x8730
nopl (%rax,%rax)