LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/binRange.c
// Function: binKeeperNew
struct binKeeper *binKeeperNew(int minPos, int maxPos)
/* Create new binKeeper that can cover range. */
{
int binCount;
struct binKeeper *bk;
if (minPos < 0 || maxPos < 0 || minPos > maxPos)
    errAbort("bad range %d,%d in binKeeperNew", minPos, maxPos);

binCount = binFromRangeBinKeeperExtended(maxPos-1, maxPos) + 1;
AllocVar(bk);
bk->minPos = minPos;
bk->maxPos = maxPos;
bk->binCount = binCount;
AllocArray(bk->binLists, binCount);
return bk;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
movl %esi, %eax
orl %edi, %eax
setns %al
cmpl %esi, %edi
setle %cl
testb %al, %cl
jne 0x1c025
leaq 0x72c51(%rip), %rdi     # 0x8ec6b
movl %ebp, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x26b6f
leal -0x1(%rbx), %edi
movl %ebx, %esi
callq 0x1c06d
movl %eax, %r14d
leal 0x1(%r14), %r12d
movl $0x20, %edi
callq 0x2dc95
movq %rax, %r15
movl %ebp, 0x8(%rax)
movl %ebx, 0xc(%rax)
movl %r12d, 0x10(%rax)
movslq %r14d, %rax
leaq 0x8(,%rax,8), %rdi
callq 0x2db04
movq %rax, 0x18(%r15)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/binRange.c
// Function: binFromRangeBinKeeperExtended
static int binFromRangeBinKeeperExtended(int start, int end)
/* This is just like binFromRangeExtended() above, but it doesn't limit
 * the answers to the range from _binOffsetOldToExtended and up.
 *	It simply uses the whole new bin scheme as if it was the only
 *	one.
 */
{
int startBin = start, endBin = end-1, i;
startBin >>= _binFirstShift;
endBin >>= _binFirstShift;
for (i=0; i<ArraySize(binOffsetsExtended); ++i)
    {
    if (startBin == endBin)
	return binOffsetsExtended[i] + startBin;
    startBin >>= _binNextShift;
    endBin >>= _binNextShift;
    }
errAbort("start %d, end %d out of range in findBin (max is 2Gb)", start, end);
return 0;
}

// Assembly:
pushq %rbx
movl %esi, %edx
movl %edi, %esi
leal -0x1(%rdx), %eax
movl %edi, %ebx
sarl $0x11, %ebx
sarl $0x11, %eax
xorl %ecx, %ecx
cmpl %eax, %ebx
je 0x1c0a4
sarl $0x3, %ebx
sarl $0x3, %eax
addq $0x4, %rcx
cmpl $0x18, %ecx
jne 0x1c07f
leaq 0x72ca1(%rip), %rdi     # 0x8ed3a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x26b6f
jmp 0x1c0ae
leaq 0x72cc5(%rip), %rax     # 0x8ed70
addl (%rcx,%rax), %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/binRange.c
// Function: binKeeperFree
void binKeeperFree(struct binKeeper **pBk)
/* Free up a bin keeper. */
{
struct binKeeper *bk = *pBk;
if (bk != NULL)
    {
    int i;
    for (i=0; i<bk->binCount; ++i)
	slFreeList(&bk->binLists[i]);
    freeMem(bk->binLists);
    freez(pBk);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x1c10a
movq %rdi, %rbx
cmpl $0x0, 0x10(%r14)
jle 0x1c0ee
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x18(%r14), %rdi
addq %r15, %rdi
callq 0x1fcd6
incq %r12
movslq 0x10(%r14), %rax
addq $0x8, %r15
cmpq %rax, %r12
jl 0x1c0d2
movq 0x18(%r14), %rdi
callq 0x2dd41
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2dd51
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/binRange.c
// Function: binKeeperAdd
void binKeeperAdd(struct binKeeper *bk, int start, int end, void *val)
/* Add item to binKeeper. */ 
{
int bin;
struct binElement *el;
if (start < bk->minPos || end > bk->maxPos || start > end)
    errAbort("(%d %d) out of range (%d %d) in binKeeperAdd", 
    	start, end, bk->minPos, bk->maxPos);
bin = binFromRangeBinKeeperExtended(start, end);
assert(bin < bk->binCount);
AllocVar(el);
el->start = start;
el->end = end;
el->val = val;
slAddHead(&bk->binLists[bin], el);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
movl 0x8(%rdi), %ecx
cmpl %esi, %ecx
jle 0x1c149
movl 0xc(%r14), %r8d
leaq 0x72b50(%rip), %rdi     # 0x8ec8b
movl %r15d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x26b6f
jmp 0x1c154
cmpl %ebp, %r15d
jg 0x1c130
cmpl %ebp, 0xc(%r14)
jl 0x1c130
movl %r15d, %edi
movl %ebp, %esi
callq 0x1c06d
cmpl 0x10(%r14), %eax
jge 0x1c197
movl %eax, %r12d
movl $0x18, %edi
callq 0x2dc95
movl %r15d, 0x8(%rax)
movl %ebp, 0xc(%rax)
movq %rbx, 0x10(%rax)
movq 0x18(%r14), %rcx
movslq %r12d, %rdx
movq (%rcx,%rdx,8), %rsi
movq %rsi, (%rax)
movq %rax, (%rcx,%rdx,8)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x72b1a(%rip), %rdi     # 0x8ecb8
leaq 0x72a5d(%rip), %rsi     # 0x8ec02
leaq 0x72b1f(%rip), %rcx     # 0x8eccb
movl $0xb4, %edx
callq 0x6460
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/binRange.c
// Function: binKeeperFind
struct binElement *binKeeperFind(struct binKeeper *bk, int start, int end)
/* Return a list of all items in binKeeper that intersect range.
 * Free this list with slFreeList. */
{
struct binElement *list = NULL, *newEl, *el;
int startBin, endBin;
int i,j;

if (start < bk->minPos) start = bk->minPos;
if (end > bk->maxPos) end = bk->maxPos;
if (start >= end) return NULL;
startBin = (start>>_binFirstShift);
endBin = ((end-1)>>_binFirstShift);
for (i=0; i<ArraySize(binOffsetsExtended); ++i)
    {
    int offset = binOffsetsExtended[i];
    for (j=startBin+offset; j<=endBin+offset; ++j)
        {
	for (el=bk->binLists[j]; el != NULL; el = el->next)
	    {
	    if (rangeIntersection(el->start, el->end, start, end) > 0)
	        {
		newEl = CloneVar(el);
		slAddHead(&list, newEl);
		}
	    }
	}
    startBin >>= _binNextShift;
    endBin >>= _binNextShift;
    }
return list;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movl %esi, %ebp
movl 0x8(%rdi), %eax
movq %rdi, 0x20(%rsp)
movl 0xc(%rdi), %ecx
cmpl %esi, %eax
cmovgl %eax, %ebp
cmpl %edx, %ecx
cmovll %ecx, %ebx
cmpl %ebx, %ebp
jge 0x1c29e
movl %ebp, %ecx
sarl $0x11, %ecx
leal -0x1(%rbx), %edx
sarl $0x11, %edx
xorl %eax, %eax
xorl %r15d, %r15d
cmpl %edx, %ecx
movl %ecx, 0xc(%rsp)
movq %rdx, 0x18(%rsp)
movq %rax, 0x10(%rsp)
jg 0x1c27b
leaq 0x72b55(%rip), %rsi     # 0x8ed70
movl (%rsi,%rax,4), %eax
leal (%rax,%rdx), %r13d
addl %ecx, %eax
movslq %eax, %r14
cmpl %r13d, %r14d
cmovgl %r14d, %r13d
incl %r13d
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax,%r14,8), %r12
testq %r12, %r12
je 0x1c273
movl 0x8(%r12), %edi
movl 0xc(%r12), %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x23630
testl %eax, %eax
jle 0x1c26d
movl $0x18, %esi
movq %r12, %rdi
callq 0x1f980
movq %r15, (%rax)
movq %rax, %r15
movq (%r12), %r12
jmp 0x1c23e
incq %r14
cmpl %r14d, %r13d
jne 0x1c231
movl 0xc(%rsp), %ecx
sarl $0x3, %ecx
movq 0x18(%rsp), %rdx
sarl $0x3, %edx
movq 0x10(%rsp), %rax
incq %rax
cmpq $0x6, %rax
jne 0x1c202
jmp 0x1c2a1
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/binRange.c
// Function: binKeeperAnyOverlap
boolean binKeeperAnyOverlap(struct binKeeper *bk, int start, int end)
/* Return TRUE if start/end overlaps with any items in binKeeper. */
{
struct binElement *el;
int startBin, endBin;
int i,j;

if (start < bk->minPos) start = bk->minPos;
if (end > bk->maxPos) end = bk->maxPos;
if (start >= end) return FALSE;
startBin = (start>>_binFirstShift);
endBin = ((end-1)>>_binFirstShift);
for (i=0; i<ArraySize(binOffsetsExtended); ++i)
    {
    int offset = binOffsetsExtended[i];
    for (j=startBin+offset; j<=endBin+offset; ++j)
        {
	for (el=bk->binLists[j]; el != NULL; el = el->next)
	    {
	    if (rangeIntersection(el->start, el->end, start, end) > 0)
	        {
		return TRUE;
		}
	    }
	}
    startBin >>= _binNextShift;
    endBin >>= _binNextShift;
    }
return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movl %esi, %ebp
movl 0x8(%rdi), %eax
movq %rdi, 0x20(%rsp)
movl 0xc(%rdi), %ecx
cmpl %esi, %eax
cmovgl %eax, %ebp
cmpl %edx, %ecx
cmovll %ecx, %ebx
cmpl %ebx, %ebp
jge 0x1c3ae
movl %ebp, %edx
sarl $0x11, %edx
leal -0x1(%rbx), %esi
sarl $0x11, %esi
xorl %r13d, %r13d
cmpl %esi, %edx
setg %dil
jle 0x1c303
sarl $0x3, %edx
sarl $0x3, %esi
jmp 0x1c39b
leaq 0x72a66(%rip), %rax     # 0x8ed70
movl (%rax,%r13,4), %eax
leal (%rax,%rsi), %ecx
addl %edx, %eax
movslq %eax, %r12
movslq %ecx, %rax
cmpl %eax, %r12d
movq %rax, 0x18(%rsp)
movl %eax, %r15d
cmovgl %r12d, %r15d
incl %r15d
movl %edx, 0xc(%rsp)
movq %rsi, 0x10(%rsp)
movb %dil, 0xb(%rsp)
leaq (,%r12,8), %r14
movq 0x20(%rsp), %rax
addq 0x18(%rax), %r14
movq (%r14), %r14
testq %r14, %r14
je 0x1c369
movl 0x8(%r14), %edi
movl 0xc(%r14), %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x23630
testl %eax, %eax
jle 0x1c34a
jmp 0x1c38d
cmpq 0x18(%rsp), %r12
leaq 0x1(%r12), %rax
setge %dil
movq %rax, %r12
cmpl %eax, %r15d
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rsi
jne 0x1c334
jmp 0x1c2f8
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rsi
movb 0xb(%rsp), %dil
testb $0x1, %dil
je 0x1c3b2
incq %r13
cmpq $0x6, %r13
jne 0x1c2f0
xorl %eax, %eax
jmp 0x1c3b7
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/binRange.c
// Function: binKeeperReplaceVal
void binKeeperReplaceVal(struct binKeeper *bk, int start, int end,
	void *oldVal, void *newVal)
/* Replace occurences of old val in range from start->end with newVal */
{
struct binElement *el;
int startBin, endBin;
int i,j;

if (start < bk->minPos) start = bk->minPos;
if (end > bk->maxPos) end = bk->maxPos;
if (start >= end) return;
startBin = (start>>_binFirstShift);
endBin = ((end-1)>>_binFirstShift);
for (i=0; i<ArraySize(binOffsetsExtended); ++i)
    {
    int offset = binOffsetsExtended[i];
    for (j=startBin+offset; j<=endBin+offset; ++j)
        {
	for (el=bk->binLists[j]; el != NULL; el = el->next)
	    {
	    if (rangeIntersection(el->start, el->end, start, end) > 0)
	        {
		if (el->val == oldVal)
		    {
		    el->val = newVal;
		    }
		}
	    }
	}
    startBin >>= _binNextShift;
    endBin >>= _binNextShift;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movl %edx, %r15d
movl %esi, %ebp
movl 0x8(%rdi), %eax
movq %rdi, 0x20(%rsp)
movl 0xc(%rdi), %ecx
cmpl %esi, %eax
cmovgl %eax, %ebp
cmpl %edx, %ecx
cmovll %ecx, %r15d
cmpl %r15d, %ebp
jge 0x1c4b2
movq %r8, %rbx
movl %ebp, %eax
sarl $0x11, %eax
leal -0x1(%r15), %ecx
sarl $0x11, %ecx
movq $0x0, 0x8(%rsp)
movl %eax, 0x4(%rsp)
movq %rcx, 0x18(%rsp)
cmpl %ecx, %eax
jg 0x1c48c
movq 0x8(%rsp), %rax
leaq 0x72944(%rip), %rcx     # 0x8ed70
movl (%rcx,%rax,4), %eax
movq 0x18(%rsp), %rcx
addl %eax, %ecx
addl 0x4(%rsp), %eax
movslq %eax, %r12
cmpl %ecx, %r12d
cmovgl %r12d, %ecx
incl %ecx
movl %ecx, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax,%r12,8), %r13
testq %r13, %r13
je 0x1c482
movl 0x8(%r13), %edi
movl 0xc(%r13), %esi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x23630
testl %eax, %eax
jle 0x1c47c
cmpq %r14, 0x10(%r13)
jne 0x1c47c
movq %rbx, 0x10(%r13)
movq (%r13), %r13
jmp 0x1c457
incq %r12
cmpl %r12d, 0x14(%rsp)
jne 0x1c44a
movl 0x4(%rsp), %eax
sarl $0x3, %eax
movq 0x18(%rsp), %rcx
sarl $0x3, %ecx
movq 0x8(%rsp), %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
cmpq $0x6, %rsi
jne 0x1c413
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, 0x18(%rsp)
movl %esi, %edx
sarl $0x11, %edx
leal -0x1(%rbx), %ecx
sarl $0x11, %ecx
xorl %eax, %eax
xorl %r12d, %r12d
cmpl %ecx, %edx
movl %edx, 0x4(%rsp)
movq %rcx, 0x10(%rsp)
movq %rax, 0x8(%rsp)
jg 0x1c5d3
leaq 0x72815(%rip), %rsi     # 0x8ed70
movl (%rsi,%rax,4), %eax
addl %eax, %ecx
addl %edx, %eax
movslq %eax, %r13
movslq %ecx, %rax
movq %rax, 0x20(%rsp)
xorl %r14d, %r14d
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax,%r13,8), %r15
testq %r15, %r15
je 0x1c5c4
movl 0x8(%r15), %edi
movl 0xc(%r15), %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x23630
testl %eax, %eax
jle 0x1c5b0
testq %r12, %r12
je 0x1c5a7
movl 0x8(%r12), %eax
cmpl %eax, 0x8(%r15)
jge 0x1c5b5
movl $0x1, %r14d
movq %r15, %r12
movq (%r15), %r15
jmp 0x1c57d
jne 0x1c5b0
movl 0xc(%r15), %eax
cmpl 0xc(%r12), %eax
jl 0x1c5a7
jmp 0x1c5b0
cmpq 0x20(%rsp), %r13
jge 0x1c5d3
incq %r13
testl %r14d, %r14d
je 0x1c570
movl 0x4(%rsp), %edx
sarl $0x3, %edx
movq 0x10(%rsp), %rcx
sarl $0x3, %ecx
movq 0x8(%rsp), %rax
incq %rax
cmpq $0x6, %rax
jne 0x1c542
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/binRange.c
// Function: binKeeperRemove
void binKeeperRemove(struct binKeeper *bk, int start, int end, void *val)
/* Remove item from binKeeper. */ 
{
int bin = binFromRangeBinKeeperExtended(start, end);
struct binElement **pList = &bk->binLists[bin], *newList = NULL, *el, *next;
for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    if (el->val == val && el->start == start && el->end == end)
        {
	freeMem(el);
	}
    else
        {
	slAddHead(&newList, el);
	}
    }
slReverse(&newList);
*pList = newList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl %esi, %edi
movl %edx, %esi
callq 0x1c06d
movq 0x18(%r15), %r15
movslq %eax, %r12
movq $0x0, (%rsp)
movq (%r15,%r12,8), %rdi
testq %rdi, %rdi
je 0x1c66b
movq (%rdi), %r13
cmpq %rbx, 0x10(%rdi)
jne 0x1c658
cmpl %r14d, 0x8(%rdi)
jne 0x1c658
cmpl %ebp, 0xc(%rdi)
jne 0x1c658
callq 0x2dd41
jmp 0x1c663
movq (%rsp), %rax
movq %rax, (%rdi)
movq %rdi, (%rsp)
movq %r13, %rdi
testq %r13, %r13
jne 0x1c63d
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1fcb3
movq (%rbx), %rax
movq %rax, (%r15,%r12,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/binRange.c
// Function: binKeeperNext
struct binElement* binKeeperNext(struct binKeeperCookie *cookie)
/* Return the next entry in the binKeeper table.  */
{
/* if we don't have a next, move down bin list until we find one */
while ((cookie->nextBel == NULL)
       && (++cookie->blIdx < cookie->bk->binCount))
    cookie->nextBel = cookie->bk->binLists[cookie->blIdx];
if (cookie->blIdx >= cookie->bk->binCount)
    return NULL;  /* no more */
else
    {
    struct binElement* bel = cookie->nextBel;
    cookie->nextBel = cookie->nextBel->next;
    return bel;
    }
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
jne 0x1c6dd
movq (%rdi), %rsi
movslq 0x10(%rsi), %rdx
movslq 0x8(%rdi), %rcx
incq %rcx
cmpq %rdx, %rcx
jge 0x1c6da
movq 0x18(%rsi), %rsi
movq (%rsi,%rcx,8), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
jne 0x1c6da
incq %rcx
cmpq %rdx, %rcx
jl 0x1c6c5
movl %ecx, 0x8(%rdi)
movl 0x8(%rdi), %ecx
movq (%rdi), %rdx
cmpl 0x10(%rdx), %ecx
jge 0x1c6f0
movq (%rax), %rcx
movq %rcx, 0x10(%rdi)
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/blastOut.c
// Function: bundleIntoTargets
static struct targetHits *bundleIntoTargets(struct axtBundle *abList)
/* BLAST typically outputs everything on the same query and target
 * in one clump.  This routine rearranges axts in abList to do this. */
{
struct targetHits *targetList = NULL, *target;
struct hash *targetHash = newHash(10);
struct axtBundle *ab;
struct axtRef *ref;

/* Build up a list of targets in database hit by query sorted by
 * score of hits. */
for (ab = abList; ab != NULL; ab = ab->next)
    {
    struct axt *axt;
    for (axt = ab->axtList; axt != NULL; axt = axt->next)
	{
	target = hashFindVal(targetHash, axt->tName);
	if (target == NULL)
	    {
	    AllocVar(target);
	    slAddHead(&targetList, target);
	    hashAdd(targetHash, axt->tName, target);
	    target->name = cloneString(axt->tName);
	    target->size = ab->tSize;
	    }
	if (axt->score > target->score)
	    target->score = axt->score;
	AllocVar(ref);
	ref->axt = axt;
	slAddHead(&target->axtList, ref);
	}
    }
slSort(&targetList, targetHitsCmpScore);
for (target = targetList; target != NULL; target = target->next)
    slSort(&target->axtList, axtRefCmpScore);

hashFree(&targetHash);
return targetList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq $0x0, (%rsp)
movl $0xa, %edi
movl $0x1, %esi
callq 0x29160
movq %rax, 0x8(%rsp)
testq %rbx, %rbx
je 0x1ddfc
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x1ddf4
movq 0x8(%rsp), %rdi
movq 0x20(%r15), %rsi
callq 0x29029
movq %rax, %r14
testq %rax, %rax
jne 0x1ddc5
movl $0x28, %edi
callq 0x2dc95
movq %rax, %r14
movq (%rsp), %rax
movq %rax, (%r14)
movq %r14, (%rsp)
movq 0x8(%rsp), %rdi
movq 0x20(%r15), %rsi
movq %r14, %rdx
callq 0x28dbe
movq 0x20(%r15), %rdi
callq 0x1f9f6
movq %rax, 0x8(%r14)
movl 0x10(%rbx), %eax
movl %eax, 0x10(%r14)
movl 0x34(%r15), %eax
cmpl 0x20(%r14), %eax
jle 0x1ddd3
movl %eax, 0x20(%r14)
movl $0x10, %edi
callq 0x2dc95
movq %r15, 0x8(%rax)
movq 0x18(%r14), %rcx
movq %rcx, (%rax)
movq %rax, 0x18(%r14)
movq (%r15), %r15
jmp 0x1dd69
movq (%rbx), %rbx
jmp 0x1dd5c
leaq 0x3f7(%rip), %rsi       # 0x1e1fa
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1fd04
movq (%rbx), %r14
testq %r14, %r14
je 0x1de31
leaq 0x3ea(%rip), %rbx       # 0x1e207
leaq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x1fd04
movq (%r14), %r14
testq %r14, %r14
jne 0x1de1d
leaq 0x8(%rsp), %rdi
callq 0x29565
movq (%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/blastOut.c
// Function: countMatches
static int countMatches(char *a, char *b, int size)
/* Count number of characters that match between a and b. */
{
int count = 0;
int i;
for (i=0; i<size; ++i)
    if (toupper(a[i]) == toupper(b[i]))
        ++count;
return count;
}

// Assembly:
testl %edx, %edx
jle 0x1de8f
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x6100
movq (%rax), %rcx
movl %ebp, %edx
xorl %esi, %esi
xorl %eax, %eax
movsbq (%r14,%rsi), %rdi
movl (%rcx,%rdi,4), %edi
movsbq (%rbx,%rsi), %r8
xorl %r9d, %r9d
cmpl (%rcx,%r8,4), %edi
sete %r9b
addl %r9d, %eax
incq %rsi
cmpq %rsi, %rdx
jne 0x1de67
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/blastOut.c
// Function: targetHitsFreeList
static void targetHitsFreeList(struct targetHits **pList)
/* Free a list of dynamically allocated targetHits's */
{
struct targetHits *el, *next;

for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    targetHitsFree(&el);
    }
*pList = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
movq %r15, (%rsp)
testq %r15, %r15
je 0x1e1e7
movq %rsp, %r14
movq (%r15), %r12
movq 0x8(%r15), %rdi
callq 0x2dd41
addq $0x18, %r15
movq %r15, %rdi
callq 0x1fcd6
movq %r14, %rdi
callq 0x2dd51
movq %r12, (%rsp)
movq %r12, %r15
testq %r12, %r12
jne 0x1e1bb
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/blastOut.c
// Function: ncbiPrintE
static void ncbiPrintE(FILE *f, double e)
/* Print a small number NCBI style. */
{
if (e <= 0.0)
    fprintf(f, "0.0");
else if (e <= 1.0e-100)
    {
    char buf[256], *s;
    safef(buf, sizeof(buf), "%e", e);
    s = strchr(buf, 'e');
    if (s == NULL)
	fprintf(f, "0.0");
    else
        fprintf(f, "%s", s);
    }
else
    fprintf(f, "%1.0e", e);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x1e25c
movsd 0x70bb5(%rip), %xmm1    # 0x8edf0
ucomisd %xmm0, %xmm1
jae 0x1e27f
leaq 0x71827(%rip), %rsi     # 0x8fa6f
movq %rbx, %rdi
movb $0x1, %al
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
jmp 0x6a90
leaq 0x71805(%rip), %rdi     # 0x8fa68
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
jmp 0x6e70
leaq 0x717e6(%rip), %rdx     # 0x8fa6c
movq %rsp, %r14
movq %r14, %rdi
movl $0x100, %esi            # imm = 0x100
movb $0x1, %al
callq 0x23c18
movq %r14, %rdi
movl $0x65, %esi
callq 0x6270
testq %rax, %rax
je 0x1e2b7
movq %rax, %rdi
movq %rbx, %rsi
callq 0x6810
jmp 0x1e2d0
leaq 0x717aa(%rip), %rdi     # 0x8fa68
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6e70
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/blastOut.c
// Function: printAxtTargetBlastTab
static void printAxtTargetBlastTab(FILE *f, struct axt *axt, int targetSize)
/* Print out target in tabular blast-oriented format. */
{
int s = axt->tStart, e = axt->tEnd;
if (axt->tStrand == '-')
    reverseIntRange(&s, &e, targetSize);
if (axt->tStrand == axt->qStrand)
    {
    fprintf(f, "%d\t", s+1);
    fprintf(f, "%d\t", e);
    }
else
    {
    fprintf(f, "%d\t", e);
    fprintf(f, "%d\t", s+1);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x28(%rsi), %eax
movl %eax, 0x4(%rsp)
movl 0x2c(%rsi), %eax
movl %eax, (%rsp)
cmpb $0x2d, 0x30(%rsi)
jne 0x1e305
leaq 0x4(%rsp), %rdi
movq %rsp, %rsi
callq 0x25145
movb 0x30(%r14), %al
cmpb 0x18(%r14), %al
jne 0x1e32b
movl 0x4(%rsp), %edx
incl %edx
leaq 0x6ff82(%rip), %rsi     # 0x8e29e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
movl (%rsp), %edx
jmp 0x1e345
movl (%rsp), %edx
leaq 0x6ff69(%rip), %rsi     # 0x8e29e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
movl 0x4(%rsp), %edx
incl %edx
leaq 0x6ff52(%rip), %rsi     # 0x8e29e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainFree
void chainFree(struct chain **pChain)
/* Free up a chain. */
{
struct chain *chain = *pChain;
if (chain != NULL)
    {
    slFreeList(&chain->blockList);
    freeMem(chain->qName);
    freeMem(chain->tName);
    freez(pChain);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x1e399
movq %rdi, %rbx
leaq 0x8(%r14), %rdi
callq 0x1fcd6
movq 0x30(%r14), %rdi
callq 0x2dd41
movq 0x18(%r14), %rdi
callq 0x2dd41
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2dd51
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainFreeList
void chainFreeList(struct chain **pList)
/* Free a list of dynamically allocated chain's */
{
struct chain *el, *next;

for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    chainFree(&el);
    }
*pList = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r15
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x1e3d4
leaq 0x8(%rsp), %r14
movq (%r15), %r15
movq %r14, %rdi
callq 0x1e360
movq %r15, 0x8(%rsp)
testq %r15, %r15
jne 0x1e3bf
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: cBlockCmpDiagQuery
int cBlockCmpDiagQuery(const void *va, const void *vb)
/* Compare to sort based on diagonal, then query. */
{
const struct cBlock *a = *((struct cBlock **)va);
const struct cBlock *b = *((struct cBlock **)vb);
int dif;
dif = (a->tStart - a->qStart) - (b->tStart - b->qStart);
if (dif == 0)
    dif = a->qStart - b->qStart;
return dif;
}

// Assembly:
movq (%rdi), %rax
movq (%rsi), %rcx
movl 0x8(%rax), %edx
movl 0x10(%rax), %eax
subl %eax, %edx
movl 0x10(%rcx), %esi
subl %esi, %eax
subl 0x8(%rcx), %esi
addl %edx, %esi
testl %esi, %esi
cmovnel %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: cBlocksFromAliSym
struct cBlock *cBlocksFromAliSym(int symCount, char *qSym, char *tSym, 
        int qPos, int tPos)
/* Convert alignment from alignment symbol (bases and dashes) format 
 * to a list of chain blocks.  The qPos and tPos correspond to the start
 * in the query and target sequences of the first letter in  qSym and tSym. */
{
struct cBlock *blockList = NULL, *block = NULL;
int i;
for (i=0; i<symCount; ++i)
    {
    if (qSym[i] == '-')
        {
        block = NULL;
        ++tPos;
        }
    else if (tSym[i] == '-')
        {
        block = NULL;
        ++qPos;
        }
    else
        {
        if (block == NULL)
            {
            AllocVar(block);
            slAddHead(&blockList, block);
            block->qStart = qPos;
            block->tStart = tPos;
            }
        block->qEnd = ++qPos;
        block->tEnd = ++tPos;
        }
    }
slReverse(&blockList);
return blockList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq $0x0, (%rsp)
testl %edi, %edi
jle 0x1e4be
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
xorl %r13d, %r13d
xorl %eax, %eax
cmpb $0x2d, (%r15,%r13)
jne 0x1e47f
incl %ebx
jmp 0x1e488
cmpb $0x2d, (%r14,%r13)
jne 0x1e48c
incl %ebp
xorl %eax, %eax
jmp 0x1e4b6
testq %rax, %rax
jne 0x1e4ac
movl $0x28, %edi
callq 0x2dc95
movq (%rsp), %rcx
movq %rcx, (%rax)
movq %rax, (%rsp)
movl %ebp, 0x10(%rax)
movl %ebx, 0x8(%rax)
incl %ebp
movl %ebp, 0x14(%rax)
incl %ebx
movl %ebx, 0xc(%rax)
incq %r13
cmpq %r13, %r12
jne 0x1e474
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1fcb3
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainCmpScore
int chainCmpScore(const void *va, const void *vb)
/* Compare to sort based on total score. */
{
const struct chain *a = *((struct chain **)va);
const struct chain *b = *((struct chain **)vb);
double diff = b->score - a->score;
if (diff < 0.0) return -1;
else if (diff > 0.0) return 1;
else return 0;
}

// Assembly:
movq (%rdi), %rax
movq (%rsi), %rcx
movsd 0x10(%rcx), %xmm0
subsd 0x10(%rax), %xmm0
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
ucomisd %xmm1, %xmm0
seta %cl
ucomisd %xmm0, %xmm1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainCmpTarget
int chainCmpTarget(const void *va, const void *vb)
/* Compare to sort based on target position. */
{
const struct chain *a = *((struct chain **)va);
const struct chain *b = *((struct chain **)vb);
int dif = strcmp(a->tName, b->tName);
if (dif == 0)
    dif = a->tStart - b->tStart;
return dif;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq (%rsi), %rbx
movq 0x18(%r14), %rdi
movq 0x18(%rbx), %rsi
callq 0x6a50
testl %eax, %eax
jne 0x1e551
movl 0x24(%r14), %eax
subl 0x24(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainCmpQuery
int chainCmpQuery(const void *va, const void *vb)
/* Compare to sort based on query chrom and target position. */
{
const struct chain *a = *((struct chain **)va);
const struct chain *b = *((struct chain **)vb);
int dif;                                                                        

dif = strcmp(a->qName, b->qName);                                               
if (dif == 0)                                                                   
    dif = a->qStart - b->qStart;                                                
return dif;                       
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq (%rsi), %rbx
movq 0x30(%r14), %rdi
movq 0x30(%rbx), %rsi
callq 0x6a50
testl %eax, %eax
jne 0x1e57b
movl 0x40(%r14), %eax
subl 0x40(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainWriteHead
void chainWriteHead(struct chain *chain, FILE *f)
/* Write chain before block/insert list. */
{
if (chain->id == 0)
    chainIdNext(chain);
fprintf(f, "chain %1.0f %s %d + %d %d %s %d %c %d %d %d\n", chain->score,
    chain->tName, chain->tSize, chain->tStart, chain->tEnd,
    chain->qName, chain->qSize, chain->qStrand, chain->qStart, chain->qEnd,
    chain->id);
}

// Assembly:
movq %rsi, %rax
movq %rdi, %r10
cmpl $0x0, 0x48(%rdi)
jne 0x1e5c7
movl 0xa2052(%rip), %ecx     # 0xc060c
leal 0x1(%rcx), %edx
movl %edx, 0xa2049(%rip)     # 0xc060c
movl %ecx, 0x48(%r10)
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd 0x10(%r10), %xmm0
movq 0x18(%r10), %rdx
movl 0x20(%r10), %ecx
movl 0x24(%r10), %r8d
movl 0x28(%r10), %r9d
movl 0x38(%r10), %r11d
movsbl 0x3c(%r10), %ebx
movl 0x40(%r10), %r14d
movl 0x44(%r10), %r15d
movl 0x48(%r10), %r12d
leaq 0x71564(%rip), %rsi     # 0x8fb65
movq %rax, %rdi
movb $0x1, %al
pushq %r12
pushq %r15
pushq %r14
pushq %rbx
pushq %r11
pushq 0x30(%r10)
callq 0x6a90
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainWrite
void chainWrite(struct chain *chain, FILE *f)
/* Write out chain to file in usual format*/
{
struct cBlock *b, *nextB;

chainWriteHead(chain, f);
for (b = chain->blockList; b != NULL; b = nextB)
    {
    nextB = b->next;
    fprintf(f, "%d", b->qEnd - b->qStart);
    if (nextB != NULL)
	fprintf(f, "\t%d\t%d", 
		nextB->tStart - b->tEnd, nextB->qStart - b->qEnd);
    fputc('\n', f);
    }
fputc('\n', f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1e5a8
movq 0x8(%r14), %r13
testq %r13, %r13
je 0x1e6a1
leaq 0x7154e(%rip), %r14     # 0x8fb96
leaq 0x71543(%rip), %r15     # 0x8fb92
movq (%r13), %r12
movl 0x14(%r13), %edx
subl 0x10(%r13), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x6a90
testq %r12, %r12
je 0x1e68c
movl 0x8(%r12), %edx
movl 0x10(%r12), %ecx
subl 0xc(%r13), %edx
subl 0x14(%r13), %ecx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x6a90
movl $0xa, %edi
movq %rbx, %rsi
callq 0x6930
movq %r12, %r13
testq %r12, %r12
jne 0x1e64f
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x6930
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainWriteLong
void chainWriteLong(struct chain *chain, FILE *f)
/* Write out chain to file in longer format*/
{
struct cBlock *b, *nextB;

chainWriteHead(chain, f);
for (b = chain->blockList; b != NULL; b = nextB)
    {
    nextB = b->next;
    fprintf(f, "%d\t%d\t", b->tStart, b->qStart);
    fprintf(f, "%d", b->qEnd - b->qStart);
    if (nextB != NULL)
	fprintf(f, "\t%d\t%d", 
		nextB->tStart - b->tEnd, nextB->qStart - b->qEnd);
    fputc('\n', f);
    }
fputc('\n', f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1e5a8
movq 0x8(%r14), %r13
testq %r13, %r13
je 0x1e778
leaq 0x6fb94(%rip), %r14     # 0x8e29b
leaq 0x71488(%rip), %r15     # 0x8fb96
leaq 0x7147d(%rip), %r12     # 0x8fb92
movq (%r13), %rbp
movl 0x8(%r13), %edx
movl 0x10(%r13), %ecx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x6a90
movl 0x14(%r13), %edx
subl 0x10(%r13), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x6a90
testq %rbp, %rbp
je 0x1e763
movl 0x8(%rbp), %edx
movl 0x10(%rbp), %ecx
subl 0xc(%r13), %edx
subl 0x14(%r13), %ecx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x6a90
movl $0xa, %edi
movq %rbx, %rsi
callq 0x6930
movq %rbp, %r13
testq %rbp, %rbp
jne 0x1e715
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6930
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainReadBlocks
void chainReadBlocks(struct lineFile *lf, struct chain *chain)
/* Read in chain blocks from file. */
{
char *row[3];
int q,t;

/* Now read in block list. */
q = chain->qStart;
t = chain->tStart;
for (;;)
    {
    int wordCount = lineFileChop(lf, row);
    int size = lineFileNeedNum(lf, row, 0);
    struct cBlock *b;
    AllocVar(b);
    slAddHead(&chain->blockList, b);
    b->qStart = q;
    b->tStart = t;
    q += size;
    t += size;
    b->qEnd = q;
    b->tEnd = t;
    if (wordCount == 1)
        break;
    else if (wordCount < 3)
        errAbort("Expecting 1 or 3 words line %d of %s\n", 
		lf->lineIx, lf->fileName);
    t += lineFileNeedNum(lf, row, 1);
    q += lineFileNeedNum(lf, row, 2);
    }
if (q != chain->qEnd)
    errAbort("q end mismatch %d vs %d line %d of %s\n", 
    	q, chain->qEnd, lf->lineIx, lf->fileName);
if (t != chain->tEnd)
    errAbort("t end mismatch %d vs %d line %d of %s\n", 
    	t, chain->tEnd, lf->lineIx, lf->fileName);
slReverse(&chain->blockList);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x24(%rsi), %r12d
movl 0x40(%rsi), %r15d
movl %r12d, %ebp
movq %r14, %rdi
movq %rsp, %r12
movq %r12, %rsi
movl $0x3, %edx
callq 0x2b03f
movl %eax, %r13d
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x2b2eb
movl %eax, %r12d
movl $0x28, %edi
callq 0x2dc95
movq 0x8(%rbx), %rcx
movq %rcx, (%rax)
movq %rax, 0x8(%rbx)
movl %r15d, 0x10(%rax)
movl %ebp, 0x8(%rax)
addl %r12d, %r15d
addl %ebp, %r12d
movl %r15d, 0x14(%rax)
movl %r12d, 0xc(%rax)
cmpl $0x1, %r13d
je 0x1ea23
cmpl $0x2, %r13d
jg 0x1e9fa
movl 0x28(%r14), %esi
movq 0x8(%r14), %rdx
leaq 0x71258(%rip), %rdi     # 0x8fc4b
xorl %eax, %eax
callq 0x26b6f
movq %r14, %rdi
movq %rsp, %rbp
movq %rbp, %rsi
movl $0x1, %edx
callq 0x2b2eb
addl %eax, %r12d
movq %r14, %rdi
movq %rbp, %rsi
movl $0x2, %edx
callq 0x2b2eb
addl %eax, %r15d
cmpl $0x1, %r13d
jne 0x1e985
movl 0x44(%rbx), %edx
cmpl %edx, %r15d
je 0x1ea4e
movl 0x28(%r14), %ecx
movq 0x8(%r14), %r8
leaq 0x7122d(%rip), %rdi     # 0x8fc71
movl %r15d, %esi
xorl %eax, %eax
callq 0x26b6f
movl 0x28(%rbx), %edx
cmpl %edx, %r12d
je 0x1ea6f
movl 0x28(%r14), %ecx
movq 0x8(%r14), %r8
leaq 0x71233(%rip), %rdi     # 0x8fc98
movl %r12d, %esi
xorl %eax, %eax
callq 0x26b6f
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x1fcb3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainRead
struct chain *chainRead(struct lineFile *lf)
/* Read next chain from file.  Return NULL at EOF. 
 * Note that chain block scores are not filled in by
 * this. */
{
struct chain *chain = chainReadChainLine(lf);
if (chain != NULL)
    chainReadBlocks(lf, chain);
return chain;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x1e793
movq %rax, %rbx
testq %rax, %rax
je 0x1eaa9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1e969
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainSwap
void chainSwap(struct chain *chain)
/* Swap target and query side of chain. */
{
struct chain old = *chain;
struct cBlock *b;

/* Copy basic stuff swapping t and q. */
chain->qName = old.tName;
chain->tName = old.qName;
chain->qStart = old.tStart;
chain->qEnd = old.tEnd;
chain->tStart = old.qStart;
chain->tEnd = old.qEnd;
chain->qSize = old.tSize;
chain->tSize = old.qSize;

/* Swap t and q in blocks. */
for (b = chain->blockList; b != NULL; b = b->next)
    {
    struct cBlock old = *b;
    b->qStart = old.tStart;
    b->qEnd = old.tEnd;
    b->tStart = old.qStart;
    b->tEnd = old.qEnd;
    }

/* Cope with the minus strand. */
if (chain->qStrand == '-')
    {
    /* chain's are really set up so that the target is on the
     * + strand and the query is on the minus strand.
     * Therefore we need to reverse complement both 
     * strands while swapping to preserve this. */
    for (b = chain->blockList; b != NULL; b = b->next)
        {
	reverseIntRange(&b->tStart, &b->tEnd, chain->tSize);
	reverseIntRange(&b->qStart, &b->qEnd, chain->qSize);
	}
    reverseIntRange(&chain->tStart, &chain->tEnd, chain->tSize);
    reverseIntRange(&chain->qStart, &chain->qEnd, chain->qSize);
    slReverse(&chain->blockList);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x18(%rdi), %rcx
movl 0x20(%rdi), %edx
movq 0x24(%rdi), %rsi
movq 0x30(%rdi), %rdi
movl 0x38(%rbx), %r8d
movl 0x40(%rbx), %r9d
movl 0x44(%rbx), %r10d
movq %rcx, 0x30(%rbx)
movq %rdi, 0x18(%rbx)
movq %rsi, 0x40(%rbx)
movl %r9d, 0x24(%rbx)
movl %r10d, 0x28(%rbx)
movl %edx, 0x38(%rbx)
movl %r8d, 0x20(%rbx)
testq %rax, %rax
je 0x1eb1c
movq (%rax), %rcx
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rsi
movq %rdx, 0x10(%rax)
movq %rsi, 0x8(%rax)
movq %rcx, %rax
testq %rcx, %rcx
jne 0x1eb01
cmpb $0x2d, 0x3c(%rbx)
jne 0x1eb67
leaq 0x24(%rbx), %r13
leaq 0x28(%rbx), %rbp
leaq 0x40(%rbx), %rax
movq %rax, (%rsp)
leaq 0x44(%rbx), %r12
leaq 0x8(%rbx), %r14
movq (%r14), %r15
testq %r15, %r15
je 0x1eb76
leaq 0x8(%r15), %rdi
leaq 0xc(%r15), %rsi
movl 0x20(%rbx), %edx
callq 0x25145
leaq 0x10(%r15), %rdi
leaq 0x14(%r15), %rsi
movl 0x38(%rbx), %edx
callq 0x25145
movq (%r15), %r15
jmp 0x1eb3d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x20(%rbx), %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x25145
movl 0x38(%rbx), %edx
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x25145
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1fcb3
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainReadUsedSwapLf
struct hash *chainReadUsedSwapLf(char *fileName, boolean swapQ, Bits *bits, struct lineFile *lf)
/* Read chains that are marked as used in the 
 * bits array (which may be NULL) into a hash keyed by id. */
{
char nameBuf[16];
struct hash *hash = hashNew(18);
struct chain *chain;
int usedCount = 0, count = 0;

while ((chain = chainRead(lf)) != NULL)
    {
    ++count;
    if (bits != NULL && !bitReadOne(bits, chain->id))
	{
	chainFree(&chain);
        continue;
	}
    safef(nameBuf, sizeof(nameBuf), "%x", chain->id);
    if (hashLookup(hash, nameBuf))
        errAbort("Duplicate chain %d ending line %d of %s", 
		chain->id, lf->lineIx, lf->fileName);
    if (swapQ)
        chainSwap(chain);
    hashAdd(hash, nameBuf, chain);
    ++usedCount;
    }
return hash;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movl $0x12, %edi
movl $0x1, %esi
callq 0x29160
movq %rax, %r15
movq %rbx, %rdi
callq 0x1ea8a
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x1ec8e
leaq 0x74836(%rip), %r12     # 0x93424
leaq 0x10(%rsp), %r13
testq %r14, %r14
je 0x1ec07
movl 0x48(%rax), %esi
movq %r14, %rdi
callq 0x1b913
testl %eax, %eax
je 0x1ec6e
movq 0x8(%rsp), %rax
movl 0x48(%rax), %ecx
movq %r13, %rdi
movl $0x10, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x23c18
movq %r15, %rdi
movq %r13, %rsi
callq 0x28b2c
testq %rax, %rax
je 0x1ec4e
movq 0x8(%rsp), %rax
movl 0x48(%rax), %esi
movl 0x28(%rbx), %edx
movq 0x8(%rbx), %rcx
leaq 0x71078(%rip), %rdi     # 0x8fcbf
xorl %eax, %eax
callq 0x26b6f
testl %ebp, %ebp
je 0x1ec5c
movq 0x8(%rsp), %rdi
callq 0x1eab4
movq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x28dbe
jmp 0x1ec78
leaq 0x8(%rsp), %rdi
callq 0x1e360
movq %rbx, %rdi
callq 0x1ea8a
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x1ebf3
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainReadUsedSwap
struct hash *chainReadUsedSwap(char *fileName, boolean swapQ, Bits *bits)
/* Read chains that are marked as used in the 
 * bits array (which may be NULL) into a hash keyed by id. */
{
struct lineFile *lf = lineFileOpen(fileName, TRUE);
struct hash *hash = chainReadUsedSwapLf(fileName, swapQ, NULL, lf);
lineFileClose(&lf);
return hash;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl $0x1, %esi
callq 0x2a1fc
movq %rsp, %r14
movq %rax, (%r14)
movl %ebx, %esi
xorl %edx, %edx
movq %rax, %rcx
callq 0x1eba9
movq %rax, %rbx
movq %r14, %rdi
callq 0x2ab48
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainReadAllWithMeta
struct hash *chainReadAllWithMeta(char *fileName, FILE *f)
/* Read chains into a hash keyed by id. */
{
struct lineFile *lf = lineFileOpen(fileName, TRUE);
struct hash *hash = NULL;
lineFileSetMetaDataOutput(lf, f);
hash = chainReadUsedSwapLf(fileName, FALSE, NULL, lf);
lineFileClose(&lf);
return hash;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl $0x1, %esi
callq 0x2a1fc
movq %rsp, %r14
movq %rax, (%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x29bce
movq (%r14), %rcx
xorl %esi, %esi
xorl %edx, %edx
callq 0x1eba9
movq %rax, %rbx
movq %r14, %rdi
callq 0x2ab48
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chain.c
// Function: chainRangeQPlusStrand
void chainRangeQPlusStrand(struct chain *chain, int *retQs, int *retQe)
/* Return range of bases covered by chain on q side on the plus
 * strand. */
{
if (chain == NULL)
    errAbort("chain::chainRangeQPlusStrand() - Can't find range in null query chain.");
if (chain->qStrand == '-')
    {
    *retQs = chain->qSize - chain->qEnd;
    *retQe = chain->qSize - chain->qStart;
    }
else
    {
    *retQs = chain->qStart;
    *retQe = chain->qEnd;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rdi, %rdi
jne 0x1f13d
leaq 0x70bb1(%rip), %rdi     # 0x8fce7
xorl %eax, %eax
callq 0x26b6f
cmpb $0x2d, 0x3c(%r14)
jne 0x1f159
movl 0x38(%r14), %eax
subl 0x44(%r14), %eax
movl %eax, (%r15)
movl 0x38(%r14), %eax
subl 0x40(%r14), %eax
jmp 0x1f164
movl 0x40(%r14), %eax
movl %eax, (%r15)
movl 0x44(%r14), %eax
movl %eax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chainBlock.c
// Function: kdLeafCmpTotal
static int kdLeafCmpTotal(const void *va, const void *vb)
/* Compare to sort based on total score. */
{
const struct kdLeaf *a = *((struct kdLeaf **)va);
const struct kdLeaf *b = *((struct kdLeaf **)vb);
double diff = b->totalScore - a->totalScore;
if (diff < 0) return -1;
else if (diff > 0) return 1;
else return 0;
}

// Assembly:
movq (%rdi), %rax
movq (%rsi), %rcx
movsd 0x18(%rcx), %xmm0
subsd 0x18(%rax), %xmm0
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
ucomisd %xmm1, %xmm0
seta %cl
ucomisd %xmm0, %xmm1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chainBlock.c
// Function: kdBuild
static struct kdBranch *kdBuild(int nodeCount, struct dlList *lists[2], int dim,
	struct lm *lm)
/* Build up kd-tree recursively. */
{
struct kdBranch *branch;
lmAllocVar(lm, branch);
if (nodeCount == 1)
    {
    struct kdLeaf *leaf = lists[0]->head->val;
    branch->leaf = leaf;
    branch->maxQ = leaf->cb->qEnd;
    branch->maxT = leaf->cb->tEnd;
    }
else
    {
    int newCount;
    struct dlList *newLists[2];
    struct dlList newQ, newT;
    int nextDim = 1-dim;

    /* Subdivide lists along median.  */
    newLists[0] = &newQ;
    newLists[1] = &newT;
    clearHits(lists[0]);
    branch->cutCoord = medianVal(lists[dim], nodeCount/2, dim);
    newCount = splitList(lists[0], newLists[0]);
    splitList(lists[1], newLists[1]);

    /* Recurse on each side. */
    branch->lo = kdBuild(nodeCount - newCount, lists, nextDim, lm);
    branch->hi = kdBuild(newCount, newLists, nextDim, lm);
    branch->maxQ = max(branch->lo->maxQ, branch->hi->maxQ);
    branch->maxT = max(branch->lo->maxT, branch->hi->maxT);
    }
return branch;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movl %edx, %r13d
movq %rsi, %r15
movl %edi, %ebp
movl $0x30, %esi
movq %rcx, %rdi
callq 0x2bfa9
movq %rax, %rbx
cmpl $0x1, %ebp
jne 0x1f673
movq (%r15), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rbx)
movq 0x8(%rax), %rax
movl 0x14(%rax), %ecx
movl %ecx, 0x28(%rbx)
movl 0xc(%rax), %eax
jmp 0x1f737
movl $0x1, %r12d
leaq 0x30(%rsp), %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq (%r15), %rdi
movq (%rdi), %rax
cmpq $0x0, (%rax)
je 0x1f6a5
movq 0x10(%rax), %rcx
movb $0x0, 0x20(%rcx)
movq (%rax), %rax
jmp 0x1f692
subl %r13d, %r12d
movl %ebp, %eax
shrl %eax
movl %r13d, %ecx
movq (%r15,%rcx,8), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rdx
movb $0x1, 0x20(%rdx)
decl %eax
jne 0x1f6b3
xorl %eax, %eax
testl %r13d, %r13d
sete %al
movq 0x8(%rdx), %rcx
movl 0x8(%rcx,%rax,8), %eax
movl %eax, 0x18(%rbx)
leaq 0x30(%rsp), %rsi
callq 0x1f74c
movl %eax, %r13d
movq 0x8(%r15), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1f74c
subl %r13d, %ebp
movl %ebp, %edi
movq %r15, %rsi
movl %r12d, %edx
movq %r14, %rcx
callq 0x1f625
movq %rax, (%rbx)
movq %rsp, %rsi
movl %r13d, %edi
movl %r12d, %edx
movq %r14, %rcx
callq 0x1f625
movq %rax, 0x8(%rbx)
movq (%rbx), %rcx
movl 0x28(%rcx), %edx
movl 0x28(%rax), %esi
cmpl %esi, %edx
cmovgl %edx, %esi
movl %esi, 0x28(%rbx)
movl 0x2c(%rcx), %ecx
movl 0x2c(%rax), %eax
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl %eax, 0x2c(%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/chainBlock.c
// Function: splitList
static int splitList(struct dlList *oldList, struct dlList *newList)
/* Peel off members of oldList that are not hit onto new list. */
{
struct dlNode *node, *next;
struct kdLeaf *leaf;
int newCount = 0;
dlListInit(newList);
for (node = oldList->head; !dlEnd(node); node = next)
    {
    next = node->next;
    leaf = node->val;
    if (!leaf->hit)
	{
	dlRemove(node);
	dlAddTail(newList, node);
	++newCount;
	}
    }
return newCount;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x245d4
movq (%r14), %r14
movq (%r14), %rax
xorl %ebp, %ebp
testq %rax, %rax
je 0x1f798
movq %rax, %r15
movq 0x10(%r14), %rax
cmpb $0x0, 0x20(%rax)
jne 0x1f790
movq %r14, %rdi
callq 0x247bc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x246d9
incl %ebp
movq (%r15), %rax
movq %r15, %r14
jmp 0x1f769
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq