// File: /workspace/github_cpp_makefile_star2_O3/icemiliang[P]vot/src/vot/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[3*i];
        uy=pts[1]-pts[3*i+1];
        uz=pts[2]-pts[3*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[3*k]-*pts;
                vy=pts[3*k+1]-pts[1];
                vz=pts[3*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[3*m]-*pts;
                    wy=pts[3*m+1]-pts[1];
                    wz=pts[3*m+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
movl 0x18(%rdi), %r9d
xorpd %xmm0, %xmm0
cmpl $0x2, %r9d
jl 0x1c8ae
movq 0x30(%rdi), %rax
movsd (%rax), %xmm4
movupd 0x8(%rax), %xmm5
movq 0x20(%rdi), %rcx
movq 0x28(%rdi), %rdx
movapd %xmm5, %xmm0
unpckhpd %xmm5, %xmm0            # xmm0 = xmm0[1],xmm5[1]
movapd %xmm0, (%rsp)
xorpd %xmm0, %xmm0
movl $0x1, %esi
xorl %r8d, %r8d
cmpl $0x0, (%rdx,%rsi,4)
jle 0x1c897
leaq (%rsi,%rsi,2), %r9
movapd %xmm4, %xmm6
subsd (%rax,%r9,8), %xmm6
movapd %xmm5, %xmm14
subsd 0x8(%rax,%r9,8), %xmm14
movapd (%rsp), %xmm8
subsd 0x10(%rax,%r9,8), %xmm8
movq (%rcx,%rsi,8), %r9
movapd %xmm8, %xmm9
movapd 0x2e486(%rip), %xmm1    # 0x4ab70
xorpd %xmm1, %xmm9
movapd %xmm14, %xmm10
xorpd %xmm1, %xmm10
movapd %xmm6, %xmm7
xorpd %xmm1, %xmm7
xorl %r10d, %r10d
movapd %xmm8, 0x10(%rsp)
movl (%r9,%r10,4), %ebx
testl %ebx, %ebx
js 0x1c883
movl %ebx, %r11d
notl %r11d
movl %r11d, (%r9,%r10,4)
movslq (%rdx,%rsi,4), %r11
movslq %r10d, %r14
addq %r11, %r14
movl (%r9,%r14,4), %r14d
movl (%rdx,%rbx,4), %ebp
decl %ebp
leal 0x1(%r14), %r11d
cmpl %r14d, %ebp
cmovel %r8d, %r11d
leaq (%rbx,%rbx,2), %r14
movsd (%rax,%r14,8), %xmm11
movupd 0x8(%rax,%r14,8), %xmm12
movq (%rcx,%rbx,8), %r15
movslq %r11d, %r12
movl (%r15,%r12,4), %r14d
movl %r14d, %ebp
notl %ebp
movl %ebp, (%r15,%r12,4)
cmpq %r14, %rsi
je 0x1c883
subpd %xmm5, %xmm12
subsd %xmm4, %xmm11
movslq %r14d, %r12
leal (%r12,%r12,2), %ebp
movslq %ebp, %r13
movsd (%rax,%r13,8), %xmm13
subsd %xmm4, %xmm13
movupd 0x8(%rax,%r13,8), %xmm3
subpd %xmm5, %xmm3
movapd %xmm5, %xmm1
movapd %xmm6, %xmm5
mulsd %xmm12, %xmm5
movapd %xmm12, %xmm15
unpckhpd %xmm12, %xmm15          # xmm15 = xmm15[1],xmm12[1]
movapd %xmm6, %xmm2
movapd %xmm14, %xmm6
mulsd %xmm15, %xmm6
mulsd %xmm13, %xmm6
movapd %xmm7, %xmm8
movapd %xmm14, %xmm7
movapd %xmm3, %xmm14
unpckhpd %xmm3, %xmm14           # xmm14 = xmm14[1],xmm3[1]
mulsd %xmm14, %xmm5
addsd %xmm6, %xmm5
movapd 0x10(%rsp), %xmm6
mulsd %xmm11, %xmm6
mulsd %xmm3, %xmm6
addsd %xmm5, %xmm6
movapd %xmm1, %xmm5
mulsd %xmm9, %xmm12
mulsd %xmm13, %xmm12
addsd %xmm6, %xmm12
movapd %xmm2, %xmm6
mulsd %xmm10, %xmm11
mulsd %xmm14, %xmm11
movapd %xmm7, %xmm14
movapd %xmm8, %xmm7
addsd %xmm12, %xmm11
mulsd %xmm8, %xmm15
mulsd %xmm3, %xmm15
addsd %xmm11, %xmm15
movslq %ebx, %rbx
movslq (%rdx,%rbx,4), %rbx
movslq %r11d, %r11
addq %rbx, %r11
movl (%r15,%r11,4), %ebx
movl (%rdx,%r12,4), %ebp
decl %ebp
leal 0x1(%rbx), %r11d
cmpl %ebx, %ebp
cmovel %r8d, %r11d
addsd %xmm15, %xmm0
movq (%rcx,%r12,8), %r15
movslq %r11d, %r12
movl (%r15,%r12,4), %r13d
movl %r14d, %ebx
movl %r13d, %r14d
movl %r13d, %ebp
notl %ebp
movl %ebp, (%r15,%r12,4)
movapd %xmm13, %xmm11
movapd %xmm3, %xmm12
cmpq %r13, %rsi
jne 0x1c777
incq %r10
movslq (%rdx,%rsi,4), %r11
cmpq %r11, %r10
jl 0x1c70b
movl 0x18(%rdi), %r9d
incq %rsi
movslq %r9d, %r10
cmpq %r10, %rsi
jl 0x1c6a8
mulsd 0x32e22(%rip), %xmm0    # 0x4f6d0
testl %r9d, %r9d
jle 0x1c8f5
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rcx
xorl %edx, %edx
cmpl $0x0, (%rcx,%rdx,4)
jle 0x1c8ea
movq (%rax,%rdx,8), %rsi
xorl %r8d, %r8d
movl (%rsi,%r8,4), %r9d
testl %r9d, %r9d
jns 0x1c904
notl %r9d
movl %r9d, (%rsi,%r8,4)
incq %r8
movslq (%rcx,%rdx,4), %r9
cmpq %r9, %r8
jl 0x1c8ca
movl 0x18(%rdi), %r9d
incq %rdx
movslq %r9d, %rsi
cmpq %rsi, %rdx
jl 0x1c8bd
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7af6
nop