// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/voro++/src/cell.cc
// Function: voro::voronoicell_base::centroid(double&, double&, double&)
void voronoicell_base::centroid(double &cx,double &cy,double &cz) {
	double tvol,vol=0;cx=cy=cz=0;
	int i,j,k,l,m,n;
	double ux,uy,uz,vx,vy,vz,wx,wy,wz;
	for(i=1;i<p;i++) {
		ux=*pts-pts[4*i];
		uy=pts[1]-pts[4*i+1];
		uz=pts[2]-pts[4*i+2];
		for(j=0;j<nu[i];j++) {
			k=ed[i][j];
			if(k>=0) {
				ed[i][j]=-1-k;
				l=cycle_up(ed[i][nu[i]+j],k);
				vx=pts[4*k]-*pts;
				vy=pts[4*k+1]-pts[1];
				vz=pts[4*k+2]-pts[2];
				m=ed[k][l];ed[k][l]=-1-m;
				while(m!=i) {
					n=cycle_up(ed[k][nu[k]+l],m);
					wx=pts[4*m]-*pts;
					wy=pts[4*m+1]-pts[1];
					wz=pts[4*m+2]-pts[2];
					tvol=ux*vy*wz+uy*vz*wx+uz*vx*wy-uz*vy*wx-uy*vx*wz-ux*vz*wy;
					vol+=tvol;
					cx+=(wx+vx-ux)*tvol;
					cy+=(wy+vy-uy)*tvol;
					cz+=(wz+vz-uz)*tvol;
					k=m;l=n;vx=wx;vy=wy;vz=wz;
					m=ed[k][l];ed[k][l]=-1-m;
				}
			}
		}
	}
	reset_edges();
	if(vol>tol_cu) {
		vol=0.125/vol;
		cx=cx*vol+0.5*(*pts);
		cy=cy*vol+0.5*pts[1];
		cz=cz*vol+0.5*pts[2];
	} else cx=cy=cz=0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
andq $0x0, (%rcx)
movq %rdx, %r14
andq $0x0, (%rdx)
movq %rsi, %r15
andq $0x0, (%rsi)
movq %rdi, %r12
movq 0x30(%rdi), %rax
movq 0x40(%rdi), %rcx
xorpd %xmm15, %xmm15
pushq $0x1
popq %rdx
movapd 0x276d7(%rip), %xmm0    # 0x2f040
xorl %esi, %esi
movslq 0x1c(%r12), %rdi
cmpq %rdi, %rdx
jge 0x7b94
movq %rdx, %rdi
shlq $0x5, %rdi
movsd (%rcx), %xmm1
movsd 0x8(%rcx), %xmm2
subsd (%rcx,%rdi), %xmm1
subsd 0x8(%rcx,%rdi), %xmm2
movsd 0x10(%rcx), %xmm3
subsd 0x10(%rcx,%rdi), %xmm3
movq 0x28(%r12), %rdi
movapd %xmm3, %xmm4
xorpd %xmm0, %xmm4
movapd %xmm2, %xmm5
xorpd %xmm0, %xmm5
movapd %xmm1, %xmm6
xorpd %xmm0, %xmm6
xorl %r8d, %r8d
movslq (%rax,%rdx,4), %r9
cmpq %r9, %r8
jge 0x7b8c
movq (%rdi,%rdx,8), %r10
movslq (%r10,%r8,4), %r9
testq %r9, %r9
js 0x7b84
movl %r9d, %r11d
notl %r11d
movl %r11d, (%r10,%r8,4)
movslq (%rax,%rdx,4), %r11
movslq %r8d, %r13
addq %r11, %r13
movl (%r10,%r13,4), %r11d
movl (%rax,%r9,4), %ebp
decl %ebp
leal 0x1(%r11), %r10d
cmpl %r11d, %ebp
cmovel %esi, %r10d
leal (,%r9,4), %r11d
movupd (%rcx,%r11,8), %xmm8
movupd (%rcx), %xmm7
subpd %xmm7, %xmm8
movsd 0x10(%rcx,%r11,8), %xmm7
subsd 0x10(%rcx), %xmm7
movl %r9d, %ebp
movq (%rdi,%r9,8), %r9
movslq %r10d, %r10
movl (%r9,%r10,4), %r11d
movl %r11d, %r13d
notl %r13d
movl %r13d, (%r9,%r10,4)
cmpq %r11, %rdx
je 0x7b84
movslq %r11d, %r9
movslq %ebp, %r13
movq (%rdi,%r13,8), %rbp
movslq (%rax,%r13,4), %r13
addq %r10, %r13
movl (%rbp,%r13,4), %r13d
movl (%rax,%r9,4), %ebp
decl %ebp
leal 0x1(%r13), %r10d
cmpl %r13d, %ebp
cmovel %esi, %r10d
leal (,%r9,4), %ebp
movslq %ebp, %r13
movupd (%rcx,%r13,8), %xmm9
movupd (%rcx), %xmm10
subpd %xmm10, %xmm9
leal 0x2(,%r9,4), %ebp
movslq %ebp, %r13
movsd (%rcx,%r13,8), %xmm10
subsd 0x10(%rcx), %xmm10
movapd %xmm8, %xmm12
unpckhpd %xmm8, %xmm12           # xmm12 = xmm12[1],xmm8[1]
movapd %xmm1, %xmm13
mulsd %xmm12, %xmm13
movapd %xmm2, %xmm11
mulsd %xmm7, %xmm11
mulsd %xmm9, %xmm11
mulsd %xmm10, %xmm13
addsd %xmm11, %xmm13
movapd %xmm3, %xmm14
mulsd %xmm8, %xmm14
movapd %xmm9, %xmm11
unpckhpd %xmm9, %xmm11           # xmm11 = xmm11[1],xmm9[1]
mulsd %xmm11, %xmm14
addsd %xmm13, %xmm14
movapd %xmm7, %xmm13
mulsd %xmm6, %xmm13
mulsd %xmm11, %xmm13
addsd %xmm12, %xmm11
mulsd %xmm4, %xmm12
mulsd %xmm9, %xmm12
addsd %xmm14, %xmm12
movapd %xmm8, %xmm14
mulsd %xmm5, %xmm14
mulsd %xmm10, %xmm14
addsd %xmm12, %xmm14
addsd %xmm14, %xmm13
addsd %xmm9, %xmm8
subsd %xmm1, %xmm8
mulsd %xmm13, %xmm8
addsd (%r15), %xmm8
addsd %xmm13, %xmm15
movsd %xmm8, (%r15)
subsd %xmm2, %xmm11
mulsd %xmm13, %xmm11
addsd (%r14), %xmm11
movsd %xmm11, (%r14)
addsd %xmm10, %xmm7
subsd %xmm3, %xmm7
mulsd %xmm13, %xmm7
addsd (%rbx), %xmm7
movsd %xmm7, (%rbx)
movl %r11d, %ebp
movapd %xmm10, %xmm7
movapd %xmm9, %xmm8
jmp 0x7a2c
incq %r8
jmp 0x79bf
incq %rdx
jmp 0x796b
movq %r12, %rdi
movsd %xmm15, (%rsp)
callq 0xe024
movsd (%rsp), %xmm1
ucomisd 0x50(%r12), %xmm1
jbe 0x7c11
movsd 0x28e68(%rip), %xmm0    # 0x30a20
divsd %xmm1, %xmm0
movq 0x40(%r12), %rax
movsd 0x27467(%rip), %xmm1    # 0x2f030
movsd (%rax), %xmm2
mulsd %xmm1, %xmm2
movsd (%r15), %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, (%r15)
movsd 0x8(%rax), %xmm2
mulsd %xmm1, %xmm2
movsd (%r14), %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, (%r14)
mulsd 0x10(%rax), %xmm1
mulsd (%rbx), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
jmp 0x7c1d
andq $0x0, (%rbx)
andq $0x0, (%r14)
andq $0x0, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq