LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/ffAli.c
// Function: ffAliFromSym
struct ffAli *ffAliFromSym(int symCount, char *nSym, char *hSym,
	struct lm *lm, char *nStart, char *hStart)
/* Convert symbol representation of alignments (letters plus '-')
 * to ffAli representation.  If lm is nonNULL, ffAli result 
 * will be lmAlloced, else it will be needMemed. This routine
 * depends on nSym/hSym being zero terminated. */
{
struct ffAli *ffList = NULL, *ff = NULL;
char n, h;
int i;

for (i=0; i<=symCount; ++i)
    {
    boolean isGap;
    n = nSym[i];
    h = hSym[i];
    isGap = (n == '-' || n == 0 || h == '-' || h == 0);
    if (isGap)
	{
	if (ff != NULL)
	    {
	    ff->nEnd = nStart;
	    ff->hEnd = hStart;
	    ff->left = ffList;
	    ffList = ff;
	    ff = NULL;
	    }
	}
    else
	{
	if (ff == NULL)
	    {
	    if (lm != NULL)
		{
		lmAllocVar(lm, ff);
		}
	    else
		{
		AllocVar(ff);
		}
	    ff->nStart = nStart;
	    ff->hStart = hStart;
	    }
	}
    if (n != '-')
	{
	++nStart;
	}
    if (h != '-')
	{
	++hStart;
	}
    }
ffList = ffMakeRightLinks(ffList);
return ffList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testl %edi, %edi
js 0x280cc
movq %r9, %rbx
movq %r8, %r14
incl %edi
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %r8d, %r8d
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movzbl (%rsi,%r12), %r13d
movb (%rdx,%r12), %bpl
cmpb $0x2d, %bpl
je 0x2804e
testl %r13d, %r13d
je 0x2804e
cmpl $0x2d, %r13d
je 0x2804e
testb %bpl, %bpl
je 0x2804e
testq %r8, %r8
je 0x28090
movq %r8, %rax
jmp 0x28067
testq %r8, %r8
jne 0x28057
xorl %eax, %eax
jmp 0x28067
movq %r14, 0x18(%r8)
movq %rbx, 0x28(%r8)
movq %r15, (%r8)
xorl %eax, %eax
movq %r8, %r15
xorl %r8d, %r8d
cmpb $0x2d, %bpl
setne %r8b
xorl %r9d, %r9d
cmpl $0x2d, %r13d
setne %r9b
addq %r9, %r14
addq %r8, %rbx
incq %r12
movq %rax, %r8
cmpq %r12, %rdi
jne 0x28025
jmp 0x280cf
testq %rcx, %rcx
je 0x280a4
movl $0x38, %esi
movq %rcx, %rdi
callq 0x2bfa9
jmp 0x280ae
movl $0x38, %edi
callq 0x2dc95
movq %r14, 0x10(%rax)
movq %rbx, 0x20(%rax)
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
jmp 0x28067
xorl %r15d, %r15d
testq %r15, %r15
je 0x280ea
xorl %ecx, %ecx
movq %r15, %rax
movq %rcx, 0x8(%r15)
movq (%r15), %r15
movq %rax, %rcx
testq %r15, %r15
jne 0x280d6
jmp 0x280ec
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/ffScore.c
// Function: ffScoreMatch
int ffScoreMatch(DNA *a, DNA *b, int size)
/* Compare two pieces of DNA base by base. Total mismatches are
 * subtracted from total matches and returned as score. 'N's 
 * neither hurt nor help score. */
{
int i;
int score = 0;
for (i=0; i<size; ++i)
    {
    DNA aa = a[i];
    DNA bb = b[i];
    if (aa == 'n' || bb == 'n')
        continue;
    if (aa == bb)
        ++score;
    else
        score -= 1;
    }
return score;
}

// Assembly:
testl %edx, %edx
jle 0x28143
movl %edx, %ecx
xorl %edx, %edx
xorl %r8d, %r8d
xorl %eax, %eax
movb (%rdi,%r8), %r9b
movb (%rsi,%r8), %r10b
xorl %r11d, %r11d
cmpb %r10b, %r9b
sete %r11b
cmpb $0x6e, %r10b
leal -0x1(%r11,%r11), %r10d
cmovel %edx, %r10d
cmpb $0x6e, %r9b
cmovel %edx, %r10d
addl %r10d, %eax
incq %r8
cmpq %r8, %rcx
jne 0x28110
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/ffScore.c
// Function: ffCalcCdnaGapPenalty
int ffCalcCdnaGapPenalty(int hGap, int nGap)
/* Return gap penalty for given h and n gaps. */
{
int acc = 2;
if (hGap > 400000)	/* Discourage really long introns. */
    {
    acc += (hGap - 400000)/3000;
    if (hGap > ffIntronMax)
        acc += (hGap - ffIntronMax)/2000;
    }
if (hGap < 0)   /* Discourage jumping back in haystack. */
    {
    hGap = -8*hGap;
    if (hGap > 48)
        hGap = (hGap*hGap);
    }
if (nGap < 0)   /* Jumping back in needle gets rid of previous alignment. */
    {
    acc += -nGap;
    nGap = 0;
    }
acc += digitsBaseTwo(hGap)/2;
if (nGap != 0)
    {
    acc += digitsBaseTwo(nGap);
    }
else
    {
    if (hGap > 30)
	acc -= 1;
    }
return acc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
movl $0x2, %r15d
cmpl $0x61a81, %edi          # imm = 0x61A81
jl 0x2819d
leal -0x61a80(%r14), %eax
imulq $0x57619f1, %rax, %r15  # imm = 0x57619F1
shrq $0x26, %r15
addl $0x2, %r15d
movl %r14d, %eax
subl 0x989f1(%rip), %eax     # 0xc0b70
jle 0x2819d
cltq
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x27, %rax
addl %ecx, %eax
addl %r15d, %eax
movl %eax, %r15d
testl %r14d, %r14d
jns 0x281be
leal (,%r14,8), %eax
negl %eax
cmpl $-0x6, %r14d
movl $0x1, %r14d
cmovll %eax, %r14d
imull %eax, %r14d
movl %r14d, %edi
callq 0x324a3
movl %eax, %ebp
testl %ebx, %ebx
jle 0x281d5
movl %ebx, %edi
callq 0x324a3
jmp 0x281e0
xorl %eax, %eax
cmpl $0x1f, %r14d
setge %al
negl %eax
movl %ebx, %ecx
sarl $0x1f, %ecx
andl %ebx, %ecx
subl %ecx, %r15d
addl %eax, %r15d
movl %ebp, %eax
shrl $0x1f, %eax
addl %ebp, %eax
sarl %eax
addl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/ffScore.c
// Function: ffCalcGapPenalty
int ffCalcGapPenalty(int hGap, int nGap, enum ffStringency stringency)
/* Return gap penalty for given h and n gaps. */
{
switch (stringency)
    {
    case ffCdna:
	return ffCalcCdnaGapPenalty(hGap, nGap);
    case ffTight:
	return calcTightGap(hGap,nGap);
    case ffLoose:
	return calcLooseGap(hGap,nGap);
    default:
        errAbort("Unknown stringency type %d", stringency);
	return 0;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpl $0x3, %edx
je 0x2825f
cmpl $0x2, %edx
je 0x28225
cmpl $0x1, %edx
jne 0x282c0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x28146
movl %esi, %eax
orl %edi, %eax
je 0x282d4
cmpl %esi, %edi
movl %esi, %eax
cmovll %edi, %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
leal (,%rdi,8), %eax
negl %eax
testl %edi, %edi
cmovnsl %edi, %eax
leal (%rsi,%rsi), %edx
negl %edx
testl %esi, %esi
cmovnsl %esi, %edx
subl %ecx, %eax
leal (%rax,%rdx), %ebx
addl $0x8, %ebx
jmp 0x282d6
movl %esi, %eax
orl %edi, %eax
je 0x282d4
cmpl %esi, %edi
movl %esi, %eax
cmovll %edi, %eax
xorl %ebx, %ebx
testl %eax, %eax
cmovgl %eax, %ebx
leal (,%rdi,8), %eax
negl %eax
testl %edi, %edi
cmovnsl %edi, %eax
leal (%rsi,%rsi), %ebp
negl %ebp
testl %esi, %esi
cmovnsl %esi, %ebp
subl %ebx, %eax
incl %eax
cvtsi2sd %eax, %xmm0
callq 0x6550
movsd %xmm0, (%rsp)
subl %ebx, %ebp
incl %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
callq 0x6550
addsd (%rsp), %xmm0
addsd 0x688de(%rip), %xmm0    # 0x90b98
cvttsd2si %xmm0, %ebx
jmp 0x282d6
leaq 0x688d9(%rip), %rdi     # 0x90ba0
xorl %ebx, %ebx
movl %edx, %esi
xorl %eax, %eax
callq 0x26b6f
jmp 0x282d6
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/ffScore.c
// Function: ffScoreSomeAlis
int ffScoreSomeAlis(struct ffAli *ali, int count, enum ffStringency stringency)
/* Figure out score of count alis. */
{
int score = 0;
int oneScore;

while (--count >= 0)
    {
    int len = ali->hEnd - ali->hStart;
    struct ffAli *right = ali->right;
    oneScore = dnaScoreMatch(ali->hStart, ali->nStart, len);
    score += oneScore;
    if (count > 0)  /* Calculate gap penalty */
        score -= ffGapPenalty(ali, right,stringency);
    ali = right;
    }
return score;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
jle 0x28371
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
incl %ebp
xorl %r13d, %r13d
movl 0x28(%r14), %edx
movq 0x20(%r14), %rdi
subl %edi, %edx
movq 0x8(%r14), %r12
movq 0x10(%r14), %rsi
callq 0x25866
movl %eax, %r15d
addl %r13d, %r15d
cmpl $0x2, %ebp
je 0x28362
movl 0x10(%r12), %esi
movl 0x20(%r12), %edi
subl 0x28(%r14), %edi
subl 0x18(%r14), %esi
movl %ebx, %edx
callq 0x28204
subl %eax, %r15d
decl %ebp
movq %r12, %r14
movl %r15d, %r13d
cmpl $0x1, %ebp
jg 0x28324
jmp 0x28374
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/ffScore.c
// Function: ffScoreSomething
int ffScoreSomething(struct ffAli *ali, enum ffStringency stringency,
   boolean isProt)
/* Score alignment. */
{
int score = 0;
int oneScore;
int (*scoreMatch)(char *a, char *b, int size);

if (ali == NULL)
    return -0x7FFFFFFF;
scoreMatch = (isProt ? aaScoreMatch : dnaScoreMatch );
while (ali->left != NULL) ali = ali->left;
while (ali != NULL)
    {
    int len = ali->hEnd - ali->hStart;
    struct ffAli *right = ali->right;
    oneScore = scoreMatch(ali->hStart, ali->nStart, len);
    score += oneScore;
    if (right)  /* Calculate gap penalty */
        {
        score -= ffGapPenalty(ali, right, stringency);
        }
    ali = right;
    }
return score;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x283b0
movl %esi, %ebx
movq %rdi, %r15
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x28398
testl %edx, %edx
jne 0x283b7
leaq -0x2b48(%rip), %r14     # 0x25866
jmp 0x283be
movl $0x80000001, %ebp       # imm = 0x80000001
jmp 0x28406
leaq -0x2b01(%rip), %r14     # 0x258bd
xorl %r13d, %r13d
movl 0x28(%r15), %edx
movq 0x20(%r15), %rdi
subl %edi, %edx
movq 0x8(%r15), %r12
movq 0x10(%r15), %rsi
callq *%r14
movl %eax, %ebp
addl %r13d, %ebp
testq %r12, %r12
je 0x283fb
movl 0x10(%r12), %esi
movl 0x20(%r12), %edi
subl 0x28(%r15), %edi
subl 0x18(%r15), %esi
movl %ebx, %edx
callq 0x28204
subl %eax, %ebp
movq %r12, %r15
movl %ebp, %r13d
testq %r12, %r12
jne 0x283c1
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/filePath.c
// Function: splitPath
void splitPath(char *path, char dir[PATH_LEN], char name[FILENAME_LEN],
	       char extension[FILEEXT_LEN])
/* Split a full path into components.  The dir component will include the
 * trailing / if any.  The extension component will include the starting
 * . if any.   Pass in NULL for dir, name, or extension if you don't care about
 * that part. */
{
char *dirStart, *nameStart, *extStart, *extEnd;
int dirSize, nameSize, extSize;

undosPath(path);
dirStart = path;
nameStart = strrchr(path,'/');
if (nameStart == NULL)
    nameStart = path;
else
    nameStart += 1;
extStart = strrchr(nameStart, '.');
if (extStart == NULL)
    extStart = nameStart + strlen(nameStart);
extEnd = extStart + strlen(extStart);
if ((dirSize = (nameStart - dirStart)) >= PATH_LEN)
    errAbort("Directory too long in %s", path);
if ((nameSize = (extStart - nameStart)) >= FILENAME_LEN)
    errAbort("Name too long in %s", path);
if ((extSize = (extEnd - extStart)) >= FILEEXT_LEN)
    errAbort("Extension too long in %s", path);
if (dir != NULL)
    {
    memcpy(dir, dirStart, dirSize);
    dir[dirSize] = 0;
    }
if (name != NULL)
    {
    memcpy(name, nameStart, nameSize);
    name[nameSize] = 0;
    }
if (extension != NULL)
    {
    memcpy(extension, extStart, extSize);
    extension[extSize] = 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
callq 0x62d0
movq %r12, %rdi
movl %eax, %esi
movl $0x5c, %edx
movl $0x2f, %ecx
callq 0x21fee
movq %r12, %rdi
movl $0x2f, %esi
callq 0x67c0
leaq 0x1(%rax), %r13
testq %rax, %rax
cmoveq %r12, %r13
movq %r13, %rdi
movl $0x2e, %esi
callq 0x67c0
movq %rax, %r15
testq %rax, %rax
jne 0x2859e
movq %r13, %rdi
callq 0x62d0
movq %rax, %r15
addq %r13, %r15
movq %r15, %rdi
callq 0x62d0
movq %rax, %rbx
movq %r13, %r14
subq %r12, %r14
cmpl $0x200, %r14d           # imm = 0x200
jl 0x285c9
leaq 0x685fc(%rip), %rdi     # 0x90bbb
movq %r12, %rsi
xorl %eax, %eax
callq 0x26b6f
movq %r15, %rbp
subq %r13, %rbp
cmpl $0x80, %ebp
jl 0x285e8
leaq 0x685f6(%rip), %rdi     # 0x90bd4
movq %r12, %rsi
xorl %eax, %eax
callq 0x26b6f
cmpl $0x40, %ebx
jl 0x285fe
leaq 0x685f4(%rip), %rdi     # 0x90be8
movq %r12, %rsi
xorl %eax, %eax
callq 0x26b6f
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x28628
movslq %r14d, %r14
movq %rbx, 0x8(%rsp)
movq %rdi, %rbx
movq %r12, %rsi
movq %r14, %rdx
callq 0x6570
movb $0x0, (%rbx,%r14)
movq 0x8(%rsp), %rbx
movq 0x18(%rsp), %r12
testq %r12, %r12
je 0x28648
movslq %ebp, %r14
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x6570
movb $0x0, (%r12,%r14)
movq 0x20(%rsp), %r14
testq %r14, %r14
je 0x28668
movslq %ebx, %rbx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6570
movb $0x0, (%r14,%rbx)
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/filePath.c
// Function: expandRelativePath
char *expandRelativePath(char *baseDir, char *relPath)
/* Expand relative path to more absolute one. */
{
if (relPath[0] == '/')
   // hey, it's absolute actually... 
   return cloneString(relPath);

char *e = baseDir + strlen(baseDir);
int slashCount;
char *rel = relPath;
char *result;
int size, baseSize;
undosPath(baseDir);
undosPath(relPath);
slashCount = countChars(baseDir, '/');
if (baseDir[0] == 0)
    slashCount = -1;
while (startsWith("../", rel))
    {
    if (slashCount < 0)
        {
	warn("More ..'s in \"%s\" than directories in \"%s\"", relPath, baseDir);
	return NULL;
	}
    else if (slashCount == 0)
        e = baseDir;
    else
        e = findSlashBefore(baseDir, e);
    slashCount -= 1;
    rel += 3;
    }
baseSize = e - baseDir;
size = strlen(rel) + 1;
if (baseSize > 0)
    size += baseSize + 1;
if (baseSize > 0)
    {
    result = needMem(size);
    memcpy(result, baseDir, baseSize);
    result[baseSize] = '/';
    strcpy(result + baseSize + 1, rel);
    }
else
    result = cloneString(rel);
return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpb $0x2f, (%rsi)
jne 0x28692
movq %r14, %rdi
jmp 0x287d9
movq %rdi, %rbx
callq 0x62d0
leaq (%rbx,%rax), %r12
movq %rbx, %rdi
movl %eax, %esi
movl $0x5c, %edx
movl $0x2f, %ecx
callq 0x21fee
movq %r14, %rdi
callq 0x62d0
movq %r14, %rdi
movl %eax, %esi
movl $0x5c, %edx
movl $0x2f, %ecx
callq 0x21fee
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x22160
movl %eax, %ebp
movb (%rbx), %r15b
leaq 0x6ae02(%rip), %rdi     # 0x934e9
movq %r14, %rsi
callq 0x217c8
testl %eax, %eax
je 0x2875a
movq %r14, %rax
xorl %r14d, %r14d
cmpb $0x1, %r15b
sbbl %r14d, %r14d
orl %ebp, %r14d
leaq 0x6addf(%rip), %r13     # 0x934e9
movq %rax, (%rsp)
movq %rax, %r15
testl %r14d, %r14d
js 0x287ac
movq %rbx, %rbp
subl $0x1, %r14d
jb 0x28742
decq %r12
cmpq %rbx, %r12
jb 0x2873f
leaq -0x1(%r12), %rbp
cmpb $0x2f, (%r12)
movq %rbp, %r12
jne 0x28726
incq %rbp
jmp 0x28742
movq %rbx, %rbp
addq $0x3, %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x217c8
movq %rbp, %r12
testl %eax, %eax
jne 0x28711
jmp 0x28760
movq %r12, %rbp
movq %r14, %r15
subq %rbx, %rbp
testl %ebp, %ebp
jle 0x287d6
movq %r15, %rdi
callq 0x62d0
addl %ebp, %eax
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2dc95
movq %rax, %r13
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movq %rax, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x6570
leaq 0x1(,%rbp), %rdi
addq %r13, %rdi
movb $0x2f, -0x1(%rdi)
movq %r15, %rsi
callq 0x6680
jmp 0x287c4
leaq 0x6844e(%rip), %rdi     # 0x90c01
xorl %r13d, %r13d
movq (%rsp), %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x268ca
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f9f6
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/filePath.c
// Function: mustExpandRelativePath
char *mustExpandRelativePath(char *dir, char* relPath)
/* Given a dir and relative path, expand path.
 * Handy for processing symlinks. errAbort if expand fails.
 * Result should be freeMem'd.*/
{
char *path = expandRelativePath(dir, relPath);
verbose(3, "dir=%s\nrelPath=%s\npath=%s\n", dir, relPath, path);
if (!path)
    errAbort("Too many .. in path %s to make relative to submitDir %s\n", relPath, dir);
return path;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x28677
movq %rax, %r15
leaq 0x68426(%rip), %rsi     # 0x90c2c
movl $0x3, %edi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x4246e
testq %r15, %r15
jne 0x28834
leaq 0x68420(%rip), %rdi     # 0x90c47
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x26b6f
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/filePath.c
// Function: pathRelativeToFile
char *pathRelativeToFile(char *baseFile, char *relPath)
/* Given a base file name and a path relative to that, return
 * relative path interpreted as if it were seen from the
 * same directory holding the baseFile.  
 *   An example of using this would be in processing include
 * files.  In this case the baseFile would be the current
 * source file, and the relPath would be from the include
 * statement.  The returned result could then be used to
 * open the include file. */
{
char dir[PATH_LEN];
splitPath(baseFile, dir, NULL, NULL);
int dirLen = strlen(dir);
if (dirLen > 0 && dir[dirLen-1] == '/')
     dir[dirLen-1] = 0;
return expandRelativePath(dir, relPath);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
movq %rsp, %r14
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2852a
movq %r14, %rdi
callq 0x62d0
testl %eax, %eax
jle 0x28871
decl %eax
cmpb $0x2f, (%rsp,%rax)
jne 0x28871
movb $0x0, (%rsp,%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x28677
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/filePath.c
// Function: mustPathRelativeToFile
char *mustPathRelativeToFile(char *baseFile, char *relPath)
/* Make Path Relative To File or Abort. */
{
char *path = pathRelativeToFile(baseFile, relPath);
verbose(3, "baseFile=%s\nrelPath=%s\npath=%s\n", baseFile, relPath, path);
if (!path)
    errAbort("Too many .. in symlink path %s to make relative to %s\n", relPath, baseFile);
return path;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2883d
movq %rax, %r15
leaq 0x683df(%rip), %rsi     # 0x90c80
movl $0x3, %edi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x4246e
testq %r15, %r15
jne 0x288cf
leaq 0x683de(%rip), %rdi     # 0x90ca0
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x26b6f
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/hash.c
// Function: hashResize
void hashResize(struct hash *hash, int powerOfTwoSize)
/* Resize the hash to a new size */
{
int oldHashSize = hash->size;
struct hashEl **oldTable = hash->table;

if (powerOfTwoSize == 0)
    powerOfTwoSize = 12;
if (powerOfTwoSize > hashMaxSize)
    powerOfTwoSize =  hashMaxSize;
if (hash->powerOfTwoSize == powerOfTwoSize)
    return;

assert(powerOfTwoSize <= hashMaxSize && powerOfTwoSize > 0);
hash->powerOfTwoSize = powerOfTwoSize;
hash->size = (1<<powerOfTwoSize);
hash->mask = hash->size-1;

AllocArray(hash->table, hash->size);

int i;
struct hashEl *hel, *next;
for (i=0; i<oldHashSize; ++i)
    {
    for (hel = oldTable[i]; hel != NULL; hel = next)
	{
	next = hel->next;
	int hashVal = hel->hashVal & hash->mask;
	hel->next = hash->table[hashVal];
	hash->table[hashVal] = hel;
	}
    }
/* restore original list order */
hashReverseAllBucketLists(hash);

freeMem(oldTable);
hash->numResizes++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x1c, %esi
movl $0x1c, %eax
cmovll %esi, %eax
testl %esi, %esi
movl $0xc, %ecx
cmovnel %eax, %ecx
cmpl %ecx, 0x18(%rdi)
je 0x28d99
testl %ecx, %ecx
jle 0x28d9f
movq %rdi, %rbx
movl 0x1c(%rdi), %r15d
movq 0x10(%rdi), %r14
movl %ecx, 0x18(%rdi)
movl $0x1, %edi
shll %cl, %edi
movl %edi, 0x1c(%rbx)
leal -0x1(%rdi), %eax
movl %eax, 0x8(%rbx)
shlq $0x3, %rdi
callq 0x2db04
movq %rax, 0x10(%rbx)
testl %r15d, %r15d
jle 0x28d86
xorl %eax, %eax
movq (%r14,%rax,8), %rcx
testq %rcx, %rcx
je 0x28d7e
movslq 0x8(%rbx), %rdx
movq (%rcx), %rsi
movslq 0x18(%rcx), %rdi
andq %rdx, %rdi
movq 0x10(%rbx), %r8
movq (%r8,%rdi,8), %r9
movq %r9, (%rcx)
movq %rcx, (%r8,%rdi,8)
movq %rsi, %rcx
testq %rsi, %rsi
jne 0x28d5d
incq %rax
cmpq %r15, %rax
jne 0x28d50
movq %rbx, %rdi
callq 0x2920a
movq %r14, %rdi
callq 0x2dd41
incl 0x34(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x67fb6(%rip), %rdi     # 0x90d5c
leaq 0x67fe3(%rip), %rsi     # 0x90d90
leaq 0x68009(%rip), %rcx     # 0x90dbd
movl $0x191, %edx            # imm = 0x191
callq 0x6460
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/hash.c
// Function: hashReverseAllBucketLists
void hashReverseAllBucketLists(struct hash *hash)
/* Reverse all hash bucket list.  You might do this to
 * get them back in the same order things were added to the hash */
{
int i;
for (i=0; i<hash->size; ++i)
    {
    struct hashEl *hel = hash->table[i];
    if (hel != NULL && hel->next != NULL)	    
	slReverse(&hash->table[i]);
    }
}

// Assembly:
cmpl $0x0, 0x1c(%rdi)
jle 0x2924e
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
movq (%rdi,%r14), %rax
testq %rax, %rax
je 0x29239
cmpq $0x0, (%rax)
je 0x29239
addq %r14, %rdi
callq 0x1fcb3
incq %r15
movslq 0x1c(%rbx), %rax
addq $0x8, %r14
cmpq %rax, %r15
jl 0x2921e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/hash.c
// Function: hashFromSlNameList
struct hash *hashFromSlNameList(void *list)
/* Create a hash out of a list of slNames. */
{
struct hash *hash = NULL;
struct slName *namedList = list, *item;
if (!list)
    return NULL;
hash = newHash(0);
for (item = namedList; item != NULL; item = item->next)
    hashAdd(hash, item->name, item);
return hash;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x29291
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x29160
movq %rax, %r14
leaq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x62d0
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
movq %rbx, %rcx
callq 0x28bfc
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x2926b
jmp 0x29294
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/hash.c
// Function: hashSetFromSlNameList
struct hash *hashSetFromSlNameList(void *list)
/* Create a hashSet (hash with only keys) out of a list of slNames. */
{
struct hash *hash = NULL;
struct slName *namedList = list, *item;
if (!list)
    return NULL;
hash = newHash(0);
for (item = namedList; item != NULL; item = item->next)
    hashAdd(hash, item->name, NULL);
return hash;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x292de
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x29160
movq %rax, %r14
leaq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x62d0
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
xorl %ecx, %ecx
callq 0x28bfc
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x292b9
jmp 0x292e1
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/hash.c
// Function: hashFromString
struct hash *hashFromString(char *string)
/* parse a whitespace-separated string with tuples in the format name=val or
 * name="val" to a hash name->val */
{
if (string==NULL)
    return NULL;

struct slPair *keyVals = slPairListFromString(string, TRUE);
if (keyVals==NULL)
    return NULL;

struct hash *nameToVal = newHash(0);
struct slPair *kv;
for (kv = keyVals; kv != NULL; kv = kv->next)
    hashAdd(nameToVal, kv->name, kv->val);
return nameToVal;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x29a48
movl $0x1, %esi
callq 0x20e0b
testq %rax, %rax
je 0x29a48
movq %rax, %r14
xorl %edi, %edi
movl $0x1, %esi
callq 0x29160
movq %rax, %rbx
movq 0x8(%r14), %r15
movq 0x10(%r14), %r12
movq %r15, %rdi
callq 0x62d0
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
movq %r12, %rcx
callq 0x28bfc
movq (%r14), %r14
testq %r14, %r14
jne 0x29a1e
jmp 0x29a4a
xorl %ebx, %ebx
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/hash.c
// Function: hashFromNameArray
struct hash *hashFromNameArray(char **nameArray, int nameCount)
/* Create a NULL valued hash on all names in array */
{
struct hash *hash = hashNew(0);
int i;
for (i=0; i<nameCount; ++i)
    hashAdd(hash, nameArray[i], NULL);
return hash;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x29160
movq %rax, %r14
testl %ebp, %ebp
jle 0x29aa5
movl %ebp, %r12d
xorl %r13d, %r13d
movq (%rbx,%r13,8), %r15
movq %r15, %rdi
callq 0x62d0
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
xorl %ecx, %ecx
callq 0x28bfc
incq %r13
cmpq %r13, %r12
jne 0x29a82
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/hash.c
// Function: hashFromNameValArray
struct hash *hashFromNameValArray(char *nameVal[][2], int nameValCount)
/* Make up a hash from nameVal array */
{
struct hash *hash = newHash(0);
int i;
for (i=0; i<nameValCount; ++i)
    hashAdd(hash, nameVal[i][0], nameVal[i][1]);
return hash;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x29160
movq %rax, %r14
testl %ebp, %ebp
jle 0x29b0d
movl %ebp, %r13d
shlq $0x4, %r13
xorl %ebp, %ebp
movq (%rbx,%rbp), %r15
movq 0x8(%rbx,%rbp), %r12
movq %r15, %rdi
callq 0x62d0
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
movq %r12, %rcx
callq 0x28bfc
addq $0x10, %rbp
cmpq %rbp, %r13
jne 0x29ae3
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/linefile.c
// Function: lineFileSetTabixRegion
boolean lineFileSetTabixRegion(struct lineFile *lf, char *seqName, int start, int end)
/* Assuming lf was created by lineFileTabixMayOpen, tell tabix to seek to the specified region
 * and return TRUE (or if there are no items in region, return FALSE). */
{
if (lf->tabix == NULL)
    errAbort("lineFileSetTabixRegion: lf->tabix is NULL.  Did you open lf with lineFileTabixMayOpen?");
if (seqName == NULL)
    return FALSE;
int tabixSeqId = ti_get_tid(lf->tabix, seqName);
if (tabixSeqId < 0 && startsWith("chr", seqName))
    // We will get some files that have chr-less Ensembl chromosome names:
    tabixSeqId = ti_get_tid(lf->tabix, seqName+strlen("chr"));
if (tabixSeqId < 0)
    return FALSE;
ti_iter_t *iter = ti_queryi((tbx_t *)lf->tabix, tabixSeqId, start, end);
if (iter == NULL)
    return FALSE;
if (lf->tabixIter != NULL)
    ti_iter_destroy(lf->tabixIter);
lf->tabixIter = iter;
lf->bytesInBuf = 0;
lf->lineIx = -1;
lf->lineStart = 0;
lf->lineEnd = 0;
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
cmpq $0x0, 0x70(%rdi)
jne 0x2a0ba
leaq 0x66e44(%rip), %rdi     # 0x90ef7
xorl %eax, %eax
callq 0x26b6f
xorl %ebp, %ebp
testq %r12, %r12
je 0x2a150
movq 0x70(%rbx), %rdi
movq %r12, %rsi
callq 0x52698
movl %eax, %r13d
testl %eax, %eax
jns 0x2a0fe
leaq 0x66e6f(%rip), %rdi     # 0x90f4e
movq %r12, %rsi
callq 0x217c8
testl %eax, %eax
je 0x2a0fe
movq 0x70(%rbx), %rdi
addq $0x3, %r12
movq %r12, %rsi
callq 0x52698
movl %eax, %r13d
testl %r13d, %r13d
js 0x2a150
movq 0x70(%rbx), %rax
movq 0x18(%rax), %rdi
leaq 0x2889f(%rip), %r8      # 0x529b1
movl %r13d, %esi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x50c5b
testq %rax, %rax
je 0x2a150
movq %rax, %r14
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x2a136
callq 0x5149e
movq %r14, 0x78(%rbx)
xorl %eax, %eax
movl %eax, 0x20(%rbx)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, 0x28(%rbx)
movl %eax, 0x30(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/linefile.c
// Function: lineFileUdcMayOpen
struct lineFile *lineFileUdcMayOpen(char *fileOrUrl, bool zTerm)
/* Create a line file object with an underlying UDC cache. NULL if not found. */
{
if (fileOrUrl == NULL)
    errAbort("lineFileUdcMayOpen: fileOrUrl is NULL");

if (udcIsLocal(fileOrUrl))
     return lineFileOpen(fileOrUrl, zTerm);
else
    {
    struct udcFile *udcFile = udcFileMayOpen(fileOrUrl, NULL);
    if (udcFile == NULL)
	return NULL;
    struct lineFile *lf;
    AllocVar(lf);
    lf->fileName = cloneString(fileOrUrl);
    lf->fd = -1;
    lf->bufSize = 0;
    lf->buf = NULL;
    lf->zTerm = zTerm;
    lf->udcFile = udcFile;
    return lf;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
testq %rdi, %rdi
jne 0x2a181
leaq 0x66dd8(%rip), %rdi     # 0x90f52
xorl %eax, %eax
callq 0x26b6f
movq %r14, %rdi
callq 0x41e4d
testl %eax, %eax
je 0x2a1a3
movsbl %bl, %esi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2a1fc
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
callq 0x402aa
testq %rax, %rax
je 0x2a1ed
movq %rax, %r12
movl $0xc8, %edi
callq 0x2dc95
movq %rax, %r15
movq %r14, %rdi
callq 0x1f9f6
movq %rax, 0x8(%r15)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x10(%r15)
movq $0x0, 0x40(%r15)
movb %bl, 0x34(%r15)
movq %r12, 0x88(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/linefile.c
// Function: lineFileSeek
void lineFileSeek(struct lineFile *lf, off_t offset, int whence)
/* Seek to read next line from given position. */
{
noTabixSupport(lf, "lineFileSeek");
if (lf->checkSupport)
    lf->checkSupport(lf, "lineFileSeek");
if (lf->pl != NULL)
    errnoAbort("Can't lineFileSeek on a compressed file: %s", lf->fileName);
lf->reuse = FALSE;
if (lf->udcFile)
    {
    udcSeek(lf->udcFile, offset);
    return;
    }
lf->lineStart = lf->lineEnd = lf->bytesInBuf = 0;
if ((lf->bufOffsetInFile = lseek(lf->fd, offset, whence)) == -1)
    errnoAbort("Couldn't lineFileSeek %s", lf->fileName);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x70(%rdi)
je 0x2a361
leaq 0x67285(%rip), %rsi     # 0x915d5
leaq 0x66c8b(%rip), %rdx     # 0x90fe2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2aa90
movq 0xb0(%rbx), %rax
testq %rax, %rax
je 0x2a379
leaq 0x66c6e(%rip), %rsi     # 0x90fe2
movq %rbx, %rdi
callq *%rax
cmpq $0x0, 0x48(%rbx)
je 0x2a392
movq 0x8(%rbx), %rsi
leaq 0x66c64(%rip), %rdi     # 0x90fef
xorl %eax, %eax
callq 0x26c9f
movb $0x0, 0x3c(%rbx)
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x2a3ae
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x41ab5
movl $0x0, 0x20(%rbx)
movq $0x0, 0x2c(%rbx)
movl 0x10(%rbx), %edi
movq %r14, %rsi
movl %ebp, %edx
callq 0x65b0
movq %rax, 0x18(%rbx)
cmpq $-0x1, %rax
je 0x2a3d9
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8(%rbx), %rsi
leaq 0x66c37(%rip), %rdi     # 0x9101b
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x26c9f
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/linefile.c
// Function: determineNlType
static void determineNlType(struct lineFile *lf, char *buf, int bufSize)
/* determine type of newline used for the file, assumes buffer not empty */
{
char *c = buf;
if (bufSize==0) return;
if (lf->nlType != nlt_undet) return;  /* if already determined just exit */
while (c < buf+bufSize)
    {
    if (*c=='\r')
	{
    	lf->nlType = nlt_mac;
	if (++c < buf+bufSize)
    	    if (*c == '\n')
    		lf->nlType = nlt_dos;
	return;
	}
    if (*(c++) == '\n')
	{
        lf->nlType = nlt_unix;
	return;
	}
    }
}

// Assembly:
testl %edx, %edx
je 0x2a8f9
cmpl $0x0, 0x38(%rdi)
je 0x2a8fa
retq
movslq %edx, %rax
addq %rsi, %rax
incq %rsi
leaq -0x1(%rsi), %rcx
cmpq %rax, %rcx
jae 0x2a8f9
movb (%rcx), %cl
cmpb $0xd, %cl
je 0x2a922
incq %rsi
cmpb $0xa, %cl
jne 0x2a903
movl $0x1, %eax
jmp 0x2a938
movl $0x3, 0x38(%rdi)
cmpq %rax, %rsi
jae 0x2a8f9
movl $0x2, %eax
cmpb $0xa, (%rsi)
jne 0x2a8f9
movl %eax, 0x38(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/linefile.c
// Function: findNextNewline
static boolean findNextNewline(struct lineFile *lf, char *buf, int bytesInBuf, int *pEndIx)
/* Return TRUE if able to find next end of line in buf, starting at buf[*pEndIx], up to bytesInBuf.
 * When done set *pEndIx to the start of the next line if applicable, otherwise bytesInBuf. */
{
boolean gotLf = FALSE;
int endIx = *pEndIx;
switch (lf->nlType)
    {
    case nlt_unix:
    case nlt_dos:
        for (endIx = *pEndIx; endIx < bytesInBuf; ++endIx)
            {
            if (buf[endIx] == '\n')
                {
                gotLf = TRUE;
                endIx += 1;
                break;
                }
            }
        break;
    case nlt_mac:
        for (endIx = *pEndIx; endIx < bytesInBuf; ++endIx)
            {
            if (buf[endIx] == '\r')
                {
                gotLf = TRUE;
                endIx += 1;
                break;
                }
            }
        break;
    case nlt_mixed:
    case nlt_undet:
        for (endIx = *pEndIx; endIx < bytesInBuf; ++endIx)
            {
            char c = buf[endIx];
            if (c == '\r' || c == '\n')
                {
                gotLf = TRUE;
                if (lf->zTerm)
                    buf[endIx] = '\0';
                endIx += 1;
                if (c == '\r' && buf[endIx] == '\n')
                    {
                    if (lf->zTerm)
                        buf[endIx] = '\0';
                    endIx += 1;
                    }
                break;
                }
            }
        break;
    }
*pEndIx = endIx;
return gotLf;
}

// Assembly:
movl (%rcx), %r8d
movl 0x38(%rdi), %r10d
xorl %eax, %eax
cmpq $0x4, %r10
ja 0x2aa19
movslq %r8d, %r9
leaq 0x664e7(%rip), %r11     # 0x90e40
movslq (%r11,%r10,4), %r10
addq %r11, %r10
jmpq *%r10
cmpl %edx, %r8d
jge 0x2aa19
xorl %eax, %eax
movslq %r8d, %r9
movzbl (%rsi,%r9), %r11d
cmpl $0xd, %r11d
je 0x2a985
movb $0x1, %r10b
cmpl $0xa, %r11d
jne 0x2a9b7
cmpb $0x0, 0x34(%rdi)
je 0x2a990
movb $0x0, (%rsi,%r9)
incq %r9
movl $0x1, %eax
cmpb $0xd, %r11b
jne 0x2a9bc
cmpb $0xa, (%rsi,%r9)
jne 0x2a9bc
cmpb $0x0, 0x34(%rdi)
je 0x2a9b0
movb $0x0, (%rsi,%r9)
addl $0x2, %r8d
xorl %r10d, %r10d
movl %r8d, %r9d
jmp 0x2a9bf
xorl %r10d, %r10d
testb %r10b, %r10b
je 0x2aa1c
incl %r9d
movl %r9d, %r8d
cmpl %edx, %r9d
jl 0x2a96e
jmp 0x2aa1c
movl %r8d, %edi
subl %edx, %edi
jge 0x2aa19
addq %r9, %rsi
xorl %eax, %eax
cmpb $0xa, (%rsi)
je 0x2aa0e
decl %eax
incq %rsi
cmpl %eax, %edi
jne 0x2a9dd
jmp 0x2aa07
movl %r8d, %edi
subl %edx, %edi
jge 0x2aa19
addq %r9, %rsi
xorl %eax, %eax
cmpb $0xd, (%rsi)
je 0x2aa0e
decl %eax
incq %rsi
cmpl %eax, %edi
jne 0x2a9f9
subl %eax, %r8d
xorl %eax, %eax
jmp 0x2aa19
subl %eax, %r8d
incl %r8d
movl $0x1, %eax
movl %r8d, %r9d
movl %r9d, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/linefile.c
// Function: lineFileClose
void lineFileClose(struct lineFile **pLf)
/* Close up a line file. */
{
struct lineFile *lf;
if ((lf = *pLf) != NULL)
    {
    struct pipeline *pl = lf->pl;
    if (pl != NULL)
        {
        pipelineClose(&lf->pl);
        }
    else if (lf->fd > 0 && lf->fd != fileno(stdin))
	{
	close(lf->fd);
	freeMem(lf->buf);
	}
    else if (lf->tabix != NULL)
	{
	if (lf->tabixIter != NULL)
	    ti_iter_destroy(lf->tabixIter);
	ti_close(lf->tabix);
        hts_close(lf->htsFile);
        kstring_t *kline = lf->kline;
        free(kline->s);
	}
    else if (lf->udcFile != NULL)
        udcFileClose(&lf->udcFile);

    if (lf->closeCallBack)
        lf->closeCallBack(lf);
    freeMem(lf->fileName);
    metaDataFree(lf);
    freez(pLf);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x2ab6c
movq %rdi, %rbx
cmpq $0x0, 0x48(%r14)
je 0x2ab71
leaq 0x48(%r14), %rdi
callq 0x35b76
jmp 0x2abef
popq %rbx
popq %r14
popq %rbp
retq
movl 0x10(%r14), %ebp
testl %ebp, %ebp
jle 0x2ab8c
movq 0x94450(%rip), %rax     # 0xbefd0
movq (%rax), %rdi
callq 0x6750
cmpl %eax, %ebp
jne 0x2abc5
cmpq $0x0, 0x70(%r14)
je 0x2abd9
movq 0x78(%r14), %rdi
testq %rdi, %rdi
je 0x2aba1
callq 0x5149e
movq 0x70(%r14), %rdi
callq 0x52e7a
movq 0x68(%r14), %rdi
callq 0x4e56f
movq 0x80(%r14), %rax
movq 0x10(%rax), %rdi
callq 0x68a0
jmp 0x2abef
movl 0x10(%r14), %edi
callq 0x6e80
movq 0x40(%r14), %rdi
callq 0x2dd41
jmp 0x2abef
cmpq $0x0, 0x88(%r14)
je 0x2abef
leaq 0x88(%r14), %rdi
callq 0x40c8a
movq 0xc0(%r14), %rax
testq %rax, %rax
je 0x2ac00
movq %r14, %rdi
callq *%rax
movq 0x8(%r14), %rdi
callq 0x2dd41
cmpb $0x0, 0x58(%r14)
je 0x2ac23
cmpq $0x0, 0x60(%r14)
je 0x2ac23
addq $0x60, %r14
movq %r14, %rdi
callq 0x29565
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2dd51
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/localmem.c
// Function: lmCloneRowExt
char **lmCloneRowExt(struct lm *lm, char **row, int rowOutSize, int rowInSize)
/* Allocate an array of strings with rowOutSize elements.  Clone the first rowInSize elements
 * of row into the new array, leaving others NULL if rowOutSize is greater than rowInSize.
 * rowOutSize must be greater than or equal to rowInSize. */
{
if (rowOutSize < rowInSize)
    errAbort("lmCloneRowExt: rowOutSize (%d) must be greater than or equal to rowInSize (%d)",
             rowOutSize, rowInSize);
char **rowClone = NULL;
lmAllocArray(lm, rowClone, rowOutSize);
int i;
for (i = 0;  i < rowInSize;  i++)
    rowClone[i] = lmCloneString(lm, row[i]);
return rowClone;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
cmpl %ecx, %edx
jge 0x2c211
leaq 0x65413(%rip), %rdi     # 0x91618
movl %r15d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x26b6f
movslq %r15d, %rsi
shlq $0x3, %rsi
movq %r14, %rdi
callq 0x2bfa9
movq %rax, %r15
testl %ebp, %ebp
jle 0x2c245
movl %ebp, %r12d
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rsi
movq %r14, %rdi
callq 0x2c0a2
movq %rax, (%r15,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x2c22d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/maf.c
// Function: mafMayOpen
struct mafFile *mafMayOpen(char *fileName)
/* Open up a maf file and verify header. */
{
struct mafFile *mf;
struct lineFile *lf;
char *line, *word;
char *sig = "##maf";

if ( hasProtocol(fileName))
    lf = lineFileUdcMayOpen(fileName, TRUE);
else
    lf = lineFileMayOpen(fileName, TRUE);

if (lf == NULL)
    return NULL;
AllocVar(mf);
mf->lf = lf;

lineFileNeedNext(lf, &line, NULL);
if (!startsWith(sig, line))
    {
    errAbort("%s does not start with %s", fileName, sig);
    }
line += strlen(sig);

while ((word = nextWord(&line)) != NULL)
    {
    /* Parse name=val. */
    char *name = word;
    char *val = strchr(word, '=');
    if (val == NULL)
       errAbort("Missing = after %s line 1 of %s\n", name, fileName);
    *val++ = 0;

    if (sameString(name, "version"))
        mf->version = atoi(val);
    else if (sameString(name, "scoring"))
        mf->scoring = cloneString(val);
    }
if (mf->version == 0)
    errAbort("No version line 1 of %s\n", fileName);
return mf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbp
callq 0x31296
movq %rbp, %rdi
movl $0x1, %esi
testl %eax, %eax
je 0x2c286
callq 0x2a161
jmp 0x2c28b
callq 0x2a2af
movq %rax, %rbx
testq %rax, %rax
je 0x2c39d
movl $0x28, %edi
callq 0x2dc95
movq %rax, %r14
movq %rbx, 0x20(%rax)
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2ab26
movq (%r15), %rsi
leaq 0x653cd(%rip), %rdi     # 0x9168f
callq 0x217c8
testl %eax, %eax
jne 0x2c2e3
leaq 0x653c3(%rip), %rdi     # 0x91695
leaq 0x653b6(%rip), %rdx     # 0x9168f
movq %rbp, %rsi
xorl %eax, %eax
callq 0x26b6f
movq %rsp, %rdi
addq $0x5, (%rdi)
callq 0x229cd
testq %rax, %rax
je 0x2c383
movq %rax, %r15
leaq 0x67b86(%rip), %r12     # 0x93e88
movq %rsp, %r13
movq %r15, %rdi
movl $0x3d, %esi
callq 0x6270
movq %rax, %rbx
testq %rax, %rax
jne 0x2c32e
leaq 0x6538e(%rip), %rdi     # 0x916af
movq %r15, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x26b6f
movq %rbx, %rax
incq %rbx
movb $0x0, (%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0x6a50
testl %eax, %eax
je 0x2c367
movq %r15, %rdi
leaq 0x65380(%rip), %rsi     # 0x916d0
callq 0x6a50
testl %eax, %eax
jne 0x2c373
movq %rbx, %rdi
callq 0x1f9f6
movq %rax, 0x10(%r14)
jmp 0x2c373
movq %rbx, %rdi
callq 0x6bd0
movl %eax, 0x8(%r14)
movq %r13, %rdi
callq 0x229cd
movq %rax, %r15
testq %rax, %rax
jne 0x2c305
cmpl $0x0, 0x8(%r14)
jne 0x2c3a0
leaq 0x65347(%rip), %rdi     # 0x916d8
movq %rbp, %rsi
xorl %eax, %eax
callq 0x26b6f
jmp 0x2c3a0
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/maf.c
// Function: mafOpen
struct mafFile *mafOpen(char *fileName)
/* Open up a maf file.  Squawk and die if there's a problem. */
{
struct mafFile *mf = mafMayOpen(fileName);
if (mf == NULL)
    errnoAbort("Couldn't open %s\n", fileName);
return mf;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x2c260
movq %rax, %rbx
testq %rax, %rax
jne 0x2c3d7
leaq 0x65324(%rip), %rdi     # 0x916f1
movq %r14, %rsi
xorl %eax, %eax
callq 0x26c9f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/maf.c
// Function: mafReadAll
struct mafFile *mafReadAll(char *fileName)
/* Read all elements in a maf file */
{
struct mafFile *mf = mafOpen(fileName);
struct mafAli *ali;
while ((ali = mafNext(mf)) != NULL)
    {
    slAddHead(&mf->alignments, ali);
    }
slReverse(&mf->alignments);
return mf;
}

// Assembly:
pushq %rbx
callq 0x2c3b2
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2c407
testq %rax, %rax
je 0x2c94a
movq 0x18(%rbx), %rcx
movq %rcx, (%rax)
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
jmp 0x2c92e
movq %rbx, %rdi
addq $0x18, %rdi
callq 0x1fcb3
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/maf.c
// Function: mafWriteStart
void mafWriteStart(FILE *f, char *scoring)
/* Write maf header and scoring scheme name (may be null) */
{
fprintf(f, "##maf version=1");
if (scoring != NULL)
    fprintf(f, " scoring=%s", scoring);
fprintf(f, "\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x64eaa(%rip), %rdi     # 0x91816
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6e70
testq %r14, %r14
je 0x2c997
leaq 0x64e9c(%rip), %rsi     # 0x91826
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x6a90
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6930
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/maf.c
// Function: mafWriteAll
void mafWriteAll(struct mafFile *mf, char *fileName)
/* Write out full mafFile. */
{
FILE *f = mustOpen(fileName, "w");
struct mafAli *ali;
mafWriteStart(f, mf->scoring);
for (ali = mf->alignments; ali != NULL; ali = ali->next)
    mafWrite(f, ali);
mafWriteEnd(f);
carefulClose(&f);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x62048(%rip), %rsi     # 0x8ec89
movq %rax, %rdi
callq 0x22d5a
movq %rax, (%rsp)
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x2c95b
movq 0x18(%rbx), %rbx
testq %rbx, %rbx
je 0x2cc88
movq (%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0xa, %edx
callq 0x2c9ab
movl $0xa, %edi
movq %r14, %rsi
callq 0x6930
movq (%rbx), %rbx
jmp 0x2cc5d
movq %rsp, %rdi
callq 0x23400
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/maf.c
// Function: mafCompFree
void mafCompFree(struct mafComp **pObj)
/* Free up a maf component. */
{
struct mafComp *obj = *pObj;
if (obj == NULL)
    return;
freeMem(obj->src);
freeMem(obj->text);
freeMem(obj->quality);
freez(pObj);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x2ccd1
movq %rdi, %rbx
movq 0x8(%r14), %rdi
callq 0x2dd41
movq 0x20(%r14), %rdi
callq 0x2dd41
movq 0x28(%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/maf.c
// Function: mafCompFreeList
void mafCompFreeList(struct mafComp **pList)
/* Free up a list of maf components. */
{
struct mafComp *el, *next;

for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    mafCompFree(&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 0x2cd0c
leaq 0x8(%rsp), %r14
movq (%r15), %r15
movq %r14, %rdi
callq 0x2cc98
movq %r15, 0x8(%rsp)
testq %r15, %r15
jne 0x2ccf7
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/maf.c
// Function: mafCompGetSrcDb
char *mafCompGetSrcDb(struct mafComp *mc, char *buf, int bufSize)
/* parse the srcDb name from the mafComp src name, return NULL if no srcDb */
{
char *e = strchr(mc->src, '.');
if (e == NULL)
    return NULL;
int len = e - mc->src;
if (len >= bufSize-1)
    errAbort("srcDb name in \"%s\" overflows buffer length of %d", mc->src, bufSize);
strncpy(buf, mc->src, len);
buf[len] = '\0';
return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r13
movq %r13, %rdi
movl $0x2e, %esi
callq 0x6270
testq %rax, %rax
je 0x2cd81
movq %rax, %r12
subq %r13, %r12
leal -0x1(%r15), %eax
cmpl %r12d, %eax
jg 0x2cd68
leaq 0x64b54(%rip), %rdi     # 0x918af
movq %r13, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x26b6f
movq 0x8(%r14), %rsi
movslq %r12d, %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x6380
movb $0x0, (%rbx,%r14)
jmp 0x2cd83
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/maf.c
// Function: mafAliFree
void mafAliFree(struct mafAli **pObj)
/* Free up a maf alignment. */
{
struct mafAli *obj = *pObj;
if (obj == NULL)
    return;
mafCompFreeList(&obj->components);
mafRegDefFree(&obj->regDef);
freez(pObj);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x2cdfb
movq %rdi, %rbx
leaq 0x10(%r14), %rdi
callq 0x2ccd9
addq $0x20, %r14
movq %r14, %rdi
callq 0x2ce03
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/maf.c
// Function: mafRegDefFree
void mafRegDefFree(struct mafRegDef **mrdPtr)
/* Free a mafRegDef object */
{
struct mafRegDef *mrd = *mrdPtr;
if (mrd != NULL)
    {
    freeMem(mrd->id);
    freeMem(mrd);
    *mrdPtr = NULL;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x2ce2a
movq %rdi, %rbx
movq 0x10(%r14), %rdi
callq 0x2dd41
movq %r14, %rdi
callq 0x2dd41
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/maf.c
// Function: mafAliFreeList
void mafAliFreeList(struct mafAli **pList)
/* Free up a list of maf alignmentx. */
{
struct mafAli *el, *next;

for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    mafAliFree(&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 0x2ce65
leaq 0x8(%rsp), %r14
movq (%r15), %r15
movq %r14, %rdi
callq 0x2cdc8
movq %r15, 0x8(%rsp)
testq %r15, %r15
jne 0x2ce50
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq