// File: /workspace/github_cpp_makefile_star2_O3/Kingsford-Group[P]ghost2/src/spectralToDistance.hpp
// Function: distanceWorker(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<LevelInfo, std::allocator<LevelInfo>>>, boost::unordered::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<LevelInfo, std::allocator<LevelInfo>>, boost::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, std::vector<LevelInfo, std::allocator<LevelInfo>>>>>*, D_alpha**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, ProgressBar*)
void distanceWorker(spectramap::value_type n, spectramap* m2,
    D_alpha** result, string* out, ProgressBar *pbar)
{
  auto end = m2->end();
  string name = n.first;
  vector<LevelInfo> info = n.second;
  ostringstream res;
  int i=0;
  for(auto it = m2->begin(); it != end; ++it){
    double topo = DTopo(&info[0], &(it->second)[0], min(info.size(), it->second.size()));
    res << name << "\t" << it->first << "\t" << topo << "\n";
    D_alpha* d = new D_alpha(name, it->first, topo);
    result[i++] = d;
  }
  pbar->update();
  *out = res.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %r8, %rbp
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x27846
addq $0x20, %r14
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x1d846
movq %rbp, 0x70(%rsp)
movq %r13, 0x68(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xc770
movq %rbx, %rdi
callq 0x3f19c
testq %rax, %rax
je 0x130ba
movq %rax, %r12
leaq 0x3598e(%rip), %rbp     # 0x488e3
leaq 0x48(%rsp), %r14
leaq 0x28(%rsp), %r13
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rax
subq %rdi, %rax
shrq $0x4, %rax
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
movq 0x30(%r12), %rsi
movq 0x38(%r12), %rcx
subq %rsi, %rcx
shrq $0x4, %rcx
imull $0xcccccccd, %ecx, %edx # imm = 0xCCCCCCCD
cmpl %edx, %eax
cmovll %eax, %edx
callq 0x12e44
movsd %xmm0, 0x20(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
callq 0xc620
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0xc620
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movq %rbx, %rdi
callq 0xc620
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0xc620
movq %rbx, %rdi
movsd 0x20(%rsp), %xmm0
callq 0xc910
movl $0x1, %edx
movq %rax, %rdi
leaq 0x35694(%rip), %rsi     # 0x4869f
callq 0xc620
movl $0x50, %edi
callq 0xc520
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x27846
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x27846
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movsd 0x20(%rsp), %xmm0
callq 0x1d8e2
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1308a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x130a6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xc550
movq %rbx, (%r15)
movq (%r12), %r12
addq $0x8, %r15
testq %r12, %r12
jne 0x12f5f
movq 0x70(%rsp), %rdi
callq 0xf7ee
leaq 0xb8(%rsp), %rsi
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %r12
callq 0xc8f0
movq 0x68(%rsp), %rdi
leaq 0x90(%rsp), %rbx
movq %rbx, %rsi
callq 0xc6a0
movq (%rbx), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x13113
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0x64e76(%rip), %rsi     # 0x77f90
leaq 0xb0(%rsp), %rdi
callq 0xc2c0
leaq 0x120(%rsp), %rdi
callq 0xc1e0
leaq 0x78(%rsp), %rdi
callq 0x1d7f8
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13154
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xc550
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x131e0
jmp 0x131d8
movq %rax, %r14
leaq 0x10(%rsp), %r12
jmp 0x13201
movq %rax, %r14
jmp 0x1320b
jmp 0x131d8
movq %rax, %r14
jmp 0x131c9
movq %rax, %r14
jmp 0x131ad
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x131ad
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x131c9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xc550
movl $0x50, %esi
movq %rbx, %rdi
callq 0xc550
jmp 0x131db
movq %rax, %r14
leaq 0x10(%rsp), %r12
movq 0x64da9(%rip), %rsi     # 0x77f90
leaq 0xb0(%rsp), %rdi
callq 0xc2c0
leaq 0x120(%rsp), %rdi
callq 0xc1e0
leaq 0x78(%rsp), %rdi
callq 0x1d7f8
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13221
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xc550
movq %r14, %rdi
callq 0xc9c0