// File: /workspace/github_cpp_makefile_star2_O1/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 0x6dc55
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 0xf32a
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 0xf32a
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 0xe8947(%rip), %rsi     # 0x156367
callq 0x44e0
leaq 0xe7b02(%rip), %r14     # 0x15552e
leaq 0xe9a53(%rip), %r15     # 0x157486
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0xe88d8(%rip), %rsi     # 0x156328
callq 0x44e0
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x44e0
movl $0x13, %edx
movq %r12, %rdi
leaq 0xe88fe(%rip), %rsi     # 0x156372
callq 0x44e0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0xe87f6(%rip), %rsi     # 0x15628c
callq 0x44e0
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x44e0
movl $0x9, %edx
movq %r12, %rdi
leaq 0xe5979(%rip), %rsi     # 0x153433
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 0xe8865(%rip), %rsi     # 0x156386
callq 0x44e0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r12
movl $0x20, %edx
movq %rax, %rdi
leaq 0xe8784(%rip), %rsi     # 0x1562c7
callq 0x44e0
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x44e0
movl $0x1, %edx
movq %r12, %rdi
leaq 0xe8727(%rip), %rsi     # 0x15628e
callq 0x44e0
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x44e0
movl $0xe, %edx
movq %rbp, %rdi
leaq 0xe8810(%rip), %rsi     # 0x15639b
callq 0x44e0
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0xe90bb(%rip), %rsi     # 0x156c68
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 0x6dbf5
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 0x6dc1b
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 0x6d96b
movq 0x8(%rsp), %rcx
movq 0x48(%rcx), %rax
cmpq %rax, 0x50(%rcx)
je 0x6dea5
addq $0x10, %r14
movl $0x1, %r12d
xorl %ebx, %ebx
leaq 0xe78b3(%rip), %rbp     # 0x15552e
leaq 0xe9804(%rip), %r15     # 0x157486
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 0xe886
movb 0x18(%r13), %al
movb %al, 0x58(%rsp)
movl $0xa, %edx
movq %r14, %rdi
leaq 0xe86e1(%rip), %rsi     # 0x1563aa
callq 0x44e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0xe863d(%rip), %rsi     # 0x156328
callq 0x44e0
movl $0x1, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x44e0
movl $0x13, %edx
movq %r13, %rdi
leaq 0xe858f(%rip), %rsi     # 0x15629e
callq 0x44e0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0xe855b(%rip), %rsi     # 0x15628c
callq 0x44e0
movl $0x1, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x44e0
movl $0x9, %edx
movq %r13, %rdi
leaq 0xe56de(%rip), %rsi     # 0x153433
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 0xe84f6(%rip), %rsi     # 0x1562b2
callq 0x44e0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %r13
movl $0x20, %edx
movq %rax, %rdi
leaq 0xe84e9(%rip), %rsi     # 0x1562c7
callq 0x44e0
movl $0x1, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x44e0
movl $0x1, %edx
movq %r13, %rdi
leaq 0xe848c(%rip), %rsi     # 0x15628e
callq 0x44e0
movl $0x1, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x44e0
movl $0xe, %edx
movq %r14, %rdi
leaq 0xe858f(%rip), %rsi     # 0x1563b5
callq 0x44e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42b0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0xe8e20(%rip), %rsi     # 0x156c68
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 0x6de82
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 0x6dc82
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 0x6defc
movq 0x70(%rsp), %rsi
incq %rsi
jmp 0x6dee8
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x6defc
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0x6defc
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2f814
movq %rbx, %rdi
callq 0x4780