// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, %rbx
movl 0x18(%rdi), %eax
xorpd %xmm8, %xmm8
cmpl $0x2, %eax
jl 0x1cce4
xorpd %xmm9, %xmm9
movl $0x1, %r14d
xorl %r9d, %r9d
movq 0x28(%rbx), %rcx
cmpl $0x0, (%rcx,%r14,4)
jle 0x1cccb
leaq (%rcx,%r14,4), %rdx
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %r12
xorl %r10d, %r10d
movq 0x20(%rbx), %rsi
movq (%rsi,%r14,8), %rdi
movslq (%rdi,%r10,4), %rax
testq %rax, %rax
movq %r10, 0x8(%rsp)
js 0x1ccaf
movl %eax, %r8d
notl %r8d
movl %r8d, (%rdi,%r10,4)
movslq (%rdx), %rdx
movslq %r10d, %r8
addq %rdx, %r8
movl (%rdi,%r8,4), %edx
movl (%rcx,%rax,4), %ecx
decl %ecx
leal 0x1(%rdx), %r15d
cmpl %edx, %ecx
cmovel %r9d, %r15d
movq (%rsi,%rax,8), %rcx
movslq %r15d, %rdx
movl (%rcx,%rdx,4), %ebp
movl %ebp, %esi
notl %esi
movl %esi, (%rcx,%rdx,4)
cmpq %rbp, %r14
je 0x1ccaf
cltq
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
movq (%rcx,%rax,8), %rcx
movslq (%rdx,%rax,4), %rsi
movslq %r15d, %rdi
addq %rsi, %rdi
movl (%rcx,%rdi,4), %ecx
movslq %ebp, %r13
movl (%rdx,%r13,4), %edx
decl %edx
leal 0x1(%rcx), %r15d
cmpl %ecx, %edx
cmovel %r9d, %r15d
movq 0x30(%rbx), %rcx
leal (%rax,%rax,2), %eax
cltq
movsd (%rcx,%rax,8), %xmm1
movsd 0x8(%rcx,%rax,8), %xmm3
movsd (%rcx,%r12), %xmm4
movsd 0x8(%rcx,%r12), %xmm5
subsd %xmm4, %xmm1
subsd %xmm5, %xmm3
movsd 0x10(%rcx,%rax,8), %xmm2
movsd 0x10(%rcx,%r12), %xmm6
subsd %xmm6, %xmm2
leal (%r13,%r13,2), %eax
cltq
movsd (%rcx,%rax,8), %xmm7
movsd 0x8(%rcx,%rax,8), %xmm0
subsd %xmm4, %xmm7
subsd %xmm5, %xmm0
movsd 0x10(%rcx,%rax,8), %xmm4
subsd %xmm6, %xmm4
movapd %xmm0, %xmm5
mulsd %xmm2, %xmm5
mulsd %xmm7, %xmm2
mulsd %xmm3, %xmm7
mulsd %xmm4, %xmm3
subsd %xmm5, %xmm3
mulsd %xmm1, %xmm4
subsd %xmm4, %xmm2
mulsd %xmm1, %xmm0
subsd %xmm7, %xmm0
mulsd %xmm2, %xmm2
mulsd %xmm3, %xmm3
addsd %xmm2, %xmm3
mulsd %xmm0, %xmm0
addsd %xmm3, %xmm0
ucomisd %xmm9, %xmm0
jb 0x1cc6d
sqrtsd %xmm0, %xmm0
jmp 0x1cc88
movsd %xmm8, 0x10(%rsp)
callq 0x72d0
xorl %r9d, %r9d
xorpd %xmm9, %xmm9
movsd 0x10(%rsp), %xmm8
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rcx
movslq %r15d, %rdx
movl (%rcx,%rdx,4), %esi
movl %ebp, %eax
movl %esi, %ebp
movl %esi, %edi
notl %edi
movl %edi, (%rcx,%rdx,4)
addsd %xmm0, %xmm8
cmpq %rsi, %r14
jne 0x1cb98
movq 0x8(%rsp), %r10
incq %r10
movq 0x28(%rbx), %rcx
leaq (%rcx,%r14,4), %rdx
movslq (%rdx), %rax
cmpq %rax, %r10
jl 0x1cb3e
incq %r14
movslq 0x18(%rbx), %rax
cmpq %rax, %r14
jl 0x1cb1c
mulsd 0x32884(%rip), %xmm8    # 0x4f568
testl %eax, %eax
jle 0x1cd26
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
xorl %edx, %edx
cmpl $0x0, (%rcx,%rdx,4)
jle 0x1cd1a
movq (%rax,%rdx,8), %rsi
xorl %edi, %edi
movl (%rsi,%rdi,4), %r8d
testl %r8d, %r8d
jns 0x1cd3a
notl %r8d
movl %r8d, (%rsi,%rdi,4)
incq %rdi
movslq (%rcx,%rdx,4), %r8
cmpq %r8, %rdi
jl 0x1ccfe
incq %rdx
movslq 0x18(%rbx), %rsi
cmpq %rsi, %rdx
jl 0x1ccf2
movapd %xmm8, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7b38
nop