LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: ssBundleFreeList
void ssBundleFreeList(struct ssBundle **pList)
/* Free up list of ssBundles */
{
struct ssBundle *el, *next;
for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    ssBundleFree(&el);
    }
*pList = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r15
leaq 0x8(%rsp), %r14
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x11d00
movq (%r15), %r15
movq %r14, %rdi
callq 0x11cb5
jmp 0x11ce9
andq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: dumpNearCrossover
void dumpNearCrossover(char *what, DNA *n, DNA *h, int size)
/* Print sequence near crossover */
{
printf("%s: ", what);
mustWrite(stdout, n, size);
printf("\n");
printf("%s: ", what);
mustWrite(stdout, h, size);
printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x6e365(%rip), %rdi     # 0x80090
movq %r15, %rsi
xorl %eax, %eax
callq 0x6070
movq 0xa1274(%rip), %r12     # 0xb2fb0
movq (%r12), %rdi
movslq %ebp, %r13
movq %r14, %rsi
movq %r13, %rdx
callq 0x1ed3f
pushq $0xa
popq %rbp
movl %ebp, %edi
callq 0x6a40
leaq 0x6e331(%rip), %rdi     # 0x80090
movq %r15, %rsi
xorl %eax, %eax
callq 0x6070
movq (%r12), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1ed3f
movl %ebp, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6a40
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: dumpFf
void dumpFf(struct ffAli *left, bioSeq *qSeq, bioSeq *tSeq, struct trans3 *t3List)
/* Print info on ffAli. */
{
struct ffAli *ff;
for (ff = left; ff != NULL; ff = ff->right)
    {
    int hStart = trans3GenoPos(ff->hStart, tSeq, t3List, FALSE);
    int hEnd   = trans3GenoPos(ff->hEnd  , tSeq, t3List, TRUE);

    printf("(%d - %d)[%ld-%ld] ", hStart, hEnd,
	(long)(ff->nStart - qSeq->dna), (long)(ff->nEnd - qSeq->dna));
    }
printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x6b683(%rip), %r13     # 0x7d42e
testq %r12, %r12
je 0x11e00
movq 0x20(%r12), %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x13107
movl %eax, %ebp
movq 0x28(%r12), %rdi
movq %r14, %rsi
movq %rbx, %rdx
pushq $0x1
popq %rcx
callq 0x13107
movq 0x10(%r15), %rdx
movq 0x10(%r12), %rcx
movq 0x18(%r12), %r8
subq %rdx, %rcx
subq %rdx, %r8
movq %r13, %rdi
movl %ebp, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x6070
movq 0x8(%r12), %r12
jmp 0x11dab
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6a40
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: dumpBuns
void dumpBuns(struct ssBundle *bunList)
/* Print diagnostic info on bundles. */
{
struct ssBundle *bun;
struct ssFfItem *ffl;
for (bun = bunList; bun != NULL; bun = bun->next)
    {
    struct dnaSeq *qSeq = bun->qSeq;        /* Query sequence (not owned by bundle.) */
    struct dnaSeq *genoSeq = bun->genoSeq;     /* Genomic sequence (not owned by bundle.) */
    printf("Bundle of %d between %s and %s\n", slCount(bun->ffList), qSeq->name, genoSeq->name);
    for (ffl = bun->ffList; ffl != NULL; ffl = ffl->next)
	{
	dumpFf(ffl->ff, bun->qSeq, bun->genoSeq, bun->t3List);
	}
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x6b619(%rip), %r14     # 0x7d442
testq %rbx, %rbx
je 0x11e7c
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r12
movq 0x18(%rbx), %r13
leaq 0x8(%rbx), %r15
callq 0x1c4aa
movq 0x8(%r12), %rdx
movq 0x8(%r13), %rcx
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x6070
movq (%r15), %r15
testq %r15, %r15
je 0x11e77
movq 0x8(%r15), %rdi
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq 0x38(%rbx), %rcx
callq 0x11d8d
jmp 0x11e58
movq (%rbx), %rbx
jmp 0x11e29
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: smallMiddleExons
struct ffAli *smallMiddleExons(struct ffAli *aliList, 
	struct ssBundle *bundle, 
	enum ffStringency stringency)
/* Look for small exons in the middle. */
{
if (bundle->t3List != NULL)
    return aliList;	/* Can't handle intense translated stuff. */
else
    {
    struct dnaSeq *qSeq =  bundle->qSeq;
    struct dnaSeq *genoSeq = bundle->genoSeq;
    struct ffAli *right, *left = NULL, *newLeft, *newRight;

    left = aliList;
    for (right = aliList->right; right != NULL; right = right->right)
        {
	if (right->hStart - left->hEnd >= 3 && right->nStart - left->nEnd >= 3)
	    {
	    newLeft = ffFind(left->nEnd, right->nStart, left->hEnd, right->hStart, stringency);
	    if (newLeft != NULL)
	        {
		newLeft = forceMonotonic(newLeft, qSeq, genoSeq, 
		    stringency, bundle->isProt, bundle->t3List );
		newRight = ffRightmost(newLeft);
                if (left != NULL)
                    {
                    left->right = newLeft;
                    newLeft->left = left;
                    }
                else
                    {
                    aliList = newLeft;
                    }
                if (right != NULL)
                    {
                    right->left = newRight;
                    newRight->right = right;
                    }
		}
	    }
	left = right;
	}
    }
return aliList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r12
cmpq $0x0, 0x38(%rsi)
je 0x11eb0
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %ebx
movq %rsi, %r15
movq 0x10(%rsi), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsi), %rax
movq %rax, 0x8(%rsp)
movq %r12, %r14
movq %r14, %r13
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x11e9e
movq 0x20(%r14), %rcx
movq 0x28(%r13), %rdx
movq %rcx, %rax
subq %rdx, %rax
cmpq $0x3, %rax
jl 0x11eca
movq 0x10(%r14), %rsi
movq 0x18(%r13), %rdi
movq %rsi, %rax
subq %rdi, %rax
cmpq $0x3, %rax
jl 0x11eca
movl %ebx, %r8d
callq 0x9254
testq %rax, %rax
je 0x11eca
movl 0x30(%r15), %r8d
movq 0x38(%r15), %r9
movq %rax, %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl %ebx, %ecx
callq 0x11f43
movq %rax, %rbp
movq %rax, %rdi
callq 0x236a3
movq %rbp, 0x8(%r13)
movq %r13, (%rbp)
movq %rax, (%r14)
movq %r14, 0x8(%rax)
jmp 0x11eca
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: forceMonotonic
static struct ffAli *forceMonotonic(struct ffAli *aliList,
	struct dnaSeq *qSeq, struct dnaSeq *tSeq, enum ffStringency stringency,
	boolean isProt, struct trans3 *t3List)
/* Remove any blocks that violate strictly increasing order in both coordinates. 
 * This is not optimal, but it turns out to be very rarely used. */
{
if (!isProt)
    {
    if (!isMonotonic(aliList))
	{
	struct ffAli *leftovers = NULL;
	int score;
	ssFindBestBig(aliList, qSeq, tSeq, stringency, isProt, t3List, &aliList, &score,
	   &leftovers);
	ffFreeAli(&leftovers);
	}
    }
return aliList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq %rdi, (%rsp)
testl %r8d, %r8d
jne 0x11ff3
movq %r9, %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %r14, %rdi
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x11ff3
movq 0x18(%rdi), %rsi
movq 0x10(%rax), %rdx
cmpq %rdx, %rsi
ja 0x11f94
movq 0x20(%rax), %rcx
cmpq %rcx, 0x28(%rdi)
movq %rax, %rdi
jbe 0x11f6f
jmp 0x11f98
movq 0x20(%rax), %rcx
subl %esi, %edx
subl 0x28(%rax), %ecx
leaq 0x6b4be(%rip), %rsi     # 0x7d462
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x3c521
leaq 0x10(%rsp), %r13
andq $0x0, (%r13)
subq $0x8, %rsp
leaq 0x14(%rsp), %rax
leaq 0x8(%rsp), %r10
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %ebp, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
pushq %r13
pushq %rax
movq %r10, %rbx
pushq %r10
callq 0x12aff
addq $0x20, %rsp
movq %r13, %rdi
callq 0x23624
movq (%rbx), %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: trans3Offsets
static void trans3Offsets(struct trans3 *t3List, AA *startP, AA *endP,
	int *retStart, int *retEnd)
/* Figure out offset of peptide in context of larger sequences. */
{
struct trans3 *t3;
int frame;
aaSeq *seq;

for (t3 = t3List; t3 != NULL; t3 = t3->next)
    {
    for (frame = 0; frame < 3; ++frame)
        {
	seq = t3->trans[frame];
	if (seq->dna <= startP && startP < seq->dna + seq->size)
	    {
	    *retStart = 3*(startP - seq->dna)+frame + t3->start;
	    *retEnd = 3*(endP - seq->dna)+frame + t3->start;
	    return;
	    }
	}
    }
internalErr();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
imull $-0x3, %edx, %eax
imull $-0x3, %esi, %edx
movabsq $0x3, %r10
testq %rdi, %rdi
je 0x120f0
movq %r10, %rbx
movl %edx, %r11d
movl %eax, %r9d
cmpq $0x6, %rbx
je 0x120cc
movq (%rdi,%rbx,8), %r15
movq 0x10(%r15), %r14
cmpq %rsi, %r14
ja 0x120c1
movslq 0x18(%r15), %r15
addq %r14, %r15
cmpq %rsi, %r15
ja 0x120d1
decl %r9d
decl %r11d
incq %rbx
jmp 0x120a2
movq (%rdi), %rdi
jmp 0x12094
movl 0x30(%rdi), %eax
leal (%r14,%r14,2), %edx
subl %edx, %eax
subl %r11d, %eax
movl %eax, (%rcx)
movl 0x30(%rdi), %eax
subl %edx, %eax
subl %r9d, %eax
movl %eax, (%r8)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6aaa4(%rip), %rdi     # 0x7cb9b
leaq 0x6b385(%rip), %rsi     # 0x7d483
movl $0xbc, %edx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x223fb
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: cutAtBigIntrons
struct ffAli *cutAtBigIntrons(struct ffAli *ffList, int maxIntron, 
	int *pScore, enum ffStringency stringency, 
	boolean isProt, bioSeq *tSeq, struct trans3 *t3List,
	struct ffAli **returnLeftovers)
/* Return ffList up to the first intron that's too big.
 * Put the rest of the blocks back onto the leftovers list. */
{
struct ffAli *prevFf, *ff, *cutFf = NULL;
prevFf = ffList;
for (ff = prevFf->right; ff != NULL; ff = ff->right)
    {
    int nhStart = trans3GenoPos(    ff->hStart, tSeq, t3List, FALSE);
    int ohEnd   = trans3GenoPos(prevFf->hEnd  , tSeq, t3List, TRUE);
    int dt = nhStart - ohEnd;
    if (dt > maxIntron)
        {
	cutFf = prevFf;
	break;
	}
    prevFf = ff;
    }
if (cutFf != NULL)
    {
    ff = cutFf->right;
    cutFf->right = NULL;
    ff->left = NULL;
    ffCat(returnLeftovers, &ff);
    if (isProt)
	*pScore = ffScoreProtein(ffList, stringency);
    else
	*pScore = ffScore(ffList, stringency);
    }
return ffList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r13
movl %r8d, 0x14(%rsp)
movl %ecx, 0x4(%rsp)
movq %rdx, 0x18(%rsp)
movl %esi, %r12d
movq %rdi, %rbx
movq 0x60(%rsp), %r14
movq %rdi, 0x8(%rsp)
movq %rbx, %rbp
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x121c3
movq 0x20(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x13107
movl %eax, %r15d
movq 0x28(%rbp), %rdi
movq %r13, %rsi
movq %r14, %rdx
pushq $0x1
popq %rcx
callq 0x13107
subl %eax, %r15d
cmpl %r12d, %r15d
jle 0x1213e
movq 0x8(%rbp), %rax
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rbp)
andq $0x0, (%rax)
movq 0x68(%rsp), %rdi
callq 0x1317c
cmpl $0x0, 0x14(%rsp)
je 0x121ae
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x23b0b
jmp 0x121bc
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x23afc
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
movq 0x8(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: ssConnectCost
static int ssConnectCost(struct cBlock *a, struct cBlock *b, void *data)
/* Calculate connection cost - including gap score
 * and overlap adjustments if any. */
{
struct ffAli *aFf = a->data, *bFf = b->data;
int overlapAdjustment = 0;
int overlap = findOverlap(a, b);
int dq = b->qStart - a->qEnd;
int dt = b->tStart - a->tEnd;

if (overlap > 0)
    {
    int aSize = aFf->hEnd - aFf->hStart;
    int bSize = bFf->hEnd - bFf->hStart;
    if (overlap >= bSize || overlap >= aSize)
	{
	/* Give stiff overlap adjustment for case where
	 * one block completely enclosed in the other on
	 * either sequence. This will make it never happen. */
	overlapAdjustment = a->score + b->score;
	}
    else
        {
	/* More normal case - partial overlap on one or both strands. */
	int crossover = findCrossover(aFf, bFf, overlap, ssIsProt);
	int remain = overlap - crossover;
	overlapAdjustment =
	    bioScoreMatch(ssIsProt, aFf->nEnd - remain, aFf->hEnd - remain, 
	    	remain)
	  + bioScoreMatch(ssIsProt, bFf->nStart, bFf->hStart, 
	  	crossover);
	dq -= overlap;
	dt -= overlap;
	}
    }
return overlapAdjustment + ssGapCost(dq, dt, data);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x8(%rsi), %ebx
movl 0x10(%rsi), %ebp
subl 0x14(%rdi), %ebp
subl 0xc(%rdi), %ebx
cmpl %ebx, %ebp
movl %ebx, %r15d
cmovll %ebp, %r15d
xorl %r14d, %r14d
testl %r15d, %r15d
jns 0x12e7d
movq 0x20(%rsi), %r14
movl %r15d, %r13d
negl %r13d
movl 0x28(%r14), %eax
subl 0x20(%r14), %eax
cmpl %eax, %r13d
jge 0x12e75
movq 0x20(%rdi), %r12
movl 0x28(%r12), %eax
subl 0x20(%r12), %eax
cmpl %eax, %r13d
jge 0x12e75
movl 0xa21aa(%rip), %ecx     # 0xb4fc4
movq %r12, %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0x12eb3
movl %eax, 0x4(%rsp)
subl %eax, %r13d
movl 0xa218f(%rip), %edi     # 0xb4fc4
movslq %r13d, %rcx
movq 0x18(%r12), %rsi
movq 0x28(%r12), %rdx
subq %rcx, %rsi
subq %rcx, %rdx
callq 0x12d95
movl %eax, %r12d
movl 0xa216e(%rip), %edi     # 0xb4fc4
movq 0x10(%r14), %rsi
movq 0x20(%r14), %rdx
movl 0x4(%rsp), %ecx
callq 0x12d95
movl %eax, %r14d
addl %r12d, %r14d
addl %r15d, %ebp
addl %r15d, %ebx
jmp 0x12e7d
movl 0x18(%rsi), %r14d
addl 0x18(%rdi), %r14d
movl %ebp, %edi
movl %ebx, %esi
callq 0x12e98
addl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: findCrossover
static int findCrossover(struct ffAli *left, struct ffAli *right, int overlap, boolean isProt)
/* Find ideal crossover point of overlapping blocks.  That is
 * the point where we should start using the right block rather
 * than the left block.  This point is an offset from the start
 * of the overlapping region (which is the same as the start of the
 * right block). */
{
int bestPos = 0;
char *nStart = right->nStart;
char *lhStart = left->hEnd - overlap;
char *rhStart = right->hStart;
int i;
int (*scoreMatch)(char a, char b);
int score, bestScore;

if (isProt)
    {
    scoreMatch = aaScore2;
    score = bestScore = aaScoreMatch(nStart, rhStart, overlap);
    }
else
    {
    scoreMatch = dnaScore2;
    score = bestScore = dnaScoreMatch(nStart, rhStart, overlap);
    }

for (i=0; i<overlap; ++i)
    {
    char n = nStart[i];
    score += scoreMatch(lhStart[i], n);
    score -= scoreMatch(rhStart[i], n);
    if (score > bestScore)
	{
	bestScore = score;
	bestPos = i+1;
	}
    }
return bestPos;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r15d
movq 0x10(%rsi), %rax
movq 0x20(%rsi), %rsi
movq 0x28(%rdi), %rdx
movq %rdx, 0x10(%rsp)
movl %r15d, %ebx
testl %ecx, %ecx
movq %rax, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rax, %rdi
movl %r15d, %edx
je 0x12efc
callq 0x21344
movl %eax, %ebp
leaq 0xe42d(%rip), %rax      # 0x21327
jmp 0x12f0a
callq 0x21317
movl %eax, %ebp
leaq 0xe3b9(%rip), %rax      # 0x212c3
movq %rax, 0x8(%rsp)
subq %rbx, 0x10(%rsp)
xorl %r14d, %r14d
testl %r15d, %r15d
cmovlel %r14d, %r15d
movl %ebp, %ebx
xorl %eax, %eax
movq 0x8(%rsp), %r12
cmpq %r14, %r15
je 0x12f70
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rax
movsbl (%rax,%r14), %r13d
movq 0x10(%rsp), %rax
movsbl (%rax,%r14), %edi
movl %r13d, %esi
callq *%r12
addl %eax, %ebp
movq 0x18(%rsp), %rax
movsbl (%rax,%r14), %edi
movl %r13d, %esi
callq *%r12
subl %eax, %ebp
movl 0x4(%rsp), %eax
incq %r14
cmpl %ebx, %ebp
cmovgl %ebp, %ebx
cmovgl %r14d, %eax
jmp 0x12f27
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/trans3.c
// Function: trans3New
struct trans3 *trans3New(struct dnaSeq *seq)
/* Create a new set of translated sequences. */
{
struct trans3 *t3;
int frame;
int lastPos = seq->size - 1;

AllocVar(t3);
t3->name = seq->name;
t3->seq = seq;
t3->end = seq->size;
for (frame=0; frame<3; ++frame)
    {
    /* Position and frame are the same except in the
     * very rare case where we are trying to translate 
     * something less than 3 bases.  In this case this
     * somewhat cryptic construction will force it to
     * return empty sequences for the missing frames
     * avoiding an assert in translateSeq. */
    int pos = frame;
    if (pos > lastPos) pos = lastPos;
    t3->trans[frame] = translateSeq(seq, pos, FALSE);
    }
return t3;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq 0x18(%rdi), %r15
leal -0x1(%r15), %ebp
pushq $0x40
popq %rdi
callq 0x28bb0
movq %rax, %r14
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
movq %rbx, 0x10(%r14)
movl 0x18(%rbx), %eax
movl %eax, 0x34(%r14)
xorl %r12d, %r12d
cmpq $0x3, %r12
je 0x12fd7
cmpq %r15, %r12
movl %ebp, %esi
cmovll %r12d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2095a
movq %rax, 0x18(%r14,%r12,8)
incq %r12
jmp 0x12fb4
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/trans3.c
// Function: trans3Free
void trans3Free(struct trans3 **pT3)
/* Free a trans3 structure. */
{
struct trans3 *t3 = *pT3;
if (t3 != NULL)
    {
    freeDnaSeq(&t3->trans[0]);
    freeDnaSeq(&t3->trans[1]);
    freeDnaSeq(&t3->trans[2]);
    freez(pT3);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x1301f
movq %rdi, %rbx
leaq 0x18(%r14), %rdi
callq 0x20737
leaq 0x20(%r14), %rdi
callq 0x20737
addq $0x28, %r14
movq %r14, %rdi
callq 0x20737
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x28c3d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/trans3.c
// Function: trans3FreeList
void trans3FreeList(struct trans3 **pList)
/* Free a list of dynamically allocated trans3's */
{
struct trans3 *el, *next;

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r15
leaq 0x8(%rsp), %r14
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x13052
movq (%r15), %r15
movq %r14, %rdi
callq 0x12fe3
jmp 0x1303b
andq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/trans3.c
// Function: trans3Find
struct trans3 *trans3Find(struct hash *t3Hash, char *name, int start, int end)
/* Find trans3 in hash which corresponds to sequence of given name and includes
 * bases between start and end. */
{
struct trans3 *t3;
for (t3 = hashFindVal(t3Hash, name); t3 != NULL; t3 = t3->next)
    {
    if (t3->start <= start && t3->end >= end)
        return t3;
    }
internalErr();
return NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
callq 0x244c6
movq %rax, %rbx
testq %rbx, %rbx
je 0x13086
cmpl %r14d, 0x30(%rbx)
jg 0x13081
cmpl %ebp, 0x34(%rbx)
jge 0x1309e
movq (%rbx), %rbx
jmp 0x13071
leaq 0x69b0e(%rip), %rdi     # 0x7cb9b
leaq 0x6a47d(%rip), %rsi     # 0x7d511
pushq $0x47
popq %rdx
xorl %eax, %eax
callq 0x223fb
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/trans3.c
// Function: trans3Offset
void trans3Offset(struct trans3 *t3List, AA *aa, int *retOffset, int *retFrame)
/* Figure out offset of peptide in context of larger sequences. */
{
struct trans3 *t3;
int frame;
aaSeq *seq;

for (t3 = t3List; t3 != NULL; t3 = t3->next)
    {
    for (frame = 0; frame < 3; ++frame)
        {
	seq = t3->trans[frame];
	if (seq->dna <= aa && aa < seq->dna + seq->size)
	    {
	    *retOffset = aa - seq->dna + t3->start/3;
	    *retFrame = frame;
	    return;
	    }
	}
    }
internalErr();
}

// Assembly:
movq %rdx, %r8
testq %rdi, %rdi
je 0x130ef
xorl %r9d, %r9d
cmpq $0x3, %r9
je 0x130d6
movq 0x18(%rdi,%r9,8), %rdx
movq 0x10(%rdx), %rax
cmpq %rsi, %rax
ja 0x130d1
movslq 0x18(%rdx), %rdx
addq %rax, %rdx
cmpq %rsi, %rdx
ja 0x130db
incq %r9
jmp 0x130b1
movq (%rdi), %rdi
jmp 0x130a9
subl %eax, %esi
movl 0x30(%rdi), %eax
pushq $0x3
popq %rdi
cltd
idivl %edi
addl %esi, %eax
movl %eax, (%r8)
movl %r9d, (%rcx)
retq
leaq 0x69aa5(%rip), %rdi     # 0x7cb9b
leaq 0x6a414(%rip), %rsi     # 0x7d511
pushq $0x5f
popq %rdx
xorl %eax, %eax
jmp 0x223fb
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/trans3.c
// Function: trans3GenoPos
int trans3GenoPos(char *pt, bioSeq *seq, struct trans3 *t3List, boolean isEnd)
/* Convert from position in one of three translated frames in
 * t3List to genomic offset. If t3List is NULL then just use seq
 * instead. */
{
int offset, frame;
if (t3List != NULL)
    {
    /* Special processing at end. The end coordinate is
     * not included.  In most cases this makes things
     * easier.  Here we have to move it back one
     * amino acid, so that in the edge case it will
     * be included in the block that's loaded.  Then
     * we move it back. */
    if (isEnd)
        pt -= 1;
    trans3Offset(t3List, pt, &offset, &frame);
    if (isEnd)
        offset += 1;
    return 3*offset + frame;
    }
else
   {
   return pt - seq->dna;
   }
}

// Assembly:
movq %rdi, %rax
testq %rdx, %rdx
je 0x13153
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
xorl %r15d, %r15d
testl %ecx, %ecx
setne %r15b
subq %r15, %rax
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %r14
movq %rdx, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x130a6
addl (%rbx), %r15d
leal (%r15,%r15,2), %eax
addl (%r14), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
subl 0x10(%rsi), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffAliHelp.c
// Function: ffAliSort
void ffAliSort(struct ffAli **pList, int (*compare )(const void *elem1,  const void *elem2))
/* Sort a doubly linked list of ffAlis. */
{
/* Get head of list and handle easy special empty case. */
struct ffAli *r = *pList;
if (r == NULL) return;

/* Since first pointer is "left", in order to reuse slSort, have
 * to jump through some minor hoops. First go to right end of list,
 * then sort it. */
while (r->right) r = r->right;
slSort(&r, compare);

/* We're sorted, but our right links are all broken.  Fix this. */
slReverse(&r);
r = ffMakeRightLinks(r);
*pList = r;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x131ea
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rax, %rcx
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x131b6
movq %rsp, %r14
movq %rcx, (%r14)
movq %r14, %rdi
callq 0x1c5ab
movq %r14, %rdi
callq 0x1c567
movq (%r14), %rdi
callq 0x236b0
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffAliHelp.c
// Function: ffExpandExactRight
void ffExpandExactRight(struct ffAli *ali, DNA *needleEnd, DNA *hayEnd)
/* Expand aligned segment to right as far as can exactly. */
{
DNA *nEnd = ali->nEnd;
DNA *hEnd = ali->hEnd;
while (nEnd < needleEnd && hEnd < hayEnd)
    {
    if (*nEnd != *hEnd)
        break;
    nEnd += 1;
    hEnd += 1;
    }
ali->nEnd = nEnd;
ali->hEnd = hEnd;
return;
}

// Assembly:
movq 0x18(%rdi), %rax
movq 0x28(%rdi), %rcx
cmpq %rsi, %rax
jae 0x13239
cmpq %rdx, %rcx
jae 0x13239
movb (%rax), %r8b
cmpb (%rcx), %r8b
jne 0x13239
incq %rax
incq %rcx
jmp 0x1321f
movq %rax, 0x18(%rdi)
movq %rcx, 0x28(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffAliHelp.c
// Function: ffExpandExactLeft
void ffExpandExactLeft(struct ffAli *ali, DNA *needleStart, DNA *hayStart)
/* Expand aligned segment to left as far as can exactly. */
{
DNA *nStart = ali->nStart-1;
DNA *hStart = ali->hStart-1;
while (nStart >= needleStart && hStart >= hayStart)
    {
    if (*nStart != *hStart)
        break;
    nStart -= 1;
    hStart -= 1;
    }
ali->nStart = nStart + 1;
ali->hStart = hStart + 1;
return;
}

// Assembly:
movq 0x10(%rdi), %r8
movq 0x20(%rdi), %r9
decq %r8
decq %r9
movq %r8, %rcx
movq %r9, %rax
cmpq %rsi, %r8
jb 0x13270
cmpq %rdx, %rax
jb 0x13270
movb (%rcx), %r10b
leaq -0x1(%rcx), %r8
leaq -0x1(%rax), %r9
cmpb (%rax), %r10b
je 0x13250
incq %rcx
movq %rcx, 0x10(%rdi)
incq %rax
movq %rax, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffAliHelp.c
// Function: ffMergeClose
struct ffAli *ffMergeClose(struct ffAli *aliList, 
	DNA *needleStart, DNA *hayStart)
/* Remove overlapping areas needle in alignment. Assumes ali is sorted on
 * ascending nStart field. Also merge perfectly abutting neighbors or
 * ones that could be merged at the expense of just a few mismatches.*/
{
struct ffAli *mid, *ali;
int closeEnough = -3;

if (aliList == NULL)
    return NULL;
for (mid = aliList->right; mid != NULL; mid = mid->right)
    {
    for (ali = aliList; ali != mid; ali = ali->right)
	{
	char *nStart, *nEnd;
	int nOverlap;
	nStart = max(ali->nStart, mid->nStart);
	nEnd = min(ali->nEnd, mid->nStart);
	nOverlap = nEnd - nStart;
	/* Overlap or perfectly abut in needle, and needle/hay
	 * offset the same. */
	if (nOverlap >= closeEnough)
	    {
	    int aliDiag = (ali->nStart - needleStart) - (ali->hStart - hayStart);
	    int midDiag = (mid->nStart - needleStart) - (mid->hStart - hayStart);
	    if (aliDiag == midDiag)
		{
		/* Make mid encompass both, and make ali empty. */
		mid->nStart = min(ali->nStart, mid->nStart);
		mid->nEnd = max(ali->nEnd, mid->nEnd);
		mid->hStart = min(ali->hStart, mid->hStart);
		mid->hEnd = max(ali->hEnd, mid->hEnd);
		ali->hStart = ali->hEnd = mid->hStart;
		ali->nEnd = ali->nStart = mid->nStart;;
		}
	    }
	}
    }
aliList = ffRemoveEmptyAlis(aliList, TRUE);
return aliList;
}

// Assembly:
testq %rdi, %rdi
je 0x1334f
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x1333f
movq %rdi, %rcx
cmpq %rax, %rcx
je 0x13291
movq 0x10(%rcx), %r9
movq 0x10(%rax), %r8
cmpq %r8, %r9
movl %r8d, %r11d
cmoval %r9d, %r11d
movq 0x18(%rcx), %r10
cmpq %r8, %r10
movl %r10d, %ebx
cmovael %r8d, %ebx
subl %r11d, %ebx
cmpl $-0x3, %ebx
jl 0x13336
movq 0x20(%rcx), %r11
leal (%rdx,%r9), %ebp
subl %esi, %ebp
subl %r11d, %ebp
movq 0x20(%rax), %rbx
leal (%r8,%rdx), %r14d
subl %ebx, %r14d
subl %esi, %r14d
cmpl %r14d, %ebp
jne 0x13336
cmpq %r8, %r9
cmovbq %r9, %r8
movq %r8, 0x10(%rax)
movq 0x18(%rax), %r9
cmpq %r9, %r10
cmovaq %r10, %r9
movq 0x28(%rax), %r10
cmpq %rbx, %r11
cmovbq %r11, %rbx
movq %r9, 0x18(%rax)
movq %rbx, 0x20(%rax)
movq 0x28(%rcx), %r9
cmpq %r10, %r9
cmovaq %r9, %r10
movq %r10, 0x28(%rax)
movq %rbx, 0x28(%rcx)
movq %rbx, 0x20(%rcx)
movq %r8, 0x10(%rcx)
movq %r8, 0x18(%rcx)
movq 0x8(%rcx), %rcx
jmp 0x132a1
movl $0x1, %esi
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x13352
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffAliHelp.c
// Function: ffRemoveEmptyAlis
struct ffAli *ffRemoveEmptyAlis(struct ffAli *ali, boolean doFree)
/* Remove empty blocks from list. Optionally free empties too. */
{
struct ffAli *leftAli;
struct ffAli *startAli;
struct ffAli *rightAli;

if (ali == NULL)
    return NULL;

/* Figure out left most non-empty ali. */
while (ali->left)
    ali = ali->left;
while (ali)
    {
    /* If current ali is empty, chuck it out. */
    if (ali->nEnd <= ali->nStart || ali->hEnd <= ali->hStart)
	{
	struct ffAli *empty = ali;
        ali = ali->right;
	if (doFree) freeMem(empty);
	}
    else
        break;
    }

if (ali == NULL)
    return NULL;

ali->left = NULL;

/* Get rid of empty middle alis. */
startAli = leftAli = ali;
ali = ali->right;
while (ali)
    {
    rightAli = ali->right;
    if (ali->nEnd <= ali->nStart || ali->hEnd <= ali->hStart)
        {
        leftAli->right = rightAli;
        if (rightAli != NULL)
            rightAli->left = leftAli;
	if (doFree) freeMem(ali);
        }
    else
        {
        leftAli = ali;
        }
    ali = rightAli;
    }
return startAli;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1339a
movl %esi, %ebx
movq %rdi, %r15
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x13361
jmp 0x13395
movq %r15, %r14
movq 0x18(%r15), %rax
cmpq 0x10(%r15), %rax
jbe 0x13385
movq 0x28(%r14), %rax
cmpq 0x20(%r14), %rax
ja 0x133ac
movq 0x8(%r14), %r15
testl %ebx, %ebx
je 0x13395
movq %r14, %rdi
callq 0x28c2d
testq %r15, %r15
jne 0x1336e
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
andq $0x0, (%r14)
movq 0x8(%r14), %r12
movq %r14, %r15
testq %r12, %r12
je 0x1339d
movq %r12, %rdi
movq 0x8(%r12), %r12
movq 0x18(%rdi), %rax
cmpq 0x10(%rdi), %rax
jbe 0x133d8
movq 0x28(%rdi), %rax
cmpq 0x20(%rdi), %rax
ja 0x133f0
movq %r12, 0x8(%r15)
testq %r12, %r12
je 0x133e5
movq %r15, (%r12)
testl %ebx, %ebx
je 0x133b7
callq 0x28c2d
jmp 0x133b7
movq %rdi, %r15
jmp 0x133b7
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffAliHelp.c
// Function: ffScoreIntron
int ffScoreIntron(DNA a, DNA b, DNA y, DNA z, int orientation)
/* Return a better score the closer an intron is to
 * consensus. */
{
int score = 0;
int revScore = 0;

if (orientation >= 0)
    {
    if (a == 'g' || a == 'G') ++score;
    if (b == 't' || b == 'T') ++score;
    if (y == 'a' || y == 'A') ++score;
    if (z == 'g' || z == 'G') ++score;
    }

if (orientation <= 0)
    {
    if (a == 'c' || a == 'C') ++revScore;
    if (b == 't' || b == 'T') ++revScore;
    if (y == 'a' || y == 'A') ++revScore;
    if (z == 'c' || z == 'C') ++revScore;
    }

return score > revScore ? score : revScore;
}

// Assembly:
andb $-0x21, %dil
testl %r8d, %r8d
js 0x1343e
xorl %eax, %eax
cmpb $0x47, %dil
sete %al
andb $-0x21, %sil
leal 0x1(%rax), %r10d
cmpb $0x54, %sil
cmovnel %eax, %r10d
andb $-0x21, %dl
xorl %eax, %eax
cmpb $0x41, %dl
sete %al
andb $-0x21, %cl
xorl %r9d, %r9d
cmpb $0x47, %cl
sete %r9b
addl %eax, %r9d
addl %r10d, %r9d
xorl %eax, %eax
testl %r8d, %r8d
jne 0x13473
jmp 0x1344b
andb $-0x21, %sil
andb $-0x21, %dl
andb $-0x21, %cl
xorl %r9d, %r9d
xorl %eax, %eax
cmpb $0x43, %dil
sete %al
leal 0x1(%rax), %edi
cmpb $0x54, %sil
cmovnel %eax, %edi
xorl %esi, %esi
cmpb $0x41, %dl
sete %sil
xorl %eax, %eax
cmpb $0x43, %cl
sete %al
addl %esi, %eax
addl %edi, %eax
cmpl %eax, %r9d
cmoval %r9d, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffAliHelp.c
// Function: ffSlideOrientedIntrons
boolean ffSlideOrientedIntrons(struct ffAli *ali, int orient)
/* Slide introns (or spaces between aligned blocks)
 * to match consensus on given strand. */
{
struct ffAli *left = ali, *right;
boolean slid = FALSE;
if (left == NULL)
    return FALSE;
while((right = left->right) != NULL)
    {
    if (slideIntron(left, right, orient))
        slid = TRUE;
    left = right;
    }
return slid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, 0x8(%rsp)
testq %rdi, %rdi
je 0x1361a
movq $0x0, 0x10(%rsp)
movq %rdi, %rcx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x13613
movq 0x28(%rcx), %rsi
movq 0x20(%rdi), %rdx
movq %rdx, %rax
subq %rsi, %rax
cmpq $0x4, %rax
jl 0x1349f
movq 0x10(%rdi), %r8
movq 0x18(%rcx), %r9
movq %r8, %rax
subq %r9, %rax
cmpq $0x2, %rax
jg 0x1349f
movq %rcx, 0x30(%rsp)
movq 0x10(%rcx), %rax
movq %rdi, 0x38(%rsp)
movq 0x18(%rdi), %rcx
movq %rcx, 0x48(%rsp)
movq %rdx, 0x28(%rsp)
movq %rdx, %rcx
movq %r8, 0x18(%rsp)
movq %r8, %rdx
movq %rsi, 0x20(%rsp)
movq %r9, 0x40(%rsp)
movq %r9, %rdi
movq %rdi, %r13
movq %rsi, %rbp
movq %rdx, %rbx
movq %rcx, %r12
cmpq %rax, %rdi
jbe 0x13543
leaq -0x1(%r13), %rdi
leaq -0x1(%rbp), %rsi
leaq -0x1(%rbx), %rdx
movb -0x1(%rbx), %r8b
leaq -0x1(%r12), %rcx
cmpb $0x6e, -0x1(%r13)
jne 0x1353e
cmpb $0x6e, %r8b
je 0x1350b
cmpb (%rcx), %r8b
je 0x1350b
movl $0x80000001, %edx       # imm = 0x80000001
xorl %r14d, %r14d
xorl %r15d, %r15d
leaq (%rbx,%r14), %rax
cmpq 0x48(%rsp), %rax
jae 0x135b4
leaq (%r14,%r13), %rax
movq %rax, 0x50(%rsp)
movb (%rbp,%r14), %al
movsbl 0x1(%rbp,%r14), %esi
movl %edx, 0xc(%rsp)
movsbl -0x2(%r12,%r14), %edx
movsbl -0x1(%r12,%r14), %ecx
movb %al, 0x7(%rsp)
movsbl %al, %edi
movl 0x8(%rsp), %r8d
callq 0x133f5
movl 0xc(%rsp), %edx
cmpl %edx, %eax
movq 0x50(%rsp), %rcx
cmovgq %rcx, %r15
movb (%rcx), %cl
cmpb $0x6e, %cl
je 0x135aa
cmpb 0x7(%rsp), %cl
jne 0x135b4
cmpl %edx, %eax
cmovgl %eax, %edx
incq %r14
jmp 0x1354e
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %r8
testq %r15, %r15
movq 0x40(%rsp), %r9
je 0x1349f
subq %r9, %r15
testl %r15d, %r15d
je 0x1349f
movslq %r15d, %rax
addq %rax, %r9
movq %r9, 0x18(%rcx)
addq %rax, %rsi
movq %rsi, 0x28(%rcx)
addq %rax, %r8
movq %r8, 0x10(%rdi)
addq %rax, %rdx
movq %rdx, 0x20(%rdi)
pushq $0x1
popq %rax
movq %rax, 0x10(%rsp)
jmp 0x1349f
movq 0x10(%rsp), %rax
jmp 0x1361c
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffAliHelp.c
// Function: ffMergeNeedleAlis
struct ffAli *ffMergeNeedleAlis(struct ffAli *ali, boolean doFree)
/* Remove overlapping areas needle in alignment. Assumes ali is sorted on
 * ascending nStart field. Also merge perfectly abutting neighbors.*/
{
struct ffAli *a = NULL;
struct ffAli *leftA = NULL;
struct ffAli *rightA;

if (ali == NULL)
    return NULL;
rightA = ali;
for (;;)
    {
    /* Advance to next ali */
    leftA = a;
    a = rightA;
    if (a == NULL)
        break;
    rightA = a->right;
    

    /* See if can merge current alignment into left one. */
    if (leftA != NULL)
        {
        int overlap = leftA->nEnd - a->nStart;

        /* Deal with overlaps in needle */
        if (overlap > 0)
            {
            /* See if left encompasses current segment. */
            if (leftA->nStart <= a->nStart && leftA->nEnd >= a->nEnd)
                {
                /* Eliminate current segment. */
                leftA->right = rightA;
                if (rightA != NULL)
                    rightA->left = leftA;
		if (doFree) freeMem(a);
                a = leftA;
                }
            else
                {
                /* Remove overlapping area from current segment, leave
                 * it in left segment. */
                a->hStart += overlap;
                a->nStart += overlap;
                }
            }
        else if (overlap == 0 && leftA->hEnd == a->hStart)
            {
            /* Remove current segment from list. */
            leftA->right = rightA;
            if (rightA != NULL)
                rightA->left = leftA;
            /* Fold data from current segment into left segment */
            leftA->nEnd = a->nEnd;
            leftA->hEnd = a->hEnd;
	    if (doFree) freeMem(a); 
	    a = leftA;
            }
        }
    }
return ali;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x13753
movl %esi, %ebp
xorl %eax, %eax
movq %rbx, %r14
testq %r14, %r14
je 0x13753
movq %r14, %rdi
movq %rax, %r15
movq 0x8(%r14), %r14
movq %rdi, %rax
testq %r15, %r15
je 0x136b0
movq 0x18(%r15), %rdx
movq 0x10(%rdi), %rax
movq %rdx, %rcx
subq %rax, %rcx
testl %ecx, %ecx
jle 0x136ff
cmpq %rax, 0x10(%r15)
ja 0x136e9
cmpq 0x18(%rdi), %rdx
jae 0x1372f
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq %rcx, 0x20(%rdi)
addq %rcx, %rax
movq %rax, 0x10(%rdi)
movq %rdi, %rax
jmp 0x136b0
movq %rdi, %rax
jne 0x136b0
movq 0x28(%r15), %rcx
movq %rdi, %rax
cmpq 0x20(%rdi), %rcx
jne 0x136b0
movq %r14, 0x8(%r15)
testq %r14, %r14
je 0x1371d
movq %r15, (%r14)
movq 0x18(%rdi), %rax
movq %rax, 0x18(%r15)
movq 0x28(%rdi), %rax
movq %rax, 0x28(%r15)
jmp 0x1373b
movq %r14, 0x8(%r15)
testq %r14, %r14
je 0x1373b
movq %r15, (%r14)
movq %r15, %rax
testl %ebp, %ebp
je 0x136b0
callq 0x28c2d
movq %r15, %rax
jmp 0x136b0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: fillInExact
static struct ffAli *fillInExact(char *nStart, char *nEnd, char *hStart, char *hEnd, 
	boolean isRc, boolean scanLeft, boolean scanRight, int resolveLimit)
/* Try and add exact match to the region, adding splice sites to
 * the area to search for small query sequences. scanRight and scanLeft
 * specify which way to scan and which side of the splice site to
 * include.  One or the other or neither should be set. */
{
struct ffAli *ff = NULL;
char *hPos = NULL;
int nGap = nEnd - nStart;
int hGap = hEnd - hStart;
int minGap = min(nGap, hGap);

if (minGap <= 2)
    return NULL;
if (scanLeft)
    {
    if ((hPos = scanExactLeft(nStart, nGap, hGap, hEnd, resolveLimit)) != NULL)
	{
	AllocVar(ff);
	ff->nStart = nStart;
	ff->nEnd = nEnd;
	ff->hStart = hPos;
	ff->hEnd = hPos + nGap;
	return ff;
	}
    }
else
    {
    if ((hPos = scanExactRight(nStart, nGap, hGap, hStart, resolveLimit)) != NULL)
	{
	AllocVar(ff);
	ff->nStart = nStart;
	ff->nEnd = nEnd;
	ff->hStart = hPos;
	ff->hEnd = hPos + nGap;
	return ff;
	}
    }
return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rax
movq %rdx, %r13
movq %rsi, %rbx
subq %rdi, %rbx
movl %eax, %edx
subl %r13d, %edx
cmpl %edx, %ebx
movl %edx, %ecx
cmovll %ebx, %ecx
cmpl $0x3, %ecx
jge 0x13b5a
xorl %ecx, %ecx
movq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, 0x10(%rsp)
movabsq $-0x100000000, %r15     # imm = 0xFFFFFFFF00000000
leaq 0x1(%rdi), %r12
movq %rdi, 0x8(%rsp)
movb (%rdi), %r14b
testl %r8d, %r8d
je 0x13b8a
cmpl $0xe, %ebx
jl 0x13b9a
leaq 0xa0fea(%rip), %rcx     # 0xb4b70
movl (%rcx), %esi
jmp 0x13bb3
cmpl $0xe, %ebx
jl 0x13bf9
leaq 0xa0fda(%rip), %rax     # 0xb4b70
movl (%rax), %eax
jmp 0x13c12
leal (%rbx,%rbx), %ecx
subl %r9d, %ecx
pushq $0x1
popq %rsi
shll %cl, %esi
leaq 0xa0fc4(%rip), %rcx     # 0xb4b70
movl (%rcx), %ecx
cmpl %ecx, %esi
cmovgel %ecx, %esi
cmpl %edx, %esi
cmovll %esi, %edx
movslq %edx, %rcx
movq %rax, %rbp
subq %rcx, %rbp
shlq $0x20, %rbx
addq %rbx, %r15
sarq $0x20, %r15
subq %r15, %rax
movq %rax, %r13
cmpq %rbp, %r13
jb 0x13b46
cmpb (%r13), %r14b
jne 0x13bf4
leaq 0x1(%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x6710
testl %eax, %eax
je 0x13c52
decq %r13
jmp 0x13bd2
leal (%rbx,%rbx), %ecx
subl %r9d, %ecx
pushq $0x1
popq %rax
shll %cl, %eax
leaq 0xa0f65(%rip), %rcx     # 0xb4b70
movl (%rcx), %ecx
cmpl %ecx, %eax
cmovgel %ecx, %eax
cmpl %edx, %eax
cmovll %eax, %edx
movslq %edx, %rbp
addq %r13, %rbp
shlq $0x20, %rbx
addq %rbx, %r15
sarq $0x20, %r15
subq %r15, %rbp
cmpq %rbp, %r13
ja 0x13b46
cmpb (%r13), %r14b
jne 0x13c4d
leaq 0x1(%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x6710
testl %eax, %eax
je 0x13c52
incq %r13
jmp 0x13c2b
pushq $0x38
popq %rdi
callq 0x28bb0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rcx)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rcx)
movq %r13, 0x20(%rcx)
sarq $0x20, %rbx
addq %r13, %rbx
movq %rbx, 0x28(%rcx)
jmp 0x13b48
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: aPenalty
int aPenalty(char *s, int size)
/* Penalty for polyA/polyT */
{
int aCount = 0, tCount = 0;
int i;
char c;
for (i=0; i<size; ++i)
    {
    c = s[i];
    if (c == 'a') ++aCount;
    if (c == 't') ++tCount;
    }
if (tCount > aCount) aCount = tCount;
if (aCount >= size)
    return aCount-1;
else if (aCount >= size*0.75)
    return aCount * 0.90;
else
    return 0;
}

// Assembly:
xorl %ecx, %ecx
testl %esi, %esi
movl $0x0, %edx
cmovgl %esi, %edx
xorl %eax, %eax
xorl %r8d, %r8d
cmpq %rcx, %rdx
je 0x13cbe
movb (%rdi,%rcx), %r9b
xorl %r10d, %r10d
cmpb $0x61, %r9b
sete %r10b
addl %r10d, %eax
xorl %r10d, %r10d
cmpb $0x74, %r9b
sete %r10b
addl %r10d, %r8d
incq %rcx
jmp 0x13c94
cmpl %eax, %r8d
cmovgl %r8d, %eax
cmpl %esi, %eax
jge 0x13cee
cvtsi2sd %eax, %xmm0
cvtsi2sd %esi, %xmm1
mulsd 0x6984f(%rip), %xmm1    # 0x7d528
xorl %eax, %eax
ucomisd %xmm1, %xmm0
jb 0x13cf0
mulsd 0x69847(%rip), %xmm0    # 0x7d530
cvttsd2si %xmm0, %eax
retq
decl %eax
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: bandExtBefore
static void bandExtBefore(struct axtScoreScheme *ss, struct ffAli *ff,
	int qGap, int tGap, struct ffAli **pExtraList)
/* Add in blocks from a banded extension before ff into the gap
 * and append results if any to *pExtraList. */
{
struct ffAli *ext;
int minGap = min(qGap, tGap);
int maxGap = minGap * 2;
if (minGap > 0)
    {
    if (qGap > maxGap) qGap = maxGap;
    if (tGap > maxGap) tGap = maxGap;
    ext = bandExtFf(NULL, ss, 3, ff, ff->nStart - qGap, ff->nStart, 
	    ff->hStart - tGap, ff->hStart, -1, maxGap);
    ffCat(pExtraList, &ext);
    }
}

// Assembly:
movq %rsi, %rax
movq %rdi, %rsi
cmpl %ecx, %edx
movl %ecx, %edi
cmovll %edx, %edi
testl %edi, %edi
jle 0x15157
pushq %rbx
subq $0x30, %rsp
movq %r8, %rbx
addl %edi, %edi
cmpl %edx, %edi
cmovll %edi, %edx
cmpl %ecx, %edi
cmovll %edi, %ecx
movslq %edx, %rdx
movq 0x10(%rax), %r9
movq 0x20(%rax), %r10
movq %r9, %r8
subq %rdx, %r8
movslq %ecx, %rcx
movl %edi, 0x18(%rsp)
movq %r10, 0x8(%rsp)
subq %rcx, %r10
orl $-0x1, 0x10(%rsp)
movq %r10, (%rsp)
pushq $0x3
popq %rdx
xorl %edi, %edi
movq %rax, %rcx
callq 0x16510
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x1317c
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: bandExtAfter
static void bandExtAfter(struct axtScoreScheme *ss, struct ffAli *ff,
	int qGap, int tGap, struct ffAli **pExtraList)
/* Add in blocks from a banded extension after ff into the gap
 * and append results if any to *pExtraList. */
{
struct ffAli *ext;
int minGap = min(qGap, tGap);
int maxGap = minGap * 2;
if (minGap > 0)
    {
    if (qGap > maxGap) qGap = maxGap;
    if (tGap > maxGap) tGap = maxGap;
    ext = bandExtFf(NULL, ss, 3, ff, ff->nEnd, ff->nEnd + qGap,
	    ff->hEnd, ff->hEnd + tGap, 1, maxGap);
    ffCat(pExtraList, &ext);
    }
}

// Assembly:
cmpl %ecx, %edx
movl %ecx, %r10d
cmovll %edx, %r10d
testl %r10d, %r10d
jle 0x151c6
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rsi, %rax
movq %rdi, %rsi
addl %r10d, %r10d
cmpl %edx, %r10d
cmovll %r10d, %edx
cmpl %ecx, %r10d
cmovll %r10d, %ecx
movslq %edx, %r9
movq 0x18(%rax), %r8
movq 0x28(%rax), %r11
addq %r8, %r9
movslq %ecx, %r14
addq %r11, %r14
pushq $0x3
popq %rdx
xorl %edi, %edi
movq %rax, %rcx
pushq %r10
pushq $0x1
pushq %r14
pushq %r11
callq 0x16510
addq $0x20, %rsp
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x1317c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: ffHashFuncN
static int ffHashFuncN(char *s, int seedSize)
/* Return hash function for a 4k hash on sequence. */
{
int acc = 0;
int i;
for (i=0; i<seedSize; ++i)
    {
    acc <<= 1;
    acc += ntVal[(int)s[i]];
    }
return acc&0xfff;
}

// Assembly:
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
leaq 0xa02ab(%rip), %rdx     # 0xb5480
xorl %eax, %eax
cmpq %rcx, %rsi
je 0x151ec
addl %eax, %eax
movsbq (%rdi,%rcx), %r8
addl (%rdx,%r8,4), %eax
incq %rcx
jmp 0x151d7
andl $0xfff, %eax            # imm = 0xFFF
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: extendExactLeft
static void extendExactLeft(int qMax, int tMax, char **pStartQ, char **pStartT)
/* Extend startQ/startT as much to the left as possible. */
{
int last = min(qMax, tMax);
int i;
char *q = *pStartQ - 1, *t = *pStartT - 1;

for (i=0; i<last; ++i)
    {
    if (*q != *t)
	break;
    q -= 1;
    t -= 1;
    }
*pStartQ = q + 1;
*pStartT = t + 1;
}

// Assembly:
pushq %rbx
cmpl %esi, %edi
cmovll %edi, %esi
movq (%rdx), %rdi
movq (%rcx), %rax
xorl %r10d, %r10d
testl %esi, %esi
cmovlel %r10d, %esi
movabsq $-0x1, %r9
movq %r10, %r8
cmpl %r8d, %esi
je 0x1522e
movb (%rdi,%r9), %r11b
leaq 0x1(%r8), %r10
leaq -0x1(%r9), %rbx
cmpb (%rax,%r9), %r11b
movq %rbx, %r9
je 0x15211
subq %r8, %rdi
movq %rdi, (%rdx)
subq %r8, %rax
movq %rax, (%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: extendExactRight
static void extendExactRight(int qMax, int tMax, char **pEndQ, char **pEndT)
/* Extend endQ/endT as much to the right as possible. */
{
int last = min(qMax, tMax);
int i;
char *q = *pEndQ, *t = *pEndT;

for (i=0; i<last; ++i)
    {
    if (*q != *t)
	break;
    q += 1;
    t += 1;
    }
*pEndQ = q;
*pEndT = t;
}

// Assembly:
cmpl %esi, %edi
cmovll %edi, %esi
movq (%rdx), %rdi
movq (%rcx), %r8
xorl %r9d, %r9d
testl %esi, %esi
cmovgl %esi, %r9d
leaq (%rdi,%r9), %rax
leaq (%r8,%r9), %rsi
subl $0x1, %r9d
jb 0x15274
movb (%rdi), %r10b
cmpb (%r8), %r10b
jne 0x1526e
incq %rdi
incq %r8
jmp 0x15258
movq %rdi, %rax
movq %r8, %rsi
movq %rax, (%rdx)
movq %rsi, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: extendGaplessLeft
static void extendGaplessLeft(int qMax, int tMax, int maxDrop, char **pStartQ, char **pStartT)
/* Extend startQ/startT as much to the left as possible allowing mismatches
 * but not gaps. */
{
int score = 0, bestScore = -1, bestPos = 0;
int last = -min(qMax, tMax);
int i;
char *q = *pStartQ, *t = *pStartT;

for (i=-1; i>=last; --i)
    {
    if (q[i] == t[i])
	{
	++score;
	if (score > bestScore)
	    {
	    bestScore = score;
	    bestPos = i;
	    }
	}
    else
	{
	score -= 3;
	if (bestScore - score >= maxDrop)
	    break;
	}
    }
*pStartQ = q+bestPos;
*pStartT = t+bestPos;
}

// Assembly:
pushq %rbx
cmpl %esi, %edi
cmovll %edi, %esi
negl %esi
movq (%rdx), %rdi
movq (%rcx), %rax
movslq %esi, %rsi
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
movabsq $-0x1, %r10
xorl %r11d, %r11d
cmpq %rsi, %r10
jl 0x152d6
movb (%rdi,%r10), %bl
cmpb (%rax,%r10), %bl
jne 0x152c2
cmpl %r9d, %r11d
cmovgel %r10d, %r8d
leal 0x1(%r11), %r11d
cmovgel %r11d, %r9d
jmp 0x152d1
addl $-0x3, %r11d
movl %r9d, %ebx
subl %r11d, %ebx
cmpl $0x8, %ebx
jg 0x152d6
decq %r10
jmp 0x152a2
movslq %r8d, %rsi
addq %rsi, %rdi
movq %rdi, (%rdx)
addq %rsi, %rax
movq %rax, (%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: extendGaplessRight
static void extendGaplessRight(int qMax, int tMax, int maxDrop, char **pEndQ, char **pEndT)
/* Extend endQ/endT as much to the right as possible allowing mismatches
 * but not gaps. */
{
int last = min(qMax, tMax);
int i;
char *q = *pEndQ, *t = *pEndT;
int score = 0, bestScore = -1, bestPos = -1;

for (i=0; i<last; ++i)
    {
    if (q[i] == t[i])
	{
	++score;
	if (score > bestScore)
	    {
	    bestScore = score;
	    bestPos = i;
	    }
	}
    else
	{
	score -= 3;
	if (bestScore - score >= maxDrop)
	    break;
	}
    }
++bestPos;
*pEndQ = q+bestPos;
*pEndT = t+bestPos;
}

// Assembly:
pushq %rbx
cmpl %esi, %edi
cmovll %edi, %esi
movq (%rdx), %rax
xorl %r8d, %r8d
testl %esi, %esi
cmovlel %r8d, %esi
movq (%rcx), %rdi
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %r11d, %r11d
movl %r9d, %r10d
cmpq %r8, %rsi
je 0x1533c
movb (%rax,%r8), %bl
cmpb (%rdi,%r8), %bl
jne 0x15328
cmpl %r9d, %r11d
leal 0x1(%r11), %r11d
cmovgel %r11d, %r9d
cmovgel %r8d, %r10d
jmp 0x15337
addl $-0x3, %r11d
movl %r9d, %ebx
subl %r11d, %ebx
cmpl $0x8, %ebx
jg 0x1533c
incq %r8
jmp 0x15308
movslq %r10d, %rsi
addq %rsi, %rax
incq %rax
movq %rax, (%rdx)
leaq 0x1(%rdi,%rsi), %rax
movq %rax, (%rcx)
popq %rbx
retq