// File: /workspace/github_cpp_makefile_star2_O1/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 0x1c801
movq 0x30(%rdi), %rax
movsd (%rax), %xmm4
movsd 0x8(%rax), %xmm3
movsd 0x10(%rax), %xmm5
movq 0x20(%rdi), %rcx
movq 0x28(%rdi), %rdx
movl $0x1, %esi
xorl %r8d, %r8d
cmpl $0x0, (%rdx,%rsi,4)
jle 0x1c7e9
leaq (%rsi,%rsi,2), %r9
movapd %xmm4, %xmm6
subsd (%rax,%r9,8), %xmm6
movapd %xmm3, %xmm8
subsd 0x8(%rax,%r9,8), %xmm8
movapd %xmm5, %xmm9
subsd 0x10(%rax,%r9,8), %xmm9
movq (%rcx,%rsi,8), %r9
movapd %xmm9, %xmm2
movapd 0x2e54f(%rip), %xmm1    # 0x4ab60
xorpd %xmm1, %xmm2
movapd %xmm8, %xmm7
xorpd %xmm1, %xmm7
movapd %xmm6, %xmm10
xorpd %xmm1, %xmm10
xorl %r10d, %r10d
movapd %xmm8, 0x10(%rsp)
movapd %xmm9, (%rsp)
movl (%r9,%r10,4), %r11d
testl %r11d, %r11d
js 0x1c7d9
movl %r11d, %ebx
notl %ebx
movl %ebx, (%r9,%r10,4)
movslq (%rdx,%rsi,4), %rbx
movslq %r10d, %r14
addq %rbx, %r14
movl (%r9,%r14,4), %r14d
movl (%rdx,%r11,4), %ebp
decl %ebp
leal 0x1(%r14), %ebx
cmpl %r14d, %ebp
cmovel %r8d, %ebx
leaq (%r11,%r11,2), %r14
movsd (%rax,%r14,8), %xmm12
movsd 0x8(%rax,%r14,8), %xmm13
movsd 0x10(%rax,%r14,8), %xmm11
movq (%rcx,%r11,8), %r15
movslq %ebx, %r12
movl (%r15,%r12,4), %r14d
movl %r14d, %ebp
notl %ebp
movl %ebp, (%r15,%r12,4)
cmpq %r14, %rsi
je 0x1c7d9
subsd %xmm5, %xmm11
subsd %xmm3, %xmm13
subsd %xmm4, %xmm12
movslq %r14d, %r15
leal (%r15,%r15,2), %ebp
movslq %ebp, %r12
movsd (%rax,%r12,8), %xmm14
movsd 0x8(%rax,%r12,8), %xmm15
subsd %xmm4, %xmm14
subsd %xmm3, %xmm15
movapd %xmm3, %xmm1
movapd %xmm4, %xmm3
movsd 0x10(%rax,%r12,8), %xmm4
subsd %xmm5, %xmm4
movapd %xmm10, %xmm9
movapd %xmm2, %xmm10
movapd %xmm5, %xmm2
movapd %xmm6, %xmm5
mulsd %xmm13, %xmm5
movapd %xmm7, %xmm8
movapd %xmm6, %xmm7
movapd 0x10(%rsp), %xmm6
mulsd %xmm11, %xmm6
mulsd %xmm14, %xmm6
mulsd %xmm4, %xmm5
addsd %xmm6, %xmm5
movapd (%rsp), %xmm6
mulsd %xmm12, %xmm6
mulsd %xmm15, %xmm6
addsd %xmm5, %xmm6
movapd %xmm2, %xmm5
movapd %xmm10, %xmm2
movapd %xmm9, %xmm10
mulsd %xmm2, %xmm13
mulsd %xmm14, %xmm13
addsd %xmm6, %xmm13
movapd %xmm7, %xmm6
movapd %xmm8, %xmm7
mulsd %xmm8, %xmm12
mulsd %xmm4, %xmm12
addsd %xmm13, %xmm12
mulsd %xmm9, %xmm11
mulsd %xmm15, %xmm11
addsd %xmm12, %xmm11
addsd %xmm11, %xmm0
movslq %r11d, %r11
movq (%rcx,%r11,8), %r12
movslq (%rdx,%r11,4), %r11
movslq %ebx, %rbx
addq %r11, %rbx
movl (%r12,%rbx,4), %r11d
movl (%rdx,%r15,4), %ebp
decl %ebp
leal 0x1(%r11), %ebx
cmpl %r11d, %ebp
cmovel %r8d, %ebx
movq (%rcx,%r15,8), %r15
movslq %ebx, %r12
movl (%r15,%r12,4), %r13d
movl %r14d, %r11d
movl %r13d, %r14d
movl %r13d, %ebp
notl %ebp
movl %ebp, (%r15,%r12,4)
movapd %xmm4, %xmm11
movapd %xmm3, %xmm4
movapd %xmm1, %xmm3
movapd %xmm15, %xmm13
movapd %xmm14, %xmm12
cmpq %r13, %rsi
jne 0x1c6b1
incq %r10
movslq (%rdx,%rsi,4), %r11
cmpq %r11, %r10
jl 0x1c638
incq %rsi
movslq 0x18(%rdi), %r9
cmpq %r9, %rsi
jl 0x1c5d0
mulsd 0x32d5f(%rip), %xmm0    # 0x4f560
testl %r9d, %r9d
jle 0x1c845
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rcx
xorl %edx, %edx
cmpl $0x0, (%rcx,%rdx,4)
jle 0x1c839
movq (%rax,%rdx,8), %rsi
xorl %r8d, %r8d
movl (%rsi,%r8,4), %r9d
testl %r9d, %r9d
jns 0x1c854
notl %r9d
movl %r9d, (%rsi,%r8,4)
incq %r8
movslq (%rcx,%rdx,4), %r9
cmpq %r9, %r8
jl 0x1c81d
incq %rdx
movslq 0x18(%rdi), %rsi
cmpq %rsi, %rdx
jl 0x1c810
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7ae8
nop