// File: /workspace/github_cpp_makefile_star2_O3/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 0x25e48
movq 0x20(%rdi), %rsi
movq 0x30(%rdi), %rcx
movq (%rsi,%r8,8), %r8
xorl %r9d, %r9d
movslq (%r8,%r9,4), %rbx
leaq (%rbx,%rbx,2), %r10
movsd 0x8(%rcx,%r10,8), %xmm5
mulsd %xmm1, %xmm5
movsd (%rcx,%r10,8), %xmm6
mulsd %xmm0, %xmm6
addsd %xmm5, %xmm6
movsd 0x10(%rcx,%r10,8), %xmm5
mulsd %xmm2, %xmm5
addsd %xmm6, %xmm5
ucomisd %xmm4, %xmm5
ja 0x25e55
incq %r9
cmpq %r9, %rax
jne 0x25e0a
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addl %r9d, %eax
movl (%r8,%rax,4), %r11d
movl %ebx, 0x1c(%rdi)
movb $0x1, %al
ucomisd %xmm5, %xmm3
jbe 0x25e4a
movl 0x18(%rdi), %r8d
cmpl $0x2, %r8d
movl $0x1, %r9d
cmovgel %r8d, %r9d
decl %r9d
xorl %r10d, %r10d
cmpl %r9d, %r10d
je 0x25f7f
testl %r11d, %r11d
jle 0x25ed7
movslq %ebx, %r14
movq (%rsi,%r14,8), %r12
movl %r11d, %r13d
xorl %r15d, %r15d
movslq (%r12,%r15,4), %r14
leaq (%r14,%r14,2), %rbp
movsd 0x8(%rcx,%rbp,8), %xmm4
mulsd %xmm1, %xmm4
movsd (%rcx,%rbp,8), %xmm6
mulsd %xmm0, %xmm6
addsd %xmm4, %xmm6
movsd 0x10(%rcx,%rbp,8), %xmm4
mulsd %xmm2, %xmm4
addsd %xmm6, %xmm4
ucomisd %xmm5, %xmm4
ja 0x25edd
incq %r15
cmpq %r15, %r13
jne 0x25e9a
jmp 0x25ee2
xorl %r15d, %r15d
movl %ebx, %r14d
cmpl %r11d, %r15d
jne 0x25f4e
movslq %ebx, %rbx
movl (%rdx,%rbx,4), %ebp
incl %r11d
cmpl %ebp, %r11d
jge 0x25f41
movl %r11d, %r15d
shlq $0x2, %r15
addq (%rsi,%rbx,8), %r15
movslq (%r15), %r14
leaq (%r14,%r14,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 0x25f41
incl %r11d
addq $0x4, %r15
cmpl %r11d, %ebp
jg 0x25efb
jmp 0x25e48
movl %r11d, %r15d
cmpl %ebp, %r11d
jne 0x25f54
jmp 0x25e48
movslq %ebx, %rbx
movl (%rdx,%rbx,4), %ebp
addl %r15d, %ebp
incl %r10d
movq (%rsi,%rbx,8), %r11
movslq %ebp, %rbx
movl (%r11,%rbx,4), %r11d
movl %r14d, 0x1c(%rdi)
ucomisd %xmm4, %xmm3
movapd %xmm4, %xmm5
movl %r14d, %ebx
ja 0x25e7f
jmp 0x25e4a
testl %r8d, %r8d
jle 0x25e48
leaq (%r8,%r8,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 0x25e4a
leaq 0x18(%rsi), %rdi
cmpq %rsi, %rdx
movq %rdi, %rsi
jne 0x25f96
jmp 0x25e4a
nop