// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/mapper.cpp
// Function: calculateSeedsBothStrands(sparseSA const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, align_opt const&, std::vector<match_t, std::allocator<match_t>>&, std::vector<match_t, std::allocator<match_t>>&)
void calculateSeedsBothStrands(const sparseSA& sa, const string& P, const string& Prc, int min_len, const align_opt & alnOptions, vector<match_t>& matches, vector<match_t>& matchesRC){
    int maxBranchWidth = alnOptions.maxSeedCandidates;
    mum_t memType = alnOptions.memType;
    int sparseSkip = 1;
    if (sa.K >= 4) sparseSkip = max((min_len - 10) / (int)sa.K,1);
    else sparseSkip = max((min_len - 12) / (int)sa.K,1);
    if(alnOptions.noSparseQ) sparseSkip = 1;
    if(alnOptions.print >= 6) cerr << "min_len " << min_len << " and sparseSkip " << sparseSkip << endl;
    if(!alnOptions.noFW)
        executeSeedType(sa, P, min_len, memType, maxBranchWidth, sparseSkip, matches, alnOptions.maxSmemMemStart);
    if(!alnOptions.noRC)
        executeSeedType(sa, Prc, min_len, memType, maxBranchWidth, sparseSkip, matchesRC, alnOptions.maxSmemMemStart);
    if(alnOptions.rescue && matches.empty() && matchesRC.empty()){
        if(alnOptions.print >= 2) cerr << "#MEMRESCUE" << endl;
        int minLength = max(MIN_SEED_LENGTH, (int)sa.K+10);//requires some difference with sparseness
        if(!alnOptions.noFW)
            executeSeedType(sa, P, (minLength+min_len)/2, memType, 100000, 1, matches, alnOptions.maxSmemMemStart);
        if(!alnOptions.noRC)
            executeSeedType(sa, Prc, (minLength+min_len)/2, memType, 100000, 1, matchesRC, alnOptions.maxSmemMemStart);
        if(matches.empty() && matchesRC.empty()){
            if(!alnOptions.noFW)
                executeSeedType(sa, P, minLength, memType, 100000, 1, matches, alnOptions.maxSmemMemStart);
            if(!alnOptions.noRC)
                executeSeedType(sa, Prc, minLength, memType, 100000, 1, matchesRC, alnOptions.maxSmemMemStart);
        }
    }
    if(alnOptions.print >= 2){ 
        cerr << "#MEMF " << matches.size() << endl;
        cerr << "#MEMR " << matchesRC.size() << endl;
        if(alnOptions.print >= 6){
            cerr << "seeds fw: " << endl;
            for(size_t i = 0; i < matches.size(); i++)
                cerr << "q,r,l " << matches[i].query << "," << matches[i].ref << "," << matches[i].len << endl;
            cerr << "seeds rev: " << endl;
            for(size_t i = 0; i < matchesRC.size(); i++)
                cerr << "q,r,l " << matchesRC[i].query << "," << matchesRC[i].ref << "," << matchesRC[i].len << endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movq %r8, %r15
movl %ecx, %r12d
movq %rdx, 0x28(%rsp)
movl 0x40(%r8), %ebp
movl 0x78(%r8), %ecx
movl 0x88(%r8), %eax
movq %rax, 0x30(%rsp)
movq %rdi, 0x18(%rsp)
movq 0xe8(%rdi), %rdi
xorl %eax, %eax
cmpq $0x4, %rdi
setge %al
leal (%r12,%rax,2), %eax
addl $-0xc, %eax
cltd
idivl %edi
movl %eax, %r13d
cmpl $0x2, %eax
movl $0x1, %eax
cmovll %eax, %r13d
cmpb $0x0, 0x72(%r8)
movq %rsi, 0x20(%rsp)
cmovnel %eax, %r13d
cmpl $0x6, %ecx
jl 0x215a6
movq 0x32aad(%rip), %r14     # 0x53fe8
leaq 0x23909(%rip), %rsi     # 0x44e4b
movl $0x8, %edx
movq %r14, %rdi
callq 0x7340
movq %r14, %rdi
movl %r12d, %esi
callq 0x75d0
movq %rax, %r14
leaq 0x238f0(%rip), %rsi     # 0x44e54
movl $0x10, %edx
movq %rax, %rdi
callq 0x7340
movq %r14, %rdi
movl %r13d, %esi
callq 0x75d0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
cmpb $0x0, 0x74(%r15)
je 0x219c9
movq 0x70(%rsp), %r14
cmpb $0x0, 0x75(%r15)
je 0x21a0e
cmpb $0x1, 0x71(%r15)
jne 0x216db
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x216db
movq (%r14), %rax
cmpq 0x8(%r14), %rax
jne 0x216db
cmpl $0x2, 0x78(%r15)
jl 0x21630
movq 0x329f4(%rip), %r13     # 0x53fe8
leaq 0x2386a(%rip), %rsi     # 0x44e65
movl $0xa, %edx
movq %r13, %rdi
callq 0x7340
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x18(%rsp), %rax
movl 0xe8(%rax), %eax
cmpl $0xb, %eax
movl $0xa, %ebp
cmovgel %eax, %ebp
addl $0xa, %ebp
cmpb $0x0, 0x74(%r15)
je 0x21b1f
cmpb $0x0, 0x75(%r15)
je 0x21b74
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x216db
movq (%r14), %rax
cmpq 0x8(%r14), %rax
jne 0x216db
cmpb $0x0, 0x74(%r15)
jne 0x216a6
movl 0x44(%r15), %eax
movl %eax, 0x8(%rsp)
movq %rbx, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl %ebp, %edx
movq 0x30(%rsp), %rcx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x2b955
cmpb $0x0, 0x75(%r15)
jne 0x216db
movl 0x44(%r15), %eax
movl %eax, 0x8(%rsp)
movq %r14, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl %ebp, %edx
movq 0x30(%rsp), %rcx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x2b955
cmpl $0x2, 0x78(%r15)
jl 0x219ba
movq 0x328fb(%rip), %r12     # 0x53fe8
leaq 0x2377c(%rip), %rsi     # 0x44e70
movl $0x6, %edx
movq %r12, %rdi
callq 0x7340
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x4, %rsi
movq %r12, %rdi
callq 0x71c0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
leaq 0x23732(%rip), %rsi     # 0x44e77
movl $0x6, %edx
movq %r12, %rdi
callq 0x7340
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x4, %rsi
movq %r12, %rdi
callq 0x71c0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
cmpl $0x6, 0x78(%r15)
jl 0x219ba
leaq 0x236dd(%rip), %rsi     # 0x44e7e
movl $0xa, %edx
movq %r12, %rdi
callq 0x7340
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x8(%rbx), %rax
cmpq (%rbx), %rax
je 0x218a5
xorl %r14d, %r14d
movq 0x327fb(%rip), %r15     # 0x53fe8
leaq 0x2369c(%rip), %rbp     # 0x44e90
xorl %r13d, %r13d
movl $0x6, %edx
movq %r15, %rdi
leaq 0x23683(%rip), %rsi     # 0x44e89
callq 0x7340
movq (%rbx), %rax
movl 0x8(%rax,%r14), %esi
movq %r15, %rdi
callq 0x75d0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7340
movq (%rbx), %rax
movq (%rax,%r14), %rsi
movq %r12, %rdi
callq 0x72a0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7340
movq (%rbx), %rax
movl 0xc(%rax,%r14), %esi
movq %r12, %rdi
callq 0x75d0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x8(%rbx), %rax
subq (%rbx), %rax
incq %r13
sarq $0x4, %rax
addq $0x10, %r14
cmpq %rax, %r13
jb 0x217f7
leaq 0x235e6(%rip), %rsi     # 0x44e92
movl $0xb, %edx
movq 0x32730(%rip), %rbx     # 0x53fe8
movq %rbx, %rdi
callq 0x7340
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x70(%rsp), %r15
movq 0x8(%r15), %rax
cmpq (%r15), %rax
je 0x219ba
xorl %r14d, %r14d
movq 0x326e5(%rip), %rbx     # 0x53fe8
leaq 0x23586(%rip), %r12     # 0x44e90
xorl %ebp, %ebp
movl $0x6, %edx
movq %rbx, %rdi
leaq 0x2356e(%rip), %rsi     # 0x44e89
callq 0x7340
movq (%r15), %rax
movl 0x8(%rax,%r14), %esi
movq %rbx, %rdi
callq 0x75d0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x7340
movq (%r15), %rax
movq (%rax,%r14), %rsi
movq %r13, %rdi
callq 0x72a0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x7340
movq (%r15), %rax
movl 0xc(%rax,%r14), %esi
movq %r13, %rdi
callq 0x75d0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x8(%r15), %rax
subq (%r15), %rax
incq %rbp
sarq $0x4, %rax
addq $0x10, %r14
cmpq %rax, %rbp
jb 0x2190c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%rsp), %rax
leal -0x2(%rax), %ecx
cmpl $0x3, %ecx
ja 0x215b1
movl 0x44(%r15), %eax
leaq 0x231bb(%rip), %rdx     # 0x44ba0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x14cda
jmp 0x215b1
movq 0x30(%rsp), %rax
leal -0x2(%rax), %ecx
cmpl $0x3, %ecx
ja 0x215c1
movl 0x44(%r15), %eax
leaq 0x23186(%rip), %rdx     # 0x44bb0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x14cda
jmp 0x215c1
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x14d44
jmp 0x215b1
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x14d44
jmp 0x215c1
movl %eax, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x154f0
jmp 0x215b1
movl %eax, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x154f0
jmp 0x215c1
movl %eax, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x14dbe
jmp 0x215b1
movl %eax, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x14dbe
jmp 0x215c1
movq 0x30(%rsp), %rax
addl $-0x2, %eax
cmpl $0x3, %eax
ja 0x21654
leal (%r12,%rbp), %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
movl 0x44(%r15), %edx
leaq 0x23078(%rip), %rsi     # 0x44bc0
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x14cda
jmp 0x21654
movq 0x30(%rsp), %rax
addl $-0x2, %eax
cmpl $0x3, %eax
ja 0x2165f
addl %ebp, %r12d
movl %r12d, %ecx
shrl $0x1f, %ecx
addl %r12d, %ecx
sarl %ecx
movl 0x44(%r15), %edx
leaq 0x23032(%rip), %rsi     # 0x44bd0
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x14cda
jmp 0x2165f
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x14d44
jmp 0x21654
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x14d44
jmp 0x2165f
movl %edx, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x154f0
jmp 0x21654
movl %edx, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x154f0
jmp 0x2165f
movl %edx, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x14dbe
jmp 0x21654
movl %edx, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x14dbe
jmp 0x2165f