// File: /workspace/github_cpp_makefile_star2_O2/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 $0x18, %rsp
movq 0x30(%rdi), %rax
xorpd %xmm7, %xmm7
pushq $0x1
popq %rcx
xorl %edx, %edx
movq %rdi, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movslq 0x1c(%rdi), %rsi
cmpq %rsi, %rcx
jge 0x7908
movq 0x28(%rdi), %r15
leaq (,%rcx,4), %r8
leaq 0x1(,%rcx,4), %r9
leaq 0x2(,%rcx,4), %r10
xorl %r11d, %r11d
movq %r15, (%rsp)
movslq (%rax,%rcx,4), %rsi
cmpq %rsi, %r11
jge 0x7900
movq (%r15,%rcx,8), %rsi
movslq (%rsi,%r11,4), %rbp
testq %rbp, %rbp
js 0x78f8
movl %ebp, %ebx
notl %ebx
movl %ebx, (%rsi,%r11,4)
movslq (%rax,%rcx,4), %rbx
movslq %r11d, %r14
addq %rbx, %r14
movl (%rsi,%r14,4), %esi
movl (%rax,%rbp,4), %r14d
decl %r14d
leal 0x1(%rsi), %ebx
cmpl %esi, %r14d
cmovel %edx, %ebx
movq (%r15,%rbp,8), %r14
movslq %ebx, %r15
movl (%r14,%r15,4), %esi
movl %esi, %r12d
notl %r12d
movl %r12d, (%r14,%r15,4)
movq 0x28(%rdi), %r14
movq 0x30(%rdi), %r15
movq 0x40(%rdi), %r12
movl %esi, %r13d
movl %esi, %esi
cmpq %rsi, %rcx
je 0x78ea
movslq %ebp, %rsi
movq (%r14,%rsi,8), %rbp
movslq (%r15,%rsi,4), %rax
movslq %ebx, %rbx
addq %rax, %rbx
movl (%rbp,%rbx,4), %eax
movslq %r13d, %rbp
movl (%r15,%rbp,4), %edi
decl %edi
leal 0x1(%rax), %ebx
cmpl %eax, %edi
cmovel %edx, %ebx
leal (,%rsi,4), %eax
cltq
movsd (%r12,%rax,8), %xmm0
movsd (%r12,%r8,8), %xmm3
subsd %xmm3, %xmm0
leal 0x1(,%rsi,4), %eax
cltq
movsd (%r12,%rax,8), %xmm2
movsd (%r12,%r9,8), %xmm5
subsd %xmm5, %xmm2
leal 0x2(,%rsi,4), %eax
cltq
movsd (%r12,%rax,8), %xmm1
movsd (%r12,%r10,8), %xmm6
subsd %xmm6, %xmm1
leal (,%r13,4), %eax
cltq
movsd (%r12,%rax,8), %xmm4
subsd %xmm3, %xmm4
leal 0x1(,%r13,4), %eax
cltq
movsd (%r12,%rax,8), %xmm3
subsd %xmm5, %xmm3
leal 0x2(,%r13,4), %eax
cltq
movsd (%r12,%rax,8), %xmm5
subsd %xmm6, %xmm5
movapd %xmm3, %xmm6
mulsd %xmm1, %xmm6
mulsd %xmm4, %xmm1
mulsd %xmm2, %xmm4
mulsd %xmm5, %xmm2
subsd %xmm6, %xmm2
mulsd %xmm0, %xmm5
subsd %xmm5, %xmm1
mulsd %xmm0, %xmm3
subsd %xmm4, %xmm3
mulsd %xmm1, %xmm1
mulsd %xmm2, %xmm2
addsd %xmm1, %xmm2
mulsd %xmm3, %xmm3
addsd %xmm2, %xmm3
sqrtsd %xmm3, %xmm0
addsd %xmm0, %xmm7
movq (%r14,%rbp,8), %rax
movslq %ebx, %rdi
movl (%rax,%rdi,4), %esi
movl %esi, %ebp
notl %ebp
movl %ebp, (%rax,%rdi,4)
movl %r13d, %ebp
jmp 0x77d2
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movq (%rsp), %r15
incq %r11
jmp 0x776d
incq %rcx
jmp 0x773d
movsd %xmm7, (%rsp)
callq 0xe024
movsd (%rsp), %xmm0
mulsd 0x29101(%rip), %xmm0    # 0x30a20
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq