// File: 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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x446ae
movl $0x0, -0x18(%rbp)
movq -0x78(%rbp), %rcx
movl -0x18(%rbp), %eax
movq 0x28(%rcx), %rcx
movslq -0x14(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x4469e
movq -0x78(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0x4468e
movq -0x78(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
subl -0x1c(%rbp), %edx
movq 0x20(%rdi), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x20(%rdi), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x28(%rdi), %rcx
movslq -0x14(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
movl -0x1c(%rbp), %edx
callq 0x4bf70
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, -0x20(%rbp)
movq 0x20(%rax), %rcx
movslq -0x1c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x20(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, -0x24(%rbp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
subl -0x24(%rbp), %edx
movq 0x20(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
je 0x4468c
movq -0x78(%rbp), %rdi
movq 0x20(%rdi), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x28(%rdi), %rcx
movslq -0x1c(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
addl -0x20(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
movl -0x24(%rbp), %edx
callq 0x4bf70
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, -0x28(%rbp)
movq 0x30(%rax), %rcx
imull $0x3, -0x1c(%rbp), %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x14(%rbp), %edx
movslq %edx, %rdx
subsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x30(%rax), %rcx
imull $0x3, -0x1c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x14(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
subsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movq 0x30(%rax), %rcx
imull $0x3, -0x1c(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x14(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
subsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, -0x40(%rbp)
movq 0x30(%rax), %rcx
imull $0x3, -0x24(%rbp), %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x14(%rbp), %edx
movslq %edx, %rdx
subsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, -0x48(%rbp)
movq 0x30(%rax), %rcx
imull $0x3, -0x24(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x14(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
subsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, -0x50(%rbp)
movq 0x30(%rax), %rcx
imull $0x3, -0x24(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x30(%rax), %rax
imull $0x3, -0x14(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x38(%rbp), %xmm0
movsd -0x58(%rbp), %xmm2
movsd -0x40(%rbp), %xmm1
mulsd -0x50(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x40(%rbp), %xmm0
movsd -0x48(%rbp), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd -0x58(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x50(%rbp), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd -0x48(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x60(%rbp), %xmm1
movsd -0x60(%rbp), %xmm2
movsd -0x68(%rbp), %xmm0
mulsd -0x68(%rbp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x70(%rbp), %xmm0
movsd -0x70(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0xa3d0
movq -0x78(%rbp), %rax
addsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movl -0x24(%rbp), %ecx
movl %ecx, -0x1c(%rbp)
movl -0x28(%rbp), %ecx
movl %ecx, -0x20(%rbp)
movq 0x20(%rax), %rcx
movslq -0x1c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x20(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, -0x24(%rbp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
subl -0x24(%rbp), %edx
movq 0x20(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x4442a
jmp 0x4468e
jmp 0x44690
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x4436d
jmp 0x446a0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x44356
movq -0x78(%rbp), %rdi
callq 0x50210
movsd 0x4fa11(%rip), %xmm0    # 0x940d0
mulsd -0x10(%rbp), %xmm0
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)