// File: /workspace/github_cpp_makefile_star2_O3/Luthaf[P]zeopp/voro++/src/cell.cc
// Function: voro::voronoicell_base::surface_area()
double voronoicell_base::surface_area() {
	double area=0;
	int i,j,k,l,m,n;
	double ux,uy,uz,vx,vy,vz,wx,wy,wz;
	for(i=1;i<p;i++) 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);
			m=ed[k][l];ed[k][l]=-1-m;
			while(m!=i) {
				n=cycle_up(ed[k][nu[k]+l],m);
				ux=pts[4*k]-pts[4*i];
				uy=pts[4*k+1]-pts[4*i+1];
				uz=pts[4*k+2]-pts[4*i+2];
				vx=pts[4*m]-pts[4*i];
				vy=pts[4*m+1]-pts[4*i+1];
				vz=pts[4*m+2]-pts[4*i+2];
				wx=uy*vz-uz*vy;
				wy=uz*vx-ux*vz;
				wz=ux*vy-uy*vx;
				area+=sqrt(wx*wx+wy*wy+wz*wz);
				k=m;l=n;
				m=ed[k][l];ed[k][l]=-1-m;
			}
		}
	}
	reset_edges();
	return 0.125*area;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x1c(%rdi), %edi
xorpd %xmm0, %xmm0
cmpl $0x2, %edi
jl 0x95cb
movq 0x28(%rbx), %rax
movq %rax, (%rsp)
movq 0x30(%rbx), %rcx
movl $0x1, %edx
xorl %esi, %esi
movq %rbx, 0x8(%rsp)
cmpl $0x0, (%rcx,%rdx,4)
jle 0x95b4
movq (%rsp), %rax
movq (%rax,%rdx,8), %rdi
movq 0x28(%rbx), %r8
movq 0x30(%rbx), %r9
movq 0x40(%rbx), %r10
leaq (,%rdx,4), %rax
movq %rax, 0x20(%rsp)
leaq 0x1(,%rdx,4), %rax
movq %rax, 0x18(%rsp)
leaq 0x2(,%rdx,4), %rax
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
movslq (%rdi,%r12,4), %r13
testq %r13, %r13
js 0x959c
movl %r13d, %r11d
notl %r11d
movl %r11d, (%rdi,%r12,4)
movslq (%rcx,%rdx,4), %r11
movslq %r12d, %r14
addq %r11, %r14
movl (%rdi,%r14,4), %r11d
movl (%rcx,%r13,4), %r14d
decl %r14d
leal 0x1(%r11), %ebp
cmpl %r11d, %r14d
cmovel %esi, %ebp
movq (%rsp), %rax
movq (%rax,%r13,8), %r11
movslq %ebp, %r14
movl (%r11,%r14,4), %r15d
movl %r15d, %eax
notl %eax
movl %eax, (%r11,%r14,4)
cmpq %r15, %rdx
je 0x959c
movq 0x20(%rsp), %rax
movsd (%r10,%rax,8), %xmm10
movq 0x18(%rsp), %rax
movsd (%r10,%rax,8), %xmm1
movq 0x10(%rsp), %rax
movsd (%r10,%rax,8), %xmm2
movq (%r8,%r13,8), %r14
movslq %r13d, %rax
movslq (%r9,%rax,4), %r11
movslq %ebp, %r13
addq %r11, %r13
movl (%r14,%r13,4), %r11d
movslq %r15d, %r13
movl (%r9,%r13,4), %r14d
decl %r14d
leal 0x1(%r11), %ebp
cmpl %r11d, %r14d
cmovel %esi, %ebp
leal (,%rax,4), %r11d
movslq %r11d, %r11
movsd (%r10,%r11,8), %xmm3
leal 0x1(,%rax,4), %r11d
movslq %r11d, %r11
movsd (%r10,%r11,8), %xmm5
leal 0x2(,%rax,4), %eax
cltq
movsd (%r10,%rax,8), %xmm4
leal (,%r13,4), %eax
cltq
movsd (%r10,%rax,8), %xmm6
leal 0x1(,%r13,4), %eax
cltq
movsd (%r10,%rax,8), %xmm7
leal 0x2(,%r13,4), %eax
cltq
movsd (%r10,%rax,8), %xmm8
movq (%r8,%r13,8), %r14
movslq %ebp, %rax
movl (%r14,%rax,4), %r11d
movl %r15d, %r13d
movl %r11d, %r15d
movl %r11d, %ebx
notl %ebx
movl %ebx, (%r14,%rax,4)
subsd %xmm10, %xmm3
subsd %xmm1, %xmm5
subsd %xmm2, %xmm4
subsd %xmm10, %xmm6
subsd %xmm1, %xmm7
subsd %xmm2, %xmm8
movapd %xmm7, %xmm9
mulsd %xmm4, %xmm9
mulsd %xmm6, %xmm4
mulsd %xmm5, %xmm6
mulsd %xmm8, %xmm5
subsd %xmm9, %xmm5
mulsd %xmm3, %xmm8
subsd %xmm8, %xmm4
mulsd %xmm3, %xmm7
subsd %xmm6, %xmm7
mulsd %xmm4, %xmm4
mulsd %xmm5, %xmm5
addsd %xmm4, %xmm5
mulsd %xmm7, %xmm7
addsd %xmm5, %xmm7
xorps %xmm3, %xmm3
sqrtsd %xmm7, %xmm3
addsd %xmm3, %xmm0
cmpq %r11, %rdx
jne 0x948b
incq %r12
movslq (%rcx,%rdx,4), %rax
cmpq %rax, %r12
jl 0x940f
movq 0x8(%rsp), %rbx
movl 0x1c(%rbx), %edi
incq %rdx
movslq %edi, %rax
cmpq %rax, %rdx
jl 0x93c7
mulsd 0x2f485(%rip), %xmm0    # 0x38a50
testl %edi, %edi
jle 0x963e
movq 0x30(%rbx), %rax
xorl %r15d, %r15d
leaq 0x2f8d8(%rip), %r14     # 0x38eb5
movsd %xmm0, (%rsp)
cmpl $0x0, (%rax,%r15,4)
jle 0x9633
movq 0x28(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
xorl %r12d, %r12d
movl (%rcx,%r12,4), %edx
testl %edx, %edx
js 0x961e
movq %r14, %rdi
movl $0x3, %esi
callq 0x133c5
movsd (%rsp), %xmm0
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rax
movq (%rcx,%r15,8), %rcx
movl (%rcx,%r12,4), %edx
notl %edx
movl %edx, (%rcx,%r12,4)
incq %r12
movslq (%rax,%r15,4), %rdx
cmpq %rdx, %r12
jl 0x95f4
movl 0x1c(%rbx), %edi
incq %r15
movslq %edi, %rcx
cmpq %rcx, %r15
jl 0x95e2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop