// File: /workspace/github_cpp_makefile_star2_O3/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 0x2125b
movq 0x32df8(%rip), %r14     # 0x53fe8
leaq 0x23c54(%rip), %rsi     # 0x44e4b
movl $0x8, %edx
movq %r14, %rdi
callq 0x7340
movq %r14, %rdi
movl %r12d, %esi
callq 0x75d0
movq %rax, %r14
leaq 0x23c3b(%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 0x2167e
movq 0x70(%rsp), %r14
cmpb $0x0, 0x75(%r15)
je 0x216c3
cmpb $0x1, 0x71(%r15)
jne 0x21390
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x21390
movq (%r14), %rax
cmpq 0x8(%r14), %rax
jne 0x21390
cmpl $0x2, 0x78(%r15)
jl 0x212e5
movq 0x32d3f(%rip), %r13     # 0x53fe8
leaq 0x23bb5(%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 0x217d4
cmpb $0x0, 0x75(%r15)
je 0x21829
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x21390
movq (%r14), %rax
cmpq 0x8(%r14), %rax
jne 0x21390
cmpb $0x0, 0x74(%r15)
jne 0x2135b
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 0x2b821
cmpb $0x0, 0x75(%r15)
jne 0x21390
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 0x2b821
cmpl $0x2, 0x78(%r15)
jl 0x2166f
movq 0x32c46(%rip), %r12     # 0x53fe8
leaq 0x23ac7(%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 0x23a7d(%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 0x2166f
leaq 0x23a28(%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 0x2155a
xorl %r14d, %r14d
movq 0x32b46(%rip), %r15     # 0x53fe8
leaq 0x239e7(%rip), %rbp     # 0x44e90
xorl %r13d, %r13d
movl $0x6, %edx
movq %r15, %rdi
leaq 0x239ce(%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 0x214ac
leaq 0x23931(%rip), %rsi     # 0x44e92
movl $0xb, %edx
movq 0x32a7b(%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 0x2166f
xorl %r14d, %r14d
movq 0x32a30(%rip), %rbx     # 0x53fe8
leaq 0x238d1(%rip), %r12     # 0x44e90
xorl %ebp, %ebp
movl $0x6, %edx
movq %rbx, %rdi
leaq 0x238b9(%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 0x215c1
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 0x21266
movl 0x44(%r15), %eax
leaq 0x23506(%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 0x14b0c
jmp 0x21266
movq 0x30(%rsp), %rax
leal -0x2(%rax), %ecx
cmpl $0x3, %ecx
ja 0x21276
movl 0x44(%r15), %eax
leaq 0x234d1(%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 0x14b0c
jmp 0x21276
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x14b76
jmp 0x21266
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x14b76
jmp 0x21276
movl %eax, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x1536c
jmp 0x21266
movl %eax, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x1536c
jmp 0x21276
movl %eax, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x14bf0
jmp 0x21266
movl %eax, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x14bf0
jmp 0x21276
movq 0x30(%rsp), %rax
addl $-0x2, %eax
cmpl $0x3, %eax
ja 0x21309
leal (%r12,%rbp), %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
movl 0x44(%r15), %edx
leaq 0x233c3(%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 0x14b0c
jmp 0x21309
movq 0x30(%rsp), %rax
addl $-0x2, %eax
cmpl $0x3, %eax
ja 0x21314
addl %ebp, %r12d
movl %r12d, %ecx
shrl $0x1f, %ecx
addl %r12d, %ecx
sarl %ecx
movl 0x44(%r15), %edx
leaq 0x2337d(%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 0x14b0c
jmp 0x21314
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x14b76
jmp 0x21309
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x14b76
jmp 0x21314
movl %edx, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x1536c
jmp 0x21309
movl %edx, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x1536c
jmp 0x21314
movl %edx, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x14bf0
jmp 0x21309
movl %edx, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movl $0x186a0, %r8d          # imm = 0x186A0
movl $0x1, %r9d
callq 0x14bf0
jmp 0x21314