// File: /workspace/github_cpp_makefile_star2_O1/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 0x8f77
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rsp), %rbp
leaq 0x98(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0xc8(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %r12
movq %rbp, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
movq %rbx, %rdi
movq %rsp, %rsi
callq 0xd328
movb $0x1, %r13b
movq %r12, %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 0x8ea4
incl (%r15)
movq 0x2c8(%r15), %rdx
incl (%rdx,%rcx,4)
cmpb $0x31, 0x2(%rax)
jne 0x8eb7
incl (%r15)
movq 0x2c8(%r15), %rdx
incl (%rdx,%rcx,4)
testb %r13b, %r13b
je 0x8f22
movzbl (%rax), %eax
cmpl $0x30, %eax
je 0x8ed8
cmpl $0x31, %eax
jne 0x8ee7
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0xd65c
incl (%rax)
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0xd65c
incl (%rax)
movq (%rsp), %rax
movq (%r14), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rax
movzbl 0x2(%rax), %eax
cmpl $0x30, %eax
je 0x8f13
cmpl $0x31, %eax
jne 0x8f22
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0xd65c
incl (%rax)
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0xd65c
incl (%rax)
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8f39
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 0x8e54
jmp 0x8f77
movq %rax, %r13
cmpl $0x1, %edx
jne 0x8f8b
movq %r13, %rdi
callq 0x7170
callq 0x76a0
xorl %r13d, %r13d
jmp 0x8e80
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8f88
movq %rax, %r13
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8fa2
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x7420
movq %r13, %rdi
callq 0x7740