// File: millanek[P]evo/process_vcf_utils.cpp
// Function: GeneralSetCountsWithComplements::getComplementCounts(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&)
void GeneralSetCountsWithComplements::getComplementCounts(const std::vector<string>& populationsToUse) {
    // Now fill in the allele frequencies
    for(std::map<string,int>::iterator it = setAltCounts.begin(); it != setAltCounts.end(); ++it) {
        int complementAAFCount = 0; int complementTotalAlleleCount = 0;
        for (int i = 0; i < populationsToUse.size(); i++) {
            if (it->first != populationsToUse[i]) {
                complementAAFCount += setAltCounts.at(populationsToUse[i]);
                complementTotalAlleleCount += setAlleleCounts.at(populationsToUse[i]);
            }
        }
        setAAFsComplement[it->first] = (double)complementAAFCount/complementTotalAlleleCount;
        setAlleleCountsComplement[it->first] = complementTotalAlleleCount;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
addq $0x38, %rdi
callq 0x83230
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rdi
addq $0x38, %rdi
callq 0x59dd0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x83260
testb $0x1, %al
jne 0x7b6af
jmp 0x7b7fc
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x7b77e
leaq -0x18(%rbp), %rdi
callq 0x83290
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x52960
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x56980
testb $0x1, %al
jne 0x7b711
jmp 0x7b76e
movq -0x38(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x52960
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x83190
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl (%rcx), %ecx
addl -0x24(%rbp), %ecx
movl %ecx, -0x24(%rbp)
addq $0x68, %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x52960
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x83190
movl (%rax), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x7b770
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7b6c4
movq -0x38(%rbp), %rax
cvtsi2sdl -0x24(%rbp), %xmm0
cvtsi2sdl -0x28(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
addq $0x240, %rax            # imm = 0x240
movq %rax, -0x78(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x83290
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x832b0
movsd -0x70(%rbp), %xmm0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movsd %xmm0, (%rcx)
movl -0x28(%rbp), %ecx
movl %ecx, -0x5c(%rbp)
addq $0x2a0, %rax            # imm = 0x2A0
movq %rax, -0x68(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x83290
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x59b00
movl -0x5c(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x18(%rbp), %rdi
callq 0x5ac30
jmp 0x7b688
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)