// File: /workspace/github_cpp_makefile_star2_O1/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, %r15
movq %rcx, 0x20(%rsp)
movq %rdx, 0x40(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, %rbx
movslq 0x20(%rdi), %r12
movq 0x30(%rdi), %rax
cmpl $0x0, (%rax,%r12,4)
movq %r8, 0x8(%rsp)
jle 0x8161
xorl %r13d, %r13d
movq %rsp, %r14
movq 0x28(%rbx), %rax
movq 0x38(%rbx), %rcx
movq (%rax,%r12,8), %rax
movl (%rax,%r13,4), %ebp
movslq %ebp, %rax
movl (%rcx,%rax,4), %ecx
cmpl 0xc0(%rbx), %ecx
jae 0x812b
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0xa318
movq 0x8(%rsp), %r8
jmp 0x813e
movq 0x40(%rbx), %rcx
shlq $0x5, %rax
movsd 0x18(%rcx,%rax), %xmm0
movsd %xmm0, (%rsp)
movsd (%r8), %xmm0
addsd 0x58(%rbx), %xmm0
ucomisd (%rsp), %xmm0
ja 0x8166
incq %r13
movq 0x30(%rbx), %rax
movslq (%rax,%r12,4), %rax
cmpq %rax, %r13
jl 0x80f9
jmp 0x8166
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x30(%rbx), %r9
movb $0x1, %al
cmpl (%r9,%r12,4), %r13d
je 0x849c
movq %r15, 0x38(%rsp)
movq 0x28(%rbx), %rcx
movq 0x78(%rbx), %rdx
leaq 0x4(%rdx), %r15
movslq 0x20(%rbx), %rsi
movq (%rcx,%rsi,8), %rdi
movl (%r9,%rsi,4), %esi
addl %esi, %esi
movslq %esi, %rsi
notl (%rdi,%rsi,4)
movslq %ebp, %rsi
movq (%rcx,%rsi,8), %rcx
movl (%r9,%rsi,4), %eax
addl %eax, %eax
cltq
notl (%rcx,%rax,4)
movl %esi, (%rdx)
leal 0x1(%r13), %eax
movq 0x30(%rbx), %rcx
cmpl (%rcx,%r12,4), %eax
jge 0x826f
movl %r13d, %r13d
incq %r13
movq %rsp, %r14
movq 0x28(%rsp), %rbp
movq 0x28(%rbx), %rax
movq 0x38(%rbx), %rcx
movq (%rax,%r12,8), %rax
movslq (%rax,%r13,4), %rsi
movl (%rcx,%rsi,4), %eax
cmpl 0xc0(%rbx), %eax
jae 0x81fc
movq %rbx, %rdi
movq %r14, %rdx
callq 0xa318
movq 0x8(%rsp), %r8
jmp 0x820f
movq 0x40(%rbx), %rax
shlq $0x5, %rsi
movsd 0x18(%rax,%rsi), %xmm0
movsd %xmm0, (%rsp)
movsd (%r8), %xmm0
addsd 0x58(%rbx), %xmm0
ucomisd (%rsp), %xmm0
jbe 0x824d
cmpq 0x88(%rbx), %r15
je 0x8260
movl (%rbp), %eax
movl %eax, (%r15)
addq $0x4, %r15
movslq (%rbp), %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)
incq %r13
movq 0x30(%rbx), %rax
cmpl %r13d, (%rax,%r12,4)
jg 0x81cf
jmp 0x826f
movq %rbx, %rdi
callq 0x2404
movq 0x8(%rsp), %r8
jmp 0x8229
movq 0x78(%rbx), %rax
cmpq %r15, %rax
jae 0x83a9
movl (%rax), %ecx
addq $0x4, %rax
movq %rax, 0x10(%rsp)
movslq %ecx, %rsi
movq 0x30(%rbx), %rax
cmpl $0x0, (%rax,%rsi,4)
jle 0x839f
movl %ecx, 0x1c(%rsp)
xorl %r12d, %r12d
movq %rsi, 0x30(%rsp)
movq 0x28(%rbx), %rcx
movq (%rcx,%rsi,8), %rdx
movl (%rdx,%r12,4), %ebp
movslq %ebp, %r13
movq (%rcx,%r13,8), %rcx
movl (%rax,%r13,4), %eax
addl %eax, %eax
cltq
cmpl $0x0, (%rcx,%rax,4)
js 0x8357
movq 0x38(%rbx), %rax
movl (%rax,%r13,4), %r14d
cmpl 0xc0(%rbx), %r14d
jae 0x82f6
movq %rbx, %rdi
movl %ebp, %esi
movq %rsp, %rdx
callq 0xa318
movq 0x30(%rsp), %rsi
movq 0x8(%rsp), %r8
movl %eax, %r14d
jmp 0x8310
movq 0x40(%rbx), %rax
movq %r13, %rcx
shlq $0x5, %rcx
movsd 0x18(%rax,%rcx), %xmm0
movsd %xmm0, (%rsp)
andl $0x3, %r14d
movsd (%rsp), %xmm1
movsd (%r8), %xmm0
ucomisd %xmm1, %xmm0
ja 0x83ed
addsd 0x58(%rbx), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x8357
cmpq 0x88(%rbx), %r15
je 0x836d
movl %ebp, (%r15)
addq $0x4, %r15
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq (%rax,%r13,8), %rax
movl (%rcx,%r13,4), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
notl (%rax,%rcx,4)
incq %r12
movq 0x30(%rbx), %rax
movslq (%rax,%rsi,4), %rcx
cmpq %rcx, %r12
jl 0x82a4
jmp 0x839f
movq %r15, %r14
subq 0x10(%rsp), %r14
movq %rbx, %rdi
callq 0x2404
movq 0x30(%rsp), %rsi
movq 0x8(%rsp), %r8
shrq $0x2, %r14
movslq %r14d, %rax
shlq $0x2, %rax
movq %r15, %rcx
subq %rax, %rcx
movq %rcx, 0x10(%rsp)
jmp 0x8338
movq 0x10(%rsp), %rax
jmp 0x8273
movslq 0x20(%rbx), %rdx
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq (%rax,%rdx,8), %rsi
movl (%rcx,%rdx,4), %edx
addl %edx, %edx
movslq %edx, %rdx
notl (%rsi,%rdx,4)
movq 0x78(%rbx), %rdx
cmpq %rdx, %r15
jbe 0x83e6
movslq -0x4(%r15), %rsi
addq $-0x4, %r15
movq (%rax,%rsi,8), %rdi
movl (%rcx,%rsi,4), %esi
addl %esi, %esi
movslq %esi, %rsi
notl (%rdi,%rsi,4)
jmp 0x83c8
movb $0x1, %al
jmp 0x849c
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 %r12d, (%rax)
movslq 0x20(%rbx), %rsi
movq 0x38(%rbx), %rax
movl (%rax,%rsi,4), %eax
cmpl 0xc0(%rbx), %eax
jae 0x8442
movq %rbx, %rdi
movq %r8, %rdx
movsd %xmm1, 0x8(%rsp)
callq 0xa318
movsd 0x8(%rsp), %xmm1
jmp 0x8455
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, %r15
jbe 0x849a
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
movslq -0x4(%r15), %rsi
addq $-0x4, %r15
movq (%rcx,%rsi,8), %rdi
movl (%rdx,%rsi,4), %esi
addl %esi, %esi
movslq %esi, %rsi
notl (%rdi,%rsi,4)
cmpq %rax, %r15
ja 0x847e
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop