LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/obscure.c
// Function: endsWithWordComma
boolean endsWithWordComma(char *string, char *word)
/* Return TRUE if string ends with word possibly followed by a comma, and the beginning
 * of word within string is the beginning of string or follows a comma. */
{
int stringLen = strlen(string);
int wordLen = strlen(word);
int commaSize = (stringLen > wordLen && string[stringLen-1] == ',') ? 1 : 0;
if (stringLen < wordLen + commaSize)
    return FALSE;
int wordOffset = stringLen - commaSize - wordLen;
if (sameStringN(string + wordOffset, word, wordLen) &&
    (wordOffset == 0 || string[wordOffset-1] == ','))
    return TRUE;
return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x62d0
movq %rax, %r14
movq %r15, %rdi
callq 0x62d0
movq %rax, %rcx
xorl %eax, %eax
movl $0x0, %ebp
cmpl %ecx, %r14d
jle 0x33904
movl %r14d, %edx
decl %edx
movslq %edx, %rdx
xorl %ebp, %ebp
cmpb $0x2c, (%rbx,%rdx)
sete %bpl
addl %ecx, %ebp
movl %r14d, %edx
subl %ebp, %edx
jl 0x33939
movslq %edx, %rax
addq %rax, %rbx
movslq %ecx, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6330
testl %eax, %eax
je 0x33929
xorl %eax, %eax
jmp 0x33939
movl $0x1, %eax
cmpl %ebp, %r14d
je 0x33939
cmpb $0x2c, -0x1(%rbx)
jne 0x33925
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/obscure.c
// Function: ensureNamesCaseUnique
void ensureNamesCaseUnique(struct slName *fieldList)
/* Ensure that there would be no name conflicts in fieldList if all fields were lower-cased. */
{
struct slName *field;
struct hash *hash = hashNew(0);
for (field = fieldList; field != NULL; field = field->next)
    {
    char *s = field->name;
    int len = strlen(s);
    assert(len<512);  // avoid stack overflow
    char lower[len+1];
    strcpy(lower, s);
    strLower(lower);
    char *conflict = hashFindVal(hash, lower);
    if (conflict)
	 {
	 if (sameString(conflict,s))
	     errAbort("Duplicate symbol %s", s);
	 else
	     errAbort("Conflict between symbols with different cases: %s vs %s",
		conflict, s);
	 }
    hashAdd(hash, lower, s);
    }
hashFree(&hash);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x29160
movq %rax, -0x30(%rbp)
testq %rbx, %rbx
je 0x33a12
leaq 0x8(%rbx), %r12
movq %r12, %rdi
callq 0x62d0
cmpl $0x200, %eax            # imm = 0x200
jge 0x33a2a
movq %rsp, %r15
incl %eax
movq %rsp, %r13
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
movq %r13, %rdi
movq %r12, %rsi
callq 0x6680
movq %r13, %rdi
callq 0x21fb5
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x29029
testq %rax, %rax
je 0x339f8
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x6a50
testl %eax, %eax
je 0x339e7
leaq 0x5f55d(%rip), %rdi     # 0x92f35
movq %r14, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x26b6f
jmp 0x339f8
leaq 0x5f533(%rip), %rdi     # 0x92f21
movq %r12, %rsi
xorl %eax, %eax
callq 0x26b6f
movq -0x30(%rbp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x28dbe
movq %r15, %rsp
movq (%rbx), %rbx
jmp 0x33965
leaq -0x30(%rbp), %rdi
callq 0x29565
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5f4bc(%rip), %rdi     # 0x92eed
leaq 0x5f446(%rip), %rsi     # 0x92e7e
leaq 0x5f4b6(%rip), %rcx     # 0x92ef5
movl $0x3ac, %edx            # imm = 0x3AC
callq 0x6460
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/obscure.c
// Function: readAndIgnore
boolean readAndIgnore(char *fileName)
/* Read a byte from fileName, so its access time is updated. */
{
boolean ret = FALSE;
char buf[256];
FILE *f = fopen(fileName, "r");
if ( f && (fread(buf, 1, 1, f) == 1 ) )
    ret = TRUE;
if (f)
    fclose(f);
return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq 0x623d0(%rip), %rsi     # 0x95e29
callq 0x6800
movq %rax, %rbx
testq %rax, %rax
je 0x33a87
movq %rsp, %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6b20
xorl %ebp, %ebp
cmpq $0x1, %rax
sete %bpl
jmp 0x33a89
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x33a96
movq %rbx, %rdi
callq 0x66e0
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/osunix.c
// Function: getTempDir
char *getTempDir(void)
/* get temporary directory to use for programs.  This first checks TMPDIR environment
 * variable, then /data/tmp, /scratch/tmp, /var/tmp, /tmp.  Return is static and
 * only set of first call */
{
static char *checkTmpDirs[] = {"/data/tmp", "/scratch/tmp", "/var/tmp", "/tmp", NULL};

static char* tmpDir = NULL;
if (tmpDir == NULL)
    {
    tmpDir = getenv("TMPDIR");
    if (tmpDir != NULL)
        tmpDir = cloneString(tmpDir);  // make sure it's stable
    else
        {
        int i;
        for (i = 0; (checkTmpDirs[i] != NULL) && (tmpDir == NULL); i++)
            {
            if (fileSize(checkTmpDirs[i]) >= 0)
                tmpDir = checkTmpDirs[i];
            }
        }
    }
if (tmpDir == NULL)
    errAbort("BUG: can't find a tmp directory");
return tmpDir;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
cmpq $0x0, 0x8f371(%rip)     # 0xc3ed0
jne 0x34bed
leaq 0x5e8db(%rip), %rdi     # 0x93447
callq 0x68f0
movq %rax, 0x8f358(%rip)     # 0xc3ed0
testq %rax, %rax
je 0x34b8e
movq %rax, %rdi
callq 0x1f9f6
movq %rax, 0x8f344(%rip)     # 0xc3ed0
jmp 0x34bed
cmpq $0x0, 0x8f33a(%rip)     # 0xc3ed0
jne 0x34bed
xorl %r15d, %r15d
leaq 0x89c3e(%rip), %r12     # 0xbe7e0
leaq 0x8(%rsp), %rbx
movq (%r15,%r12), %r14
movl $0x90, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x63b0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6d00
cmpl $-0x1, %eax
je 0x34bd9
cmpq $0x0, 0x38(%rsp)
js 0x34bd9
movq %r14, 0x8f2f7(%rip)     # 0xc3ed0
cmpq $0x18, %r15
je 0x34bed
addq $0x8, %r15
cmpq $0x0, 0x8f2e5(%rip)     # 0xc3ed0
je 0x34ba7
cmpq $0x0, 0x8f2db(%rip)     # 0xc3ed0
jne 0x34c05
leaq 0x5e850(%rip), %rdi     # 0x9344e
xorl %eax, %eax
callq 0x26b6f
movq 0x8f2c4(%rip), %rax     # 0xc3ed0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/osunix.c
// Function: maybeTouchFile
boolean maybeTouchFile(char *fileName)
/* If file exists, set its access and mod times to now.  If it doesn't exist, create it.
 * Return FALSE if we have a problem doing so (e.g. when qateam is gdb'ing and code tries 
 * to touch some file owned by www). */
{
if (fileExists(fileName))
    {
    int ret = utime(fileName, NULL);
    if (ret != 0)
	{
	warn("utime(%s) failed (ownership?)", fileName);
	return FALSE;
	}
    }
else
    {
    FILE *f = fopen(fileName, "w");
    if (f == NULL)
	return FALSE;
    else
	carefulClose(&f);
    }
return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x23942
testl %eax, %eax
je 0x35244
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x63a0
testl %eax, %eax
je 0x35264
leaq 0x5e3e9(%rip), %rdi     # 0x93621
movq %r14, %rsi
xorl %eax, %eax
callq 0x268ca
jmp 0x3526d
leaq 0x59a3e(%rip), %rsi     # 0x8ec89
movq %r14, %rdi
callq 0x6800
movq %rax, (%rsp)
testq %rax, %rax
je 0x3526b
movq %rsp, %rdi
callq 0x23400
movl $0x1, %ebx
jmp 0x3526d
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/osunix.c
// Function: touchFileFromFile
void touchFileFromFile(const char *oldFile, const char *newFile)
/* Set access and mod time of newFile from oldFile. */
{
    struct stat buf;
    if (stat(oldFile, &buf) != 0)
        errnoAbort("stat failed on %s", oldFile);
    struct utimbuf puttime;
    puttime.modtime = buf.st_mtime;
    puttime.actime = buf.st_atime;
    if (utime(newFile, &puttime) != 0)
	errnoAbort("utime failed on %s", newFile);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %rsi
callq 0x6d00
testl %eax, %eax
je 0x352a6
leaq 0x5e3a3(%rip), %rdi     # 0x9363f
movq %r14, %rsi
xorl %eax, %eax
callq 0x26c9f
movq 0x60(%rsp), %rax
movq 0x70(%rsp), %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, 0x8(%rsi)
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x63a0
testl %eax, %eax
je 0x352e3
leaq 0x5e382(%rip), %rdi     # 0x93651
movq %rbx, %rsi
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
jmp 0x26c9f
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/osunix.c
// Function: mustReadSymlinkExt
char *mustReadSymlinkExt(char *path, struct stat *sb)
/* Read symlink or abort. FreeMem the returned value. */
{
ssize_t nbytes, bufsiz;
// determine whether the buffer returned was truncated.
bufsiz = sb->st_size + 1;
char *symPath = needMem(bufsiz);
nbytes = readlink(path, symPath, bufsiz);
if (nbytes == -1) 
    errnoAbort("readlink failure on symlink %s", path);
if (nbytes == bufsiz)
    errAbort("readlink returned buffer truncated\n");
return symPath;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x30(%rsi), %r14
incq %r14
movq %r14, %rdi
callq 0x2dc95
movq %rax, %rbx
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x6770
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x353a3
leaq 0x5e2cb(%rip), %rdi     # 0x93664
movq %r15, %rsi
xorl %eax, %eax
callq 0x26c9f
cmpq %r14, %r12
jne 0x353b6
leaq 0x5e2d4(%rip), %rdi     # 0x93683
xorl %eax, %eax
callq 0x26b6f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/osunix.c
// Function: mustReadSymlink
char *mustReadSymlink(char *path)
/* Read symlink or abort. Checks that path is a symlink. 
FreeMem the returned value. */
{
struct stat sb;
if (lstat(path, &sb) == -1)
    errnoAbort("lstat failure on %s", path);
if ((sb.st_mode & S_IFMT) != S_IFLNK)
    errnoAbort("path %s not a symlink.", path);
return mustReadSymlinkExt(path, &sb);
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
movq %rsp, %rsi
callq 0x6a70
cmpl $-0x1, %eax
jne 0x353ee
leaq 0x5e2c3(%rip), %rdi     # 0x936a7
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26c9f
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0xa000, %eax           # imm = 0xA000
je 0x3540f
leaq 0x5e2b6(%rip), %rdi     # 0x936bb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26c9f
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3535e
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/pipeline.c
// Function: pipelineClose
int pipelineClose(struct pipeline **pPl)
/* Wait for pipeline to finish and free it. Same as pipelineWait then pipelineClose.
 * Returns pipelineWait result (normally 0). */
{
struct pipeline *pl = *pPl;
int ret = 0;
if (pl != NULL)
    {
    ret = pipelineWait(pl);
    pipelineFree(pPl);
    }
return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x35b97
callq 0x35a21
movl %eax, %ebp
movq %rbx, %rdi
callq 0x3545c
movl %ebp, %eax
jmp 0x35b99
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/pipeline.c
// Function: plProcSetup
static void plProcSetup(struct plProc* proc, int stdinFd, int stdoutFd, int stderrFd)
/* setup signal, error handling, and file descriptors after fork */
{
/* Optionally treat a closed pipe as an EOF rather than getting SIGPIPE */
if (signal(SIGPIPE, ((proc->pl->options & pipelineSigpipe) ? SIG_DFL : SIG_IGN)) == SIG_ERR)
    errnoAbort("error ignoring SIGPIPE");

if (setpgid(getpid(), proc->pl->groupLeader) != 0)
    errnoAbort("error from setpgid(%d, %d)", getpid(), proc->pl->groupLeader);

/* child, first setup stdio files */
if (stdinFd != STDIN_FILENO)
    {
    if (dup2(stdinFd, STDIN_FILENO) < 0)
        errnoAbort("can't dup2 to stdin");
    }
    
if (stdoutFd != STDOUT_FILENO)
    {
    if (dup2(stdoutFd, STDOUT_FILENO) < 0)
        errnoAbort("can't dup2 to stdout");
    }
    
if (stderrFd != STDERR_FILENO)
    {
    if (dup2(stderrFd, STDERR_FILENO) < 0)
        errnoAbort("can't dup2 to stderr");
    }
closeNonStdDescriptors();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movq 0x8(%rdi), %rax
xorl %esi, %esi
testb $0x20, 0x1c(%rax)
sete %sil
movl $0xd, %edi
callq 0x6890
cmpq $-0x1, %rax
jne 0x361d7
leaq 0x5d81c(%rip), %rdi     # 0x939ec
xorl %eax, %eax
callq 0x26c9f
callq 0x6ac0
movq 0x8(%r15), %rcx
movl 0xc(%rcx), %esi
movl %eax, %edi
callq 0x6ca0
testl %eax, %eax
je 0x3620a
callq 0x6ac0
movq 0x8(%r15), %rcx
movl 0xc(%rcx), %edx
leaq 0x5d802(%rip), %rdi     # 0x93a03
movl %eax, %esi
xorl %eax, %eax
callq 0x26c9f
testl %r14d, %r14d
je 0x3622b
movl %r14d, %edi
xorl %esi, %esi
callq 0x6670
testl %eax, %eax
jns 0x3622b
leaq 0x5d7fa(%rip), %rdi     # 0x93a1e
xorl %eax, %eax
callq 0x26c9f
cmpl $0x1, %ebp
je 0x3624e
movl %ebp, %edi
movl $0x1, %esi
callq 0x6670
testl %eax, %eax
jns 0x3624e
leaq 0x5d7eb(%rip), %rdi     # 0x93a32
xorl %eax, %eax
callq 0x26c9f
cmpl $0x2, %ebx
je 0x36271
movl %ebx, %edi
movl $0x2, %esi
callq 0x6670
testl %eax, %eax
jns 0x36271
leaq 0x5d7dd(%rip), %rdi     # 0x93a47
xorl %eax, %eax
callq 0x26c9f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x35fad
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslxLoad
struct psl *pslxLoad(char **row)
/* Load a psl from row fetched with select * from psl
 * from database.  Dispose of this with pslFree(). */
{
struct psl *ret = pslLoad(row);
int retSize;
sqlStringDynamicArray(row[21],&ret->qSequence, &retSize);
sqlStringDynamicArray(row[22],&ret->tSequence, &retSize);
return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x3633b
movq %rax, %r14
movq 0xa8(%rbx), %rdi
leaq 0x78(%rax), %rsi
leaq 0xc(%rsp), %r15
movq %r15, %rdx
callq 0x3d1b5
movq 0xb0(%rbx), %rdi
leaq 0x80(%r14), %rsi
movq %r15, %rdx
callq 0x3d1b5
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslFree
void pslFree(struct psl **pEl)
/* Free a single dynamically allocated psl such as created
 * with pslLoad(). */
{
struct psl *el;

if ((el = *pEl) == NULL) return;
freeMem(el->qName);
freeMem(el->tName);
freeMem(el->blockSizes);
freeMem(el->qStarts);
freeMem(el->tStarts);
if (el->qSequence)
    {
    freeMem(el->qSequence[0]);
    freeMem(el->qSequence);
    }
if (el->tSequence)
    {
    freeMem(el->tSequence[0]);
    freeMem(el->tSequence);
    }
freez(pEl);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x3683e
movq %rdi, %rbx
movq 0x30(%r14), %rdi
callq 0x2dd41
movq 0x48(%r14), %rdi
callq 0x2dd41
movq 0x60(%r14), %rdi
callq 0x2dd41
movq 0x68(%r14), %rdi
callq 0x2dd41
movq 0x70(%r14), %rdi
callq 0x2dd41
movq 0x78(%r14), %rax
testq %rax, %rax
je 0x3680f
movq (%rax), %rdi
callq 0x2dd41
movq 0x78(%r14), %rdi
callq 0x2dd41
movq 0x80(%r14), %rax
testq %rax, %rax
je 0x3682f
movq (%rax), %rdi
callq 0x2dd41
movq 0x80(%r14), %rdi
callq 0x2dd41
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2dd51
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslFreeList
void pslFreeList(struct psl **pList)
/* Free a list of dynamically allocated psl's */
{
struct psl *el, *next;

for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    pslFree(&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 0x36879
leaq 0x8(%rsp), %r14
movq (%r15), %r15
movq %r14, %rdi
callq 0x367b9
movq %r15, 0x8(%rsp)
testq %r15, %r15
jne 0x36864
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslLoadAll
struct psl *pslLoadAll(char *fileName)
/* Load all psl's in file. */
{
struct lineFile *lf = pslFileOpen(fileName);
struct psl *pslList = NULL, *psl;
while ((psl = pslNext(lf)) != NULL)
    {
    slAddHead(&pslList, psl);
    }
slReverse(&pslList);
lineFileClose(&lf);
return pslList;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsp, %rbx
leaq 0x14(%rsp), %rdx
leaq 0x8(%rsp), %r14
movq %rbx, %rsi
movq %r14, %rcx
callq 0x376b9
movq (%r14), %rdi
movq %rdi, (%r14)
movq $0x0, (%rbx)
callq 0x37349
testq %rax, %rax
je 0x37306
movq (%rsp), %rcx
movq %rcx, (%rax)
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
jmp 0x372ea
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1fcb3
leaq 0x8(%rsp), %rdi
callq 0x2ab48
movq (%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslNext
struct psl *pslNext(struct lineFile *lf)
/* Read next line from file and convert it to psl.  Return
 * NULL at eof. */
{
char *line;
int lineSize;
char *words[32];
int wordCount;
static int lineAlloc = 0;
static char *chopBuf = NULL;

if (!lineFileNextReal(lf, &line))
    {
    return NULL;
    }
lineSize = strlen(line);
if (lineSize >= lineAlloc)
    {
    lineAlloc = lineSize+256;
    chopBuf = needMoreMem(chopBuf, 0, lineAlloc);
    }
memcpy(chopBuf, line, lineSize+1);
wordCount = chopLine(chopBuf, words);
if (wordCount == 21)
    {
    return pslLoad(words);
    }
if (wordCount == 23)
    {
    return pslxLoad(words);
    }
else
    {
    errAbort("Bad line %d of %s wordCount is %d instead of 21 or 23\n", lf->lineIx, lf->fileName, wordCount);
    return NULL;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x2afac
testl %eax, %eax
je 0x373e3
movq 0x8(%rsp), %rdi
callq 0x62d0
movq %rax, %r14
cmpl %r14d, 0x8cd6e(%rip)    # 0xc40e8
jg 0x373a0
movl %r14d, %edx
addl $0x100, %edx            # imm = 0x100
movl %edx, 0x8cd5d(%rip)     # 0xc40e8
movq 0x8cd5e(%rip), %rdi     # 0xc40f0
xorl %esi, %esi
callq 0x2dd03
movq %rax, 0x8cd50(%rip)     # 0xc40f0
movq 0x8cd49(%rip), %r15     # 0xc40f0
movq 0x8(%rsp), %rsi
leal 0x1(%r14), %eax
movslq %eax, %rdx
movq %r15, %rdi
callq 0x6570
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movl $0x20, %edx
callq 0x223ad
cmpl $0x17, %eax
je 0x373e7
cmpl $0x15, %eax
jne 0x373f6
leaq 0x10(%rsp), %rdi
callq 0x3633b
jmp 0x373f1
xorl %ebx, %ebx
jmp 0x3740f
leaq 0x10(%rsp), %rdi
callq 0x362ec
movq %rax, %rbx
jmp 0x3740f
movl 0x28(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x5cb09(%rip), %rdi     # 0x93f0d
xorl %ebx, %ebx
movl %eax, %ecx
xorl %eax, %eax
callq 0x26b6f
movq %rbx, %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslCmpQuery
int pslCmpQuery(const void *va, const void *vb)
/* Compare to sort based on query start. */
{
const struct psl *a = *((struct psl **)va);
const struct psl *b = *((struct psl **)vb);
int dif;
dif = strcmp(a->qName, b->qName);
if (dif == 0)
    dif = a->qStart - b->qStart;
return dif;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq (%rsi), %rbx
movq 0x30(%r14), %rdi
movq 0x30(%rbx), %rsi
callq 0x6a50
testl %eax, %eax
jne 0x37441
movl 0x3c(%r14), %eax
subl 0x3c(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslCmpTarget
int pslCmpTarget(const void *va, const void *vb)
/* Compare to sort based on target start. */
{
const struct psl *a = *((struct psl **)va);
const struct psl *b = *((struct psl **)vb);
int dif;
dif = strcmp(a->tName, b->tName);
if (dif == 0)
    dif = a->tStart - b->tStart;
return dif;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq (%rsi), %rbx
movq 0x48(%r14), %rdi
movq 0x48(%rbx), %rsi
callq 0x6a50
testl %eax, %eax
jne 0x3746b
movl 0x54(%r14), %eax
subl 0x54(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslCmpTargetAndStrand
int pslCmpTargetAndStrand(const void *va, const void *vb)
/* Compare to sort based on target, strand,  tStart. */
{
const struct psl *a = *((struct psl **)va);
const struct psl *b = *((struct psl **)vb);
int dif;
dif = strcmp(a->tName, b->tName);
if (dif == 0)
    dif = strcmp(a->strand, b->strand);
if (dif == 0)
    dif = a->tStart - b->tStart;
return dif;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq (%rsi), %rbx
movq 0x48(%r14), %rdi
movq 0x48(%rbx), %rsi
callq 0x6a50
testl %eax, %eax
jne 0x3749b
leaq 0x28(%r14), %rdi
leaq 0x28(%rbx), %rsi
callq 0x6a50
testl %eax, %eax
jne 0x374a6
movl 0x54(%r14), %eax
subl 0x54(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslCmpQueryScore
int pslCmpQueryScore(const void *va, const void *vb)
/* Compare to sort based on query then score (descending). */
{
const struct psl *a = *((struct psl **)va);
const struct psl *b = *((struct psl **)vb);
int diff = strcmp(a->qName, b->qName);
if (diff == 0)
    diff = pslScore(b) - pslScore(a);
return diff;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rbx
movq (%rsi), %r14
movq 0x30(%rbx), %rdi
movq 0x30(%r14), %rsi
callq 0x6a50
movl %eax, %ebp
testl %eax, %eax
jne 0x375cb
movq %r14, %rdi
callq 0x37d73
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal 0x1(,%rcx,2), %eax
movl 0x10(%r14), %ebp
shrl %ebp
addl 0x8(%r14), %ebp
subl 0xc(%r14), %ebp
movl 0x20(%r14), %r15d
imull %eax, %ebp
addl 0x18(%r14), %r15d
movq %rbx, %rdi
callq 0x37d73
xorl %ecx, %ecx
cmpl $0x1, %eax
sbbl %ecx, %ecx
movl 0x10(%rbx), %eax
shrl %eax
addl 0x8(%rbx), %eax
subl 0xc(%rbx), %eax
orl $-0x3, %ecx
subl %r15d, %ebp
addl 0x18(%rbx), %ebp
imull %ecx, %eax
addl 0x20(%rbx), %ebp
addl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslWriteAll
void pslWriteAll(struct psl *pslList, char *fileName, boolean writeHeader)
/* Write a psl file from list. */
{
FILE *f;
struct psl *psl;

f = mustOpen(fileName, "w");
if (writeHeader)
    pslWriteHead(f);
for (psl = pslList; psl != NULL; psl = psl->next)
    pslTabOut(psl, f);
fclose(f);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x57628(%rip), %rsi     # 0x8ec89
movq %rax, %rdi
callq 0x22d5a
movq %rax, %r14
testl %ebp, %ebp
je 0x376a8
leaq 0x5c7e8(%rip), %rdi     # 0x93e5f
movq %r14, %rsi
callq 0x6810
leaq 0x5cbb9(%rip), %rdi     # 0x9423f
movq %r14, %rsi
callq 0x6810
jmp 0x376a8
movq %rbx, %rdi
movq %r14, %rsi
movl $0x9, %edx
movl $0xa, %ecx
callq 0x3688a
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x37690
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x66e0
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslxLoadLm
struct psl *pslxLoadLm(char **row, struct lm *lm)
/* Load row into local memory pslx. */
{
struct psl *ret = pslLoadLm(row, lm);
ret->qSequence = lmAlloc(lm, sizeof(ret->qSequence[0]) * ret->blockCount);
sqlStringArray(lmCloneString(lm,row[21]),ret->qSequence, ret->blockCount);
ret->tSequence = lmAlloc(lm, sizeof(ret->tSequence[0]) * ret->blockCount);
sqlStringArray(lmCloneString(lm,row[22]),ret->tSequence, ret->blockCount);
return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x37bfa
movq %rax, %rbx
movl 0x5c(%rax), %esi
shlq $0x3, %rsi
movq %r14, %rdi
callq 0x2bfa9
movq %rax, 0x78(%rbx)
movq 0xa8(%r15), %rsi
movq %r14, %rdi
callq 0x2c0a2
movq 0x78(%rbx), %rsi
movl 0x5c(%rbx), %edx
movq %rax, %rdi
callq 0x3d07d
movl 0x5c(%rbx), %esi
shlq $0x3, %rsi
movq %r14, %rdi
callq 0x2bfa9
movq %rax, 0x80(%rbx)
movq 0xb0(%r15), %rsi
movq %r14, %rdi
callq 0x2c0a2
movq 0x80(%rbx), %rsi
movl 0x5c(%rbx), %edx
movq %rax, %rdi
callq 0x3d07d
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslLoadLm
struct psl *pslLoadLm(char **row, struct lm *lm)
/* Load row into local memory psl. */
{
struct psl *ret;

ret = lmAlloc(lm, sizeof(*ret));
ret->blockCount = sqlUnsigned(row[17]);
ret->match = sqlUnsigned(row[0]);
ret->misMatch = sqlUnsigned(row[1]);
ret->repMatch = sqlUnsigned(row[2]);
ret->nCount = sqlUnsigned(row[3]);
ret->qNumInsert = sqlUnsigned(row[4]);
ret->qBaseInsert = sqlSigned(row[5]);
ret->tNumInsert = sqlUnsigned(row[6]);
ret->tBaseInsert = sqlSigned(row[7]);
strcpy(ret->strand, row[8]);
ret->qName = lmCloneString(lm,row[9]);
ret->qSize = sqlUnsigned(row[10]);
ret->qStart = sqlUnsigned(row[11]);
ret->qEnd = sqlUnsigned(row[12]);
ret->tName = lmCloneString(lm, row[13]);
ret->tSize = sqlUnsigned(row[14]);
ret->tStart = sqlUnsigned(row[15]);
ret->tEnd = sqlUnsigned(row[16]);
ret->blockSizes = lmAlloc(lm, sizeof(ret->blockSizes[0]) * ret->blockCount);
sqlUnsignedArray(row[18], ret->blockSizes, ret->blockCount);
ret->qStarts = lmAlloc(lm, sizeof(ret->qStarts[0]) * ret->blockCount);
sqlUnsignedArray(row[19], ret->qStarts, ret->blockCount);
ret->tStarts = lmAlloc(lm, sizeof(ret->tStarts[0]) * ret->blockCount);
sqlUnsignedArray(row[20], ret->tStarts, ret->blockCount);
return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x88, %esi
movq %r15, %rdi
callq 0x2bfa9
movq %rax, %rbx
movq 0x88(%r14), %rdi
callq 0x3b838
movl %eax, 0x5c(%rbx)
movq (%r14), %rdi
callq 0x3b838
movl %eax, 0x8(%rbx)
movq 0x8(%r14), %rdi
callq 0x3b838
movl %eax, 0xc(%rbx)
movq 0x10(%r14), %rdi
callq 0x3b838
movl %eax, 0x10(%rbx)
movq 0x18(%r14), %rdi
callq 0x3b838
movl %eax, 0x14(%rbx)
movq 0x20(%r14), %rdi
callq 0x3b838
movl %eax, 0x18(%rbx)
movq 0x28(%r14), %rdi
callq 0x3b9a8
movl %eax, 0x1c(%rbx)
movq 0x30(%r14), %rdi
callq 0x3b838
movl %eax, 0x20(%rbx)
movq 0x38(%r14), %rdi
callq 0x3b9a8
movl %eax, 0x24(%rbx)
leaq 0x28(%rbx), %rdi
movq 0x40(%r14), %rsi
callq 0x6680
movq 0x48(%r14), %rsi
movq %r15, %rdi
callq 0x2c0a2
movq %rax, 0x30(%rbx)
movq 0x50(%r14), %rdi
callq 0x3b838
movl %eax, 0x38(%rbx)
movq 0x58(%r14), %rdi
callq 0x3b838
movl %eax, 0x3c(%rbx)
movq 0x60(%r14), %rdi
callq 0x3b838
movl %eax, 0x40(%rbx)
movq 0x68(%r14), %rsi
movq %r15, %rdi
callq 0x2c0a2
movq %rax, 0x48(%rbx)
movq 0x70(%r14), %rdi
callq 0x3b838
movl %eax, 0x50(%rbx)
movq 0x78(%r14), %rdi
callq 0x3b838
movl %eax, 0x54(%rbx)
movq 0x80(%r14), %rdi
callq 0x3b838
movl %eax, 0x58(%rbx)
movl 0x5c(%rbx), %esi
shlq $0x2, %rsi
movq %r15, %rdi
callq 0x2bfa9
movq %rax, 0x60(%rbx)
movq 0x90(%r14), %rdi
movl 0x5c(%rbx), %edx
movq %rax, %rsi
callq 0x3caf3
movl 0x5c(%rbx), %esi
shlq $0x2, %rsi
movq %r15, %rdi
callq 0x2bfa9
movq %rax, 0x68(%rbx)
movq 0x98(%r14), %rdi
movl 0x5c(%rbx), %edx
movq %rax, %rsi
callq 0x3caf3
movl 0x5c(%rbx), %esi
shlq $0x2, %rsi
movq %r15, %rdi
callq 0x2bfa9
movq %rax, 0x70(%rbx)
movq 0xa0(%r14), %rdi
movl 0x5c(%rbx), %edx
movq %rax, %rsi
callq 0x3caf3
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslIsProtein
boolean pslIsProtein(const struct psl *psl)
/* is psl a protein psl (are it's blockSizes and scores in protein space) */
{
int lastBlock = psl->blockCount - 1;

return  (((psl->strand[1] == '+' ) &&
    (psl->tEnd == psl->tStarts[lastBlock] + 3*psl->blockSizes[lastBlock])) ||
   ((psl->strand[1] == '-') && 
    (psl->tStart == (psl->tSize-(psl->tStarts[lastBlock] + 3*psl->blockSizes[lastBlock])))));
}

// Assembly:
movl 0x5c(%rdi), %ecx
decl %ecx
movzbl 0x29(%rdi), %edx
cmpl $0x2d, %edx
je 0x37db4
xorl %eax, %eax
cmpl $0x2b, %edx
jne 0x37dd5
movq 0x70(%rdi), %rax
movslq %ecx, %rsi
movq 0x60(%rdi), %r8
movl (%r8,%rsi,4), %r8d
leal (%r8,%r8,2), %r8d
addl (%rax,%rsi,4), %r8d
movl $0x1, %eax
cmpl %r8d, 0x58(%rdi)
je 0x37dd5
movl $0x0, %eax
cmpb $0x2d, %dl
jne 0x37dd5
movl 0x50(%rdi), %edx
movq 0x70(%rdi), %rax
movslq %ecx, %rcx
movq 0x60(%rdi), %rsi
movl (%rsi,%rcx,4), %esi
leal (%rsi,%rsi,2), %esi
subl (%rax,%rcx,4), %edx
subl %esi, %edx
xorl %eax, %eax
cmpl %edx, 0x54(%rdi)
sete %al
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslCalcMilliBad
int pslCalcMilliBad(struct psl *psl, boolean isMrna)
/* Calculate badness in parts per thousand. */
{
int sizeMul = pslIsProtein(psl) ? 3 : 1;
int qAliSize, tAliSize, aliSize;
int milliBad = 0;
int sizeDif;
int insertFactor;
int total;

qAliSize = sizeMul * (psl->qEnd - psl->qStart);
tAliSize = psl->tEnd - psl->tStart;
aliSize = min(qAliSize, tAliSize);
if (aliSize <= 0)
    return 0;
sizeDif = qAliSize - tAliSize;
if (sizeDif < 0)
    {
    if (isMrna)
	sizeDif = 0;
    else
	sizeDif = -sizeDif;
    }
insertFactor = psl->qNumInsert;
if (!isMrna)
    insertFactor += psl->tNumInsert;

total = (sizeMul * (psl->match + psl->repMatch + psl->misMatch));
if (total != 0)
    milliBad = (1000 * (psl->misMatch*sizeMul + insertFactor + round(3*log(1+sizeDif)))) / total;
return milliBad;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x37d73
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal 0x1(,%rcx,2), %ecx
movl 0x40(%rbx), %eax
movl 0x58(%rbx), %edx
subl 0x3c(%rbx), %eax
imull %ecx, %eax
subl 0x54(%rbx), %edx
movl %eax, %esi
subl %edx, %esi
cmovll %eax, %edx
testl %edx, %edx
jle 0x37e6d
movl %esi, %edx
negl %edx
xorl %eax, %eax
testl %ebp, %ebp
cmovnel %eax, %edx
testl %esi, %esi
cmovnsl %esi, %edx
movl 0x18(%rbx), %esi
testl %ebp, %ebp
jne 0x37e26
addl 0x20(%rbx), %esi
movl 0xc(%rbx), %r14d
movl 0x10(%rbx), %ebp
addl 0x8(%rbx), %ebp
addl %r14d, %ebp
je 0x37e6f
imull %ecx, %ebp
imull %ecx, %r14d
addl %esi, %r14d
incl %edx
cvtsi2sd %edx, %xmm0
callq 0x6550
mulsd 0x5bec6(%rip), %xmm0    # 0x93d18
addsd 0x56f4e(%rip), %xmm0    # 0x8eda8
cvttsd2si %xmm0, %eax
addl %r14d, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
xorl %edx, %edx
divl %ebp
jmp 0x37e6f
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslToFakeFfAli
struct ffAli *pslToFakeFfAli(struct psl *psl, DNA *needle, DNA *haystack)
/* Convert from psl to ffAli format.  In some cases you can pass NULL
 * for needle and haystack - depending what the post-processing is going
 * to be. */
{
struct ffAli *ffList = NULL, *ff;
int blockCount = psl->blockCount;
unsigned *blockSizes = psl->blockSizes;
unsigned *qStarts = psl->qStarts;
unsigned *tStarts = psl->tStarts;
int size;
int i;

for (i=0; i<blockCount; ++i)
    {
    size = blockSizes[i];
    AllocVar(ff);
    ff->left = ffList;
    ffList = ff;
    ff->nStart = ff->nEnd = needle + qStarts[i];
    ff->nEnd += size;
    ff->hStart = ff->hEnd = haystack + tStarts[i];
    ff->hEnd += size;
    }
ffList = ffMakeRightLinks(ffList);
return ffList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq 0x5c(%rdi), %rbp
testq %rbp, %rbp
jle 0x37f72
movq %rdx, %r15
movq %rsi, %r13
movq 0x60(%rdi), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rdi), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rdi), %rax
movq %rax, (%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x10(%rsp), %rax
movslq (%rax,%rbx,4), %r12
movl $0x38, %edi
callq 0x2dc95
movq %r14, (%rax)
movq 0x8(%rsp), %rcx
movl (%rcx,%rbx,4), %ecx
addq %r13, %rcx
movq %rcx, 0x10(%rax)
addq %r12, %rcx
movq %rcx, 0x18(%rax)
movq (%rsp), %rcx
movl (%rcx,%rbx,4), %ecx
addq %r15, %rcx
movq %rcx, 0x20(%rax)
addq %r12, %rcx
movq %rcx, 0x28(%rax)
incq %rbx
movq %rax, %r14
cmpq %rbx, %rbp
jne 0x37f24
jmp 0x37f74
xorl %eax, %eax
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27f4d
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslFromFakeFfAli
struct psl *pslFromFakeFfAli(struct ffAli *ff, 
	DNA *needle, DNA *haystack, char strand,
	char *qName, int qSize, char *tName, int tSize)
/* This will create a basic psl structure from a sorted series of ffAli
 * blocks.  The fields that would need actual sequence to be filled in
 * are left zero however - fields including match, repMatch, mismatch. */
{
struct psl *psl;
unsigned *blockSizes;
unsigned *qStarts;
unsigned *tStarts;
int blockCount;
int i;
int nStart, hStart;
int nEnd, hEnd;

AllocVar(psl);
psl->blockCount = blockCount = ffAliCount(ff);
psl->blockSizes = AllocArray(blockSizes, blockCount);
psl->qStarts = AllocArray(qStarts, blockCount);
psl->tStarts = AllocArray(tStarts, blockCount);
psl->qName = cloneString(qName);
psl->qSize = qSize;
psl->tName = cloneString(tName);
psl->tSize = tSize;
psl->strand[0] = strand;

for (i=0; i<blockCount; ++i)
    {
    nStart = ff->nStart - needle;
    nEnd = ff->nEnd - needle;
    hStart = ff->hStart - haystack;
    hEnd = ff->hEnd - haystack;
    blockSizes[i] = nEnd - nStart;
    qStarts[i] = nStart;
    tStarts[i] = hStart;
    if (i == 0)
       {
       psl->qStart = nStart;
       psl->tStart = hStart;
       }
    if (i == blockCount-1)
       {
       psl->qEnd = nEnd;
       psl->tEnd = hEnd;
       }
    ff = ff->right;
    }
if (strand == '-')
    {
    reverseIntRange(&psl->qStart, &psl->qEnd, psl->qSize);
    }
return psl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x4(%rsp)
movq %r8, 0x18(%rsp)
movl %ecx, (%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x88, %edi
callq 0x2dc95
movq %rax, %rbx
movq %r12, %rdi
callq 0x27fda
movl %eax, 0x5c(%rbx)
movq %rax, 0x8(%rsp)
cltq
movq %rax, 0x10(%rsp)
leaq (,%rax,4), %r13
movq %r13, %rdi
callq 0x2db04
movq %rax, 0x20(%rsp)
movq %rax, 0x60(%rbx)
movq %r13, %rdi
callq 0x2db04
movq %rax, %rbp
movq %rax, 0x68(%rbx)
movq %r13, %rdi
callq 0x2db04
movq %rax, %r13
movq %rax, 0x70(%rbx)
movq 0x18(%rsp), %rdi
callq 0x1f9f6
movq %rax, 0x30(%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x38(%rbx)
movq 0x60(%rsp), %rdi
callq 0x1f9f6
movq %rax, 0x48(%rbx)
movl 0x68(%rsp), %eax
movl %eax, 0x50(%rbx)
movl (%rsp), %eax
movb %al, 0x28(%rbx)
cmpl $0x0, 0x10(%rsp)
jle 0x380aa
movq 0x8(%rsp), %rcx
leal -0x1(%rcx), %eax
movl %ecx, %ecx
xorl %edx, %edx
movq 0x20(%rsp), %r11
movl 0x10(%r12), %r8d
movl 0x18(%r12), %esi
subl %r15d, %r8d
subl %r15d, %esi
movl 0x20(%r12), %r9d
subl %r14d, %r9d
movl 0x28(%r12), %edi
movl %esi, %r10d
subl %r8d, %r10d
movl %r10d, (%r11,%rdx,4)
movl %r8d, (%rbp,%rdx,4)
movl %r9d, (%r13,%rdx,4)
testq %rdx, %rdx
jne 0x3808f
movl %r8d, 0x3c(%rbx)
movl %r9d, 0x54(%rbx)
cmpq %rdx, %rax
jne 0x3809d
subl %r14d, %edi
movl %esi, 0x40(%rbx)
movl %edi, 0x58(%rbx)
movq 0x8(%r12), %r12
incq %rdx
cmpq %rdx, %rcx
jne 0x38051
cmpb $0x2d, (%rsp)
jne 0x380c3
leaq 0x3c(%rbx), %rdi
movq %rbx, %rsi
addq $0x40, %rsi
movl 0x38(%rbx), %edx
callq 0x25145
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslToFfAli
struct ffAli *pslToFfAli(struct psl *psl, struct dnaSeq *query, struct dnaSeq *target,
	int targetOffset)
/* Convert from psl to ffAli format.  Clip to parts that we actually
 * have sequence for. */
{
struct ffAli *ffList = NULL, *ff;
DNA *needle = query->dna;
DNA *haystack = target->dna;
int blockCount = psl->blockCount;
unsigned *blockSizes = psl->blockSizes;
unsigned *qStarts = psl->qStarts;
unsigned *tStarts = psl->tStarts;
int size;
int i;
int tMin = targetOffset;
int tMax = targetOffset + target->size;
int tStart, tEnd;
int clipStart, clipEnd, clipOffset, clipSize;

for (i=0; i<blockCount; ++i)
    {
    clipStart = tStart = tStarts[i];
    size = blockSizes[i];
    clipEnd = tEnd = tStart + size;
    if (tStart < tMax && tEnd > tMin)
	{
	if (clipStart < tMin) clipStart = tMin;
	if (clipEnd > tMax) clipEnd = tMax;
	clipOffset = clipStart - tStart;
	clipSize = clipEnd - clipStart;
	AllocVar(ff);
	ff->left = ffList;
	ffList = ff;
	ff->nStart = ff->nEnd = needle + qStarts[i] + clipOffset;
	ff->nEnd += clipSize;
	ff->hStart = ff->hEnd = haystack + clipStart - targetOffset;
	ff->hEnd += clipSize;
	}
    }
ffList = ffMakeRightLinks(ffList);
ffCountGoodEnds(ffList);
return ffList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movslq 0x5c(%rdi), %r8
testq %r8, %r8
jle 0x381c9
movl %ecx, %ebx
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rsp)
movl 0x18(%rdx), %r15d
addl %ecx, %r15d
movq 0x60(%rdi), %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rdi), %rax
movq %rax, 0x18(%rsp)
movq 0x70(%rdi), %rsi
movq 0x10(%rdx), %rdx
movslq %ecx, %rax
subq %rax, %rdx
movq %rdx, 0x8(%rsp)
xorl %r13d, %r13d
xorl %r12d, %r12d
movq %r8, 0x28(%rsp)
movq %rsi, 0x10(%rsp)
movl %ecx, 0x4(%rsp)
movl (%rsi,%r13,4), %eax
cmpl %r15d, %eax
jge 0x381bb
movq 0x30(%rsp), %rdx
movl (%rdx,%r13,4), %ebp
addl %eax, %ebp
cmpl %ebx, %ebp
jle 0x381bb
cmpl %ebx, %eax
cmovgl %eax, %ebx
cmpl %r15d, %ebp
jl 0x38160
movl %r15d, %ebp
movl %ebx, %r14d
subl %eax, %r14d
subl %ebx, %ebp
movl $0x38, %edi
callq 0x2dc95
movq %r12, (%rax)
movq 0x18(%rsp), %rcx
movl (%rcx,%r13,4), %ecx
addq 0x20(%rsp), %rcx
movslq %r14d, %rdx
addq %rcx, %rdx
movq %rdx, 0x10(%rax)
movslq %ebp, %rcx
addq %rcx, %rdx
movq %rdx, 0x18(%rax)
movslq %ebx, %rdx
addq 0x8(%rsp), %rdx
movq %rdx, 0x20(%rax)
addq %rcx, %rdx
movq %rdx, 0x28(%rax)
movq %rax, %r12
movq 0x28(%rsp), %r8
movq 0x10(%rsp), %rsi
movl 0x4(%rsp), %ebx
incq %r13
cmpq %r13, %r8
jne 0x3813b
jmp 0x381cc
xorl %r12d, %r12d
movq %r12, %rdi
callq 0x27f4d
movq %rax, %rbx
movq %rax, %rdi
callq 0x27f6a
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslWeightedIntronOrientation
int pslWeightedIntronOrientation(struct psl *psl, struct dnaSeq *genoSeq, int offset)
/* Return >0 if introns make it look like alignment is on + strand,
 *        <0 if introns make it look like alignment is on - strand,
 *        0 if can't tell.  The absolute value of the return indicates
 * how many splice sites we've seen supporting the orientation.
 * Sequence should NOT be reverse complemented.  */
{
int intronDir = 0;
int oneDir;
int i;
DNA *dna = genoSeq->dna;

/* code below doesn't support negative target strand (translated blat) */
if (psl->strand[1] == '-')
    errAbort("pslWeightedIntronOrientation doesn't support a negative target strand");

for (i=1; i<psl->blockCount; ++i)
    {
    int iStart, iEnd, blockSize = psl->blockSizes[i-1];
    if (psl->qStarts[i-1] + blockSize == psl->qStarts[i])
	{
	iStart = psl->tStarts[i-1] + psl->blockSizes[i-1] - offset;
	iEnd = psl->tStarts[i] - offset;
	oneDir = intronOrientation(dna+iStart, dna+iEnd);
	intronDir += oneDir;
	}
    }
return intronDir;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movq 0x10(%rsi), %r15
cmpb $0x2d, 0x29(%rdi)
jne 0x38239
leaq 0x5bd12(%rip), %rdi     # 0x93f44
xorl %eax, %eax
callq 0x26b6f
xorl %ebp, %ebp
cmpl $0x2, 0x5c(%r14)
jb 0x38291
xorl %ebp, %ebp
movl $0x1, %r12d
movq 0x60(%r14), %rax
movq 0x68(%r14), %rcx
movl -0x4(%rax,%r12,4), %eax
movl -0x4(%rcx,%r12,4), %edx
addl %eax, %edx
cmpl (%rcx,%r12,4), %edx
jne 0x38288
movq 0x70(%r14), %rcx
subl %ebx, %eax
addl -0x4(%rcx,%r12,4), %eax
movl (%rcx,%r12,4), %ecx
subl %ebx, %ecx
movslq %eax, %rdi
addq %r15, %rdi
movslq %ecx, %rsi
addq %r15, %rsi
callq 0x25807
addl %eax, %ebp
incq %r12
cmpl %r12d, 0x5c(%r14)
ja 0x3824a
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslHasIntron
boolean pslHasIntron(struct psl *psl, struct dnaSeq *seq, int seqOffset)
/* Return TRUE if there's a probable intron. Sequence should NOT be
 * reverse complemented.*/
{
int blockCount = psl->blockCount, i;
unsigned *tStarts = psl->tStarts;
unsigned *blockSizes = psl->blockSizes;
unsigned *qStarts = psl->qStarts;
int blockSize, start, end;
DNA *dna = seq->dna;

for (i=1; i<blockCount; ++i)
    {
    blockSize = blockSizes[i-1];
    start = qStarts[i-1]+blockSize;
    end = qStarts[i];
    if (start == end)
        {
        start = tStarts[i-1] + blockSize;
        end = tStarts[i];
        if (psl->strand[1] == '-')
            reverseIntRange(&start, &end, psl->tSize);
        start -= seqOffset;
        end -= seqOffset;
	if (intronOrientation(dna+start, dna+end) != 0)
	    return TRUE;
	}
    }
return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq 0x5c(%rdi), %r12
cmpq $0x2, %r12
jl 0x3836c
movq 0x70(%rdi), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rdi), %r15
movq 0x68(%rdi), %r14
movq 0x10(%rsi), %rax
movq %rax, 0x8(%rsp)
decq %r12
xorl %ebx, %ebx
movslq %edx, %r13
movl (%r15,%rbx,4), %eax
movl (%r14,%rbx,4), %ecx
addl %eax, %ecx
movl %ecx, 0x4(%rsp)
movl 0x4(%r14,%rbx,4), %edx
movl %edx, (%rsp)
cmpl %edx, %ecx
jne 0x38364
movq 0x10(%rsp), %rcx
addl (%rcx,%rbx,4), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rcx,%rbx,4), %eax
movl %eax, (%rsp)
movq %rdi, %rbp
cmpb $0x2d, 0x29(%rdi)
jne 0x38337
movl 0x50(%rbp), %edx
leaq 0x4(%rsp), %rdi
movq %rsp, %rsi
callq 0x25145
movslq 0x4(%rsp), %rdi
subq %r13, %rdi
movl %edi, 0x4(%rsp)
movslq (%rsp), %rsi
subq %r13, %rsi
movl %esi, (%rsp)
movq 0x8(%rsp), %rax
addq %rax, %rdi
addq %rax, %rsi
callq 0x25807
testl %eax, %eax
movq %rbp, %rdi
jne 0x3837d
incq %rbx
cmpq %rbx, %r12
jne 0x382f1
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x3836e
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslTailSizes
void pslTailSizes(struct psl *psl, int *retStartTail, int *retEndTail)
/* Find the length of "tails" (rather than extensions) implied by psl. */
{
int orientation = pslOrientation(psl);
int qFloppyStart, qFloppyEnd;
int tFloppyStart, tFloppyEnd;

if (orientation > 0)
    {
    qFloppyStart = psl->qStart;
    qFloppyEnd = psl->qSize - psl->qEnd;
    }
else
    {
    qFloppyStart = psl->qSize - psl->qEnd;
    qFloppyEnd = psl->qStart;
    }
tFloppyStart = psl->tStart;
tFloppyEnd = psl->tSize - psl->tEnd;
*retStartTail = min(qFloppyStart, tFloppyStart);
*retEndTail = min(qFloppyEnd, tFloppyEnd);
}

// Assembly:
movb 0x28(%rdi), %al
movb 0x29(%rdi), %cl
xorl %r8d, %r8d
cmpb %cl, %al
sete %r8b
xorl %r9d, %r9d
cmpb $0x2d, %al
setne %r9b
testb %cl, %cl
cmovel %r9d, %r8d
cmpb $0x1, %r8b
jne 0x383b3
movl 0x38(%rdi), %eax
movl 0x3c(%rdi), %ecx
subl 0x40(%rdi), %eax
jmp 0x383bc
movl 0x38(%rdi), %ecx
movl 0x3c(%rdi), %eax
subl 0x40(%rdi), %ecx
movl 0x50(%rdi), %r8d
movl 0x54(%rdi), %r9d
subl 0x58(%rdi), %r8d
cmpl %r9d, %ecx
cmovll %ecx, %r9d
movl %r9d, (%rsi)
cmpl %r8d, %eax
cmovll %eax, %r8d
movl %r8d, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: pslRc
void pslRc(struct psl *psl)
/* Reverse-complement a PSL alignment.  This makes the target strand explicit. */
{
unsigned tSize = psl->tSize, qSize = psl->qSize;
unsigned blockCount = psl->blockCount, i;
unsigned *tStarts = psl->tStarts, *qStarts = psl->qStarts, *blockSizes = psl->blockSizes;
int mult = pslIsProtein(psl) ? 3 : 1;

/* swap strand, forcing target to have an explict strand */
psl->strand[0] = (psl->strand[0] != '-') ? '-' : '+';
psl->strand[1] = (psl->strand[1] != '-') ? '-' : '+';
psl->strand[2] = 0;

for (i=0; i<blockCount; ++i)
    {
    tStarts[i] = tSize - (tStarts[i] + mult * blockSizes[i]);
    qStarts[i] = qSize - (qStarts[i] + blockSizes[i]);
    }
reverseUnsigned(tStarts, blockCount);
reverseUnsigned(qStarts, blockCount);
reverseUnsigned(blockSizes, blockCount);
if (psl->qSequence != NULL)
    {
    rcSeqs(psl->qSequence, blockCount, blockSizes);
    rcSeqs(psl->tSequence, blockCount, blockSizes);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movl 0x38(%rdi), %ebp
movl 0x50(%rdi), %ebx
movl 0x5c(%rdi), %eax
movq %rax, 0x8(%rsp)
movq 0x70(%rdi), %r13
movq 0x68(%rdi), %r12
movq 0x60(%rdi), %r15
callq 0x37d73
cmpb $0x2d, 0x28(%r14)
setne %dl
addb %dl, %dl
addb $0x2b, %dl
cmpb $0x2d, 0x29(%r14)
setne %sil
addb %sil, %sil
addb $0x2b, %sil
xorl %ecx, %ecx
cmpl $0x1, %eax
sbbl %ecx, %ecx
movb %dl, 0x28(%r14)
movb %sil, 0x29(%r14)
movq %r14, 0x10(%rsp)
movb $0x0, 0x2a(%r14)
movq 0x8(%rsp), %r14
testq %r14, %r14
je 0x3847f
orl $-0x3, %ecx
xorl %eax, %eax
movl (%r15,%rax,4), %edx
imull %ecx, %edx
movl %ebx, %esi
subl (%r13,%rax,4), %esi
addl %edx, %esi
movl %esi, (%r13,%rax,4)
movl (%r12,%rax,4), %edx
addl (%r15,%rax,4), %edx
movl %ebp, %esi
subl %edx, %esi
movl %esi, (%r12,%rax,4)
incq %rax
cmpq %rax, %r14
jne 0x38452
movq %r13, %rdi
movl %r14d, %esi
callq 0x1fb3a
movq %r12, %rdi
movl %r14d, %esi
callq 0x1fb3a
movq %r15, %rdi
movl %r14d, %esi
callq 0x1fb3a
movq 0x10(%rsp), %rbx
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x384d6
movl %r14d, %esi
movq %r15, %rdx
callq 0x384e5
movq 0x80(%rbx), %rdi
movl %r14d, %esi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x384e5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/psl.c
// Function: rcSeqs
static void rcSeqs(char **seqs, unsigned blockCount, unsigned *blockSizes)
/* reverses complement sequences in list, maintain property that all strings
 * are in one malloc block.   blockSizes should already be reversed. */
{
char *buf, *next;
int i, memSz = 0;

/* get a new memory block for strings */
for (i = 0; i < blockCount; i++)
    memSz += blockSizes[i]+1;
next = buf = needLargeMem(memSz);

/* reverse compliment and copy to new memory block */
for (i = blockCount-1; i >= 0; i--)
    {
    int len = strlen(seqs[i]);
    reverseComplement(seqs[i], len);
    memcpy(next, seqs[i], len+1);
    next += len+1;
    }

/* swap memory and update pointers */
freeMem(seqs[0]);
seqs[0] = buf;
next = buf;

for (i = 0; i < blockCount; i++)
    {
    seqs[i] = next;
    next += blockSizes[i]+1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
xorl %edi, %edi
movl %esi, %esi
testl %ebx, %ebx
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
je 0x3851e
xorl %eax, %eax
movl (%rdx,%rax,4), %ecx
addl %ecx, %edi
incl %edi
incq %rax
cmpq %rax, %rsi
jne 0x3850c
movslq %edi, %rdi
callq 0x2da9d
movq %rax, %r15
movl %ebx, 0x4(%rsp)
decl %ebx
js 0x3856e
movl %ebx, %ebx
incq %rbx
movq %r15, %r12
movq -0x8(%r14,%rbx,8), %r13
movq %r13, %rdi
callq 0x62d0
movslq %eax, %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x250f6
movq -0x8(%r14,%rbx,8), %rsi
incl %ebp
movslq %ebp, %r13
movq %r12, %rdi
movq %r13, %rdx
callq 0x6570
addq %r13, %r12
decq %rbx
jg 0x38536
movq (%r14), %rdi
callq 0x2dd41
movq %r15, (%r14)
cmpl $0x0, 0x4(%rsp)
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rsi
je 0x385a0
xorl %eax, %eax
movq %r15, (%r14,%rax,8)
movl (%rdx,%rax,4), %ecx
incl %ecx
addq %rcx, %r15
incq %rax
cmpq %rax, %rsi
jne 0x3858c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq