// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_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++) {
        std::string species = posToSpeciesMap.at(i);
        // The first allele in this individual
        if (genotypes[i][0] == '1') {
            overall++; individualsWithVariant[i] = 1;
            setAltCounts[species]++; setAlleleCounts[species]++;
        } else if (genotypes[i][0] == '0') {
            setAlleleCounts[species]++; setRefCounts[species]++;
            individualsWithVariant[i] = 0;
        }
        // The second allele in this individual
        if (genotypes[i][2] == '1') {
            overall++;
            setAltCounts[species]++; setAlleleCounts[species]++;
            individualsWithVariant[i]++;
        } else if (genotypes[i][2] == '0') {
            setAlleleCounts[species]++; setRefCounts[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 0x5009f
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rsp), %rbp
leaq 0x68(%rdi), %r12
leaq 0x8(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x38(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %r13
movq %rbx, %rdi
movq %rsp, %rsi
callq 0x54b56
movq %rbp, 0x18(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x2e45c
movq (%rsp), %rax
movq (%r14), %rcx
movq %rax, %rdx
shlq $0x5, %rdx
movq (%rcx,%rdx), %rcx
movzbl (%rcx), %ecx
cmpl $0x30, %ecx
je 0x4ffd2
cmpl $0x31, %ecx
jne 0x50000
incl (%r15)
movq 0x1c0(%r15), %rcx
movl $0x1, (%rcx,%rax,4)
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x3f0a2
incl (%rax)
movq %r12, %rdi
movq %r13, %rsi
callq 0x3f0a2
incl (%rax)
jmp 0x50000
movq %r12, %rdi
movq %r13, %rsi
callq 0x3f0a2
incl (%rax)
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x3f0a2
incl (%rax)
movq (%rsp), %rax
movq 0x1c0(%r15), %rcx
movl $0x0, (%rcx,%rax,4)
movq (%rsp), %rax
movq (%r14), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rax
movzbl 0x2(%rax), %eax
cmpl $0x30, %eax
je 0x5004d
cmpl $0x31, %eax
jne 0x50069
incl (%r15)
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x3f0a2
incl (%rax)
movq %r12, %rdi
movq %r13, %rsi
callq 0x3f0a2
incl (%rax)
movq (%rsp), %rax
shlq $0x2, %rax
addq 0x1c0(%r15), %rax
jmp 0x50067
movq %r12, %rdi
movq %r13, %rsi
callq 0x3f0a2
incl (%rax)
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x3f0a2
incl (%rax)
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0x50080
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rcx
subq (%r14), %rcx
sarq $0x5, %rcx
cmpq %rcx, %rax
jne 0x4ff62
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0x500c8
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840