// File: icemiliang[P]vot/src/vot/cell.cc
// Function: voro::voronoicell_base::plane_intersects_track(double, double, double, double, double)
inline bool voronoicell_base::plane_intersects_track(double x,double y,double z,double rsq,double g) {
    int count=0,ls,us,tp;
    double t;

    // The test point is outside of the cutting space
    for(us=0;us<nu[up];us++) {
        tp=ed[up][us];
        t=x*pts[3*tp]+y*pts[3*tp+1]+z*pts[3*tp+2];
        if(t>g) {
            ls=ed[up][nu[up]+us];
            up=tp;
            while (t<rsq) {
                if(++count>=p) {
#if VOROPP_VERBOSE >=1
                    fputs("Bailed out of convex calculation",stderr);
#endif
                    for(tp=0;tp<p;tp++) if(x*pts[3*tp]+y*pts[3*tp+1]+z*pts[3*tp+2]>rsq) return true;
                    return false;
                }

                // Test all the neighbors of the current point
                // and find the one which is closest to the
                // plane
                for(us=0;us<ls;us++) {
                    tp=ed[up][us];
                    g=x*pts[3*tp]+y*pts[3*tp+1]+z*pts[3*tp+2];
                    if(g>t) break;
                }
                if(us==ls) {
                    us++;
                    while(us<nu[up]) {
                        tp=ed[up][us];
                        g=x*pts[3*tp]+y*pts[3*tp+1]+z*pts[3*tp+2];
                        if(g>t) break;
                        us++;
                    }
                    if(us==nu[up]) return false;
                }
                ls=ed[up][nu[up]+us];up=tp;t=g;
            }
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd %xmm1, -0x20(%rbp)
movsd %xmm2, -0x28(%rbp)
movsd %xmm3, -0x30(%rbp)
movsd %xmm4, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x58(%rbp), %rdx
movl -0x44(%rbp), %eax
movq 0x28(%rdx), %rcx
movslq 0x1c(%rdx), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x5102f
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rcx
movslq 0x1c(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x44(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, -0x48(%rbp)
movsd -0x18(%rbp), %xmm1
movq 0x30(%rax), %rcx
imull $0x3, -0x48(%rbp), %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm2
movsd -0x20(%rbp), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x48(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
mulsd (%rcx,%rdx,8), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
movq 0x30(%rax), %rax
imull $0x3, -0x48(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
ucomisd -0x38(%rbp), %xmm0
jbe 0x5101f
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rcx
movslq 0x1c(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x28(%rax), %rdx
movslq 0x1c(%rax), %rsi
movl (%rdx,%rsi,4), %edx
addl -0x44(%rbp), %edx
movslq %edx, %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, -0x40(%rbp)
movl -0x48(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movsd -0x50(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x51019
movq -0x58(%rbp), %rcx
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
cmpl 0x18(%rcx), %eax
jl 0x50e5f
movl $0x0, -0x48(%rbp)
movq -0x58(%rbp), %rcx
movl -0x48(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x50e56
movq -0x58(%rbp), %rax
movsd -0x18(%rbp), %xmm1
movq 0x30(%rax), %rcx
imull $0x3, -0x48(%rbp), %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm2
movsd -0x20(%rbp), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x48(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
mulsd (%rcx,%rdx,8), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
movq 0x30(%rax), %rax
imull $0x3, -0x48(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
ucomisd -0x30(%rbp), %xmm0
jbe 0x50e46
movb $0x1, -0x1(%rbp)
jmp 0x51033
jmp 0x50e48
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x50dd1
movb $0x0, -0x1(%rbp)
jmp 0x51033
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x50f04
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rcx
movslq 0x1c(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x44(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, -0x48(%rbp)
movsd -0x18(%rbp), %xmm1
movq 0x30(%rax), %rcx
imull $0x3, -0x48(%rbp), %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm2
movsd -0x20(%rbp), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x48(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
mulsd (%rcx,%rdx,8), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
movq 0x30(%rax), %rax
imull $0x3, -0x48(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
ucomisd -0x50(%rbp), %xmm0
jbe 0x50ef4
jmp 0x50f04
jmp 0x50ef6
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x50e66
movl -0x44(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x50fdd
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x58(%rbp), %rdx
movl -0x44(%rbp), %eax
movq 0x28(%rdx), %rcx
movslq 0x1c(%rdx), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x50fc1
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rcx
movslq 0x1c(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x44(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, -0x48(%rbp)
movsd -0x18(%rbp), %xmm1
movq 0x30(%rax), %rcx
imull $0x3, -0x48(%rbp), %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm2
movsd -0x20(%rbp), %xmm0
movq 0x30(%rax), %rcx
imull $0x3, -0x48(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
mulsd (%rcx,%rdx,8), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
movq 0x30(%rax), %rax
imull $0x3, -0x48(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
ucomisd -0x50(%rbp), %xmm0
jbe 0x50fb3
jmp 0x50fc1
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x50f19
movq -0x58(%rbp), %rdx
movl -0x44(%rbp), %eax
movq 0x28(%rdx), %rcx
movslq 0x1c(%rdx), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x50fdb
movb $0x0, -0x1(%rbp)
jmp 0x51033
jmp 0x50fdd
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rcx
movslq 0x1c(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x28(%rax), %rdx
movslq 0x1c(%rax), %rsi
movl (%rdx,%rsi,4), %edx
addl -0x44(%rbp), %edx
movslq %edx, %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, -0x40(%rbp)
movl -0x48(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x50da0
movb $0x1, -0x1(%rbp)
jmp 0x51033
jmp 0x51021
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x50cd7
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw (%rax,%rax)