// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]Dsuite/Dsuite_utils.cpp
// Function: GeneralSetCounts::getBasicCounts(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::map<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&)
void GeneralSetCounts::getBasicCounts(const std::vector<std::string>& genotypes, const std::map<size_t, string>& posToSpeciesMap) {
    // Go through the genotypes - only biallelic markers are allowed
    for (std::vector<std::string>::size_type i = 0; i != genotypes.size(); i++) {
        bool speciesDefined = true;
        std::string species; try { species = posToSpeciesMap.at(i); } catch (const std::out_of_range& oor) {
            speciesDefined = false;
        }
        // The first allele in this individual
        if (genotypes[i][0] == '1') { overall++; individualsWithVariant[i]++; }
        if (genotypes[i][2] == '1') { overall++; individualsWithVariant[i]++; }
        if (speciesDefined) {
            if (genotypes[i][0] == '1') {
                setAltCounts[species]++; setAlleleCounts[species]++;
            } else if (genotypes[i][0] == '0') {
                setAlleleCounts[species]++;
            }
            // The second allele in this individual
            if (genotypes[i][2] == '1') {
                setAltCounts[species]++; setAlleleCounts[species]++;
            } else if (genotypes[i][2] == '0') {
                setAlleleCounts[species]++;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq $0x0, (%rsp)
movq 0x8(%rsi), %rax
cmpq (%rsi), %rax
je 0x8f7b
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rsp), %rbp
leaq 0xc8(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x98(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %r13
movq %rbp, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
movq %rbx, %rdi
movq %rsp, %rsi
callq 0xd286
movb $0x1, %r12b
movq %r13, %rdi
movq %rax, %rsi
callq 0x7210
movq (%rsp), %rcx
movq (%r14), %rax
movq %rcx, %rdx
shlq $0x5, %rdx
movq (%rax,%rdx), %rax
cmpb $0x31, (%rax)
jne 0x8ea8
incl (%r15)
movq 0x2c8(%r15), %rdx
incl (%rdx,%rcx,4)
cmpb $0x31, 0x2(%rax)
jne 0x8ebb
incl (%r15)
movq 0x2c8(%r15), %rdx
incl (%rdx,%rcx,4)
testb %r12b, %r12b
je 0x8f26
movzbl (%rax), %eax
cmpl $0x30, %eax
je 0x8edc
cmpl $0x31, %eax
jne 0x8eeb
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xd5c2
incl (%rax)
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0xd5c2
incl (%rax)
movq (%rsp), %rax
movq (%r14), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rax
movzbl 0x2(%rax), %eax
cmpl $0x30, %eax
je 0x8f17
cmpl $0x31, %eax
jne 0x8f26
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xd5c2
incl (%rax)
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0xd5c2
incl (%rax)
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8f3d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x7420
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rcx
subq (%r14), %rcx
sarq $0x5, %rcx
cmpq %rcx, %rax
jne 0x8e58
jmp 0x8f7b
movq %rax, %r12
cmpl $0x1, %edx
jne 0x8f8f
movq %r12, %rdi
callq 0x7170
callq 0x76a0
xorl %r12d, %r12d
jmp 0x8e84
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8f8c
movq %rax, %r12
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8fa6
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x7420
movq %r12, %rdi
callq 0x7740