// File: millanek[P]evo/evo_recombUtils.cpp
// Function: RecombRead::findHetsInMatchingString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::map<int, PhaseInfo*, std::less<int>, std::allocator<std::pair<int const, PhaseInfo*>>> const&)
void RecombRead::findHetsInMatchingString(const string& matchSeq, int startPos, const std::map<int,PhaseInfo*>& positionToPhase) {
    for (int i = 0; i < matchSeq.length(); i++) {
        if (positionToPhase.count(startPos + i) == 1) {
            PhaseInfo* thisHetPhase = positionToPhase.at(startPos + i);
            std::vector<char> phasedSNPbases = thisHetPhase->phasedVars;
            char readBase = matchSeq[i];
            int snpPos = startPos + i;
            HetInfo* het = new HetInfo(snpPos, readBase, int(readQual[i])-33, phasedSNPbases[0], phasedSNPbases[1], thisHetPhase->quality, thisHetPhase->blockNum);
            hetSites.push_back(het);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa930
movq %rax, %rcx
movq -0x80(%rbp), %rax
cmpq %rcx, %rax
jae 0x12615d
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x126d60
cmpq $0x1, %rax
jne 0x12614d
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl -0x24(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
leaq -0x34(%rbp), %rsi
callq 0x126dc0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
addq $0x8, %rsi
leaq -0x50(%rbp), %rdi
callq 0x126e60
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0xa670
movb (%rax), %al
movb %al, -0x51(%rbp)
movl -0x14(%rbp), %eax
movl -0x24(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x58(%rbp)
movl $0x28, %edi
callq 0xa5d0
movq %rax, -0x88(%rbp)
jmp 0x12603a
movq -0x78(%rbp), %rdi
movl -0x58(%rbp), %eax
movl %eax, -0x98(%rbp)
movb -0x51(%rbp), %al
movb %al, -0x91(%rbp)
addq $0x70, %rdi
movslq -0x24(%rbp), %rsi
callq 0xac60
movq %rax, -0x90(%rbp)
jmp 0x126066
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
addl $-0x21, %eax
movl %eax, -0xa0(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0xada00
movq -0xa8(%rbp), %rdi
movsbl (%rax), %eax
movl %eax, -0x9c(%rbp)
movl $0x1, %esi
callq 0xada00
movq -0x88(%rbp), %rdi
movl -0x98(%rbp), %esi
movl -0xa0(%rbp), %ecx
movl -0x9c(%rbp), %r8d
movq %rax, %rdx
movb -0x91(%rbp), %al
movsbl (%rdx), %r9d
movq -0x30(%rbp), %rdx
movsd 0x20(%rdx), %xmm0
movl 0x2c(%rdx), %r10d
movq %rsp, %rdx
movl %r10d, (%rdx)
movsbl %al, %edx
callq 0x126f50
jmp 0x1260eb
movq -0x78(%rbp), %rdi
movq -0x88(%rbp), %rax
movq %rax, -0x60(%rbp)
addq $0x108, %rdi            # imm = 0x108
leaq -0x60(%rbp), %rsi
callq 0x127040
jmp 0x12610c
leaq -0x50(%rbp), %rdi
callq 0xae570
jmp 0x12614d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x126142
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
movl $0x28, %esi
callq 0xa5e0
leaq -0x50(%rbp), %rdi
callq 0xae570
jmp 0x126166
jmp 0x12614f
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x125f99
addq $0xb0, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0xab50
nop