// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]evo/./process_vcf_annotation_tools.h
// Function: LinkedCoordsBed::getMeanPerElement(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<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, double>>>&)
std::vector<double> getMeanPerElement(std::unordered_map<string, double>& posDxyMap) {
        std::vector<double> elementDxyValues;
        for (int i = 0; i < (int)elementCoordsVector.size(); i++) {
            std::vector<std::vector<string> > thisElement = elementCoordsVector[i];
            double elementDxyTotal = 0; int elementLengthTotal = 0;
            for (int j = 0; j < (int)thisElement.size(); j++) {
                std::vector<string> thisCoordVector = thisElement[j];
                string currentScaffold = thisCoordVector[0];
                int left = atoi(thisCoordVector[1].c_str());
                int right = atoi(thisCoordVector[2].c_str());
                int intervalLength = right - left;
                for (int k = 0; k < intervalLength; k++) {
                    string genomeLocation = currentScaffold+"\t"+numToString(left+k+1);
                    if (posDxyMap.count(genomeLocation) == 1) {
                        elementDxyTotal = elementDxyTotal + posDxyMap[genomeLocation];
                    }
                }
                elementLengthTotal = elementLengthTotal + intervalLength;
            }
            elementDxyValues.push_back(elementDxyTotal/elementLengthTotal);
        }
        return elementDxyValues;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %r14
movq %rsi, 0x20(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rdi)
movq %rdi, 0x8(%rsp)
andq $0x0, 0x10(%rdi)
xorl %ecx, %ecx
leaq 0xa8(%rsp), %r12
leaq 0x88(%rsp), %r15
leaq 0xc8(%rsp), %r13
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rax
subq %rsi, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
cltq
cmpq %rax, %rcx
jge 0x28e27
movq %rcx, 0x28(%rsp)
imulq $0x18, %rcx, %rax
addq %rax, %rsi
leaq 0x50(%rsp), %rdi
callq 0x2a906
xorl %edi, %edi
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x0, 0x4(%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rax
subq %rsi, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
cltq
cmpq %rax, %rdi
jge 0x28deb
movq %rdi, 0x30(%rsp)
imulq $0x18, %rdi, %rax
addq %rax, %rsi
leaq 0x38(%rsp), %rdi
callq 0x297dc
movq 0x38(%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0x8600
movq 0x38(%rsp), %rbp
movq 0x20(%rbp), %rdi
callq 0x86f0
movl %eax, %ebx
movq 0x40(%rbp), %rdi
callq 0x86f0
subl %ebx, %eax
incl %ebx
testl %eax, %eax
movl $0x0, %ebp
movl %eax, 0x1c(%rsp)
cmovgl %eax, %ebp
subl $0x1, %ebp
jb 0x28dc2
movq %r12, %rdi
leaq 0x68(%rsp), %rsi
leaq 0x710c1(%rip), %rdx     # 0x99e1e
callq 0x28806
movq %r15, %rdi
movl %ebx, %esi
callq 0x28ad3
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x28a48
movq %r15, %rdi
callq 0x8978
movq %r12, %rdi
callq 0x8978
movq %r14, %rdi
movq %r13, %rsi
callq 0x2b45a
cmpq $0x1, %rax
jne 0x28db6
movq %r14, %rdi
movq %r13, %rsi
callq 0x2b49c
movsd 0x10(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r13, %rdi
callq 0x8978
incl %ebx
jmp 0x28d49
movl 0x1c(%rsp), %eax
addl %eax, 0x4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x8978
leaq 0x38(%rsp), %rdi
callq 0x28a08
movq 0x30(%rsp), %rdi
incq %rdi
jmp 0x28cd9
cvtsi2sdl 0x4(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x68(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2af10
leaq 0x50(%rsp), %rdi
callq 0x29054
movq 0x28(%rsp), %rcx
incq %rcx
jmp 0x28c8d
movq 0x8(%rsp), %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28e4a
movq %rax, %rbx
jmp 0x28ea1
movq %rax, %rbx
jmp 0x28e8d
movq %rax, %rbx
jmp 0x28e97
movq %rax, %rbx
jmp 0x28e64
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x8978
leaq 0xa8(%rsp), %rdi
jmp 0x28e7e
movq %rax, %rbx
jmp 0x28e83
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x8978
leaq 0x68(%rsp), %rdi
callq 0x8978
leaq 0x38(%rsp), %rdi
callq 0x28a08
leaq 0x50(%rsp), %rdi
callq 0x29054
movq 0x8(%rsp), %rdi
callq 0x2b43c
movq %rbx, %rdi
callq 0x8870
nop