LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/obscure.c
// Function: currentVmPeak
long long currentVmPeak()
/* return value of peak Vm memory usage (if /proc/ business exists) */
{
long long vmPeak = 0;

pid_t pid = getpid();
char temp[256];
safef(temp, sizeof(temp), "/proc/%d/status", (int) pid);
struct lineFile *lf = lineFileMayOpen(temp, TRUE);
if (lf)
    {
    char *line;
    while (lineFileNextReal(lf, &line))
	{	// typical line: 'VmPeak:     62646196 kB'
		// seems to always be kB
	if (stringIn("VmPeak", line))
	    {
	    char *words[3];
	    chopByWhite(line, words, 3);
	    vmPeak = sqlLongLong(words[1]);	// assume always 2nd word
	    break;
	    }
	}
    lineFileClose(&lf);
    }

return vmPeak;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
callq 0x6ac0
leaq 0x53d4f(%rip), %rdx     # 0x81e75
xorl %ebx, %ebx
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movl $0x100, %esi            # imm = 0x100
movl %eax, %ecx
xorl %eax, %eax
callq 0x1fab2
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x2551a
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x2e1ae
movq %rax, %r14
movq %rsp, %r15
xorl %ebx, %ebx
leaq 0x53d23(%rip), %r12     # 0x81e85
movq %r14, %rdi
movq %r15, %rsi
callq 0x26108
testl %eax, %eax
je 0x2e1a4
movq (%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x6180
testq %rax, %rax
je 0x2e162
leaq 0x10(%rsp), %rbx
pushq $0x3
popq %rdx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1e59b
movq 0x8(%rbx), %rdi
callq 0x35f40
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x25cd8
movq %rbx, %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2e355
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 0x2e388
movslq %edx, %rax
addq %rax, %rbx
movslq %ecx, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6330
testl %eax, %eax
je 0x2e37a
xorl %eax, %eax
jmp 0x2e388
pushq $0x1
popq %rax
cmpl %ebp, %r14d
je 0x2e388
cmpb $0x2c, -0x1(%rbx)
jne 0x2e376
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x245c9
movq %rax, -0x30(%rbp)
testq %rbx, %rbx
je 0x2e45f
leaq 0x8(%rbx), %r12
movq %r12, %rdi
callq 0x62d0
cmpl $0x200, %eax            # imm = 0x200
jge 0x2e477
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 0x1e270
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x244c6
testq %rax, %rax
je 0x2e445
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x6a50
testl %eax, %eax
je 0x2e434
leaq 0x53ae0(%rip), %rdi     # 0x81f05
movq %r14, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x223fb
jmp 0x2e445
leaq 0x53ab6(%rip), %rdi     # 0x81ef1
movq %r12, %rsi
xorl %eax, %eax
callq 0x223fb
movq -0x30(%rbp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x242d0
movq %r15, %rsp
movq (%rbx), %rbx
jmp 0x2e3b2
leaq -0x30(%rbp), %rdi
callq 0x2494c
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x53a3f(%rip), %rdi     # 0x81ebd
leaq 0x539c9(%rip), %rsi     # 0x81e4e
leaq 0x53a39(%rip), %rcx     # 0x81ec5
movl $0x3ac, %edx            # imm = 0x3AC
callq 0x6460
// File: /workspace/github_c_makefile_star2_O2/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 0x56963(%rip), %rsi     # 0x84e09
callq 0x6800
testq %rax, %rax
je 0x2e4d8
movq %rax, %rbx
movq %rsp, %rdi
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %rax, %rcx
callq 0x6b20
xorl %ebp, %ebp
cmpq $0x1, %rax
sete %bpl
movq %rbx, %rdi
callq 0x66e0
jmp 0x2e4da
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq 0x88a88(%rip), %rbx     # 0xb7ef0
testq %rbx, %rbx
jne 0x2f4b1
leaq 0x52fa0(%rip), %rdi     # 0x82414
callq 0x68f0
movq %rax, 0x88a70(%rip)     # 0xb7ef0
testq %rax, %rax
je 0x2f4ba
movq %rax, %rdi
callq 0x1c306
movq %rax, %rbx
movq %rax, 0x88a59(%rip)     # 0xb7ef0
testq %rbx, %rbx
jne 0x2f4b1
leaq 0x52f78(%rip), %rdi     # 0x8241b
xorl %eax, %eax
callq 0x223fb
movq 0x88a3f(%rip), %rbx     # 0xb7ef0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
xorl %r14d, %r14d
leaq 0x8334c(%rip), %r15     # 0xb2810
xorl %ebx, %ebx
cmpq $0x20, %r14
je 0x2f497
testq %rbx, %rbx
jne 0x2f497
movq (%r14,%r15), %rbx
movq %rbx, %rdi
callq 0x2ed50
testq %rax, %rax
js 0x2f4eb
movq %rbx, 0x88a07(%rip)     # 0xb7ef0
jmp 0x2f4f2
movq 0x889fe(%rip), %rbx     # 0xb7ef0
addq $0x8, %r14
jmp 0x2f4c6
// File: /workspace/github_c_makefile_star2_O2/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 0x1f807
testl %eax, %eax
je 0x2fb15
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x63a0
testl %eax, %eax
je 0x2fb35
leaq 0x52ae5(%rip), %rdi     # 0x825ee
movq %r14, %rsi
xorl %eax, %eax
callq 0x22186
jmp 0x2fb3c
leaq 0x4e15d(%rip), %rsi     # 0x7dc79
movq %r14, %rdi
callq 0x6800
movq %rax, (%rsp)
testq %rax, %rax
je 0x2fb3a
movq %rsp, %rdi
callq 0x1f2ea
pushq $0x1
popq %rbx
jmp 0x2fb3c
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2fb75
leaq 0x52aa1(%rip), %rdi     # 0x8260c
movq %r14, %rsi
xorl %eax, %eax
callq 0x22504
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 0x2fbb2
leaq 0x52a80(%rip), %rdi     # 0x8261e
movq %rbx, %rsi
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
jmp 0x22504
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x28bb0
movq %rax, %rbx
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x6770
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x2fc72
leaq 0x529c9(%rip), %rdi     # 0x82631
movq %r15, %rsi
xorl %eax, %eax
callq 0x22504
cmpq %r14, %r12
jne 0x2fc85
leaq 0x529d2(%rip), %rdi     # 0x82650
xorl %eax, %eax
callq 0x223fb
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2fcbd
leaq 0x529c1(%rip), %rdi     # 0x82674
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22504
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0xa000, %eax           # imm = 0xA000
je 0x2fcde
leaq 0x529b4(%rip), %rdi     # 0x82688
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22504
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2fc2d
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3042c
callq 0x302a8
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2fd28
movl %ebp, %eax
jmp 0x3042e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0xd
popq %rdi
callq 0x6890
cmpq $-0x1, %rax
jne 0x30a4d
leaq 0x51f73(%rip), %rdi     # 0x829b9
xorl %eax, %eax
callq 0x22504
callq 0x6ac0
movq 0x8(%r15), %rcx
movl 0xc(%rcx), %esi
movl %eax, %edi
callq 0x6ca0
testl %eax, %eax
je 0x30a80
callq 0x6ac0
movq 0x8(%r15), %rcx
movl 0xc(%rcx), %edx
leaq 0x51f59(%rip), %rdi     # 0x829d0
movl %eax, %esi
xorl %eax, %eax
callq 0x22504
testl %r14d, %r14d
je 0x30aa1
movl %r14d, %edi
xorl %esi, %esi
callq 0x6670
testl %eax, %eax
jns 0x30aa1
leaq 0x51f51(%rip), %rdi     # 0x829eb
xorl %eax, %eax
callq 0x22504
cmpl $0x1, %ebp
je 0x30ac2
pushq $0x1
popq %rsi
movl %ebp, %edi
callq 0x6670
testl %eax, %eax
jns 0x30ac2
leaq 0x51f44(%rip), %rdi     # 0x829ff
xorl %eax, %eax
callq 0x22504
cmpl $0x2, %ebx
je 0x30ae3
pushq $0x2
popq %rsi
movl %ebx, %edi
callq 0x6670
testl %eax, %eax
jns 0x30ae3
leaq 0x51f38(%rip), %rdi     # 0x82a14
xorl %eax, %eax
callq 0x22504
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x307fb
// File: /workspace/github_c_makefile_star2_O2/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 0x30ba7
movq %rax, %r14
movq 0xa8(%rbx), %rdi
leaq 0x78(%rax), %rsi
leaq 0xc(%rsp), %r15
movq %r15, %rdx
callq 0x37562
movq 0xb0(%rbx), %rdi
leaq 0x80(%r14), %rsi
movq %r15, %rdx
callq 0x37562
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3106a
movq %rdi, %rbx
movq 0x30(%r14), %rdi
callq 0x28c2d
movq 0x48(%r14), %rdi
callq 0x28c2d
movq 0x60(%r14), %rdi
callq 0x28c2d
movq 0x68(%r14), %rdi
callq 0x28c2d
movq 0x70(%r14), %rdi
callq 0x28c2d
movq 0x78(%r14), %rax
testq %rax, %rax
je 0x3103b
movq (%rax), %rdi
callq 0x28c2d
movq 0x78(%r14), %rdi
callq 0x28c2d
movq 0x80(%r14), %rax
testq %rax, %rax
je 0x3105b
movq (%rax), %rdi
callq 0x28c2d
movq 0x80(%r14), %rdi
callq 0x28c2d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x28c3d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/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
leaq 0x8(%rsp), %r14
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x3109d
movq (%r15), %r15
movq %r14, %rdi
callq 0x30fe5
jmp 0x31086
andq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
callq 0x31b66
movq %rax, %rbx
movq %rax, 0x10(%rsp)
xorl %r14d, %r14d
movq %r14, 0x8(%rsp)
movq %rbx, %rdi
callq 0x31b89
testq %rax, %rax
je 0x31b44
movq %r14, (%rax)
movq %rax, %r14
jmp 0x31b2a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1c567
leaq 0x10(%rsp), %rdi
callq 0x25cd8
movq (%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x26108
testl %eax, %eax
je 0x31c2c
movq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x62d0
movq %rax, %r15
movq 0x8654d(%rip), %r14     # 0xb8110
cmpl %r15d, 0x8653e(%rip)    # 0xb8108
jg 0x31bf4
movl %r15d, %edx
addl $0x100, %edx            # imm = 0x100
movl %edx, 0x8652d(%rip)     # 0xb8108
movq %r14, %rdi
xorl %esi, %esi
callq 0x28c1e
movq %rax, %r14
movq %rax, 0x86521(%rip)     # 0xb8110
movq 0x8(%rsp), %r12
leal 0x1(%r15), %eax
movslq %eax, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x6570
leaq 0x10(%rsp), %rsi
pushq $0x20
popq %rdx
movq %r14, %rdi
callq 0x1e59b
cmpl $0x17, %eax
je 0x31c30
cmpl $0x15, %eax
jne 0x31c3f
leaq 0x10(%rsp), %rdi
callq 0x30ba7
jmp 0x31c3a
xorl %ebx, %ebx
jmp 0x31c58
leaq 0x10(%rsp), %rdi
callq 0x30b58
movq %rax, %rbx
jmp 0x31c58
movl 0x28(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x51290(%rip), %rdi     # 0x82edd
xorl %ebx, %ebx
movl %eax, %ecx
xorl %eax, %eax
callq 0x223fb
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x31c8c
movl 0x3c(%r14), %eax
subl 0x3c(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x31cb6
movl 0x54(%r14), %eax
subl 0x54(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x31cf1
leaq 0x28(%r14), %rdi
leaq 0x28(%rbx), %rsi
callq 0x6a50
testl %eax, %eax
jne 0x31cf1
movl 0x54(%r14), %eax
subl 0x54(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
movq (%rdi), %rbx
movq (%rsi), %r14
movq 0x30(%rbx), %rdi
movq 0x30(%r14), %rsi
callq 0x6a50
movl %eax, %ebp
testl %eax, %eax
jne 0x31d7c
movq %r14, %rdi
callq 0x31d1c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x31d1c
subl %eax, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x4be6f(%rip), %rsi     # 0x7dc79
movq %rax, %rdi
callq 0x1ec79
movq %rax, %r14
testl %ebp, %ebp
je 0x31e21
movq %r14, %rdi
callq 0x31ddb
pushq $0x9
popq %rbp
pushq $0xa
popq %r15
testq %rbx, %rbx
je 0x31e42
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x310ab
movq (%rbx), %rbx
jmp 0x31e28
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x66e0
// File: /workspace/github_c_makefile_star2_O2/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 0x32341
movq %rax, %rbx
movl 0x5c(%rax), %esi
shlq $0x3, %rsi
movq %r14, %rdi
callq 0x26ff4
movq %rax, 0x78(%rbx)
movq 0xa8(%r15), %rsi
movq %r14, %rdi
callq 0x270f3
movq 0x78(%rbx), %rsi
movl 0x5c(%rbx), %edx
movq %rax, %rdi
callq 0x37447
movl 0x5c(%rbx), %esi
shlq $0x3, %rsi
movq %r14, %rdi
callq 0x26ff4
movq %rax, 0x80(%rbx)
movq 0xb0(%r15), %rsi
movq %r14, %rdi
callq 0x270f3
movq 0x80(%rbx), %rsi
movl 0x5c(%rbx), %edx
movq %rax, %rdi
callq 0x37447
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x26ff4
movq %rax, %rbx
movq 0x88(%r14), %rdi
callq 0x35d13
movl %eax, 0x5c(%rbx)
movq (%r14), %rdi
callq 0x35d13
movl %eax, 0x8(%rbx)
movq 0x8(%r14), %rdi
callq 0x35d13
movl %eax, 0xc(%rbx)
movq 0x10(%r14), %rdi
callq 0x35d13
movl %eax, 0x10(%rbx)
movq 0x18(%r14), %rdi
callq 0x35d13
movl %eax, 0x14(%rbx)
movq 0x20(%r14), %rdi
callq 0x35d13
movl %eax, 0x18(%rbx)
movq 0x28(%r14), %rdi
callq 0x35e52
movl %eax, 0x1c(%rbx)
movq 0x30(%r14), %rdi
callq 0x35d13
movl %eax, 0x20(%rbx)
movq 0x38(%r14), %rdi
callq 0x35e52
movl %eax, 0x24(%rbx)
leaq 0x28(%rbx), %rdi
movq 0x40(%r14), %rsi
callq 0x6680
movq 0x48(%r14), %rsi
movq %r15, %rdi
callq 0x270f3
movq %rax, 0x30(%rbx)
movq 0x50(%r14), %rdi
callq 0x35d13
movl %eax, 0x38(%rbx)
movq 0x58(%r14), %rdi
callq 0x35d13
movl %eax, 0x3c(%rbx)
movq 0x60(%r14), %rdi
callq 0x35d13
movl %eax, 0x40(%rbx)
movq 0x68(%r14), %rsi
movq %r15, %rdi
callq 0x270f3
movq %rax, 0x48(%rbx)
movq 0x70(%r14), %rdi
callq 0x35d13
movl %eax, 0x50(%rbx)
movq 0x78(%r14), %rdi
callq 0x35d13
movl %eax, 0x54(%rbx)
movq 0x80(%r14), %rdi
callq 0x35d13
movl %eax, 0x58(%rbx)
movl 0x5c(%rbx), %esi
shlq $0x2, %rsi
movq %r15, %rdi
callq 0x26ff4
movq %rax, 0x60(%rbx)
movq 0x90(%r14), %rdi
movl 0x5c(%rbx), %edx
movq %rax, %rsi
callq 0x36eec
movl 0x5c(%rbx), %esi
shlq $0x2, %rsi
movq %r15, %rdi
callq 0x26ff4
movq %rax, 0x68(%rbx)
movq 0x98(%r14), %rdi
movl 0x5c(%rbx), %edx
movq %rax, %rsi
callq 0x36eec
movl 0x5c(%rbx), %esi
shlq $0x2, %rsi
movq %r15, %rdi
callq 0x26ff4
movq %rax, 0x70(%rbx)
movq 0xa0(%r14), %rdi
movl 0x5c(%rbx), %edx
movq %rax, %rsi
callq 0x36eec
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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), %eax
decl %eax
movzbl 0x29(%rdi), %ecx
cmpl $0x2d, %ecx
je 0x324e3
cmpl $0x2b, %ecx
jne 0x32501
movq 0x70(%rdi), %rcx
cltq
movq 0x60(%rdi), %rdx
imull $0x3, (%rdx,%rax,4), %edx
addl (%rcx,%rax,4), %edx
cmpl %edx, 0x58(%rdi)
jmp 0x324fc
movl 0x50(%rdi), %ecx
movq 0x70(%rdi), %rdx
cltq
movq 0x60(%rdi), %rsi
imull $-0x3, (%rsi,%rax,4), %esi
subl (%rdx,%rax,4), %ecx
addl %esi, %ecx
cmpl %ecx, 0x54(%rdi)
sete %al
jmp 0x32503
xorl %eax, %eax
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x324ba
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 0x3259e
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 0x32557
addl 0x20(%rbx), %esi
movl 0xc(%rbx), %r14d
movl 0x10(%rbx), %ebp
addl 0x8(%rbx), %ebp
addl %r14d, %ebp
je 0x325a0
imull %ecx, %ebp
imull %ecx, %r14d
addl %esi, %r14d
incl %edx
cvtsi2sd %edx, %xmm0
callq 0x6550
mulsd 0x50765(%rip), %xmm0    # 0x82ce8
addsd 0x4b80d(%rip), %xmm0    # 0x7dd98
cvttsd2si %xmm0, %eax
addl %r14d, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
xorl %edx, %edx
divl %ebp
jmp 0x325a0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl 0x5c(%rdi), %r13d
movq 0x60(%rdi), %rax
movq %rax, (%rsp)
movq 0x68(%rdi), %r15
movq 0x70(%rdi), %rbx
xorl %r14d, %r14d
testl %r13d, %r13d
cmovlel %r14d, %r13d
xorl %r12d, %r12d
cmpq %r14, %r13
je 0x32649
movq (%rsp), %rax
movslq (%rax,%r14,4), %rbp
pushq $0x38
popq %rdi
callq 0x28bb0
movq %r12, (%rax)
movl (%r15,%r14,4), %ecx
addq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rax)
addq %rbp, %rcx
movq %rcx, 0x18(%rax)
movl (%rbx,%r14,4), %ecx
addq 0x10(%rsp), %rcx
movq %rcx, 0x20(%rax)
addq %rbp, %rcx
movq %rcx, 0x28(%rax)
incq %r14
movq %rax, %r12
jmp 0x32601
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x236b0
// File: /workspace/github_c_makefile_star2_O2/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, 0x8(%rsp)
movq %r8, 0x10(%rsp)
movl %ecx, 0x4(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x88, %edi
callq 0x28bb0
movq %rax, %rbx
movq %r12, %rdi
callq 0x23733
movl %eax, 0x5c(%rbx)
movslq %eax, %rbp
leaq (,%rbp,4), %r13
movq %r13, %rdi
callq 0x28a1f
movq %rax, 0x20(%rsp)
movq %rax, 0x60(%rbx)
movq %r13, %rdi
callq 0x28a1f
movq %rax, 0x18(%rsp)
movq %rax, 0x68(%rbx)
movq %r13, %rdi
callq 0x28a1f
movq %rax, %r13
movq %rax, 0x70(%rbx)
movq 0x10(%rsp), %rdi
callq 0x1c306
movq %rax, 0x30(%rbx)
movl 0x8(%rsp), %eax
movl %eax, 0x38(%rbx)
movq 0x60(%rsp), %rdi
callq 0x1c306
movq %rax, 0x48(%rbx)
movl 0x68(%rsp), %eax
movl %eax, 0x50(%rbx)
movl 0x4(%rsp), %eax
movb %al, 0x28(%rbx)
leaq 0x3c(%rbx), %rax
movq %rax, 0x8(%rsp)
leal -0x1(%rbp), %eax
movq %rbx, %rsi
addq $0x40, %rsi
xorl %ecx, %ecx
testl %ebp, %ebp
cmovlel %ecx, %ebp
cmpq %rcx, %rbp
je 0x32788
movl 0x10(%r12), %r9d
movl 0x18(%r12), %edx
subl %r15d, %r9d
subl %r15d, %edx
movl 0x20(%r12), %r10d
subl %r14d, %r10d
movl 0x28(%r12), %r8d
movl %edx, %r11d
subl %r9d, %r11d
movq 0x20(%rsp), %rdi
movl %r11d, (%rdi,%rcx,4)
movq 0x18(%rsp), %rdi
movl %r9d, (%rdi,%rcx,4)
movl %r10d, (%r13,%rcx,4)
testq %rcx, %rcx
jne 0x3276f
movl %r9d, 0x3c(%rbx)
movl %r10d, 0x54(%rbx)
cmpq %rcx, %rax
jne 0x3277e
subl %r14d, %r8d
movl %edx, 0x40(%rbx)
movl %r8d, 0x58(%rbx)
movq 0x8(%r12), %r12
incq %rcx
jmp 0x32723
cmpb $0x2d, 0x4(%rsp)
jne 0x3279c
movl 0x38(%rbx), %edx
movq 0x8(%rsp), %rdi
callq 0x20d61
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_O2/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
movl %ecx, %ebx
movq 0x10(%rsi), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rdx), %rcx
movl 0x5c(%rdi), %esi
movq 0x60(%rdi), %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rdi), %rax
movq %rax, 0x10(%rsp)
movq 0x70(%rdi), %r8
movl 0x18(%rdx), %r12d
addl %ebx, %r12d
movslq %ebx, %rax
subq %rax, %rcx
movq %rcx, 0x20(%rsp)
xorl %r14d, %r14d
testl %esi, %esi
cmovlel %r14d, %esi
xorl %ebp, %ebp
movq %rsi, 0x18(%rsp)
movq %r8, 0x8(%rsp)
movl %ebx, 0x4(%rsp)
cmpq %r14, %rsi
je 0x328a1
movl (%r8,%r14,4), %eax
cmpl %r12d, %eax
jge 0x32899
movq 0x30(%rsp), %rcx
movl (%rcx,%r14,4), %r13d
addl %eax, %r13d
cmpl %ebx, %r13d
jle 0x32899
cmpl %ebx, %eax
cmovgl %eax, %ebx
cmpl %r12d, %r13d
jl 0x3283f
movl %r12d, %r13d
movl %ebx, %r15d
subl %eax, %r15d
subl %ebx, %r13d
pushq $0x38
popq %rdi
callq 0x28bb0
movq %rbp, (%rax)
movq 0x10(%rsp), %rcx
movl (%rcx,%r14,4), %ecx
addq 0x28(%rsp), %rcx
movslq %r15d, %rdx
addq %rcx, %rdx
movq %rdx, 0x10(%rax)
movslq %r13d, %rcx
addq %rcx, %rdx
movq %rdx, 0x18(%rax)
movslq %ebx, %rdx
addq 0x20(%rsp), %rdx
movq %rdx, 0x20(%rax)
addq %rcx, %rdx
movq %rdx, 0x28(%rax)
movq %rax, %rbp
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %r8
movl 0x4(%rsp), %ebx
incq %r14
jmp 0x3280f
movq %rbp, %rdi
callq 0x236b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x236c7
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_O2/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 0x3290e
leaq 0x5060d(%rip), %rdi     # 0x82f14
xorl %eax, %eax
callq 0x223fb
xorl %ebp, %ebp
pushq $0x1
popq %r12
movl 0x5c(%r14), %eax
cmpq %rax, %r12
jae 0x32960
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 0x3295b
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 0x212bb
addl %eax, %ebp
incq %r12
jmp 0x32914
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl %edx, 0xc(%rsp)
movslq 0x5c(%rdi), %r13
movq 0x70(%rdi), %rbp
movq 0x60(%rdi), %r15
movq %rdi, 0x10(%rsp)
movq 0x68(%rdi), %r12
movq 0x10(%rsi), %r14
pushq $0x1
popq %rbx
cmpq %r13, %rbx
jge 0x32a29
movl -0x4(%r15,%rbx,4), %eax
movl -0x4(%r12,%rbx,4), %ecx
addl %eax, %ecx
cmpl (%r12,%rbx,4), %ecx
jne 0x32a24
addl -0x4(%rbp,%rbx,4), %eax
movl %eax, 0x8(%rsp)
movl (%rbp,%rbx,4), %ecx
movl %ecx, 0x4(%rsp)
movq 0x10(%rsp), %rdx
cmpb $0x2d, 0x29(%rdx)
jne 0x329ff
movq 0x10(%rsp), %rax
movl 0x50(%rax), %edx
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x20d61
movl 0x8(%rsp), %eax
movl 0x4(%rsp), %ecx
movl 0xc(%rsp), %edx
subl %edx, %eax
movl %eax, 0x8(%rsp)
subl %edx, %ecx
movl %ecx, 0x4(%rsp)
movslq %eax, %rdi
addq %r14, %rdi
movslq %ecx, %rsi
addq %r14, %rsi
callq 0x212bb
testl %eax, %eax
jne 0x32a2d
incq %rbx
jmp 0x329ae
xorl %eax, %eax
jmp 0x32a30
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x328c6
testl %eax, %eax
jle 0x32a64
movl 0x38(%r15), %eax
movl 0x3c(%r15), %ecx
subl 0x40(%r15), %eax
jmp 0x32a70
movl 0x38(%r15), %ecx
movl 0x3c(%r15), %eax
subl 0x40(%r15), %ecx
movl 0x50(%r15), %edx
movl 0x54(%r15), %esi
subl 0x58(%r15), %edx
cmpl %esi, %ecx
cmovll %ecx, %esi
movl %esi, (%r14)
cmpl %edx, %eax
cmovll %eax, %edx
movl %edx, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %rdi, (%rsp)
movl 0x38(%rdi), %ebp
movl 0x50(%rdi), %ebx
movl 0x5c(%rdi), %r14d
movq 0x70(%rdi), %r13
movq 0x68(%rdi), %r12
movq 0x60(%rdi), %r15
callq 0x324ba
movq (%rsp), %rsi
movb 0x29(%rsi), %cl
cmpb $0x2d, 0x28(%rsi)
setne %dl
addb %dl, %dl
addb $0x2b, %dl
movb %dl, 0x28(%rsi)
cmpb $0x2d, %cl
setne %cl
addb %cl, %cl
addb $0x2b, %cl
movb %cl, 0x29(%rsi)
movb $0x0, 0x2a(%rsi)
xorl %ecx, %ecx
cmpl $0x1, %eax
movl $0x0, %eax
sbbl %eax, %eax
orl $-0x3, %eax
cmpq %rcx, %r14
je 0x32b21
movl (%r15,%rcx,4), %edx
imull %eax, %edx
movl %ebx, %esi
subl (%r13,%rcx,4), %esi
addl %edx, %esi
movl %esi, (%r13,%rcx,4)
movl (%r12,%rcx,4), %edx
addl (%r15,%rcx,4), %edx
movl %ebp, %esi
subl %edx, %esi
movl %esi, (%r12,%rcx,4)
incq %rcx
jmp 0x32af2
movq %r13, %rdi
movl %r14d, %esi
callq 0x1c40c
movq %r12, %rdi
movl %r14d, %esi
callq 0x1c40c
movq %r15, %rdi
movl %r14d, %esi
callq 0x1c40c
movq (%rsp), %rbx
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x32b77
movl %r14d, %esi
movq %r15, %rdx
callq 0x32b86
movq 0x80(%rbx), %rdi
movl %r14d, %esi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32b86
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/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 $0x28, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, %ebx
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rax, %rbx
je 0x32bb0
movl (%rdx,%rax,4), %esi
addl %esi, %ecx
incl %ecx
incq %rax
jmp 0x32b9f
movq %rdx, 0x20(%rsp)
movslq %ecx, %rdi
callq 0x289b8
movq %rax, %r12
movq %rbx, 0x18(%rsp)
leaq -0x1(%rbx), %r14
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %r15
testl %r14d, %r14d
js 0x32c17
movl %r14d, %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq (%r15,%rbx,8), %r13
movq %r13, %rdi
callq 0x62d0
movslq %eax, %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x20d38
movq (%r15,%rbx,8), %rsi
incl %ebp
movslq %ebp, %r13
movq %r12, %rdi
movq %r13, %rdx
callq 0x6570
addq %r13, %r12
decq %r14
jmp 0x32bd3
movq 0x8(%rsp), %rbx
movq (%rbx), %rdi
callq 0x28c2d
movq 0x10(%rsp), %rdi
movq %rdi, (%rbx)
xorl %eax, %eax
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rsi
cmpq %rax, %rsi
je 0x32c53
movq 0x8(%rsp), %rcx
movq %rdi, (%rcx,%rax,8)
movl (%rdx,%rax,4), %ecx
incl %ecx
addq %rcx, %rdi
incq %rax
jmp 0x32c38
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq