// File: /workspace/github_cpp_makefile_star2_O1/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 0x28d6a
addq $0x20, %r14
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x1eb4c
movq %rbp, 0x70(%rsp)
movq %r13, 0x68(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xd770
movq %rbx, %rdi
callq 0x402a4
testq %rax, %rax
je 0x142c7
movq %rax, %r12
leaq 0x35751(%rip), %rbp     # 0x498b3
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 0x14051
movsd %xmm0, 0x20(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
callq 0xd620
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0xd620
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movq %rbx, %rdi
callq 0xd620
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0xd620
movq %rbx, %rdi
movsd 0x20(%rsp), %xmm0
callq 0xd910
movl $0x1, %edx
movq %rax, %rdi
leaq 0x35457(%rip), %rsi     # 0x4966f
callq 0xd620
movl $0x50, %edi
callq 0xd520
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 0x28d6a
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x28d6a
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movsd 0x20(%rsp), %xmm0
callq 0x1ebe8
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x14297
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x142b3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xd550
movq %rbx, (%r15)
movq (%r12), %r12
addq $0x8, %r15
testq %r12, %r12
jne 0x1416c
movq 0x70(%rsp), %rdi
callq 0x10808
leaq 0xb8(%rsp), %rsi
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %r12
callq 0xd8f0
movq 0x68(%rsp), %rdi
leaq 0x90(%rsp), %rbx
movq %rbx, %rsi
callq 0xd6a0
movq (%rbx), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x14320
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x64c69(%rip), %rsi     # 0x78f90
leaq 0xb0(%rsp), %rdi
callq 0xd2c0
leaq 0x120(%rsp), %rdi
callq 0xd1e0
leaq 0x78(%rsp), %rdi
callq 0x1eafe
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14361
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xd550
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x143ed
jmp 0x143e5
movq %rax, %r14
leaq 0x10(%rsp), %r12
jmp 0x1440e
movq %rax, %r14
jmp 0x14418
jmp 0x143e5
movq %rax, %r14
jmp 0x143d6
movq %rax, %r14
jmp 0x143ba
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x143ba
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x143d6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xd550
movl $0x50, %esi
movq %rbx, %rdi
callq 0xd550
jmp 0x143e8
movq %rax, %r14
leaq 0x10(%rsp), %r12
movq 0x64b9c(%rip), %rsi     # 0x78f90
leaq 0xb0(%rsp), %rdi
callq 0xd2c0
leaq 0x120(%rsp), %rdi
callq 0xd1e0
leaq 0x78(%rsp), %rdi
callq 0x1eafe
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1442e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xd550
movq %r14, %rdi
callq 0xd9c0