// File: /workspace/github_cpp_makefile_star2_O1/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), %eax
xorpd %xmm7, %xmm7
cmpl $0x2, %eax
jl 0x96c7
xorpd %xmm8, %xmm8
movl $0x1, %r14d
xorl %r9d, %r9d
movq 0x30(%rbx), %rcx
cmpl $0x0, (%rcx,%r14,4)
jle 0x96af
leaq (%rcx,%r14,4), %rdx
leaq (,%r14,4), %r10
leaq 0x1(,%r14,4), %r11
leaq 0x2(,%r14,4), %r15
xorl %r12d, %r12d
movq %r15, 0x20(%rsp)
movq 0x28(%rbx), %rsi
movq (%rsi,%r14,8), %rdi
movslq (%rdi,%r12,4), %rax
testq %rax, %rax
movq %r12, 0x18(%rsp)
js 0x9693
movl %eax, %r8d
notl %r8d
movl %r8d, (%rdi,%r12,4)
movslq (%rdx), %rdx
movslq %r12d, %r8
addq %rdx, %r8
movl (%rdi,%r8,4), %edx
movl (%rcx,%rax,4), %ecx
decl %ecx
leal 0x1(%rdx), %ebp
cmpl %edx, %ecx
cmovel %r9d, %ebp
movq (%rsi,%rax,8), %rcx
movslq %ebp, %rdx
movl (%rcx,%rdx,4), %r12d
movl %r12d, %esi
notl %esi
movl %esi, (%rcx,%rdx,4)
cmpq %r12, %r14
je 0x9693
movslq %eax, %rcx
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rdx
movq (%rax,%rcx,8), %rax
movslq (%rdx,%rcx,4), %rsi
movslq %ebp, %rdi
addq %rsi, %rdi
movl (%rax,%rdi,4), %eax
movslq %r12d, %r13
movl (%rdx,%r13,4), %edx
decl %edx
leal 0x1(%rax), %ebp
cmpl %eax, %edx
cmovel %r9d, %ebp
movq 0x40(%rbx), %rax
leal (,%rcx,4), %edx
movslq %edx, %rdx
movsd (%rax,%rdx,8), %xmm1
movsd (%rax,%r10,8), %xmm0
subsd %xmm0, %xmm1
leal 0x1(,%rcx,4), %edx
movslq %edx, %rdx
movsd (%rax,%rdx,8), %xmm3
movsd (%rax,%r11,8), %xmm5
subsd %xmm5, %xmm3
leal 0x2(,%rcx,4), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd (%rax,%r15,8), %xmm6
subsd %xmm6, %xmm2
leal (,%r13,4), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm4
subsd %xmm0, %xmm4
leal 0x1(,%r13,4), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
subsd %xmm5, %xmm0
leal 0x2(,%r13,4), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm5
subsd %xmm6, %xmm5
movapd %xmm0, %xmm6
mulsd %xmm2, %xmm6
mulsd %xmm4, %xmm2
mulsd %xmm3, %xmm4
mulsd %xmm5, %xmm3
subsd %xmm6, %xmm3
mulsd %xmm1, %xmm5
subsd %xmm5, %xmm2
mulsd %xmm1, %xmm0
subsd %xmm4, %xmm0
mulsd %xmm2, %xmm2
mulsd %xmm3, %xmm3
addsd %xmm2, %xmm3
mulsd %xmm0, %xmm0
addsd %xmm3, %xmm0
ucomisd %xmm8, %xmm0
jb 0x962d
sqrtsd %xmm0, %xmm0
jmp 0x966b
movsd %xmm7, 0x8(%rsp)
movl %ebp, 0x14(%rsp)
movq %r10, %rbp
movq %rbx, %r15
movq %r14, %rbx
movq %r11, %r14
callq 0x20f0
movq %r14, %r11
movq %rbx, %r14
movq %r15, %rbx
movq 0x20(%rsp), %r15
movq %rbp, %r10
movl 0x14(%rsp), %ebp
xorl %r9d, %r9d
xorpd %xmm8, %xmm8
movsd 0x8(%rsp), %xmm7
movq 0x28(%rbx), %rax
movq (%rax,%r13,8), %rcx
movslq %ebp, %rdx
movl (%rcx,%rdx,4), %esi
movl %r12d, %eax
movl %esi, %r12d
movl %esi, %edi
notl %edi
movl %edi, (%rcx,%rdx,4)
addsd %xmm0, %xmm7
cmpq %rsi, %r14
jne 0x952b
movq 0x18(%rsp), %r12
incq %r12
movq 0x30(%rbx), %rcx
leaq (%rcx,%r14,4), %rdx
movslq (%rdx), %rax
cmpq %rax, %r12
jl 0x94d0
incq %r14
movslq 0x1c(%rbx), %rax
cmpq %rax, %r14
jl 0x949d
mulsd 0x2f319(%rip), %xmm7    # 0x389e0
testl %eax, %eax
jle 0x9733
xorl %r15d, %r15d
leaq 0x2f770(%rip), %r14     # 0x38e45
movsd %xmm7, 0x8(%rsp)
movq 0x30(%rbx), %rax
cmpl $0x0, (%rax,%r15,4)
jle 0x9727
xorl %r12d, %r12d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, (%rax,%r12,4)
js 0x970b
movq %r14, %rdi
movl $0x3, %esi
callq 0x1318d
movsd 0x8(%rsp), %xmm7
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rax
notl (%rax,%r12,4)
incq %r12
movq 0x30(%rbx), %rax
movslq (%rax,%r15,4), %rax
cmpq %rax, %r12
jl 0x96e9
incq %r15
movslq 0x1c(%rbx), %rax
cmpq %rax, %r15
jl 0x96db
movapd %xmm7, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq