// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
movq 0x28(%rdi), %rdx
movslq 0x1c(%rdi), %r8
movslq (%rdx,%r8,4), %rax
testq %rax, %rax
jle 0x25b96
movq 0x20(%rdi), %rsi
movq 0x30(%rdi), %rcx
movq (%rsi,%r8,8), %r9
xorl %r10d, %r10d
movslq (%r9,%r10,4), %r8
leaq (%r8,%r8,2), %r11
movsd 0x8(%rcx,%r11,8), %xmm5
mulsd %xmm1, %xmm5
movsd (%rcx,%r11,8), %xmm6
mulsd %xmm0, %xmm6
addsd %xmm5, %xmm6
movsd 0x10(%rcx,%r11,8), %xmm5
mulsd %xmm2, %xmm5
addsd %xmm6, %xmm5
ucomisd %xmm4, %xmm5
ja 0x25ba3
incq %r10
cmpq %r10, %rax
jne 0x25b58
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addl %r10d, %eax
movl (%r9,%rax,4), %ebx
movl %r8d, 0x1c(%rdi)
movb $0x1, %al
ucomisd %xmm5, %xmm3
jbe 0x25b98
movl 0x18(%rdi), %r9d
cmpl $0x2, %r9d
movl $0x1, %r10d
cmovgel %r9d, %r10d
decl %r10d
xorl %r11d, %r11d
cmpl %r10d, %r11d
je 0x25cc3
movl %ebx, %r15d
movslq %r8d, %rbx
testl %r15d, %r15d
jle 0x25c2c
movq (%rsi,%rbx,8), %r12
xorl %r14d, %r14d
movslq (%r12,%r14,4), %r8
leaq (%r8,%r8,2), %r13
movsd 0x8(%rcx,%r13,8), %xmm4
mulsd %xmm1, %xmm4
movsd (%rcx,%r13,8), %xmm6
mulsd %xmm0, %xmm6
addsd %xmm4, %xmm6
movsd 0x10(%rcx,%r13,8), %xmm4
mulsd %xmm2, %xmm4
addsd %xmm6, %xmm4
ucomisd %xmm5, %xmm4
ja 0x25c2f
incq %r14
cmpq %r14, %r15
jne 0x25be9
movl %r15d, %r14d
jmp 0x25c2f
xorl %r14d, %r14d
cmpl %r15d, %r14d
jne 0x25c97
movl (%rdx,%rbx,4), %ebp
incl %r14d
cmpl %ebp, %r14d
jge 0x25c8e
movl %r14d, %r15d
shlq $0x2, %r15
addq (%rsi,%rbx,8), %r15
movslq (%r15), %r8
leaq (%r8,%r8,2), %r12
movsd 0x8(%rcx,%r12,8), %xmm4
mulsd %xmm1, %xmm4
movsd (%rcx,%r12,8), %xmm6
mulsd %xmm0, %xmm6
addsd %xmm4, %xmm6
movsd 0x10(%rcx,%r12,8), %xmm4
mulsd %xmm2, %xmm4
addsd %xmm6, %xmm4
ucomisd %xmm5, %xmm4
ja 0x25c8e
incl %r14d
addq $0x4, %r15
cmpl %r14d, %ebp
jg 0x25c4a
movl %ebp, %r14d
cmpl %ebp, %r14d
je 0x25b96
incl %r11d
movq (%rsi,%rbx,8), %r15
movslq (%rdx,%rbx,4), %rbx
movslq %r14d, %r14
addq %rbx, %r14
movl (%r15,%r14,4), %ebx
movl %r8d, 0x1c(%rdi)
ucomisd %xmm4, %xmm3
movapd %xmm4, %xmm5
ja 0x25bce
jmp 0x25b98
testl %r9d, %r9d
jle 0x25b96
leaq (%r9,%r9,2), %rax
leaq -0x18(,%rax,8), %rdx
xorl %esi, %esi
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
seta %al
ja 0x25b98
leaq 0x18(%rsi), %rdi
cmpq %rsi, %rdx
movq %rdi, %rsi
jne 0x25cda
jmp 0x25b98
nop