// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/v_network.cc
// Function: voronoi_network::print_network(_IO_FILE*, bool)
void voronoi_network::print_network(FILE *fp,bool reverse_remove) {
	int ai,aj,ak,j,l,ll,q;
	double x,y,z,x2,y2,z2,*ptsp;

	// Print the vertex table
	fprintf(fp,"Vertex table:\n%d\n",edc);
	//os << edc << "\n";
	for(l=0;l<edc;l++) {
		ptsp=pts[reg[l]];j=4*regp[l];
		fprintf(fp,"%d %g %g %g %g",l,ptsp[j],ptsp[j+1],ptsp[j+2],ptsp[j+3]);
		for(ll=0;ll<nec[l];ll++) fprintf(fp," %d",ne[l][ll]);
		fputs("\n",fp);
	}
	
	// Print out the edge table, loop over vertices
	fputs("\nEdge table:\n",fp);
	for(l=0;l<edc;l++) {
		
		// Store the position of this vertex
		ptsp=pts[reg[l]];j=4*regp[l];
		x=ptsp[j];y=ptsp[j+1];z=ptsp[j+2];

		// Loop over edges of this vertex
		for(q=0;q<nu[l];q++) {

			unpack_periodicity(pered[l][q],ai,aj,ak);

			// If this option is enabled, then the code will not
			// print edges from i to j for j<i.
			if(reverse_remove) if(ed[l][q]<l&&ai==0&&aj==0&&ak==0) continue;
			
			fprintf(fp,"%d -> %d",l,ed[l][q]);
			raded[l][q].print(fp);
			
			// Compute and print the length of the edge 
			ptsp=pts[reg[ed[l][q]]];j=4*regp[ed[l][q]];
			x2=ptsp[j]+ai*bx+aj*bxy+ak*bxz-x;
			y2=ptsp[j+1]+aj*by+ak*byz-y;
			z2=ptsp[j+2]+ak*bz-z;
			fprintf(fp," %d %d %d %g\n",ai,aj,ak,sqrt(x2*x2+y2*y2+z2*z2));
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, 0x14(%rsp)
movq %rsi, %rax
movq %rdi, %r15
movl 0xa0(%rdi), %edx
leaq 0xa3763(%rip), %rsi     # 0x103f9e
movq %rax, (%rsp)
movq %rax, %rdi
xorl %eax, %eax
callq 0x4610
leaq 0xa3760(%rip), %rbx     # 0x103fb0
leaq 0xae9f3(%rip), %r12     # 0x10f24a
leaq 0xa1d20(%rip), %r13     # 0x10257e
xorl %ebp, %ebp
movslq 0xa0(%r15), %rax
cmpq %rax, %rbp
jge 0x60919
movq 0x60(%r15), %rax
movq 0xc0(%r15), %rcx
movslq (%rcx,%rbp,4), %rcx
movq (%rax,%rcx,8), %rax
movq 0xc8(%r15), %rcx
movslq (%rcx,%rbp,4), %rcx
leaq (,%rcx,4), %rdx
shlq $0x5, %rcx
movsd (%rax,%rcx), %xmm0
leal 0x1(%rdx), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
leal 0x2(%rdx), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
orl $0x3, %edx
movslq %edx, %rcx
movsd (%rax,%rcx,8), %xmm3
movq (%rsp), %rdi
movq %rbx, %rsi
movl %ebp, %edx
movb $0x4, %al
callq 0x4610
xorl %r14d, %r14d
movq 0xb0(%r15), %rax
movslq (%rax,%rbp,4), %rax
cmpq %rax, %r14
jge 0x60905
movq 0x88(%r15), %rax
movq (%rax,%rbp,8), %rax
movl (%rax,%r14,4), %edx
movq (%rsp), %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x4610
incq %r14
jmp 0x608d3
movq %r13, %rdi
movq (%rsp), %rsi
callq 0x44f0
incq %rbp
jmp 0x60860
leaq 0xa369f(%rip), %rdi     # 0x103fbf
movq (%rsp), %rsi
callq 0x44f0
xorl %edx, %edx
movq (%rsp), %rbp
movslq 0xa0(%r15), %rax
cmpq %rax, %rdx
jge 0x60b48
movq 0x60(%r15), %rax
movq 0xc0(%r15), %rcx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movq 0xc8(%r15), %rcx
movslq (%rcx,%rdx,4), %rcx
leaq (,%rcx,4), %rsi
shlq $0x5, %rcx
movsd (%rax,%rcx), %xmm0
movsd %xmm0, 0x30(%rsp)
leal 0x1(%rsi), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x28(%rsp)
orl $0x2, %esi
movslq %esi, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
xorl %r14d, %r14d
movq %rdx, 0x8(%rsp)
movq 0xa8(%r15), %rax
movslq (%rax,%rdx,4), %rax
cmpq %rax, %r14
jge 0x60b40
movq 0x80(%r15), %rax
movq 0x98(%r15), %rcx
movq (%rcx,%rdx,8), %rcx
movl (%rcx,%r14,4), %r13d
movl %r13d, %ebx
shrl $0x10, %ebx
addl $-0x7f, %ebx
movl %r13d, %r12d
shrl $0x8, %r12d
movl $0xff, %ecx
andl %ecx, %r12d
addl $-0x7f, %r12d
andl %ecx, %r13d
addl $-0x7f, %r13d
movq (%rax,%rdx,8), %rax
movslq (%rax,%r14,4), %rcx
cmpb $0x0, 0x14(%rsp)
je 0x60a1a
cmpq %rcx, %rdx
jle 0x60a1a
testl %ebx, %ebx
jne 0x60a1a
testl %r12d, %r12d
jne 0x60a1a
testl %r13d, %r13d
je 0x60b32
movq %rbp, %rdi
leaq 0xa35a9(%rip), %rsi     # 0x103fcd
xorl %eax, %eax
callq 0x4610
movq 0x90(%r15), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
addq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x6124e
movq 0xc0(%r15), %rax
movq 0x60(%r15), %rcx
movq 0x80(%r15), %rdx
movq 0x8(%rsp), %rsi
movq (%rdx,%rsi,8), %rdx
movslq (%rdx,%r14,4), %rdx
movslq (%rax,%rdx,4), %rax
movq (%rcx,%rax,8), %rax
movq 0xc8(%r15), %rcx
movslq (%rcx,%rdx,4), %rdx
leaq (,%rdx,4), %rcx
shlq $0x5, %rdx
cvtsi2sd %ebx, %xmm1
mulsd (%r15), %xmm1
addsd (%rax,%rdx), %xmm1
cvtsi2sd %r12d, %xmm2
movsd 0x8(%r15), %xmm3
mulsd %xmm2, %xmm3
cvtsi2sd %r13d, %xmm0
addsd %xmm1, %xmm3
movsd 0x18(%r15), %xmm1
mulsd %xmm0, %xmm1
addsd %xmm3, %xmm1
subsd 0x30(%rsp), %xmm1
leal 0x1(%rcx), %edx
mulsd 0x10(%r15), %xmm2
movslq %edx, %rdx
addsd (%rax,%rdx,8), %xmm2
movsd 0x20(%r15), %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
orl $0x2, %ecx
movslq %ecx, %rcx
mulsd 0x28(%r15), %xmm0
addsd (%rax,%rcx,8), %xmm0
subsd 0x28(%rsp), %xmm3
subsd 0x20(%rsp), %xmm0
mulsd %xmm3, %xmm3
mulsd %xmm1, %xmm1
addsd %xmm3, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movq %rbp, %rdi
leaq 0xa34b8(%rip), %rsi     # 0x103fd6
movl %ebx, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movb $0x1, %al
callq 0x4610
movq 0x8(%rsp), %rdx
incq %r14
addq $0x10, 0x18(%rsp)
jmp 0x609a7
incq %rdx
jmp 0x6092f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop