// File: /workspace/github_cpp_makefile_star2_O1/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, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
movl 0xa0(%rdi), %edx
leaq 0xd56c0(%rip), %rsi     # 0x156f19
movq %rbx, %rdi
xorl %eax, %eax
callq 0x45f0
cmpl $0x0, 0xa0(%r15)
jle 0x81941
leaq 0xdec32(%rip), %r12     # 0x1604aa
leaq 0xd3caf(%rip), %r13     # 0x15552e
xorl %ebp, %ebp
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 %rbx, %rdi
leaq 0xd5650(%rip), %rsi     # 0x156f2b
movl %ebp, %edx
movb $0x4, %al
callq 0x45f0
movq 0xb0(%r15), %rax
cmpl $0x0, (%rax,%rbp,4)
jle 0x81923
xorl %r14d, %r14d
movq 0x88(%r15), %rax
movq (%rax,%rbp,8), %rax
movl (%rax,%r14,4), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x45f0
incq %r14
movq 0xb0(%r15), %rax
movslq (%rax,%rbp,4), %rax
cmpq %rax, %r14
jl 0x818f4
movq %r13, %rdi
movq %rbx, %rsi
callq 0x44b0
incq %rbp
movslq 0xa0(%r15), %rax
cmpq %rax, %rbp
jl 0x81881
leaq 0xd55f2(%rip), %rdi     # 0x156f3a
movq %rbx, 0x10(%rsp)
movq %rbx, %rsi
callq 0x44b0
cmpl $0x0, 0xa0(%r15)
jle 0x81bc4
movq %r15, %r14
xorl %r15d, %r15d
movq 0xa8(%r14), %rax
cmpl $0x0, (%rax,%r15,4)
jle 0x81bb1
movq 0xc0(%r14), %rax
movslq (%rax,%r15,4), %rax
movq 0x60(%r14), %rcx
movq (%rcx,%rax,8), %rax
movq 0xc8(%r14), %rcx
movslq (%rcx,%r15,4), %rcx
leaq (,%rcx,4), %rdx
shlq $0x5, %rcx
movsd (%rax,%rcx), %xmm0
movsd %xmm0, 0x30(%rsp)
leal 0x1(%rdx), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x28(%rsp)
orl $0x2, %edx
movslq %edx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movl $0x8, %eax
movq %rax, 0x18(%rsp)
xorl %r12d, %r12d
movq 0x98(%r14), %rax
movq (%rax,%r15,8), %rax
movl (%rax,%r12,4), %ebp
movl %ebp, %edx
shrl $0x10, %edx
addl $-0x7f, %edx
movl %ebp, %r13d
shrl $0x8, %r13d
movl $0xff, %eax
andl %eax, %r13d
addl $-0x7f, %r13d
andl %eax, %ebp
addl $-0x7f, %ebp
cmpb $0x0, 0x8(%rsp)
je 0x81a3a
movq 0x80(%r14), %rax
movq (%rax,%r15,8), %rax
movslq (%rax,%r12,4), %rax
cmpq %rax, %r15
jle 0x81a3a
testl %edx, %edx
jne 0x81a3a
testl %r13d, %r13d
jne 0x81a3a
testl %ebp, %ebp
je 0x81b94
movq 0x80(%r14), %rax
movq (%rax,%r15,8), %rax
movl (%rax,%r12,4), %ecx
movl %edx, 0xc(%rsp)
movq %r14, %rbx
movq 0x10(%rsp), %r14
movq %r14, %rdi
leaq 0xd54e9(%rip), %rsi     # 0x156f48
movl %r15d, %edx
xorl %eax, %eax
callq 0x45f0
movq 0x90(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x18(%rsp), %rcx
movsd -0x8(%rax,%rcx), %xmm1
movsd (%rax,%rcx), %xmm0
movq %r14, %rdi
movq %rbx, %r14
movl 0xc(%rsp), %ebx
leaq 0xd549e(%rip), %rsi     # 0x156f33
movb $0x2, %al
callq 0x45f0
movq 0xc0(%r14), %rax
movq 0x60(%r14), %rcx
movq 0x80(%r14), %rdx
movq (%rdx,%r15,8), %rdx
movslq (%rdx,%r12,4), %rdx
movslq (%rax,%rdx,4), %rax
movq (%rcx,%rax,8), %rax
movq 0xc8(%r14), %rcx
movslq (%rcx,%rdx,4), %rdx
leaq (,%rdx,4), %rcx
shlq $0x5, %rdx
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
mulsd (%r14), %xmm0
addsd (%rax,%rdx), %xmm0
cvtsi2sd %r13d, %xmm2
movsd 0x8(%r14), %xmm3
mulsd %xmm2, %xmm3
addsd %xmm0, %xmm3
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd 0x18(%r14), %xmm1
mulsd %xmm0, %xmm1
addsd %xmm3, %xmm1
subsd 0x30(%rsp), %xmm1
leal 0x1(%rcx), %edx
movslq %edx, %rdx
mulsd 0x10(%r14), %xmm2
addsd (%rax,%rdx,8), %xmm2
movsd 0x20(%r14), %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
subsd 0x28(%rsp), %xmm3
orl $0x2, %ecx
movslq %ecx, %rcx
mulsd 0x28(%r14), %xmm0
addsd (%rax,%rcx,8), %xmm0
subsd 0x20(%rsp), %xmm0
mulsd %xmm3, %xmm3
mulsd %xmm1, %xmm1
addsd %xmm3, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd 0xd1754(%rip), %xmm0    # 0x1532c0
jb 0x81b74
sqrtsd %xmm0, %xmm0
jmp 0x81b79
callq 0x4350
movq 0x10(%rsp), %rdi
leaq 0xd53cc(%rip), %rsi     # 0x156f51
movl %ebx, %edx
movl %r13d, %ecx
movl %ebp, %r8d
movb $0x1, %al
callq 0x45f0
incq %r12
movq 0xa8(%r14), %rax
movslq (%rax,%r15,4), %rax
addq $0x10, 0x18(%rsp)
cmpq %rax, %r12
jl 0x819df
incq %r15
movslq 0xa0(%r14), %rax
cmpq %rax, %r15
jl 0x81969
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop