// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x20(%rdi), %rdx
movq 0x28(%rdi), %rsi
movslq 0x1c(%rdi), %r10
movl (%rsi,%r10,4), %eax
movq 0x30(%rdi), %rcx
xorl %r9d, %r9d
testl %eax, %eax
movl $0x0, %r11d
cmovgl %eax, %r11d
cmpq %r9, %r11
je 0x1ef37
movq (%rdx,%r10,8), %rbx
movslq (%rbx,%r9,4), %r8
imulq $0x18, %r8, %r14
movsd 0x8(%rcx,%r14), %xmm5
mulsd %xmm1, %xmm5
movsd (%rcx,%r14), %xmm6
mulsd %xmm0, %xmm6
addsd %xmm5, %xmm6
movsd 0x10(%rcx,%r14), %xmm5
mulsd %xmm2, %xmm5
addsd %xmm6, %xmm5
ucomisd %xmm4, %xmm5
ja 0x1ef3e
incq %r9
jmp 0x1eef3
xorl %eax, %eax
jmp 0x1f093
addl %r9d, %eax
cltq
leaq (%rbx,%rax,4), %rax
movl 0x18(%rdi), %r9d
xorl %r10d, %r10d
movl (%rax), %ebx
movl %r8d, 0x1c(%rdi)
ucomisd %xmm5, %xmm3
setbe %al
jbe 0x1f044
incl %r10d
cmpl %r9d, %r10d
jge 0x1f048
movslq %r8d, %r11
testl %ebx, %ebx
movl $0x0, %r14d
cmovgl %ebx, %r14d
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x1efc6
movq (%rdx,%r11,8), %r8
movslq (%r8,%r15,4), %r8
imulq $0x18, %r8, %r12
movsd 0x8(%rcx,%r12), %xmm4
mulsd %xmm1, %xmm4
movsd (%rcx,%r12), %xmm6
mulsd %xmm0, %xmm6
addsd %xmm4, %xmm6
movsd 0x10(%rcx,%r12), %xmm4
mulsd %xmm2, %xmm4
addsd %xmm6, %xmm4
ucomisd %xmm5, %xmm4
ja 0x1efc3
incq %r15
jmp 0x1ef7f
movl %r15d, %r14d
movl (%rsi,%r11,4), %ebp
cmpl %ebx, %r14d
jne 0x1f02d
leal 0x1(%rbx), %r14d
cmpl %r14d, %ebp
cmovgl %ebp, %r14d
leaq 0x1(%rbx), %r15
incl %ebx
cmpl %ebx, %ebp
jle 0x1f023
movq (%rdx,%r11,8), %r8
movslq (%r8,%r15,4), %r8
imulq $0x18, %r8, %r12
movsd 0x8(%rcx,%r12), %xmm4
mulsd %xmm1, %xmm4
movsd (%rcx,%r12), %xmm6
mulsd %xmm0, %xmm6
addsd %xmm4, %xmm6
movsd 0x10(%rcx,%r12), %xmm4
mulsd %xmm2, %xmm4
addsd %xmm6, %xmm4
incq %r15
ucomisd %xmm5, %xmm4
jbe 0x1efde
jmp 0x1f026
movl %r14d, %ebx
movl %ebx, %r14d
cmpl %ebp, %ebx
je 0x1f093
addl %r14d, %ebp
movslq %ebp, %rax
shlq $0x2, %rax
addq (%rdx,%r11,8), %rax
movapd %xmm4, %xmm5
jmp 0x1ef4e
movb $0x1, %al
jmp 0x1f093
xorl %esi, %esi
testl %r9d, %r9d
cmovlel %esi, %r9d
imulq $0x18, %r9, %rdx
addq $0x18, %rdx
leaq 0x18(%rsi), %rdi
cmpq %rdi, %rdx
setne %al
je 0x1f093
movsd 0x8(%rcx,%rsi), %xmm4
mulsd %xmm1, %xmm4
movsd (%rcx,%rsi), %xmm5
mulsd %xmm0, %xmm5
addsd %xmm4, %xmm5
movsd 0x10(%rcx,%rsi), %xmm4
mulsd %xmm2, %xmm4
addsd %xmm5, %xmm4
ucomisd %xmm3, %xmm4
movq %rdi, %rsi
jbe 0x1f059
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq