// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/voro++/src/cell.cc
// Function: bool voro::voronoicell_base::nplane<voro::voronoicell_neighbor>(voro::voronoicell_neighbor&, double, double, double, double, int)
bool voronoicell_base::nplane(vc_class &vc,double x,double y,double z,double rsq,int p_id) {
	int i,j,lp=up,cp,qp,*dsp;
	int us=0,ls=0;
	unsigned int uw,lw;
	int *edp,*edd;stackp=ds;
	double u,l=0;up=0;

	// Initialize the safe testing routine
	px=x;py=y;pz=z;prsq=rsq;
	maskc+=4;
	if(maskc<4) reset_mask();

	uw=m_test(up,u);
	if(uw==2) {
		if(!search_downward(lw,lp,ls,us,l,u)) return false;
		if(lw==1) {up=lp;lp=-1;}
	} else if(uw==0) {
		if(!search_upward(uw,lp,ls,us,l,u)) return true;
		if(uw==1) lp=-1;
	} else {
		lp=-1;
	}

	// Set stack pointers
	stackp=ds;stackp2=ds2;stackp3=xse;

	// Store initial number of vertices
	int op=p;

	if(create_facet(vc,lp,ls,l,us,u,p_id)) return false;
	int k=0;int xtra=0;
	while(xse+k<stackp3) {
		lp=xse[k++];
		uw=m_test(lp,l);
		for(ls=0;ls<nu[lp];ls++) {
			up=ed[lp][ls];

			// Skip if this is a new vertex
			uw=m_test(up,u);
			if(up>=op) continue;

			if(uw==0) {
				if(u>-big_tol&&ed[up][nu[up]<<1]!=-1) {
					ed[up][nu[up]<<1]=-1;
					if(stackp3==stacke3) add_memory_xse();
					*(stackp3++)=up;
				}
			} else if(uw==1) {

				// This is a possible facet starting
				// from a vertex on the cutting plane
				if(create_facet(vc,-1,0,0,0,u,p_id)) return false;
			} else {

				// This is a new facet
				us=ed[lp][nu[lp]+ls];
				m_test(lp,l);
				if(create_facet(vc,lp,ls,l,us,u,p_id)) return false;
			}
		}
		xtra++;
	}

	// Reset back pointers on extra search stack
	for(dsp=xse;dsp<stackp3;dsp++) {
		j=*dsp;
		ed[j][nu[j]<<1]=j;
	}

	// Delete points: first, remove any duplicates
	dsp=ds;
	while(dsp<stackp) {
		j=*dsp;
		if(ed[j][nu[j]]!=-1) {
			ed[j][nu[j]]=-1;
			dsp++;
		} else *dsp=*(--stackp);
	}

	// Add the points in the auxiliary delete stack,
	// and reset their back pointers
	for(dsp=ds2;dsp<stackp2;dsp++) {
		j=*dsp;
		ed[j][nu[j]<<1]=j;
		if(ed[j][nu[j]]!=-1) {
			ed[j][nu[j]]=-1;
			if(stackp==stacke) add_memory_ds();
			*(stackp++)=j;
		}
	}

	// Scan connections and add in extras
	for(dsp=ds;dsp<stackp;dsp++) {
		cp=*dsp;
		for(edp=ed[cp];edp<ed[cp]+nu[cp];edp++) {
			qp=*edp;
			if(qp!=-1&&ed[qp][nu[qp]]!=-1) {
				if(stackp==stacke) {
					int dis=stackp-dsp;
					add_memory_ds();
					dsp=ds+dis;
				}
				*(stackp++)=qp;
				ed[qp][nu[qp]]=-1;
			}
		}
	}
	up=0;

	// Delete them from the array structure
	while(stackp>ds) {
		--p;
		while(ed[p][nu[p]]==-1) {
			j=nu[p];
			edp=ed[p];edd=(mep[j]+((j<<1)+1)*--mec[j]);
			while(edp<ed[p]+(j<<1)+1) *(edp++)=*(edd++);
			vc.n_set_aux2_copy(p,j);
			vc.n_copy_pointer(ed[p][(j<<1)],p);
			ed[ed[p][(j<<1)]]=ed[p];
			--p;
		}
		up=*(--stackp);
		if(up<p) {

			// Vertex management
			pts[(up<<2)]=pts[(p<<2)];
			pts[(up<<2)+1]=pts[(p<<2)+1];
			pts[(up<<2)+2]=pts[(p<<2)+2];

			// Memory management
			j=nu[up];
			edp=ed[up];edd=(mep[j]+((j<<1)+1)*--mec[j]);
			while(edp<ed[up]+(j<<1)+1) *(edp++)=*(edd++);
			vc.n_set_aux2_copy(up,j);
			vc.n_copy_pointer(ed[up][j<<1],up);
			vc.n_copy_pointer(up,p);
			ed[ed[up][j<<1]]=ed[up];

			// Edge management
			ed[up]=ed[p];
			nu[up]=nu[p];
			for(i=0;i<nu[up];i++) ed[ed[up][i]][ed[up][nu[up]+i]]=up;
			ed[up][nu[up]<<1]=up;
		} else up=p++;
	}

	// Check for any vertices of zero order
	if(*mec>0) voro_fatal_error("Zero order vertex formed",VOROPP_INTERNAL_ERROR);

	// Collapse any order 2 vertices and exit
	return collapse_order2(vc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x20(%rdi), %eax
movl %eax, 0x8(%rsp)
andl $0x0, 0x10(%rsp)
andl $0x0, 0xc(%rsp)
movq 0x78(%rdi), %rax
movq %rax, 0x80(%rdi)
andq $0x0, 0x18(%rsp)
andl $0x0, 0x20(%rdi)
movsd %xmm0, 0xc8(%rdi)
movsd %xmm1, 0xd0(%rdi)
movsd %xmm2, 0xd8(%rdi)
movsd %xmm3, 0xe0(%rdi)
movl 0xc0(%rdi), %eax
leal 0x4(%rax), %ecx
movl %ecx, 0xc0(%rdi)
xorl %esi, %esi
cmpl $-0x4, %eax
jb 0xb70e
movq %r14, %rdi
callq 0xa08c
movl 0x20(%r14), %esi
leaq 0x20(%rsp), %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0xa0b0
movl %eax, 0x14(%rsp)
pushq $-0x1
popq %r13
testl %eax, %eax
je 0xb7d1
cmpl $0x2, %eax
jne 0xb76f
movq %r12, (%rsp)
leaq 0x2c(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0x18(%rsp), %r9
movq %r14, %rdi
callq 0xa0e2
testb %al, %al
je 0xb7c9
cmpl $0x1, 0x2c(%rsp)
movl 0x8(%rsp), %eax
jne 0xb9c5
movl %eax, 0x20(%r14)
orl $-0x1, 0x8(%rsp)
movq 0x78(%r14), %rax
movq %rax, 0x80(%r14)
movq 0x90(%r14), %rax
movq %rax, 0x98(%r14)
movq 0xa8(%r14), %rax
movq %rax, 0xb0(%r14)
movl 0x1c(%r14), %r15d
movl 0xc(%rsp), %ecx
movsd 0x18(%rsp), %xmm0
movl 0x10(%rsp), %r8d
movsd 0x20(%rsp), %xmm1
movq %r14, %rdi
movq %rbx, %rsi
movl %r13d, %edx
movl %ebp, %r9d
callq 0xbdfc
testb %al, %al
je 0xb81c
xorl %r13d, %r13d
jmp 0xbdea
movl %r13d, %r15d
movq %r12, (%rsp)
leaq 0x14(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0x18(%rsp), %r9
movq %r14, %rdi
callq 0xa260
movb $0x1, %r13b
testb %al, %al
je 0xbdea
cmpl $0x1, 0x14(%rsp)
jne 0xb9cd
orl $-0x1, 0x8(%rsp)
movl %r15d, %r13d
jmp 0xb774
xorl %esi, %esi
leaq 0x20(%rsp), %r12
xorl %r13d, %r13d
movq 0xa8(%r14), %rax
movq 0xb0(%r14), %rcx
leaq (%rax,%rsi,4), %rdx
cmpq %rcx, %rdx
jae 0xb9d7
incq %rsi
movq %rsi, 0x30(%rsp)
movl (%rdx), %esi
movl %esi, 0x8(%rsp)
movq %r14, %rdi
leaq 0x18(%rsp), %rdx
callq 0xa0b0
movl %eax, 0x14(%rsp)
xorl %eax, %eax
movl %eax, 0xc(%rsp)
movq 0x30(%r14), %rdx
movslq 0x8(%rsp), %rcx
cmpl (%rdx,%rcx,4), %eax
jge 0xb9bb
movq 0x28(%r14), %rdx
movq (%rdx,%rcx,8), %rcx
cltq
movl (%rcx,%rax,4), %esi
movl %esi, 0x20(%r14)
movq %r14, %rdi
movq %r12, %rdx
callq 0xa0b0
movl %eax, 0x14(%rsp)
movslq 0x20(%r14), %rcx
cmpl %r15d, %ecx
jge 0xb9b0
cmpl $0x1, %eax
je 0xb927
testl %eax, %eax
jne 0xb950
movsd 0x20(%rsp), %xmm0
movsd 0x58(%r14), %xmm1
xorpd 0x2377a(%rip), %xmm1    # 0x2f040
ucomisd %xmm1, %xmm0
jbe 0xb9b0
movq 0x28(%r14), %rax
movq 0x30(%r14), %rdx
movq (%rax,%rcx,8), %rax
movl (%rdx,%rcx,4), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
cmpl $-0x1, (%rax,%rcx,4)
je 0xb9b0
orl $-0x1, (%rax,%rcx,4)
movq 0xb0(%r14), %rax
cmpq 0xb8(%r14), %rax
jne 0xb911
movq %r14, %rdi
callq 0x537c
movq 0xb0(%r14), %rax
movl 0x20(%r14), %ecx
leaq 0x4(%rax), %rdx
movq %rdx, 0xb0(%r14)
movl %ecx, (%rax)
jmp 0xb9b0
movsd 0x20(%rsp), %xmm1
xorpd %xmm0, %xmm0
movq %r14, %rdi
movq %rbx, %rsi
pushq $-0x1
popq %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0xbdfc
testb %al, %al
je 0xb9b0
jmp 0xbdea
movslq 0x8(%rsp), %rsi
movq 0x28(%r14), %rax
movq 0x30(%r14), %rcx
movq (%rax,%rsi,8), %rax
movslq (%rcx,%rsi,4), %rcx
movslq 0xc(%rsp), %rdx
addq %rcx, %rdx
movl (%rax,%rdx,4), %eax
movl %eax, 0x10(%rsp)
movq %r14, %rdi
leaq 0x18(%rsp), %rdx
callq 0xa0b0
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %ecx
movsd 0x18(%rsp), %xmm0
movl 0x10(%rsp), %r8d
movsd 0x20(%rsp), %xmm1
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %r9d
callq 0xbdfc
testb %al, %al
jne 0xb7c9
movl 0xc(%rsp), %eax
incl %eax
jmp 0xb862
movq 0x30(%rsp), %rsi
jmp 0xb826
movl %eax, %r13d
jmp 0xb774
movl 0x8(%rsp), %r13d
jmp 0xb774
movq 0x28(%r14), %rdx
movq 0x30(%r14), %rsi
cmpq %rcx, %rax
jae 0xb9ff
movslq (%rax), %rdi
movq (%rdx,%rdi,8), %r8
movl (%rsi,%rdi,4), %r9d
addl %r9d, %r9d
movslq %r9d, %r9
movl %edi, (%r8,%r9,4)
addq $0x4, %rax
jmp 0xb9df
movq 0x78(%r14), %rax
movq 0x80(%r14), %r15
movq 0x28(%r14), %rcx
movq 0x30(%r14), %rdx
cmpq %r15, %rax
jae 0xba48
movslq (%rax), %rdi
movq (%rcx,%rdi,8), %rsi
movslq (%rdx,%rdi,4), %rdi
cmpl $-0x1, (%rsi,%rdi,4)
je 0xba32
orl $-0x1, (%rsi,%rdi,4)
addq $0x4, %rax
jmp 0xba12
leaq -0x4(%r15), %rsi
movq %rsi, 0x80(%r14)
movl -0x4(%r15), %edi
movl %edi, (%rax)
movq %rsi, %r15
jmp 0xba12
movq 0x90(%r14), %r12
cmpq 0x98(%r14), %r12
jae 0xbab2
movslq (%r12), %r13
movq 0x28(%r14), %rax
movq 0x30(%r14), %rcx
movq (%rax,%r13,8), %rax
movl (%rcx,%r13,4), %edx
addl %edx, %edx
movslq %edx, %rdx
movl %r13d, (%rax,%rdx,4)
movslq (%rcx,%r13,4), %rcx
cmpl $-0x1, (%rax,%rcx,4)
je 0xbaac
orl $-0x1, (%rax,%rcx,4)
cmpq 0x88(%r14), %r15
jne 0xba9b
movq %r14, %rdi
callq 0x543c
movq 0x80(%r14), %r15
leaq 0x4(%r15), %rax
movq %rax, 0x80(%r14)
movl %r13d, (%r15)
movq %rax, %r15
addq $0x4, %r12
jmp 0xba4f
movq 0x78(%r14), %rax
movq %rax, %rcx
cmpq %r15, %rcx
jae 0xbb5d
movslq (%rcx), %r12
movq 0x28(%r14), %rdx
movq 0x30(%r14), %rsi
movq (%rdx,%r12,8), %rdi
movq %rdi, %r13
movslq (%rsi,%r12,4), %r8
leaq (%rdi,%r8,4), %r8
cmpq %r8, %r13
jae 0xbb54
movslq (%r13), %rbp
cmpq $-0x1, %rbp
je 0xbb4e
movq (%rdx,%rbp,8), %r8
movslq (%rsi,%rbp,4), %r9
cmpl $-0x1, (%r8,%r9,4)
je 0xbb4e
cmpq 0x88(%r14), %r15
jne 0xbb2c
subq %rcx, %r15
movq %r14, %rdi
callq 0x543c
movq 0x78(%r14), %rax
shrq $0x2, %r15
movslq %r15d, %rcx
leaq (%rax,%rcx,4), %rcx
movq 0x80(%r14), %r15
movq 0x28(%r14), %rdx
movq 0x30(%r14), %rsi
leaq 0x4(%r15), %r8
movq %r8, 0x80(%r14)
movl %ebp, (%r15)
movq (%rdx,%rbp,8), %rdi
movslq (%rsi,%rbp,4), %r9
orl $-0x1, (%rdi,%r9,4)
movq (%rdx,%r12,8), %rdi
movq %r8, %r15
addq $0x4, %r13
jmp 0xbad4
addq $0x4, %rcx
jmp 0xbab9
andl $0x0, 0x20(%r14)
cmpq %rax, %r15
jbe 0xbdc4
movl 0x1c(%r14), %r8d
leal -0x1(%r8), %edi
movl %edi, 0x1c(%r14)
movq 0x28(%r14), %rax
movq 0x30(%r14), %rsi
movslq %r8d, %rdx
movq -0x8(%rax,%rdx,8), %rcx
movslq -0x4(%rsi,%rdx,4), %rdx
cmpl $-0x1, (%rcx,%rdx,4)
jne 0xbc21
movq 0x68(%r14), %rsi
movq 0x70(%r14), %r8
leal (%rdx,%rdx), %edi
movslq %edi, %r15
leaq 0x1(%r15), %r9
movslq (%rsi,%rdx,4), %r10
decq %r10
movq %r10, %rdi
imulq %r9, %rdi
shlq $0x2, %rdi
addq (%r8,%rdx,8), %rdi
movl %r10d, (%rsi,%rdx,4)
movslq 0x1c(%r14), %rsi
movq (%rax,%rsi,8), %r8
leaq (%r8,%r15,4), %r8
addq $0x4, %r8
cmpq %r8, %rcx
jae 0xbbe5
movl (%rdi), %esi
addq $0x4, %rdi
movl %esi, (%rcx)
addq $0x4, %rcx
jmp 0xbbc2
movq %rbx, %rdi
callq 0xd0d2
movq 0x28(%r14), %rax
movslq 0x1c(%r14), %r8
movq (%rax,%r8,8), %rax
movslq (%rax,%r15,4), %rax
movq 0xf0(%rbx), %rcx
movq (%rcx,%r8,8), %rdx
movq %rdx, (%rcx,%rax,8)
movq 0x28(%r14), %rax
movq (%rax,%r8,8), %rcx
movslq (%rcx,%r15,4), %rdx
movq %rcx, (%rax,%rdx,8)
jmp 0xbb6f
movq 0x80(%r14), %rcx
leaq -0x4(%rcx), %r15
movq %r15, 0x80(%r14)
movslq -0x4(%rcx), %rcx
movl %ecx, 0x20(%r14)
cmpl %edi, %ecx
jge 0xbd00
movq 0x40(%r14), %rdx
leal (,%rdi,4), %r8d
movslq %r8d, %r8
movsd (%rdx,%r8,8), %xmm0
leal (,%rcx,4), %r8d
movslq %r8d, %r8
movsd %xmm0, (%rdx,%r8,8)
leal 0x1(,%rdi,4), %r8d
movslq %r8d, %r8
movsd (%rdx,%r8,8), %xmm0
leal 0x1(,%rcx,4), %r8d
movslq %r8d, %r8
movsd %xmm0, (%rdx,%r8,8)
leal 0x2(,%rdi,4), %edi
movslq %edi, %rdi
movsd (%rdx,%rdi,8), %xmm0
leal 0x2(,%rcx,4), %edi
movslq %edi, %rdi
movsd %xmm0, (%rdx,%rdi,8)
movslq (%rsi,%rcx,4), %rdx
movq (%rax,%rcx,8), %rcx
movq 0x68(%r14), %rsi
movq 0x70(%r14), %r8
leal (%rdx,%rdx), %edi
movslq %edi, %r15
leaq 0x1(%r15), %r9
movslq (%rsi,%rdx,4), %r10
decq %r10
movq %r10, %rdi
imulq %r9, %rdi
shlq $0x2, %rdi
addq (%r8,%rdx,8), %rdi
movl %r10d, (%rsi,%rdx,4)
movslq 0x20(%r14), %rsi
movq (%rax,%rsi,8), %r8
leaq (%r8,%r15,4), %r8
addq $0x4, %r8
cmpq %r8, %rcx
jae 0xbd0d
movl (%rdi), %esi
addq $0x4, %rdi
movl %esi, (%rcx)
addq $0x4, %rcx
jmp 0xbcdd
movl %r8d, 0x1c(%r14)
movl %edi, 0x20(%r14)
jmp 0xbdbb
movq %rbx, %rdi
callq 0xd0d2
movq 0x28(%r14), %rax
movslq 0x20(%r14), %rcx
movq (%rax,%rcx,8), %rax
movslq (%rax,%r15,4), %rax
movq 0xf0(%rbx), %rdx
movq (%rdx,%rcx,8), %rsi
movq %rsi, (%rdx,%rax,8)
movslq 0x1c(%r14), %rdx
movq 0xf0(%rbx), %rax
movq (%rax,%rdx,8), %rsi
movq %rsi, (%rax,%rcx,8)
movq 0x28(%r14), %rax
movq (%rax,%rcx,8), %rsi
movslq (%rsi,%r15,4), %rdi
movq %rsi, (%rax,%rdi,8)
movq 0x28(%r14), %rax
movq (%rax,%rdx,8), %rsi
movq %rsi, (%rax,%rcx,8)
movq 0x30(%r14), %rax
movl (%rax,%rdx,4), %edx
movl %edx, (%rax,%rcx,4)
movq 0x28(%r14), %rcx
xorl %edx, %edx
movl 0x20(%r14), %esi
movslq %esi, %rsi
movslq (%rax,%rsi,4), %r8
movl %r8d, %edi
cmpq %r8, %rdx
jge 0xbda4
movq (%rcx,%rsi,8), %r8
movslq (%r8,%rdx,4), %r9
movq (%rcx,%r9,8), %r9
addl %edx, %edi
movslq %edi, %rdi
movslq (%r8,%rdi,4), %rdi
movl %esi, (%r9,%rdi,4)
incq %rdx
jmp 0xbd73
movq 0x28(%r14), %rax
movq (%rax,%rsi,8), %rax
addl %edi, %edi
movslq %edi, %rcx
movl %esi, (%rax,%rcx,4)
movq 0x80(%r14), %r15
movq 0x78(%r14), %rax
jmp 0xbb62
movq 0x68(%r14), %rax
cmpl $0x0, (%rax)
jle 0xbddc
leaq 0x24daa(%rip), %rdi     # 0x30b7e
pushq $0x3
popq %rsi
callq 0xfdaf
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd128
movl %eax, %r13d
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq