// File: millanek[P]evo/process_vcf_stats_functions.cpp
// Function: getPopulationsToIndividualsMap(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>>>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>&)
std::map<std::string,std::vector<int>> getPopulationsToIndividualsMap(std::vector<std::string> populations, std::map<std::string,int>& fp_map) {
    std::map<std::string,std::vector<int>> popsToIndivMap;
    for (std::map<std::string,int>::iterator it = fp_map.begin(); it != fp_map.end(); it++) {
        std::vector<int> thisPopI;
        std::vector<std::string>::iterator it_i =  std::find(populations.begin(), populations.end(), it->first);
        while (it_i != populations.end()) {
            thisPopI.push_back((int)std::distance(populations.begin(), it_i));
            ++it_i;
            it_i = std::find(it_i, populations.end(), it->first);
        }
        popsToIndivMap[it->first] = thisPopI;
    }
    return popsToIndivMap;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rsi, -0xc8(%rbp)
movq %rdi, -0xc0(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x73cf0
movq -0x18(%rbp), %rdi
callq 0x83230
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x59dd0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x83260
testb $0x1, %al
jne 0x9bd08
jmp 0x9beba
leaq -0x48(%rbp), %rdi
callq 0x46270
movq -0xc8(%rbp), %rdi
callq 0x44030
movq -0xc8(%rbp), %rdi
movq %rax, -0x58(%rbp)
callq 0x44060
movq %rax, -0x60(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x83290
movq %rax, %rdx
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x84050
movq %rax, -0xd0(%rbp)
jmp 0x9bd53
movq -0xd0(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x44060
movq %rax, -0x78(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x44190
testb $0x1, %al
jne 0x9bd84
jmp 0x9be67
movq -0xc8(%rbp), %rdi
callq 0x44030
movq %rax, -0x88(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x75450
movq %rax, -0xd8(%rbp)
jmp 0x9bdbe
movq -0xd8(%rbp), %rax
movl %eax, -0x7c(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x7c(%rbp), %rsi
callq 0x4ce80
jmp 0x9bdd7
leaq -0x50(%rbp), %rdi
callq 0x441f0
movq -0xc8(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0xa0(%rbp)
callq 0x44060
movq %rax, -0xa8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x83290
movq %rax, %rdx
movq -0xa0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x84050
movq %rax, -0xe0(%rbp)
jmp 0x9be26
movq -0xe0(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x9bd5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x48290
movq -0xc0(%rbp), %rdi
callq 0x70cd0
jmp 0x9bee0
leaq -0x28(%rbp), %rdi
callq 0x83290
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0x6b150
movq %rax, -0xe8(%rbp)
jmp 0x9be88
movq -0xe8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x46440
jmp 0x9be9a
leaq -0x48(%rbp), %rdi
callq 0x48290
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x9d6e0
movq %rax, -0xb0(%rbp)
jmp 0x9bce5
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x9bed0
movq -0xc0(%rbp), %rdi
callq 0x70cd0
movq -0xb8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0xab50
nopl (%rax)