// File: /workspace/github_cpp_makefile_star2_O3/Luthaf[P]zeopp/voro++/src/cell.cc
// Function: voro::voronoicell_base::volume()
double voronoicell_base::volume() {
	const double fe=1/48.0;
	double vol=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[i<<2];
		uy=pts[1]-pts[(i<<2)+1];
		uz=pts[2]-pts[(i<<2)+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[k<<2]-*pts;
				vy=pts[(k<<2)+1]-pts[1];
				vz=pts[(k<<2)+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[(m<<2)]-*pts;
					wy=pts[(m<<2)+1]-pts[1];
					wz=pts[(m<<2)+2]-pts[2];
					vol+=ux*vy*wz+uy*vz*wx+uz*vx*wy-uz*vy*wx-uy*vx*wz-ux*vz*wy;
					k=m;l=n;vx=wx;vy=wy;vz=wz;
					m=ed[k][l];ed[k][l]=-1-m;
				}
			}
		}
	}
	reset_edges();
	return vol*fe;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x1c(%rdi), %r8d
xorpd %xmm0, %xmm0
cmpl $0x2, %r8d
jl 0x86d5
movq 0x40(%rbx), %rax
movsd (%rax), %xmm3
movupd 0x8(%rax), %xmm5
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
movapd %xmm5, %xmm0
unpckhpd %xmm5, %xmm0            # xmm0 = xmm0[1],xmm5[1]
movapd %xmm0, 0x10(%rsp)
xorpd %xmm0, %xmm0
movl $0x1, %esi
xorl %edi, %edi
cmpl $0x0, (%rdx,%rsi,4)
jle 0x86be
leal (,%rsi,4), %r8d
movslq %r8d, %r8
movapd %xmm3, %xmm15
subsd (%rax,%r8,8), %xmm15
leal 0x1(,%rsi,4), %r8d
movslq %r8d, %r8
movapd %xmm5, %xmm13
subsd (%rax,%r8,8), %xmm13
leal 0x2(,%rsi,4), %r8d
movslq %r8d, %r8
movapd 0x10(%rsp), %xmm7
subsd (%rax,%r8,8), %xmm7
movq (%rcx,%rsi,8), %r8
movapd %xmm7, %xmm8
movapd 0x2eb55(%rip), %xmm2    # 0x37040
xorpd %xmm2, %xmm8
movapd %xmm13, %xmm9
xorpd %xmm2, %xmm9
movapd %xmm15, %xmm6
xorpd %xmm2, %xmm6
xorl %r9d, %r9d
movapd %xmm7, (%rsp)
movslq (%r8,%r9,4), %r11
testq %r11, %r11
js 0x86aa
movl %r11d, %r10d
notl %r10d
movl %r10d, (%r8,%r9,4)
movslq (%rdx,%rsi,4), %r10
movslq %r9d, %r14
addq %r10, %r14
movl (%r8,%r14,4), %r14d
movl (%rdx,%r11,4), %ebp
decl %ebp
leal 0x1(%r14), %r10d
cmpl %r14d, %ebp
cmovel %edi, %r10d
leal (,%r11,4), %ebp
movslq %ebp, %r14
movsd (%rax,%r14,8), %xmm10
leal 0x1(,%r11,4), %ebp
movslq %ebp, %r14
movupd (%rax,%r14,8), %xmm11
movq (%rcx,%r11,8), %r15
movslq %r10d, %r12
movl (%r15,%r12,4), %r14d
movl %r14d, %ebp
notl %ebp
movl %ebp, (%r15,%r12,4)
cmpq %r14, %rsi
je 0x86aa
subpd %xmm5, %xmm11
subsd %xmm3, %xmm10
movslq %r14d, %r12
leal (,%r12,4), %ebp
movslq %ebp, %r13
movsd (%rax,%r13,8), %xmm12
subsd %xmm3, %xmm12
leal 0x1(,%r12,4), %ebp
movslq %ebp, %r13
movapd %xmm3, %xmm2
movupd (%rax,%r13,8), %xmm3
subpd %xmm5, %xmm3
movapd %xmm15, %xmm1
mulsd %xmm11, %xmm15
movapd %xmm11, %xmm14
unpckhpd %xmm11, %xmm14          # xmm14 = xmm14[1],xmm11[1]
movapd %xmm5, %xmm4
movapd %xmm13, %xmm5
mulsd %xmm14, %xmm5
mulsd %xmm12, %xmm5
movapd %xmm6, %xmm7
movapd %xmm13, %xmm6
movapd %xmm3, %xmm13
unpckhpd %xmm3, %xmm13           # xmm13 = xmm13[1],xmm3[1]
mulsd %xmm13, %xmm15
addsd %xmm5, %xmm15
movapd (%rsp), %xmm5
mulsd %xmm10, %xmm5
mulsd %xmm3, %xmm5
addsd %xmm15, %xmm5
movapd %xmm1, %xmm15
mulsd %xmm8, %xmm11
mulsd %xmm12, %xmm11
addsd %xmm5, %xmm11
movapd %xmm4, %xmm5
mulsd %xmm9, %xmm10
mulsd %xmm13, %xmm10
movapd %xmm6, %xmm13
movapd %xmm7, %xmm6
addsd %xmm11, %xmm10
mulsd %xmm7, %xmm14
mulsd %xmm3, %xmm14
addsd %xmm10, %xmm14
movslq %r11d, %r11
movslq (%rdx,%r11,4), %r11
movslq %r10d, %r10
addq %r11, %r10
movl (%r15,%r10,4), %r11d
movl (%rdx,%r12,4), %ebp
decl %ebp
leal 0x1(%r11), %r10d
cmpl %r11d, %ebp
cmovel %edi, %r10d
addsd %xmm14, %xmm0
movq (%rcx,%r12,8), %r15
movslq %r10d, %r12
movl (%r15,%r12,4), %r13d
movl %r14d, %r11d
movl %r13d, %r14d
movl %r13d, %ebp
notl %ebp
movl %ebp, (%r15,%r12,4)
movapd %xmm12, %xmm10
movapd %xmm3, %xmm11
movapd %xmm2, %xmm3
cmpq %r13, %rsi
jne 0x858a
incq %r9
movslq (%rdx,%rsi,4), %r10
cmpq %r10, %r9
jl 0x850b
movl 0x1c(%rbx), %r8d
incq %rsi
movslq %r8d, %r9
cmpq %r9, %rsi
jl 0x848d
mulsd 0x30373(%rip), %xmm0    # 0x38a48
testl %r8d, %r8d
jle 0x874a
movq 0x30(%rbx), %rax
xorl %r15d, %r15d
leaq 0x307cd(%rip), %r14     # 0x38eb5
movsd %xmm0, (%rsp)
cmpl $0x0, (%rax,%r15,4)
jle 0x873f
movq 0x28(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
xorl %r12d, %r12d
movl (%rcx,%r12,4), %edx
testl %edx, %edx
js 0x8729
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 0x86ff
movl 0x1c(%rbx), %r8d
incq %r15
movslq %r8d, %rcx
cmpq %rcx, %r15
jl 0x86ed
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop