LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: gfRangesToFfItem
struct ssFfItem *gfRangesToFfItem(struct gfRange *rangeList, aaSeq *qSeq)
/* Convert ranges to ssFfItem's. */
{
AA *q = qSeq->dna;
struct ffAli *ffList = NULL, *ff;
struct gfRange *range;
struct ssFfItem *ffi;

for (range = rangeList; range != NULL; range = range->next)
    {
    aaSeq *tSeq = range->tSeq;
    AA *t = tSeq->dna;
    AllocVar(ff);
    ff->nStart = q + range->qStart;
    ff->nEnd = q + range->qEnd;
    ff->hStart = t + range->tStart;
    ff->hEnd = t + range->tEnd;
    ff->left = ffList;
    ffList = ff;
    }
AllocVar(ffi);
ffi->ff = ffMakeRightLinks(ffList);
return ffi;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x10592
movq %rdi, %rbx
movq 0x10(%rsi), %r15
xorl %r12d, %r12d
movq 0x18(%rbx), %rax
movq 0x10(%rax), %r13
movl $0x38, %edi
callq 0x2dff4
movq %rax, %r14
movslq 0x8(%rbx), %rax
addq %r15, %rax
movq %rax, 0x10(%r14)
movslq 0xc(%rbx), %rax
addq %r15, %rax
movq %rax, 0x18(%r14)
movslq 0x20(%rbx), %rax
addq %r13, %rax
movq %rax, 0x20(%r14)
movslq 0x24(%rbx), %rax
addq %r13, %rax
movq %rax, 0x28(%r14)
movq %r12, (%r14)
movq (%rbx), %rbx
movq %r14, %r12
testq %rbx, %rbx
jne 0x10541
jmp 0x10595
xorl %r14d, %r14d
movl $0x10, %edi
callq 0x2dff4
movq %rax, %rbx
movq %r14, %rdi
callq 0x28293
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: rangeScore
int rangeScore(struct gfRange *range, struct dnaSeq *qSeq)
/* Return score associated with range. */
{
struct gfRange *comp;
struct dnaSeq *tSeq;
int score = 0;
for (comp = range->components; comp != NULL; comp = comp->next)
    {
    tSeq = comp->tSeq;
    score += dnaScoreMatch(tSeq->dna + range->tStart, qSeq->dna + range->qStart, 
        range->tEnd - range->tStart);
    if (comp->next != NULL)
        score -= 4;
    }
return score;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x28(%rdi), %r15
testq %r15, %r15
je 0x1077d
movq %rsi, %rbx
movq %rdi, %r14
xorl %ecx, %ecx
movq 0x18(%r15), %rax
movslq 0x20(%r14), %rdi
movl 0x24(%r14), %edx
subl %edi, %edx
addq 0x10(%rax), %rdi
movl %ecx, %r12d
movslq 0x8(%r14), %rsi
addq 0x10(%rbx), %rsi
callq 0x25b71
movq (%r15), %r15
leal (%rax,%r12), %ecx
addl $-0x4, %ecx
testq %r15, %r15
jne 0x10747
addl %r12d, %eax
jmp 0x1077f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: rangeCoorTimes3
void rangeCoorTimes3(struct gfRange *rangeList)
/* Multiply coordinates on range list times three (to go from
 * amino acid to nucleotide. */
{
struct gfRange *range;
for (range = rangeList; range != NULL; range = range->next)
    {
    range->qStart *= 3;
    range->qEnd *= 3;
    range->tStart = range->tStart*3;
    range->tEnd = range->tEnd*3;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x10df0
movl 0x8(%rdi), %eax
leal (%rax,%rax,2), %eax
movl %eax, 0x8(%rdi)
movl 0xc(%rdi), %eax
leal (%rax,%rax,2), %eax
movl %eax, 0xc(%rdi)
movl 0x20(%rdi), %eax
leal (%rax,%rax,2), %eax
movl %eax, 0x20(%rdi)
movl 0x24(%rdi), %eax
leal (%rax,%rax,2), %eax
movl %eax, 0x24(%rdi)
movq (%rdi), %rdi
jmp 0x10dc2
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: seqClumpToRangeList
static struct gfRange *seqClumpToRangeList(struct gfClump *clumpList, int frame)
/* Convert from clump list to range list. */
{
struct gfRange *rangeList = NULL, *range;
struct gfClump *clump;
char *name;
int tOff;

for (clump = clumpList; clump != NULL; clump = clump->next)
    {
    tOff = clump->target->start;
    AllocVar(range);
    range->qStart = clump->qStart;
    range->qEnd = clump->qEnd;
    name = clumpTargetName(clump);
    range->tName = cloneString(name);
    range->tStart = clump->tStart - tOff;
    range->tEnd = clump->tEnd - tOff;
    range->tSeq = clump->target->seq;
    range->frame = frame;
    slAddHead(&rangeList, range);
    }
slReverse(&rangeList);
return rangeList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq $0x0, (%rsp)
testq %rdi, %rdi
je 0x11569
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movl 0x18(%rax), %r12d
movl $0x48, %edi
callq 0x2dff4
movq %rax, %r13
movq 0x8(%r14), %rax
movq %rax, 0x8(%r13)
movq 0x10(%r14), %rax
movq 0x10(%rax), %rcx
testq %rcx, %rcx
cmoveq %rax, %rcx
movq 0x8(%rcx), %rbp
testq %rbp, %rbp
jne 0x1151c
leaq 0x7c702(%rip), %rdi     # 0x8dc0b
leaq 0x7c8e8(%rip), %rsi     # 0x8ddf8
movl $0x251, %edx            # imm = 0x251
xorl %eax, %eax
callq 0x26e94
movq %rbp, %rdi
callq 0x1feba
movq %rax, 0x10(%r13)
movq 0x18(%r14), %xmm0
movd %r12d, %xmm1
pshufd $0x50, %xmm1, %xmm1     # xmm1 = xmm1[0,0,1,1]
psubd %xmm1, %xmm0
movq %xmm0, 0x20(%r13)
movq 0x10(%r14), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%r13)
movl %ebx, 0x34(%r13)
movq %r15, (%r13)
movq %r13, (%rsp)
movq (%r14), %r14
movq %r13, %r15
testq %r14, %r14
jne 0x114cd
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x20173
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_O3/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: loadHashT3Ranges
static void loadHashT3Ranges(struct gfRange *rangeList, 
	char *tSeqDir, struct hash *tFileCache, int qSeqSize, boolean isRc, 
	struct hash **retT3Hash, struct dnaSeq **retSeqList,
	struct slRef **retT3RefList)
/* Load DNA in ranges into memory, and put translation in a hash
 * that gets returned. */
{
struct hash *t3Hash = newHash(10);
struct dnaSeq *targetSeq, *tSeqList = NULL;
struct slRef *t3RefList = NULL;
struct gfRange *range;

for (range = rangeList; range != NULL; range = range->next)
    {
    struct trans3 *t3, *oldT3;

    targetSeq = gfiExpandAndLoadCached(range, tFileCache,
    	tSeqDir, qSeqSize*3, &range->tTotalSize, TRUE, isRc, usualExpansion);
    slAddHead(&tSeqList, targetSeq);
    freez(&targetSeq->name);
    targetSeq->name = cloneString(range->tName);
    t3 = trans3New(targetSeq);
    refAdd(&t3RefList, t3);
    t3->start = range->tStart;
    t3->end = range->tEnd;
    t3->nibSize = range->tTotalSize;
    t3->isRc = isRc;
    if ((oldT3 = hashFindVal(t3Hash, range->tName)) != NULL)
	{
	slAddTail(&oldT3->next, t3);
	}
    else
	{
	hashAdd(t3Hash, range->tName, t3);
	}
    }
*retT3Hash = t3Hash;
*retSeqList = tSeqList;
*retT3RefList = t3RefList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r13
movl %r8d, %r15d
movl %ecx, %ebx
movq %rdx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, %rbp
movl $0xa, %edi
movl $0x1, %esi
callq 0x294ea
movq %rax, %r14
movq $0x0, 0x8(%rsp)
testq %rbp, %rbp
je 0x11692
movq %r13, 0x10(%rsp)
leal (%rbx,%rbx,2), %ebx
xorl %r12d, %r12d
movq %r12, %r13
leaq 0x40(%rbp), %r8
movq %rbp, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl %ebx, %ecx
movl $0x1, %r9d
pushq $0x1f4                  # imm = 0x1F4
pushq %r15
callq 0x13334
addq $0x10, %rsp
movq %rax, %r12
movq %r13, (%rax)
leaq 0x8(%rax), %rdi
callq 0x2e0b0
movq 0x10(%rbp), %rdi
callq 0x1feba
movq %rax, 0x8(%r12)
movq %r12, %rdi
callq 0x15dc0
movq %rax, %r13
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x20f8f
movq 0x20(%rbp), %rax
movq %rax, 0x30(%r13)
movl 0x40(%rbp), %eax
movl %eax, 0x38(%r13)
movl %r15d, 0x3c(%r13)
movq 0x10(%rbp), %rsi
movq %r14, %rdi
callq 0x293ad
testq %rax, %rax
je 0x1166a
movq %rax, %rdi
movq %r13, %rsi
callq 0x20105
jmp 0x11679
movq 0x10(%rbp), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x29142
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x115d8
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %r13
jmp 0x11697
xorl %eax, %eax
xorl %r12d, %r12d
movq %r14, (%r13)
movq 0x60(%rsp), %rcx
movq %r12, (%rcx)
movq 0x68(%rsp), %rcx
movq %rax, (%rcx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: untranslateRangeList
void untranslateRangeList(struct gfRange *rangeList, int qFrame, int tFrame, 
	struct hash *t3Hash, struct trans3 *t3, int tOffset)
/* Translate coordinates from protein to dna. */
{
struct gfRange *range;
for (range = rangeList; range != NULL; range = range->next)
    {
    range->qStart = 3*range->qStart + qFrame;
    range->qEnd = 3*range->qEnd + qFrame;
    range->tStart = 3*range->tStart + tFrame;
    range->tEnd = 3*range->tEnd + tFrame;
    if (t3Hash)
	t3 = trans3Find(t3Hash, range->tSeq->name, range->tStart + tOffset, range->tEnd + tOffset);
    range->tSeq = t3->seq;
    range->t3 = t3;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x11753
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %ebx
movq %r8, %rax
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
movl 0x8(%r12), %ecx
movl 0xc(%r12), %edx
leal (%rcx,%rcx,2), %esi
addl %r15d, %esi
leal (%rdx,%rdx,2), %edi
addl %r15d, %edi
movl 0x20(%r12), %ecx
leal (%rcx,%rcx,2), %edx
addl %ebp, %edx
movl 0x24(%r12), %ecx
leal (%rcx,%rcx,2), %ecx
addl %ebp, %ecx
movl %esi, 0x8(%r12)
movl %edi, 0xc(%r12)
movl %edx, 0x20(%r12)
movl %ecx, 0x24(%r12)
testq %r14, %r14
je 0x11734
movq 0x18(%r12), %rax
movq 0x8(%rax), %rsi
addl %ebx, %edx
addl %ebx, %ecx
movq %r14, %rdi
callq 0x15eab
movq 0x10(%rax), %rcx
movq %rcx, 0x18(%r12)
movq %rax, 0x38(%r12)
movq (%r12), %r12
testq %r12, %r12
jne 0x116dc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: addToBigBundleList
static void addToBigBundleList(struct ssBundle **pOneList, struct hash *bunHash, 
	struct ssBundle **pBigList, struct dnaSeq *query)
/* Add bundles in one list to bigList, consolidating bundles that refer
 * to the same target sequence.  This will destroy oneList in the process. */
{
struct ssBundle *oneBun, *bigBun;

for (oneBun = *pOneList; oneBun != NULL; oneBun = oneBun->next)
    {
    char *name = oneBun->genoSeq->name;
    if ((bigBun = hashFindVal(bunHash, name)) == NULL)
        {
	AllocVar(bigBun);
	slAddHead(pBigList, bigBun);
	hashAdd(bunHash, name, bigBun);
	bigBun->qSeq = query;
	bigBun->genoSeq = oneBun->genoSeq;
	bigBun->isProt = oneBun->isProt;
	bigBun->avoidFuzzyFindKludge = oneBun->avoidFuzzyFindKludge;
	}
    bigBun->ffList = slCat(bigBun->ffList, oneBun->ffList);
    oneBun->ffList = NULL;
    }
ssBundleFreeList(pOneList);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
movq (%rdi), %r15
testq %r15, %r15
je 0x126f4
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq 0x18(%r15), %rax
movq 0x8(%rax), %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x293ad
movq %rax, %r13
testq %rax, %rax
jne 0x126d3
movl $0x48, %edi
callq 0x2dff4
movq %rax, %r13
movq (%r14), %rax
movq %rax, (%r13)
movq %r13, (%r14)
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x29142
movq %rbx, 0x10(%r13)
movq 0x18(%r15), %rax
movq %rax, 0x18(%r13)
movl 0x30(%r15), %eax
movl %eax, 0x30(%r13)
movl 0x40(%r15), %eax
movl %eax, 0x40(%r13)
movq 0x8(%r13), %rdi
movq 0x8(%r15), %rsi
callq 0x20155
movq %rax, 0x8(%r13)
movq $0x0, 0x8(%r15)
movq (%r15), %r15
testq %r15, %r15
jne 0x12677
movq (%rsp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x14a0c
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: startSeqQuery
static void startSeqQuery(int conn, bioSeq *seq, char *type)
/* Send a query that involves some sequence. */
{
char buf[256];
sprintf(buf, "%s%s %d", gfSignature(), type, seq->size);
mustWriteFd(conn, buf, strlen(buf));
if (read(conn, buf, 1) < 0)
    errAbort("startSeqQuery: read failed: %s", strerror(errno));
if (buf[0] != 'Y')
    errAbort("Expecting 'Y' from server, got %c", buf[0]);
mustWriteFd(conn, seq->dna, seq->size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %r15
movq %rsi, %r14
movl %edi, %ebx
xorl %eax, %eax
callq 0xc544
movl 0x18(%r14), %r8d
leaq 0x7b2f5(%rip), %rsi     # 0x8de3f
movq %rsp, %r12
movq %r12, %rdi
movq %rax, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x6170
movq %r12, %rdi
callq 0x62d0
movl %ebx, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x23517
movl $0x1, %edx
movl %ebx, %edi
movq %r12, %rsi
callq 0x6aa0
testq %rax, %rax
jns 0x12ba3
callq 0x6060
movl (%rax), %edi
callq 0x6230
leaq 0x7b2ae(%rip), %rdi     # 0x8de47
movq %rax, %rsi
xorl %eax, %eax
callq 0x26e94
movsbl (%rsp), %esi
cmpl $0x59, %esi
je 0x12bba
leaq 0x7b2b3(%rip), %rdi     # 0x8de66
xorl %eax, %eax
callq 0x26e94
movq 0x10(%r14), %rsi
movslq 0x18(%r14), %rdx
movl %ebx, %edi
callq 0x23517
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: findTileSize
static int findTileSize(char *line)
/* Parse through line/val pairs looking for tileSize. */
{
char *var, *val;
int tileSize = 4;
for (;;)
    {
    var = nextWord(&line);
    if (var == NULL)
         break;
    val = nextWord(&line);
    if (val == NULL)
	 {
	 internalErr();
         break;
	 }
    if (sameString("tileSize", var))
         {
	 tileSize = atoi(val);
	 if (tileSize <= 0)
	     internalErr();
	 }
    }
return tileSize;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsp, %rax
movq %rdi, (%rax)
movq %rax, %rdi
callq 0x22cf1
testq %rax, %rax
je 0x12c64
movq %rax, %rbp
movl $0x4, %ebx
movq %rsp, %r14
leaq 0x7a7da(%rip), %r15     # 0x8d3e2
leaq 0x7b1e9(%rip), %r13     # 0x8ddf8
movq %r14, %rdi
callq 0x22cf1
testq %rax, %rax
je 0x12c6b
movq %rax, %r12
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6a50
testl %eax, %eax
jne 0x12c52
movq %r12, %rdi
callq 0x6bd0
movl %eax, %ebx
testl %eax, %eax
jg 0x12c52
leaq 0x7afc8(%rip), %rdi     # 0x8dc0b
movq %r13, %rsi
movl $0xb6, %edx
xorl %eax, %eax
callq 0x26e94
movq %r14, %rdi
callq 0x22cf1
movq %rax, %rbp
testq %rax, %rax
jne 0x12c0f
jmp 0x12c85
movl $0x4, %ebx
jmp 0x12c85
leaq 0x7af99(%rip), %rdi     # 0x8dc0b
leaq 0x7b17f(%rip), %rsi     # 0x8ddf8
movl $0xaf, %edx
xorl %eax, %eax
callq 0x26e94
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfClientLib.c
// Function: gfClientFileArray
void gfClientFileArray(char *fileName, char ***retFiles, int *retFileCount)
/* Check if file if .2bit or .nib or .fa.  If so return just that
 * file in a list of one.  Otherwise read all file and treat file
 * as a list of filenames.  */
{
boolean gotSingle = FALSE;
char *buf;		/* This will leak memory but won't matter. */

if (nibIsFile(fileName) || twoBitIsSpec(fileName)
    || sameString(fileName, "stdin")
    || endsWith(fileName, ".Z")
    || endsWith(fileName, ".gz")
    || endsWith(fileName, ".bz2"))
    gotSingle = TRUE;
/* Detect .fa files (where suffix is not standardized)
 * by first character being a '>'. */
else
    {
    FILE *f = mustOpen(fileName, "r");
    char c = fgetc(f);
    fclose(f);
    if (c == '>')
        gotSingle = TRUE;
    }
if (gotSingle)
    {
    char **files;
    *retFiles = AllocArray(files, 1);
    files[0] = cloneString(fileName);
    *retFileCount = 1;
    return;
    }
else
    {
    readAllWords(fileName, retFiles, retFileCount, &buf);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x324f7
testl %eax, %eax
jne 0x12cc2
movq %r14, %rdi
callq 0x3f293
testl %eax, %eax
je 0x12cf1
movl $0x8, %edi
callq 0x2de63
movq %rax, %r12
movq %rax, (%r15)
movq %r14, %rdi
callq 0x1feba
movq %rax, (%r12)
movl $0x1, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x80e01(%rip), %rsi     # 0x93af9
movq %r14, %rdi
callq 0x6a50
testl %eax, %eax
je 0x12cc2
leaq 0x7b3a5(%rip), %rsi     # 0x8e0b0
movq %r14, %rdi
callq 0x21e4c
testl %eax, %eax
jne 0x12cc2
leaq 0x859ea(%rip), %rsi     # 0x98708
movq %r14, %rdi
callq 0x21e4c
testl %eax, %eax
jne 0x12cc2
leaq 0x7b382(%rip), %rsi     # 0x8e0b3
movq %r14, %rdi
callq 0x21e4c
testl %eax, %eax
jne 0x12cc2
leaq 0x831c5(%rip), %rsi     # 0x95f09
movq %r14, %rdi
callq 0x23072
movq %rax, %r12
movq %rax, %rdi
callq 0x6bf0
movl %eax, %ebp
movq %r12, %rdi
callq 0x66e0
cmpb $0x3e, %bpl
je 0x12cc2
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x32873
jmp 0x12ce4
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfInternal.c
// Function: gfiGetSeqName
void gfiGetSeqName(char *spec, char *name, char *file)
/* Extract sequence name and optionally file name from spec, 
 * which includes nib and 2bit files.  (The file may be NULL
 * if you don't care.) */
{
if (nibIsFile(spec))
    {
    splitPath(spec, NULL, name, NULL);
    if (file != NULL)
        strcpy(file, spec);
    }
else
    {
    char *s = strchr(spec, ':');
    if (s == NULL)
	errAbort("Expecting colon in %s", spec);
    strcpy(name, s+1);
    if (file != NULL)
        {
	int fileNameSize = s - spec;
	memcpy(file, spec, fileNameSize);
	file[fileNameSize] = 0;
	}
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x324f7
movq %r14, %rdi
testl %eax, %eax
je 0x135dd
xorl %esi, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x288ae
testq %rbx, %rbx
je 0x1362b
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6680
movl $0x3a, %esi
callq 0x6270
movq %rax, %r12
testq %rax, %rax
jne 0x13600
leaq 0x7ac0a(%rip), %rdi     # 0x8e200
movq %r14, %rsi
xorl %eax, %eax
callq 0x26e94
leaq 0x1(%r12), %rsi
movq %r15, %rdi
callq 0x6680
testq %rbx, %rbx
je 0x1362b
subl %r14d, %r12d
movslq %r12d, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6570
movb $0x0, (%rbx,%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfOut.c
// Function: gfOutputPsl
struct gfOutput *gfOutputPsl(int goodPpt, 
	boolean qIsProt, boolean tIsProt, FILE *f, 
	boolean saveSeq, boolean noHead)
/* Set up psl/pslx output */
{
struct gfOutput *out = gfOutputInit(goodPpt, qIsProt, tIsProt);
struct pslxData *pslData;

AllocVar(pslData);
pslData->saveSeq = saveSeq;
pslData->f = f;
out->out = pslOut;
out->data = pslData;
if (!noHead)
    out->fileHead = pslHead;
return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, %r14d
movq %rcx, %r15
movl %edx, %r12d
movl %esi, %r13d
movl %edi, %ebp
movl $0x50, %edi
callq 0x2dff4
movq %rax, %rbx
movl %ebp, 0x38(%rax)
movl %r13d, 0x3c(%rax)
movl %r12d, 0x40(%rax)
movl $0x10, %edi
callq 0x2dff4
movl %r14d, 0x8(%rax)
movq %r15, (%rax)
leaq 0x2c(%rip), %rcx        # 0x136b2
movq %rcx, 0x10(%rbx)
movq %rax, 0x8(%rbx)
cmpl $0x0, 0x4(%rsp)
jne 0x136a0
leaq 0x5b3(%rip), %rax       # 0x13c4f
movq %rax, 0x20(%rbx)
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_O3/icebert[P]pblat/jkOwnLib/gfOut.c
// Function: gfOutputAxtMem
struct gfOutput *gfOutputAxtMem(int goodPpt, boolean qIsProt, 
	boolean tIsProt)
/* Setup output for in memory axt output. */
{
struct gfOutput *out = gfOutputInit(goodPpt, qIsProt, tIsProt);
struct axtData *ad;
AllocVar(ad);
out->out = saveAxtBundle;
out->data = ad;
return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
movl $0x50, %edi
callq 0x2dff4
movq %rax, %r15
movl %r14d, 0x38(%rax)
movl %ebp, 0x3c(%rax)
movl %ebx, 0x40(%rax)
movl $0x30, %edi
callq 0x2dff4
leaq 0x16(%rip), %rcx        # 0x13ca3
movq %rcx, 0x10(%r15)
movq %rax, 0x8(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfOut.c
// Function: axtQueryOut
static void axtQueryOut(struct gfOutput *out, FILE *f)
/* Do axt oriented output - at end of processing query. */
{
struct axtData *aod = out->data;
struct axtBundle *gab;
for (gab = aod->bundleList; gab != NULL; gab = gab->next)
    {
    struct axt *axt;
    for (axt = gab->axtList; axt != NULL; axt = axt->next)
	axtWrite(axt, f);
    }
axtBundleFreeList(&aod->bundleList);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r14
movq (%r14), %r12
testq %r12, %r12
je 0x1412f
movq %rsi, %rbx
movq 0x8(%r12), %r15
testq %r15, %r15
je 0x14126
movq %r15, %rdi
movq %rbx, %rsi
callq 0x19dd2
movq (%r15), %r15
jmp 0x14111
movq (%r12), %r12
testq %r12, %r12
jne 0x1410c
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1b2ed
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfOut.c
// Function: gfOutputMaf
struct gfOutput *gfOutputMaf(int goodPpt, boolean qIsProt, 
	boolean tIsProt, FILE *f)
/* Setup output for maf format. */
{
struct gfOutput *out = gfOutputAxtMem(goodPpt, qIsProt, tIsProt);
out->queryOut = mafQueryOut;
out->fileHead = mafHead;
return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
movl $0x50, %edi
callq 0x2dff4
movq %rax, %r15
movl %r14d, 0x38(%rax)
movl %ebp, 0x3c(%rax)
movl %ebx, 0x40(%rax)
movl $0x30, %edi
callq 0x2dff4
leaq -0x4d5(%rip), %rcx      # 0x13ca3
movq %rcx, 0x10(%r15)
movq %rax, 0x8(%r15)
leaq 0x1d(%rip), %rax        # 0x141a4
movq %rax, 0x18(%r15)
leaq 0x7f(%rip), %rax        # 0x14211
movq %rax, 0x20(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfOut.c
// Function: mafQueryOut
static void mafQueryOut(struct gfOutput *out, FILE *f)
/* Do axt oriented output - at end of processing query. */
{
struct axtData *aod = out->data;
struct axtBundle *gab;
for (gab = aod->bundleList; gab != NULL; gab = gab->next)
    {
    struct axt *axt;
    for (axt = gab->axtList; axt != NULL; axt = axt->next)
	{
	struct mafAli temp;
	mafFromAxtTemp(axt, gab->tSize, gab->qSize, &temp);
	mafWrite(f, &temp);
	}
    }
axtBundleFreeList(&aod->bundleList);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq 0x8(%rdi), %rbx
movq (%rbx), %r13
testq %r13, %r13
je 0x141fb
movq %rsi, %r14
leaq 0x8(%rsp), %r15
movq 0x8(%r13), %r12
testq %r12, %r12
je 0x141f2
movl 0x10(%r13), %esi
movl 0x14(%r13), %edx
movq %r12, %rdi
movq %r15, %rcx
callq 0x2db2c
movq %r14, %rdi
movq %r15, %rsi
callq 0x2cf62
movq (%r12), %r12
jmp 0x141c9
movq (%r13), %r13
testq %r13, %r13
jne 0x141c5
movq %rbx, %rdi
callq 0x1b2ed
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfOut.c
// Function: gfOutputSim4
struct gfOutput *gfOutputSim4(int goodPpt, boolean qIsProt, boolean tIsProt, 
	char *databaseName)
/* Set up to output in sim4 format. */
{
struct gfOutput *out = gfOutputAxtMem(goodPpt, qIsProt, tIsProt);
struct axtData *ad = out->data;
if (qIsProt || tIsProt)
    errAbort("sim4 output is not available for protein query sequences.");
ad->databaseName = databaseName;
out->queryOut = sim4QueryOut;
return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r12d
movl %edi, %r15d
movl $0x50, %edi
callq 0x2dff4
movq %rax, %r14
movl %r15d, 0x38(%rax)
movl %r12d, 0x3c(%rax)
movl %ebp, 0x40(%rax)
movl $0x30, %edi
callq 0x2dff4
movq %rax, %r15
leaq -0x5bc(%rip), %rax      # 0x13ca3
movq %rax, 0x10(%r14)
movq %r15, 0x8(%r14)
orl %r12d, %ebp
je 0x1427a
leaq 0x79fb5(%rip), %rdi     # 0x8e228
xorl %eax, %eax
callq 0x26e94
movq %rbx, 0x8(%r15)
leaq 0x10(%rip), %rax        # 0x14295
movq %rax, 0x18(%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfOut.c
// Function: gfOutputBlast
struct gfOutput *gfOutputBlast(int goodPpt, 
	boolean qIsProt, boolean tIsProt, 
	char *databaseName, int databaseSeqCount, double databaseLetters,
	char *blastType, double minIdentity, FILE *f)
/* Setup output for blast format. */
{
struct gfOutput *out = gfOutputAxtMem(goodPpt, qIsProt, tIsProt);
struct axtData *ad = out->data;
ad->databaseName = databaseName;
ad->databaseSeqCount = databaseSeqCount;
ad->databaseLetters = databaseLetters;
ad->blastType = blastType;
ad->minIdentity = minIdentity;
out->queryOut = blastQueryOut;
return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm1, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movsd %xmm0, (%rsp)
movl %r8d, %ebp
movq %rcx, %r14
movl %edx, %r15d
movl %esi, %r12d
movl %edi, %r13d
movl $0x50, %edi
callq 0x2dff4
movq %rax, %rbx
movl %r13d, 0x38(%rax)
movl %r12d, 0x3c(%rax)
movl %r15d, 0x40(%rax)
movl $0x30, %edi
callq 0x2dff4
leaq -0x85d(%rip), %rcx      # 0x13ca3
movq %rcx, 0x10(%rbx)
movq %rax, 0x8(%rbx)
movq %r14, 0x8(%rax)
movl %ebp, 0x10(%rax)
movsd (%rsp), %xmm0
movsd %xmm0, 0x18(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x20(%rax)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x28(%rax)
leaq 0x16(%rip), %rax        # 0x1454a
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfOut.c
// Function: blastQueryOut
static void blastQueryOut(struct gfOutput *out, FILE *f)
/* Output blast on query. */
{
struct axtData *aod = out->data;
axtBlastOut(aod->bundleList, out->queryIx, out->qIsProt, f,
	aod->databaseName, aod->databaseSeqCount, aod->databaseLetters,
	aod->blastType, "blat", aod->minIdentity);
axtBundleFreeList(&aod->bundleList);
}

// Assembly:
pushq %rbx
movq %rsi, %rcx
movq 0x8(%rdi), %rbx
movl 0x44(%rdi), %esi
movl 0x3c(%rdi), %edx
movq (%rbx), %rdi
movq 0x8(%rbx), %r8
movl 0x10(%rbx), %r9d
movsd 0x18(%rbx), %xmm0
movsd 0x28(%rbx), %xmm1
leaq 0x79ecd(%rip), %rax     # 0x8e441
pushq %rax
pushq 0x20(%rbx)
callq 0x1ca44
addq $0x10, %rsp
movq %rbx, %rdi
popq %rbx
jmp 0x1b2ed
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfOut.c
// Function: gfOutputFree
void gfOutputFree(struct gfOutput **pOut)
/* Free up output */
{
struct gfOutput *out = *pOut;
if (out != NULL)
    {
    freeMem(out->data);
    freez(pOut);
    }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x147f5
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rax), %rdi
callq 0x2e0a0
movq %rbx, %rdi
popq %rbx
jmp 0x2e0b0
retq
nop
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/ooc.c
// Function: oocMaskCounts
void oocMaskCounts(char *oocFile, bits32 *tileCounts, int tileSize, bits32 maxPat)
/* Set items of tileCounts to maxPat if they are in oocFile. 
 * Effectively masks this out of index.*/
{
if (oocFile != NULL)
    {
    bits32 sig, psz;
    FILE *f = mustOpen(oocFile, "rb");
    boolean mustSwap = FALSE;

    mustReadOne(f, sig);
    mustReadOne(f, psz);
    if (sig == oocSig)
	mustSwap = FALSE;
    else if (sig == oocSigSwapped)
	{
	mustSwap = TRUE;
	psz = byteSwap32(psz);
	}
    else
        errAbort("Bad signature on %s\n", oocFile);
    if (psz != tileSize)
        errAbort("Oligo size mismatch in %s. Expecting %d got %d\n", 
            oocFile, tileSize, psz);
    if (mustSwap)
	{
	union {bits32 whole; UBYTE bytes[4];} u,v;
	while (readOne(f, u))
	    {
	    v.bytes[0] = u.bytes[3];
	    v.bytes[1] = u.bytes[2];
	    v.bytes[2] = u.bytes[1];
	    v.bytes[3] = u.bytes[0];
	    tileCounts[v.whole] = maxPat;
	    }
	}
    else
	{
	bits32 oli;
	while (readOne(f, oli))
	    tileCounts[oli] = maxPat;
	}
    fclose(f);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x1493c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movq %rsi, %r14
movq %rdi, %r12
movl %edx, 0xc(%rsp)
leaq 0x79c24(%rip), %rsi     # 0x8e446
callq 0x23072
movq %rax, %r15
leaq 0x14(%rsp), %r13
movl $0x4, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x23192
leaq 0x10(%rsp), %rsi
movl $0x4, %edx
movq %r15, %rdi
callq 0x23192
movb $0x1, %bpl
movl (%r13), %eax
cmpl $0x584155f2, %eax       # imm = 0x584155F2
je 0x14888
cmpl $0xf2554158, %eax       # imm = 0xF2554158
jne 0x14877
movl 0x10(%rsp), %edi
callq 0x239ea
movl %eax, 0x10(%rsp)
xorl %ebp, %ebp
jmp 0x14888
leaq 0x79bcb(%rip), %rdi     # 0x8e449
movq %r12, %rsi
xorl %eax, %eax
callq 0x26e94
movl 0xc(%rsp), %edx
movl 0x10(%rsp), %ecx
cmpl %edx, %ecx
je 0x148a5
leaq 0x79bc3(%rip), %rdi     # 0x8e45e
movq %r12, %rsi
xorl %eax, %eax
callq 0x26e94
leaq 0x8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
testb %bpl, %bpl
je 0x148f1
callq 0x6b20
cmpq $0x1, %rax
jne 0x14926
leaq 0x8(%rsp), %r12
movl 0x8(%rsp), %eax
movl %ebx, (%r14,%rax,4)
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rcx
callq 0x6b20
cmpq $0x1, %rax
je 0x148cc
jmp 0x14926
callq 0x6b20
cmpq $0x1, %rax
jne 0x14926
leaq 0x8(%rsp), %r12
movl 0x8(%rsp), %eax
bswapl %eax
movl %ebx, (%r14,%rax,4)
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rcx
callq 0x6b20
cmpq $0x1, %rax
je 0x14901
movq %r15, %rdi
callq 0x66e0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/ooc.c
// Function: oocMaskSimpleRepeats
void oocMaskSimpleRepeats(bits32 *tileCounts, int seedSize, bits32 maxPat)
/* Mask out simple repeats in index . */
{
int i, j, k;
int tileMask = (1<<(seedSize+seedSize))-1;
for (i=0; i<4; ++i)
    {
    for (j=0; j<4; ++j)
        {
        bits32 repeat = 0;
        for (k=0; k<8; ++k)
            {
            repeat <<= 2;
            repeat |= i;
            repeat <<= 2;
            repeat |= j;
            }
        repeat &= tileMask;
        tileCounts[repeat] = maxPat;
        }
    }
}

// Assembly:
leal (%rsi,%rsi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
notl %eax
xorl %ecx, %ecx
leal (,%rcx,4), %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
movl $0x8, %r10d
shll $0x4, %r9d
addl %esi, %r9d
addl %r8d, %r9d
decl %r10d
jne 0x1495e
andl %eax, %r9d
movl %edx, (%rdi,%r9,4)
incl %r8d
cmpl $0x4, %r8d
jne 0x14955
incl %ecx
cmpl $0x4, %ecx
jne 0x1494b
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/supStitch.c
// Function: ssFfItemFreeList
void ssFfItemFreeList(struct ssFfItem **pList)
/* Free a list of ssFfItems. */
{
struct ssFfItem *el, *next;
for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    ssFfItemFree(&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 0x149db
leaq 0x8(%rsp), %r14
movq (%r15), %r15
movq %r14, %rdi
callq 0x14988
movq %r15, 0x8(%rsp)
testq %r15, %r15
jne 0x149c6
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x14a3f
leaq 0x8(%rsp), %r14
movq (%r15), %r15
movq %r14, %rdi
callq 0x149ec
movq %r15, 0x8(%rsp)
testq %r15, %r15
jne 0x14a2a
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7c723(%rip), %rdi     # 0x91190
movq %r15, %rsi
xorl %eax, %eax
callq 0x6070
movq 0xaa532(%rip), %r12     # 0xbefb0
movq (%r12), %rdi
movslq %ebp, %r13
movq %r14, %rsi
movq %r13, %rdx
callq 0x23138
movl $0xa, %edi
callq 0x6a40
leaq 0x7c6ef(%rip), %rdi     # 0x91190
movq %r15, %rsi
xorl %eax, %eax
callq 0x6070
movq (%r12), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x23138
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6a40
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x14b5c
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 0x79995(%rip), %r13     # 0x8e48e
movq 0x20(%r12), %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x15f64
movl %eax, %ebp
movq 0x28(%r12), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x15f64
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
testq %r12, %r12
jne 0x14af9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movl $0xa, %edi
jmp 0x6a40
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x14bd9
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x79925(%rip), %r14     # 0x8e4a2
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r15
movq 0x18(%rbx), %r12
callq 0x200ac
movq 0x8(%r15), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x6070
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x14bc6
movq 0x8(%r15), %rdi
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq 0x38(%rbx), %rcx
callq 0x14ad2
movq (%r15), %r15
jmp 0x14ba7
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x14b7d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rbp
cmpq $0x0, 0x38(%rsi)
jne 0x14cb7
movq 0x8(%rbp), %rax
testq %rax, %rax
je 0x14cb7
movl %edx, %ebx
movq %rsi, %r15
movq 0x10(%rsi), %rcx
movq %rcx, 0x8(%rsp)
movq 0x18(%rsi), %rcx
movq %rcx, (%rsp)
leaq 0x8(%rbp), %r12
movq %rbp, %r14
movq %rsi, 0x10(%rsp)
movq %r14, %r13
movq %rax, %r14
movq 0x20(%rax), %rcx
movq 0x28(%r13), %rdx
movq %rcx, %rax
subq %rdx, %rax
cmpq $0x3, %rax
jl 0x14ca6
movq 0x10(%r14), %rsi
movq 0x18(%r13), %rdi
movq %rsi, %rax
subq %rdi, %rax
cmpq $0x3, %rax
jl 0x14ca6
movl %ebx, %r8d
callq 0xacd1
testq %rax, %rax
je 0x14ca6
movl 0x30(%r15), %r8d
movq 0x38(%r15), %r9
movq %rax, %rdi
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
movl %ebx, %ecx
callq 0x14cc9
movl %ebx, %r15d
movq %rbp, %rbx
movq %rax, %rbp
movq %rax, %rdi
callq 0x28286
movq %rbp, (%r12)
movq %r13, (%rbp)
movq %rbx, %rbp
movl %r15d, %ebx
movq 0x10(%rsp), %r15
movq %rax, (%r14)
movq %r14, 0x8(%rax)
leaq 0x8(%r14), %r12
movq 0x8(%r14), %rax
testq %rax, %rax
jne 0x14c25
movq %rbp, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x14d82
movq %r9, %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %r14, %rdi
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x14d82
movq 0x18(%rdi), %rsi
movq 0x10(%rax), %rdx
cmpq %rdx, %rsi
ja 0x14d1e
movq 0x20(%rax), %rcx
cmpq %rcx, 0x28(%rdi)
movq %rax, %rdi
jbe 0x14cf5
jmp 0x14d22
movq 0x20(%rax), %rcx
subl %esi, %edx
subl 0x28(%rax), %ecx
leaq 0x79794(%rip), %rsi     # 0x8e4c2
movl $0x2, %edi
xorl %eax, %eax
callq 0x427e5
leaq 0x10(%rsp), %r13
movq $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 0x158b2
addq $0x20, %rsp
movq %r13, %rdi
callq 0x281f8
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_O3/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 %r14
pushq %rbx
testq %rdi, %rdi
je 0x14e5c
leal (%rdx,%rdx,2), %eax
negl %eax
leal (%rsi,%rsi,2), %edx
negl %edx
movl $0x3, %r11d
movl %edx, %r10d
movl %eax, %r9d
movq (%rdi,%r11,8), %r14
movq 0x10(%r14), %rbx
cmpq %rsi, %rbx
ja 0x14e45
movslq 0x18(%r14), %r14
addq %rbx, %r14
cmpq %rsi, %r14
ja 0x14e79
decl %r9d
decl %r10d
incq %r11
cmpq $0x6, %r11
jne 0x14e2c
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x14e20
leaq 0x78da8(%rip), %rdi     # 0x8dc0b
leaq 0x79679(%rip), %rsi     # 0x8e4e3
movl $0xbc, %edx
xorl %eax, %eax
popq %rbx
popq %r14
jmp 0x26e94
movl 0x30(%rdi), %eax
leal (%rbx,%rbx,2), %edx
subl %edx, %eax
subl %r10d, %eax
movl %eax, (%rcx)
movl 0x30(%rdi), %eax
subl %edx, %eax
subl %r9d, %eax
movl %eax, (%r8)
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq 0x60(%rsp), %r14
movq %rdi, 0x8(%rsp)
movq %r15, %rbx
movq 0x8(%r15), %r15
testq %r15, %r15
je 0x14f49
movq 0x20(%r15), %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x15f64
movl %eax, %ebp
movq 0x28(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x15f64
subl %eax, %ebp
cmpl %r12d, %ebp
jle 0x14ec4
movq 0x8(%rbx), %rax
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
xorl %ecx, %ecx
movq %rcx, 0x8(%rbx)
movq %rcx, (%rax)
movq 0x68(%rsp), %rdi
callq 0x1600c
cmpl $0x0, 0x14(%rsp)
je 0x14f34
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x2880a
jmp 0x14f42
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x2877d
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_O3/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
subq $0x18, %rsp
movl 0x8(%rsi), %ebx
movl 0x10(%rsi), %r13d
subl 0x14(%rdi), %r13d
subl 0xc(%rdi), %ebx
cmpl %ebx, %r13d
movl %ebx, %r14d
cmovll %r13d, %r14d
xorl %ebp, %ebp
testl %r14d, %r14d
js 0x15bf5
xorl %r15d, %r15d
jmp 0x15c9c
movq 0x20(%rsi), %r15
movl %r14d, %r12d
negl %r12d
movl 0x28(%r15), %eax
movq 0x20(%r15), %rdx
subl %edx, %eax
cmpl %eax, %r12d
jge 0x15c94
movq 0x20(%rdi), %r9
movq 0x28(%r9), %rax
movl 0x20(%r9), %ecx
movl %eax, %r8d
subl %ecx, %r8d
cmpl %r8d, %r12d
jge 0x15c94
movl 0xab374(%rip), %r8d     # 0xc0fa4
movq 0x10(%r15), %rsi
movq %rax, %rdi
movl %r12d, %ecx
movq %r9, 0x10(%rsp)
callq 0x15ce4
movl %eax, 0xc(%rsp)
subl %eax, %r12d
movl 0xab353(%rip), %edi     # 0xc0fa4
movslq %r12d, %rcx
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x28(%rax), %rdx
subq %rcx, %rsi
subq %rcx, %rdx
callq 0x15b80
movl %eax, %r12d
movl 0xab32f(%rip), %edi     # 0xc0fa4
movq 0x10(%r15), %rsi
movq 0x20(%r15), %rdx
movl 0xc(%rsp), %ecx
callq 0x15b80
movl %eax, %r15d
addl %r12d, %r15d
addl %r14d, %r13d
addl %r14d, %ebx
jmp 0x15c9c
movl 0x18(%rsi), %r15d
addl 0x18(%rdi), %r15d
testl %ebx, %ebx
cmovlel %ebp, %ebx
testl %r13d, %r13d
cmovgl %r13d, %ebp
movl 0xab2f2(%rip), %edx     # 0xc0fa0
movl %ebx, %edi
movl %ebp, %esi
callq 0x28548
addl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 $0x38, %rsp
movl %ecx, %r12d
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
movl %ecx, %edx
testl %r8d, %r8d
je 0x15d1b
callq 0x25bc8
movl %eax, %edx
leaq 0xfe92(%rip), %rax      # 0x25bab
jmp 0x15d29
callq 0x25b71
movl %eax, %edx
leaq 0xfdf3(%rip), %rax      # 0x25b1c
testl %r12d, %r12d
jle 0x15da9
movl %r12d, %ecx
movq %rcx, 0x28(%rsp)
subq %rcx, %r15
movq %r15, 0x20(%rsp)
xorl %r15d, %r15d
xorl %r12d, %r12d
movl %edx, %ebp
movq %rbx, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movq %r13, 0x30(%rsp)
movq 0x10(%rsp), %r14
movl %edx, 0xc(%rsp)
movq 0x30(%rsp), %rax
movsbl (%rax,%r15), %r13d
movq 0x20(%rsp), %rax
movsbl (%rax,%r15), %edi
movl %r13d, %esi
callq *%r14
movl %eax, %ebx
addl %ebp, %ebx
movq 0x18(%rsp), %rax
movsbl (%rax,%r15), %edi
movl %r13d, %esi
callq *%r14
movl 0xc(%rsp), %edx
subl %eax, %ebx
incq %r15
cmpl %edx, %ebx
cmovgl %ebx, %edx
cmovgl %r15d, %r12d
movl %ebx, %ebp
cmpq %r15, 0x28(%rsp)
jne 0x15d5a
jmp 0x15dac
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop