// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]Dsuite/Dsuite_common.cpp
// Function: SetInformation::linkSetsAndVCFpositions(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 SetInformation::linkSetsAndVCFpositions(const std::vector<std::string>& sampleNames) {
    // print_vector_stream(sampleNames, std::cerr);
    for (std::vector<std::string>::size_type i = 0; i != sampleNames.size(); i++) {
        try { posToPopMap[i] = IDsToPopMap.at(sampleNames[i]); } catch (const std::out_of_range& oor) {
            std::cerr << "WARNING: The sample " << sampleNames[i] << " is in the VCF but not assigned in the SETS.txt file" << std::endl;
        }
    }
    // Iterate over all the keys in the map to find the samples in the VCF:
    // Give an error if no sample is found for a species:
    for(std::map<string, std::vector<string>>::const_iterator it = popToIDsMap.begin(); it != popToIDsMap.end(); ++it) {
        string sp =  it->first;
        //std::cerr << "sp " << sp << std::endl;
        std::vector<string> IDs = it->second;
        std::vector<size_t> spPos = locateSet(sampleNames, IDs); 
        if (spPos.empty()) {
            std::cerr << "Did not find any samples in the VCF for \"" << sp << "\"" << std::endl;
            assert(!spPos.empty());
        }
        popToPosMap[sp] = spPos;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
leaq 0x18(%rdi), %r15
movq %rdi, %r14
leaq 0xa8(%rdi), %r12
xorl %eax, %eax
leaq 0x20(%rsp), %r13
movq %rax, 0x20(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
subq %rsi, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rax
je 0x31ebd
shlq $0x5, %rax
addq %rax, %rsi
movq %r15, %rdi
callq 0x32962
movq %rax, %rbp
movq %r12, %rdi
movq %r13, %rsi
callq 0x329a8
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7240
movq 0x20(%rsp), %rax
incq %rax
jmp 0x31e16
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x32003
movq %rbp, %rdi
callq 0x7190
movq 0x1f169(%rip), %rdi     # 0x50fe8
leaq 0x91ab(%rip), %rsi      # 0x3b031
callq 0x7400
movq 0x20(%rsp), %rsi
shlq $0x5, %rsi
addq (%rbx), %rsi
movq %rax, %rdi
callq 0x73c0
movq %rax, %rdi
leaq 0x919d(%rip), %rsi      # 0x3b046
callq 0x7400
movq %rax, %rdi
callq 0x71e0
callq 0x76a0
jmp 0x31e5a
movq %r14, %rax
movq 0x60(%r14), %r15
addq $0x50, %r14
addq $0x78, %rax
movq %rax, (%rsp)
leaq 0x20(%rsp), %r12
leaq 0x40(%rsp), %r13
leaq 0x8(%rsp), %rbp
cmpq %r14, %r15
je 0x31f9a
leaq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x7590
leaq 0x40(%r15), %rsi
movq %r13, %rdi
callq 0xbe66
movq %rbp, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0xb274
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x31f5b
movq 0x1f0c7(%rip), %rdi     # 0x50fe8
leaq 0x9153(%rip), %rsi      # 0x3b07b
callq 0x7400
movq %rax, %rdi
movq %r12, %rsi
callq 0x73c0
movq %rax, %rdi
leaq 0x480d(%rip), %rsi      # 0x3674f
callq 0x7400
movq %rax, %rdi
callq 0x71e0
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x31fa9
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x329f8
movq %rax, %rdi
movq %rbp, %rsi
callq 0x32a5e
movq %rbp, %rdi
callq 0xc14a
movq %r13, %rdi
callq 0xb80c
movq %r12, %rdi
callq 0x7898
movq %r15, %rdi
callq 0x74b0
movq %rax, %r15
jmp 0x31edf
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x90f5(%rip), %rdi      # 0x3b0a5
leaq 0x90fd(%rip), %rsi      # 0x3b0b4
leaq 0x9108(%rip), %rcx      # 0x3b0c6
pushq $0x1c
popq %rdx
callq 0x72b0
movq %rax, %rbp
callq 0x76a0
jmp 0x32003
movq %rax, %rdi
callq 0xbb7c
movq %rax, %rbp
jmp 0x31ff9
movq %rax, %rbp
jmp 0x31fef
movq %rax, %rbp
leaq 0x8(%rsp), %rdi
callq 0xc14a
leaq 0x40(%rsp), %rdi
callq 0xb80c
leaq 0x20(%rsp), %rdi
callq 0x7898
movq %rbp, %rdi
callq 0x7750
nop