// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/binRange.c
// Function: binKeeperFindLowest
struct binElement *binKeeperFindLowest(struct binKeeper *bk, int start, int end)
/* Find the lowest overlapping range. Quick even if search range large */
{
struct binElement *first = NULL, *el;
int startBin = (start>>_binFirstShift), endBin = ((end-1)>>_binFirstShift);
int i,j;

/* Search the possible range of bins at each level, looking for lowest.  Once
 * an overlaping range is found at a level, continue with next level, however
 * must search an entire bin as they are not ordered. */
for (i=0; i<ArraySize(binOffsetsExtended); ++i)
    {
    int offset = binOffsetsExtended[i];
    boolean foundOne = FALSE;
    for (j=startBin+offset; (j<=endBin+offset) && (!foundOne); ++j)
        {
	for (el=bk->binLists[j]; el != NULL; el = el->next)
	    {
            if ((rangeIntersection(el->start, el->end, start, end) > 0)
                && ((first == NULL) || (el->start < first->start)
                    || ((el->start == first->start)
                        && (el->end < first->end))))
                {
                first = el;
                foundOne = TRUE;
		}
	    }
	}
    startBin >>= _binNextShift;
    endBin >>= _binNextShift;
    }
return first;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl -0xc(%rbp), %eax
sarl $0x11, %eax
movl %eax, -0x24(%rbp)
movl -0x10(%rbp), %eax
subl $0x1, %eax
sarl $0x11, %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq $0x6, %rax
jae 0x2537d
movslq -0x2c(%rbp), %rcx
leaq 0xe1481(%rip), %rax     # 0x106700
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x24(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
movl -0x28(%rbp), %edx
addl -0x34(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x39(%rbp)
jg 0x252b3
cmpl $0x0, -0x38(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x252bf
jmp 0x2535d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2534d
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x20(%rbp), %rax
movl 0xc(%rax), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
callq 0x305c0
cmpl $0x0, %eax
jle 0x2533e
cmpq $0x0, -0x18(%rbp)
je 0x2532f
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jl 0x2532f
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x2533e
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x2533e
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x1, -0x38(%rbp)
jmp 0x25340
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x252d3
jmp 0x2534f
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x25295
movl -0x24(%rbp), %eax
sarl $0x3, %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
sarl $0x3, %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x25266
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)