// File: /workspace/github_cpp_makefile_star2_O3/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
subq $0x18, %rsp
movl 0x18(%rdi), %r8d
xorpd %xmm0, %xmm0
cmpl $0x2, %r8d
jl 0x1cd71
movq 0x20(%rdi), %rax
movq %rax, (%rsp)
movq 0x28(%rdi), %rcx
movl $0x1, %edx
xorl %esi, %esi
movq %rdi, 0x8(%rsp)
cmpl $0x0, (%rcx,%rdx,4)
jle 0x1cd5a
leaq (,%rdx,8), %rax
movq (%rsp), %r8
movq (%r8,%rdx,8), %r8
movq 0x20(%rdi), %r9
movq 0x28(%rdi), %r10
movq 0x30(%rdi), %r11
leaq (%rax,%rax,2), %rax
movq %rax, 0x10(%rsp)
xorl %r14d, %r14d
movslq (%r8,%r14,4), %r12
testq %r12, %r12
js 0x1cd41
movl %r12d, %eax
notl %eax
movl %eax, (%r8,%r14,4)
movslq (%rcx,%rdx,4), %rax
movslq %r14d, %r15
addq %rax, %r15
movl (%r8,%r15,4), %eax
movl (%rcx,%r12,4), %r15d
decl %r15d
leal 0x1(%rax), %ebp
cmpl %eax, %r15d
cmovel %esi, %ebp
movq (%rsp), %rax
movq (%rax,%r12,8), %r15
movslq %ebp, %r13
movl (%r15,%r13,4), %eax
movl %eax, %edi
notl %edi
movl %edi, (%r15,%r13,4)
cmpq %rax, %rdx
je 0x1cd41
movq 0x10(%rsp), %rdi
movsd (%r11,%rdi), %xmm1
movsd 0x8(%r11,%rdi), %xmm2
movsd 0x10(%r11,%rdi), %xmm3
movq (%r9,%r12,8), %r13
movslq %r12d, %rdi
movslq (%r10,%rdi,4), %r15
movslq %ebp, %r12
addq %r15, %r12
movl (%r13,%r12,4), %r15d
movslq %eax, %r12
movl (%r10,%r12,4), %r13d
decl %r13d
leal 0x1(%r15), %ebp
cmpl %r15d, %r13d
cmovel %esi, %ebp
leal (%rdi,%rdi,2), %edi
movslq %edi, %rdi
movsd (%r11,%rdi,8), %xmm4
movsd 0x8(%r11,%rdi,8), %xmm6
movsd 0x10(%r11,%rdi,8), %xmm5
leal (%r12,%r12,2), %edi
movslq %edi, %rdi
movsd (%r11,%rdi,8), %xmm8
movsd 0x8(%r11,%rdi,8), %xmm7
movsd 0x10(%r11,%rdi,8), %xmm9
movq (%r9,%r12,8), %r13
movslq %ebp, %rdi
movl (%r13,%rdi,4), %r15d
movl %eax, %r12d
movl %r15d, %eax
movl %r15d, %ebx
notl %ebx
movl %ebx, (%r13,%rdi,4)
subsd %xmm1, %xmm4
subsd %xmm2, %xmm6
subsd %xmm3, %xmm5
subsd %xmm1, %xmm8
subsd %xmm2, %xmm7
subsd %xmm3, %xmm9
movapd %xmm7, %xmm10
mulsd %xmm5, %xmm10
mulsd %xmm8, %xmm5
mulsd %xmm6, %xmm8
mulsd %xmm9, %xmm6
subsd %xmm10, %xmm6
mulsd %xmm4, %xmm9
subsd %xmm9, %xmm5
mulsd %xmm4, %xmm7
subsd %xmm8, %xmm7
mulsd %xmm5, %xmm5
mulsd %xmm6, %xmm6
addsd %xmm5, %xmm6
mulsd %xmm7, %xmm7
addsd %xmm6, %xmm7
xorps %xmm4, %xmm4
sqrtsd %xmm7, %xmm4
addsd %xmm4, %xmm0
cmpq %r15, %rdx
jne 0x1cc57
incq %r14
movslq (%rcx,%rdx,4), %rax
cmpq %rax, %r14
jl 0x1cbe6
movq 0x8(%rsp), %rdi
movl 0x18(%rdi), %r8d
incq %rdx
movslq %r8d, %rax
cmpq %rax, %rdx
jl 0x1cbb4
mulsd 0x32967(%rip), %xmm0    # 0x4f6d8
testl %r8d, %r8d
jle 0x1cdb8
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rcx
xorl %edx, %edx
cmpl $0x0, (%rcx,%rdx,4)
jle 0x1cdad
movq (%rax,%rdx,8), %rsi
xorl %r9d, %r9d
movl (%rsi,%r9,4), %r8d
testl %r8d, %r8d
jns 0x1cdc7
notl %r8d
movl %r8d, (%rsi,%r9,4)
incq %r9
movslq (%rcx,%rdx,4), %r8
cmpq %r8, %r9
jl 0x1cd8d
movl 0x18(%rdi), %r8d
incq %rdx
movslq %r8d, %rsi
cmpq %rsi, %rdx
jl 0x1cd80
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7b46