// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/voronoicell.cc
// Function: writeVMDAtomsAndNodes(std::basic_fstream<char, std::char_traits<char>>&, ATOM_NETWORK*, VORONOI_NETWORK*)
void writeVMDAtomsAndNodes(fstream &output, ATOM_NETWORK *atmnet, VORONOI_NETWORK *vornet){
  // Iterate over all atoms. Set the radius of the atom to its actual value
  for(unsigned int i = 0; i < atmnet->atoms.size(); i++){
    ATOM curAtom = atmnet->atoms.at(i);
    output << "set atoms(" << i << ") {" << "\n"
	       << "{color $atomColors(" << i << ") }" << "\n"
	       << "{sphere {" << curAtom.x << " " << curAtom.y << " " << curAtom.z 
	       << "} radius $atomRadii(" << i << ") resolution $sphere_resolution}" 
	       << "\n" << "}" << "\n";
    output << "set atomRadii(" << i << ") " << curAtom.radius << "\n";
  }

  // Iterate over all nodes. Set the radius of the node to that of the maximum static sphere
  for(unsigned int i = 0; i < vornet->nodes.size(); i++){
    VOR_NODE curNode = vornet->nodes.at(i);
    output << "set nodes(" << i << ") {" << "\n"
	   << "{color $nodeColors("<< i << ") }" << "\n"
	   << "{sphere {" << curNode.x << " " << curNode.y << " " << curNode.z 
	   << "} radius $nodeRadii(" << i <<  ") resolution $sphere_resolution}" << "\n"
	   << "}" << "\n";
    output << "set nodeRadii(" << i << ") " << curNode.rad_stat_sphere << "\n";
  }    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x2f0(%rsi), %rax
movq %rax, 0x8(%rsp)
addq $0x10, %r14
xorl %r13d, %r13d
leaq 0xb1f36(%rip), %rbp     # 0x10257e
leaq 0xb3ec3(%rip), %r12     # 0x104512
movl %r13d, %r13d
movq 0x2f8(%r15), %rax
subq 0x2f0(%r15), %rax
cqto
movl $0x98, %ecx
idivq %rcx
cmpq %r13, %rax
jbe 0x507e6
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xa73a
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xa75c
movq %r14, %rdi
leaq 0xb2d20(%rip), %rsi     # 0x1033b7
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0xb2cc7(%rip), %rsi     # 0x103378
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4480
movq %rax, %rdi
leaq 0xb2cf7(%rip), %rsi     # 0x1033c2
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0xb2bf7(%rip), %rsi     # 0x1032dc
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4480
movq %rax, %rdi
leaq 0xafd54(%rip), %rsi     # 0x100453
callq 0x4480
movsd 0x10(%rsp), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4480
movsd 0x18(%rsp), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4480
movsd 0x20(%rsp), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
leaq 0xb2c88(%rip), %rsi     # 0x1033d6
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0xb2baf(%rip), %rsi     # 0x103317
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4480
movq %rax, %rdi
leaq 0xb2b5c(%rip), %rsi     # 0x1032de
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4480
movq %r14, %rdi
leaq 0xb2c4f(%rip), %rsi     # 0x1033eb
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0xb3522(%rip), %rsi     # 0x103cd8
callq 0x4480
movsd 0x40(%rsp), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4480
leaq 0x10(%rsp), %rdi
callq 0xa808
incl %r13d
jmp 0x5064f
leaq 0x48(%rbx), %r12
xorl %r13d, %r13d
leaq 0xb1d8a(%rip), %r15     # 0x10257e
leaq 0xb3d17(%rip), %rbp     # 0x104512
movl %r13d, %r13d
movq 0x50(%rbx), %rax
subq 0x48(%rbx), %rax
sarq $0x6, %rax
cmpq %r13, %rax
jbe 0x50984
movq %r12, %rdi
movq %r13, %rsi
callq 0xa848
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xa86a
movq %r14, %rdi
leaq 0xb2bc5(%rip), %rsi     # 0x1033fa
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0xb2b29(%rip), %rsi     # 0x103378
callq 0x4480
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
movq %rax, %rdi
leaq 0xb2a85(%rip), %rsi     # 0x1032ee
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0xb2a59(%rip), %rsi     # 0x1032dc
callq 0x4480
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
movq %rax, %rdi
leaq 0xafbb6(%rip), %rsi     # 0x100453
callq 0x4480
movsd 0x10(%rsp), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4480
movsd 0x18(%rsp), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4480
movsd 0x20(%rsp), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
leaq 0xb2a16(%rip), %rsi     # 0x103302
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0xb2a11(%rip), %rsi     # 0x103317
callq 0x4480
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
movq %rax, %rdi
leaq 0xb29be(%rip), %rsi     # 0x1032de
callq 0x4480
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
movq %r14, %rdi
leaq 0xb2acb(%rip), %rsi     # 0x103405
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0xb3384(%rip), %rsi     # 0x103cd8
callq 0x4480
movsd 0x28(%rsp), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
leaq 0x30(%rsp), %rdi
callq 0xb290
incl %r13d
jmp 0x507fb
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xb290
jmp 0x509b2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xa808
movq %rbx, %rdi
callq 0x4780