// File: /workspace/github_cpp_makefile_star2_O3/Kingsford-Group[P]ghost2/src/gzWriter.hpp
// Function: GzWriter::writeData(boost::unordered::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<LevelData, std::allocator<LevelData>>, 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<LevelData, std::allocator<LevelData>>>>>)
void GzWriter::writeData(levelMap levelmap)
{
  levelMap::iterator iter = levelmap.begin(),
  iend = levelmap.end();
  for(; iter != iend; iter++)
  {
    writeString(iter->first);
    for(int i=1;i<=(iter->second).size();i++)
    {
      writeInt(i);
      int sz = (iter->second)[i-1].vnames.size();
      writeInt(sz);
      for(int j=0;j<sz;j++)
        writeString((iter->second)[i-1].vnames[j]);
      sz = (iter->second)[i-1].spectrum.size();
      writeInt(sz);
      for(int j=0;j<sz;j++)
        writeDouble((iter->second)[i-1].spectrum[j]);
      writeDouble((iter->second)[i-1].density);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3379e
movq %rax, %r14
testq %rax, %rax
je 0x10d8d
leaq 0x40(%rsp), %r12
leaq 0x10(%rbx), %r15
movq %r12, 0x30(%rsp)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x27846
movzwl 0x38(%rsp), %eax
rolw $0x8, %ax
movw %ax, 0xe(%rsp)
movl $0x2, %edx
movq %r15, %rdi
leaq 0xe(%rsp), %rsi
callq 0xc730
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %r15, %rdi
callq 0xc730
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x10c15
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0x38(%r14), %rax
cmpq 0x30(%r14), %rax
je 0x10d7c
movl $0x1, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x1ca10
movq %r12, 0x50(%rsp)
leaq -0x1(%r12), %rax
movq 0x30(%r14), %rcx
imulq $0x38, %rax, %rbp
movq 0x8(%rcx,%rbp), %r12
subq (%rcx,%rbp), %r12
shrq $0x5, %r12
movq %rbx, %rdi
movl %r12d, %esi
callq 0x1ca10
testl %r12d, %r12d
jle 0x10cf3
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl $0x8, %r13d
movq 0x30(%r14), %rax
movq (%rax,%rbp), %rax
leaq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x27846
movzwl 0x18(%rsp), %eax
rolw $0x8, %ax
movw %ax, 0xe(%rsp)
movl $0x2, %edx
movq %r15, %rdi
leaq 0xe(%rsp), %rsi
callq 0xc730
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0xc730
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x10cea
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xc550
addq $0x20, %r13
decq %r12
jne 0x10c74
movq 0x30(%r14), %rax
movq 0x20(%rax,%rbp), %r12
subq 0x18(%rax,%rbp), %r12
shrq $0x3, %r12
movq %rbx, %rdi
movl %r12d, %esi
callq 0x1ca10
testl %r12d, %r12d
jle 0x10d3e
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq 0x30(%r14), %rax
movq 0x18(%rax,%rbp), %rax
movsd (%rax,%r13,8), %xmm0
movq %rbx, %rdi
callq 0x1ca4a
incq %r13
cmpq %r13, %r12
jne 0x10d1f
movq 0x30(%r14), %rax
movsd 0x30(%rax,%rbp), %xmm0
movq %rbx, %rdi
callq 0x1ca4a
movq 0x50(%rsp), %rsi
leaq 0x1(%rsi), %r12
movq 0x38(%r14), %rcx
subq 0x30(%r14), %rcx
sarq $0x3, %rcx
movabsq $0x6db6db6db6db6db7, %rdx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdx, %rcx
cmpq %rsi, %rcx
ja 0x10c29
movq (%r14), %r14
testq %r14, %r14
leaq 0x40(%rsp), %r12
jne 0x10bb2
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x1c340
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
jne 0x10dc8
jmp 0x10dd4
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
movq %rax, %r12
cmpq %rax, %rdi
je 0x10dd4
movq (%r12), %rsi
incq %rsi
callq 0xc550
movq %rbx, %rdi
callq 0xc9c0