// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/vot/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[3*k]-pts[3*i];
                uy=pts[3*k+1]-pts[3*i+1];
                uz=pts[3*k+2]-pts[3*i+2];
                vx=pts[3*m]-pts[3*i];
                vy=pts[3*m+1]-pts[3*i+1];
                vz=pts[3*m+2]-pts[3*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
pushq %rax
movq 0x28(%rdi), %rax
xorpd %xmm8, %xmm8
pushq $0x1
popq %rcx
xorl %edx, %edx
movslq 0x18(%rdi), %rsi
cmpq %rsi, %rcx
jge 0x17dab
movq 0x20(%rdi), %rsi
imulq $0x18, %rcx, %r8
xorl %r9d, %r9d
movq %rsi, (%rsp)
movslq (%rax,%rcx,4), %r10
cmpq %r10, %r9
jge 0x17da3
movq (%rsi,%rcx,8), %r10
movslq (%r10,%r9,4), %r12
testq %r12, %r12
js 0x17d9b
movl %r12d, %r11d
notl %r11d
movl %r11d, (%r10,%r9,4)
movslq (%rax,%rcx,4), %r11
movslq %r9d, %rbx
addq %r11, %rbx
movl (%r10,%rbx,4), %r11d
movl (%rax,%r12,4), %ebx
decl %ebx
leal 0x1(%r11), %r10d
cmpl %r11d, %ebx
cmovel %edx, %r10d
movq (%rsi,%r12,8), %r11
movslq %r10d, %rbx
movl (%r11,%rbx,4), %ebp
movl %ebp, %r14d
notl %r14d
movl %r14d, (%r11,%rbx,4)
movq 0x20(%rdi), %r11
movq 0x28(%rdi), %rbx
movq 0x30(%rdi), %r14
movl %ebp, %r13d
cmpq %r13, %rcx
je 0x17d97
movl %ebp, %r15d
movslq %r12d, %r13
movq (%r11,%r13,8), %r12
movslq (%rbx,%r13,4), %rbp
movslq %r10d, %r10
addq %rbp, %r10
movl (%r12,%r10,4), %ebp
movslq %r15d, %r12
movl (%rbx,%r12,4), %esi
decl %esi
leal 0x1(%rbp), %r10d
cmpl %ebp, %esi
cmovel %edx, %r10d
leal (%r13,%r13,2), %esi
movslq %esi, %rsi
movsd (%r14,%rsi,8), %xmm0
movsd 0x8(%r14,%rsi,8), %xmm3
movsd (%r14,%r8), %xmm4
movsd 0x8(%r14,%r8), %xmm5
subsd %xmm4, %xmm0
subsd %xmm5, %xmm3
movsd 0x10(%r14,%rsi,8), %xmm1
movsd 0x10(%r14,%r8), %xmm6
subsd %xmm6, %xmm1
leal (%r15,%r15,2), %esi
movslq %esi, %rsi
movsd (%r14,%rsi,8), %xmm7
movsd 0x8(%r14,%rsi,8), %xmm2
subsd %xmm4, %xmm7
subsd %xmm5, %xmm2
movsd 0x10(%r14,%rsi,8), %xmm4
subsd %xmm6, %xmm4
movapd %xmm2, %xmm5
mulsd %xmm1, %xmm5
mulsd %xmm7, %xmm1
mulsd %xmm3, %xmm7
mulsd %xmm4, %xmm3
subsd %xmm5, %xmm3
mulsd %xmm0, %xmm4
subsd %xmm4, %xmm1
mulsd %xmm0, %xmm2
subsd %xmm7, %xmm2
mulsd %xmm1, %xmm1
mulsd %xmm3, %xmm3
addsd %xmm1, %xmm3
mulsd %xmm2, %xmm2
addsd %xmm3, %xmm2
sqrtsd %xmm2, %xmm0
addsd %xmm0, %xmm8
movq (%r11,%r12,8), %rsi
movslq %r10d, %r12
movl (%rsi,%r12,4), %ebp
movl %ebp, %r13d
notl %r13d
movl %r13d, (%rsi,%r12,4)
movl %r15d, %r12d
jmp 0x17c9b
movq (%rsp), %rsi
incq %r9
jmp 0x17c33
incq %rcx
jmp 0x17c17
movsd %xmm8, (%rsp)
callq 0x1ea08
movsd (%rsp), %xmm0
mulsd 0x2c6e5(%rip), %xmm0    # 0x444a8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq