// File: /workspace/github_cpp_makefile_star2_O3/Luthaf[P]zeopp/voro++/src/cell.cc
// Function: voro::voronoicell_base::definite_min(int&, int&, double&, double&, unsigned int&)
bool voronoicell_base::definite_min(int &lp,int &us,double &l,double &u,unsigned int &lw) {
	int tp=up,ts,qp=0;
	unsigned int qw;
	double q;

	// Check to see whether point up is a well-defined maximum. Otherwise
	// any neighboring vertices of up that are marginal need to be
	// followed, to see if they lead to a better maximum.
	for(ts=0;ts<nu[tp];ts++) {
		qp=ed[tp][ts];
		m_test(qp,q);
		if(q<u+big_tol) break;
	}
	if(ts==nu[tp]) return true;

	// The point tp is marginal, so it will be necessary to do the
	// flood-fill search. Mark the point tp and the point qp, and search
	// any remaining neighbors of the point tp.
	int *stackp=ds+1;
	flip(up);
	flip(qp);
	*ds=qp;
	ts++;
	while(ts<nu[tp]) {
		qp=ed[tp][ts];
		m_test(qp,q);
		if(q<u+big_tol) {
			if(stackp==stacke) add_memory_ds();
			*(stackp++)=lp;
			flip(lp);
		}
		ts++;
	}

	// Consider additional marginal points, starting with the original
	// point qp
	int *spp=ds;
	while(spp<stackp) {
		tp=*(spp++);
		for(ts=0;ts<nu[tp];ts++) {
			qp=ed[tp][ts];

			// Skip the point if it's already marked
			if(ed[qp][nu[qp]<<1]<0) continue;
			qw=m_test(qp,q);

			// This point is a better minimum. Reset markers and
			// return true.
			if(q<u) {
				flip(up);
				up=tp;
				us=ts;
				m_test(up,u);
				lp=qp;
				lw=qw;
				l=q;
				while(stackp>ds) flip(*(--stackp));
				return false;
			}

			// The point is marginal and therefore must also be
			// considered
			if(q<u+big_tol) {
				if(stackp==stacke) {
					int nn=stackp-spp;
					add_memory_ds();
					spp=stackp-nn;
				}
				*(stackp++)=qp;
				flip(qp);
			}
		}
	}

	// Reset markers and return false
	flip(up);
	while(stackp>ds) flip(*(--stackp));
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r12
movq %rcx, 0x20(%rsp)
movq %rdx, 0x40(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, %rbx
movslq 0x20(%rdi), %r14
movq 0x30(%rdi), %rdi
movl (%rdi,%r14,4), %ecx
testl %ecx, %ecx
movq %r8, 0x8(%rsp)
jle 0x80da
xorl %r13d, %r13d
movq %rsp, %r15
movq 0x28(%rbx), %rcx
movq 0x38(%rbx), %rdx
movq (%rcx,%r14,8), %rcx
movl (%rcx,%r13,4), %ebp
movslq %ebp, %rcx
movl (%rdx,%rcx,4), %edx
cmpl 0xc0(%rbx), %edx
jae 0x80a9
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xa220
movq 0x8(%rsp), %r8
movsd (%rsp), %xmm0
movq 0x30(%rbx), %rdi
jmp 0x80bc
movq 0x40(%rbx), %rdx
shlq $0x5, %rcx
movsd 0x18(%rdx,%rcx), %xmm0
movsd %xmm0, (%rsp)
movsd (%r8), %xmm1
addsd 0x58(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x80e1
incq %r13
movslq (%rdi,%r14,4), %rcx
cmpq %rcx, %r13
jl 0x806e
jmp 0x80e5
xorl %r13d, %r13d
xorl %ebp, %ebp
jmp 0x80e5
movl (%rdi,%r14,4), %ecx
movb $0x1, %al
cmpl %ecx, %r13d
je 0x840a
movq %r12, 0x38(%rsp)
movq 0x28(%rbx), %rcx
movq 0x78(%rbx), %rax
leaq 0x4(%rax), %r12
movslq 0x20(%rbx), %rdx
movq (%rcx,%rdx,8), %rsi
movl (%rdi,%rdx,4), %edx
addl %edx, %edx
movslq %edx, %rdx
notl (%rsi,%rdx,4)
movslq %ebp, %rdx
movq (%rcx,%rdx,8), %rcx
movl (%rdi,%rdx,4), %esi
addl %esi, %esi
movslq %esi, %rsi
notl (%rcx,%rsi,4)
movl %edx, (%rax)
leal 0x1(%r13), %ecx
cmpl (%rdi,%r14,4), %ecx
jge 0x81f6
movl %r13d, %r13d
incq %r13
movq %rsp, %r15
movq 0x28(%rsp), %rbp
movq 0x28(%rbx), %rax
movq 0x38(%rbx), %rcx
movq (%rax,%r14,8), %rax
movslq (%rax,%r13,4), %rsi
movl (%rcx,%rsi,4), %eax
cmpl 0xc0(%rbx), %eax
jae 0x8176
movq %rbx, %rdi
movq %r15, %rdx
callq 0xa220
movq 0x8(%rsp), %r8
movsd (%rsp), %xmm0
jmp 0x8189
movq 0x40(%rbx), %rax
shlq $0x5, %rsi
movsd 0x18(%rax,%rsi), %xmm0
movsd %xmm0, (%rsp)
movsd (%r8), %xmm1
addsd 0x58(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x81c7
cmpq 0x88(%rbx), %r12
je 0x81da
movslq (%rbp), %rcx
movl %ecx, (%r12)
addq $0x4, %r12
movq 0x28(%rbx), %rdx
movq 0x30(%rbx), %rdi
movq (%rdx,%rcx,8), %rdx
movl (%rdi,%rcx,4), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
notl (%rdx,%rcx,4)
jmp 0x81cb
movq 0x30(%rbx), %rdi
incq %r13
cmpl %r13d, (%rdi,%r14,4)
jg 0x8144
jmp 0x81e9
movq %rbx, %rdi
callq 0x2410
movq 0x8(%rsp), %r8
jmp 0x81a2
movq 0x78(%rbx), %rax
cmpq %r12, %rax
jae 0x832b
movl (%rax), %ecx
addq $0x4, %rax
movq %rax, 0x10(%rsp)
movslq %ecx, %rsi
cmpl $0x0, (%rdi,%rsi,4)
jle 0x8319
movl %ecx, 0x1c(%rsp)
xorl %r15d, %r15d
movq %rsi, 0x30(%rsp)
movq 0x28(%rbx), %rcx
movq (%rcx,%rsi,8), %rdx
movl (%rdx,%r15,4), %ebp
movslq %ebp, %r13
movq (%rcx,%r13,8), %rcx
movl (%rdi,%r13,4), %edx
addl %edx, %edx
movslq %edx, %rdx
cmpl $0x0, (%rcx,%rdx,4)
js 0x82d5
movq 0x38(%rbx), %rax
movl (%rax,%r13,4), %r14d
cmpl 0xc0(%rbx), %r14d
jae 0x8272
movq %rbx, %rdi
movl %ebp, %esi
movq %rsp, %rdx
callq 0xa220
movq 0x30(%rsp), %rsi
movq 0x8(%rsp), %r8
movl %eax, %r14d
movsd (%rsp), %xmm1
jmp 0x828c
movq 0x40(%rbx), %rax
movq %r13, %rcx
shlq $0x5, %rcx
movsd 0x18(%rax,%rcx), %xmm1
movsd %xmm1, (%rsp)
andl $0x3, %r14d
movsd (%r8), %xmm0
ucomisd %xmm1, %xmm0
ja 0x8356
addsd 0x58(%rbx), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x82d1
cmpq 0x88(%rbx), %r12
je 0x82e7
movl %ebp, (%r12)
addq $0x4, %r12
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdi
movq (%rcx,%r13,8), %rcx
movl (%rdi,%r13,4), %edx
addl %edx, %edx
movslq %edx, %rdx
notl (%rcx,%rdx,4)
jmp 0x82d5
movq 0x30(%rbx), %rdi
incq %r15
movslq (%rdi,%rsi,4), %rcx
cmpq %rcx, %r15
jl 0x821a
jmp 0x8319
movq %r12, %r14
subq 0x10(%rsp), %r14
movq %rbx, %rdi
callq 0x2410
movq 0x30(%rsp), %rsi
movq 0x8(%rsp), %r8
shrq $0x2, %r14
movslq %r14d, %rax
shlq $0x2, %rax
movq %r12, %rcx
subq %rax, %rcx
movq %rcx, 0x10(%rsp)
jmp 0x82af
movq 0x10(%rsp), %rax
cmpq %r12, %rax
jb 0x81f6
movq 0x78(%rbx), %rax
movslq 0x20(%rbx), %rdx
movq 0x28(%rbx), %rcx
movq (%rcx,%rdx,8), %rsi
movl (%rdi,%rdx,4), %edx
addl %edx, %edx
movslq %edx, %rdx
notl (%rsi,%rdx,4)
cmpq %rax, %r12
jbe 0x8408
movslq -0x4(%r12), %rdx
addq $-0x4, %r12
jmp 0x8333
movslq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq (%rcx,%rax,8), %rcx
movl (%rdx,%rax,4), %eax
addl %eax, %eax
cltq
notl (%rcx,%rax,4)
movl 0x1c(%rsp), %eax
movl %eax, 0x20(%rbx)
movq 0x40(%rsp), %rax
movl %r15d, (%rax)
movslq 0x20(%rbx), %rsi
movq 0x38(%rbx), %rax
movl (%rax,%rsi,4), %eax
cmpl 0xc0(%rbx), %eax
jae 0x83ab
movq %rbx, %rdi
movq %r8, %rdx
movsd %xmm1, 0x8(%rsp)
callq 0xa220
movsd 0x8(%rsp), %xmm1
jmp 0x83be
movq 0x40(%rbx), %rax
shlq $0x5, %rsi
movsd 0x18(%rax,%rsi), %xmm0
movsd %xmm0, (%r8)
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
movl %ebp, (%rax)
movq 0x38(%rsp), %rax
movl %r14d, (%rax)
movsd %xmm1, (%rcx)
movq 0x78(%rbx), %rax
cmpq %rax, %r12
jbe 0x8404
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
movslq -0x4(%r12), %rsi
addq $-0x4, %r12
movq (%rcx,%rsi,8), %rdi
movl (%rdx,%rsi,4), %esi
addl %esi, %esi
movslq %esi, %rsi
notl (%rdi,%rsi,4)
cmpq %rax, %r12
ja 0x83e7
xorl %eax, %eax
jmp 0x840a
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop