// File: /workspace/github_cpp_makefile_star2_O3/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 $0xb8, %rsp
movq %rdx, 0x8(%rsp)
movq %rdi, %r14
movq 0x2f0(%rsi), %r12
movq %rsi, 0x18(%rsp)
cmpq %r12, 0x2f8(%rsi)
je 0x6d069
leaq 0x60(%rsp), %r13
leaq 0x10(%r14), %rbp
movl $0x1, %eax
xorl %ebx, %ebx
movq %r14, 0x10(%rsp)
movl %eax, 0x4(%rsp)
movq %rbp, %r15
imulq $0x98, %rbx, %r14
movups (%r12,%r14), %xmm0
movups 0x10(%r12,%r14), %xmm1
movups 0x20(%r12,%r14), %xmm2
movups 0x30(%r12,%r14), %xmm3
movaps %xmm3, 0x50(%rsp)
movaps %xmm2, 0x40(%rsp)
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x40(%r12,%r14), %rsi
movq 0x48(%r12,%r14), %rdx
addq %rsi, %rdx
movq %r13, %rbp
movq %r13, %rdi
callq 0xf3ce
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x60(%r12,%r14), %rsi
movq 0x68(%r12,%r14), %rdx
addq %rsi, %rdx
leaq 0x80(%rsp), %rdi
callq 0xf3ce
addq %r14, %r12
movb 0x90(%r12), %al
movb %al, 0x50(%rbp)
movups 0x80(%r12), %xmm0
movq %rbp, %r13
movups %xmm0, 0x40(%rbp)
movl $0xa, %edx
movq %r15, %rbp
movq %r15, %rdi
leaq 0xe7623(%rip), %rsi     # 0x154457
callq 0x44e0
leaq 0xe67de(%rip), %r14     # 0x15361e
leaq 0xe878f(%rip), %r15     # 0x1555d6
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0xe75b4(%rip), %rsi     # 0x154418
callq 0x44e0
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x44e0
movl $0x13, %edx
movq %r12, %rdi
leaq 0xe75da(%rip), %rsi     # 0x154462
callq 0x44e0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0xe74d2(%rip), %rsi     # 0x15437c
callq 0x44e0
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x44e0
movl $0x9, %edx
movq %r12, %rdi
leaq 0xe45f5(%rip), %rsi     # 0x1514c3
callq 0x44e0
movsd 0x20(%rsp), %xmm0
movq %r12, %rdi
callq 0x46b0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x44e0
movsd 0x28(%rsp), %xmm0
movq %r12, %rdi
callq 0x46b0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x44e0
movsd 0x30(%rsp), %xmm0
movq %r12, %rdi
callq 0x46b0
movq %rax, %r12
movl $0x14, %edx
movq %rax, %rdi
leaq 0xe7541(%rip), %rsi     # 0x154476
callq 0x44e0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r12
movl $0x20, %edx
movq %rax, %rdi
leaq 0xe7460(%rip), %rsi     # 0x1543b7
callq 0x44e0
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x44e0
movl $0x1, %edx
movq %r12, %rdi
leaq 0xe7403(%rip), %rsi     # 0x15437e
callq 0x44e0
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x44e0
movl $0xe, %edx
movq %rbp, %rdi
leaq 0xe74ec(%rip), %rsi     # 0x15448b
callq 0x44e0
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0xe7dbf(%rip), %rsi     # 0x154d80
callq 0x44e0
movsd 0x50(%rsp), %xmm0
movq %rbx, %rdi
callq 0x46b0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x44e0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x6d009
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
movq 0x10(%rsp), %r14
movl 0x4(%rsp), %r15d
je 0x6d02f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4470
movl %r15d, %ebx
movq 0x18(%rsp), %rax
movq 0x2f0(%rax), %r12
movq 0x2f8(%rax), %rax
subq %r12, %rax
sarq $0x3, %rax
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rax
incl %r15d
cmpq %rbx, %rax
movl %r15d, %eax
ja 0x6cd7f
movq 0x8(%rsp), %rcx
movq 0x48(%rcx), %rax
cmpq %rax, 0x50(%rcx)
je 0x6d2b9
addq $0x10, %r14
movl $0x1, %r12d
xorl %ebx, %ebx
leaq 0xe658f(%rip), %rbp     # 0x15361e
leaq 0xe8540(%rip), %r15     # 0x1555d6
movq %rbx, %rcx
shlq $0x6, %rcx
leaq (%rax,%rcx), %r13
addq $0x20, %r13
movups -0x20(%r13), %xmm0
movups -0x10(%r13), %xmm1
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0xe8f8
movb 0x18(%r13), %al
movb %al, 0x58(%rsp)
movl $0xa, %edx
movq %r14, %rdi
leaq 0xe73bd(%rip), %rsi     # 0x15449a
callq 0x44e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0xe7319(%rip), %rsi     # 0x154418
callq 0x44e0
movl $0x1, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x44e0
movl $0x13, %edx
movq %r13, %rdi
leaq 0xe726b(%rip), %rsi     # 0x15438e
callq 0x44e0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0xe7237(%rip), %rsi     # 0x15437c
callq 0x44e0
movl $0x1, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x44e0
movl $0x9, %edx
movq %r13, %rdi
leaq 0xe435a(%rip), %rsi     # 0x1514c3
callq 0x44e0
movsd 0x20(%rsp), %xmm0
movq %r13, %rdi
callq 0x46b0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x44e0
movsd 0x28(%rsp), %xmm0
movq %r13, %rdi
callq 0x46b0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x44e0
movsd 0x30(%rsp), %xmm0
movq %r13, %rdi
callq 0x46b0
movq %rax, %r13
movl $0x14, %edx
movq %rax, %rdi
leaq 0xe71d2(%rip), %rsi     # 0x1543a2
callq 0x44e0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r13
movl $0x20, %edx
movq %rax, %rdi
leaq 0xe71c5(%rip), %rsi     # 0x1543b7
callq 0x44e0
movl $0x1, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x44e0
movl $0x1, %edx
movq %r13, %rdi
leaq 0xe7168(%rip), %rsi     # 0x15437e
callq 0x44e0
movl $0x1, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x44e0
movl $0xe, %edx
movq %r14, %rdi
leaq 0xe726b(%rip), %rsi     # 0x1544a5
callq 0x44e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0xe7b24(%rip), %rsi     # 0x154d80
callq 0x44e0
movsd 0x38(%rsp), %xmm0
movq %rbx, %rdi
callq 0x46b0
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x44e0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x6d296
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movl %r12d, %ebx
movq 0x8(%rsp), %rcx
movq 0x48(%rcx), %rax
movq 0x50(%rcx), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
incl %r12d
cmpq %rbx, %rcx
ja 0x6d096
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x6d310
movq 0x70(%rsp), %rsi
incq %rsi
jmp 0x6d2fc
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x6d310
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0x6d310
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2f5e8
movq %rbx, %rdi
callq 0x4780