LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: skipBeyondDelimit
char *skipBeyondDelimit(char *s,char delimit)
/* Returns NULL or pointer to first char beyond one (or more contiguous) delimit char.
   If delimit is ' ' then skips beyond first patch of whitespace. */
{
if (s != NULL)
    {
    char *beyond = NULL;
    if (delimit == ' ')
        return skipLeadingSpaces(skipToSpaces(s));
    else
        beyond = strchr(s,delimit);
    if (beyond != NULL)
        {
        for (beyond++;*beyond == delimit;beyond++) ;
        if (*beyond != '\0')
            return beyond;
        }
    }
return NULL;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x8278
movl %esi, %ebx
cmpb $0x20, %bl
jne 0x8257
callq 0x827c
movq %rax, %rdi
popq %rbx
jmp 0x722d
movsbl %bl, %esi
callq 0x3260
testq %rax, %rax
je 0x8278
movb 0x1(%rax), %cl
incq %rax
cmpb %bl, %cl
je 0x8264
xorl %edx, %edx
testb %cl, %cl
cmoveq %rdx, %rax
jmp 0x827a
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: skipToSpaces
char *skipToSpaces(char *s)
/* Return first white space or NULL if none.. */
{
char c;
if (s == NULL)
    return NULL;
for (;;)
    {
    c = *s;
    if (c == 0)
        return NULL;
    if (isspace(c))
	return s;
    ++s;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x82a6
movq %rdi, %rbx
movsbq (%rbx), %r14
testq %r14, %r14
je 0x82a6
callq 0x37a0
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r14,2)
jne 0x82a8
incq %rbx
jmp 0x8288
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: eraseTrailingSpaces
void eraseTrailingSpaces(char *s)
/* Replace trailing white space with zeroes. */
{
int len = strlen(s);
int i;
char c;

for (i=len-1; i>=0; --i)
    {
    c = s[i];
    if (isspace(c))
	s[i] = 0;
    else
	break;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x3200
movl %eax, %r14d
testl %r14d, %r14d
jle 0x82e9
movsbq -0x1(%rbx,%r14), %r15
callq 0x37a0
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r15,2)
je 0x82e9
movb $0x0, -0x1(%rbx,%r14)
decq %r14
jmp 0x82c3
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: eraseWhiteSpace
void eraseWhiteSpace(char *s)
{
char *in, *out;
char c;

in = out = s;
for (;;)
    {
    c = *in++;
    if (c == 0)
	break;
    if (!isspace(c))
	*out++ = c;
    }
*out++ = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rdi, %r14
movsbq (%r14), %r15
testq %r15, %r15
je 0x831e
incq %r14
callq 0x37a0
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r15,2)
jne 0x82fa
movb %r15b, (%rbx)
incq %rbx
jmp 0x82fa
movb $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: eraseNonAlphaNum
void eraseNonAlphaNum(char *s)
{
char *in, *out;
char c;

in = out = s;
for (;;)
    {
    c = *in++;
    if (c == 0)
        break;
    if (isalnum(c))
        *out++ = c;
    }
*out = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rdi, %r14
movsbq (%r14), %r15
testq %r15, %r15
je 0x8355
incq %r14
callq 0x37a0
movq (%rax), %rax
testb $0x8, (%rax,%r15,2)
je 0x8332
movb %r15b, (%rbx)
incq %rbx
jmp 0x8332
movb $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: trimSpaces
char *trimSpaces(char *s)
/* Remove leading and trailing white space. */
{
if (s != NULL)
    {
    s = skipLeadingSpaces(s);
    eraseTrailingSpaces(s);
    }
return s;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x8376
callq 0x722d
movq %rax, %rbx
movq %rax, %rdi
callq 0x82b3
jmp 0x8378
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: firstWordInLine
char *firstWordInLine(char *line)
/* Returns first word in line if any (white space separated).
 * Puts 0 in place of white space after word. */
{
char *e;
line = skipLeadingSpaces(line);
if ((e = skipToSpaces(line)) != NULL)
    *e = 0;
return line;
}

// Assembly:
pushq %rbx
callq 0x722d
movq %rax, %rbx
movq %rax, %rdi
callq 0x827c
testq %rax, %rax
je 0x83cc
movb $0x0, (%rax)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: cloneFirstWord
char *cloneFirstWord(char *line)
/* Clone first word in line */
{
char *startFirstWord = skipLeadingSpaces(line);
if (startFirstWord == NULL)
    return NULL;
char *endFirstWord = skipToSpaces(startFirstWord);
if (endFirstWord == NULL)
    return cloneString(startFirstWord);
else
    return cloneStringZ(startFirstWord, endFirstWord - startFirstWord);
}

// Assembly:
pushq %rbx
callq 0x722d
testq %rax, %rax
je 0x83f9
movq %rax, %rbx
movq %rax, %rdi
callq 0x827c
testq %rax, %rax
je 0x83fd
subl %ebx, %eax
movq %rbx, %rdi
movl %eax, %esi
popq %rbx
jmp 0x5e7b
xorl %eax, %eax
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x5ede
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: lastWordInLine
char *lastWordInLine(char *line)
/* Returns last word in line if any (white space separated).
 * Returns NULL if string is empty.  Removes any terminating white space
 * from line. */
{
char *s = line;
char *word = NULL, *wordEnd = NULL;
for (;;)
    {
    s = skipLeadingSpaces(s);
    if (s == NULL || s[0] == 0)
	break;
    word = s;
    s = wordEnd = skipToSpaces(s);
    if (s == NULL)
        break;
    }
if (wordEnd != NULL)
    *wordEnd = 0;
return word;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rax
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %rax, %rdi
callq 0x722d
testq %rax, %rax
je 0x843e
movq %rax, %rbx
cmpb $0x0, (%rax)
je 0x843e
movq %rbx, %rdi
callq 0x827c
movq %rbx, %r14
movq %rax, %r15
testq %rax, %rax
jne 0x8414
jmp 0x844a
testq %r15, %r15
je 0x8447
movb $0x0, (%r15)
movq %r14, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: nextTabWord
char *nextTabWord(char **pLine)
/* Return next tab-separated word. */
{
char *s = *pLine;
char *e;
if (s == NULL || *s == '\n' || *s == 0)
    {
    *pLine = NULL;
    return NULL;
    }
e = strchr(s, '\t');
if (e == NULL)
    {
    e = strchr(s, '\n');
    if (e != NULL)
        *e = 0;
    *pLine = NULL;
    }
else
    {
    *e++ = 0;
    *pLine = e;
    }
return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x848e
movzbl (%r14), %edx
xorl %ecx, %ecx
testl %edx, %edx
je 0x8490
movl $0x0, %eax
cmpl $0xa, %edx
je 0x84ac
pushq $0x9
popq %rsi
movq %r14, %rdi
callq 0x3260
testq %rax, %rax
je 0x8494
movq %rax, %rcx
incq %rcx
jmp 0x84a6
xorl %ecx, %ecx
xorl %eax, %eax
jmp 0x84ac
pushq $0xa
popq %rsi
movq %r14, %rdi
callq 0x3260
xorl %ecx, %ecx
testq %rax, %rax
je 0x84a9
movb $0x0, (%rax)
movq %r14, %rax
movq %rcx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: cloneFirstWordByDelimiter
char *cloneFirstWordByDelimiter(char *line,char delimit)
/* Returns a cloned first word, not harming the memory passed in */
{
if (line == NULL || *line == 0)
    return NULL;
line = skipLeadingSpaces(line);
if (*line == 0)
    return NULL;
int size=0;
char *e;
for (e=line;*e!=0;e++)
    {
    if (*e==delimit)
        break;
    else if (delimit == ' ' && isspace(*e))
        break;
    size++;
    }
if (size == 0)
    return NULL;
char *new = needMem(size + 2); // Null terminated by 2
memcpy(new, line, size);
return new;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x852f
cmpb $0x0, (%rdi)
je 0x852f
movl %esi, %ebx
callq 0x722d
movb (%rax), %bpl
testb %bpl, %bpl
je 0x852f
movq %rax, %r14
xorl %r15d, %r15d
testb %bpl, %bpl
je 0x8509
cmpb %bl, %bpl
je 0x8509
cmpb $0x20, %bl
jne 0x84ff
callq 0x37a0
movq (%rax), %rax
movsbq %bpl, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x8509
movb 0x1(%r14,%r15), %bpl
incq %r15
jmp 0x84dd
testl %r15d, %r15d
je 0x852f
leaq 0x2(%r15), %rdi
callq 0xd87c
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x34a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: cloneNextWordByDelimiter
char *cloneNextWordByDelimiter(char **line,char delimit)
/* Returns a cloned first word, advancing the line pointer but not harming memory passed in */
{
char *new = cloneFirstWordByDelimiter(*line,delimit);
if (new != NULL)
    {
    *line = skipLeadingSpaces(*line);
    *line += strlen(new);
    if ( **line != 0)
        (*line)++;
    }
return new;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x84b7
movq %rax, %r14
testq %rax, %rax
je 0x857e
movq (%rbx), %rdi
callq 0x722d
movq %rax, %r15
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x3200
leaq (%r15,%rax), %rcx
movq %rcx, (%rbx)
cmpb $0x0, (%r15,%rax)
je 0x857e
incq %rcx
movq %rcx, (%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: stringArrayIx
int stringArrayIx(char *string, char *array[], int arraySize)

/* Return index of string in array or -1 if not there. */
{
int i;
for (i=0; i<arraySize; ++i)
    if (!differentWord(array[i], string))
        return i;
return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
testl %edx, %edx
cmovlel %r12d, %ebx
pushq $-0x1
popq %rbp
cmpq %r12, %rbx
je 0x861d
movq (%r14,%r12,8), %rdi
movq %r15, %rsi
callq 0x682f
testl %eax, %eax
je 0x861a
incq %r12
jmp 0x8600
movl %r12d, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: ptArrayIx
int ptArrayIx(void *pt, void *array, int arraySize)
/* Return index of pt in array or -1 if not there. */
{
int i;
void **a = array;
for (i=0; i<arraySize; ++i)
    {
    if (pt == a[i])
        return i;
    }
return -1;
}

// Assembly:
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
pushq $-0x1
popq %rax
cmpq %rcx, %rdx
je 0x8644
cmpq %rdi, (%rsi,%rcx,8)
je 0x8642
incq %rcx
jmp 0x8632
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: mustOpen
FILE *mustOpen(char *fileName, char *mode)
/* Open a file - or squawk and die. */
{
FILE *f;

if (sameString(fileName, "stdin"))
    return stdin;
if (sameString(fileName, "stdout"))
    return stdout;
if ((f = fopen(fileName, mode)) == NULL)
    {
    char *modeName = "";
    if (mode)
        {
        if (mode[0] == 'r')
            modeName = " to read";
        else if (mode[0] == 'w')
            modeName = " to write";
        else if (mode[0] == 'a')
            modeName = " to append";
        }
    errAbort("Can't open %s%s: %s", fileName, modeName, strerror(errno));
    }
return f;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10d71(%rip), %rsi     # 0x193cb
callq 0x3440
testl %eax, %eax
je 0x86b1
leaq 0x10d75(%rip), %rsi     # 0x193df
movq %rbx, %rdi
callq 0x3440
testl %eax, %eax
je 0x86ba
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3480
movq %rax, %r12
testq %rax, %rax
jne 0x86c4
leaq 0xf642(%rip), %r14      # 0x17cd2
testq %r15, %r15
je 0x86e3
movzbl (%r15), %eax
cmpl $0x61, %eax
je 0x86dc
cmpl $0x72, %eax
je 0x86d3
cmpl $0x77, %eax
jne 0x86e3
leaq 0xee5f(%rip), %r14      # 0x1750e
jmp 0x86e3
movq 0x1d918(%rip), %rax     # 0x25fd0
jmp 0x86c1
movq 0x1d907(%rip), %rax     # 0x25fc8
movq (%rax), %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xee2b(%rip), %r14      # 0x17505
jmp 0x86e3
leaq 0xee35(%rip), %r14      # 0x17518
callq 0x30c0
movl (%rax), %edi
callq 0x3720
leaq 0xee2d(%rip), %rdi      # 0x17523
xorl %r12d, %r12d
movq %rbx, %rsi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xa61f
jmp 0x86c4
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: mustRead
void mustRead(FILE *file, void *buf, size_t size)
/* Read size bytes from a file or squawk and die. */
{
if (size != 0 && fread(buf, size, 1, file) != 1)
    {
    if (ferror(file))
	errAbort("Error reading %lld bytes: %s", (long long)size, strerror(ferror(file)));
    else
	errAbort("End of file reading %lld bytes", (long long)size);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x8789
movq %rdx, %rbx
movq %rdi, %r14
pushq $0x1
popq %rdx
movq %rsi, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x3150
cmpq $0x1, %rax
jne 0x8791
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x3110
testl %eax, %eax
je 0x87bf
movl %eax, %edi
callq 0x3720
leaq 0xedaa(%rip), %rdi      # 0x17555
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa61f
leaq 0xedac(%rip), %rdi      # 0x17572
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa61f
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: writeString
void writeString(FILE *f, char *s)
/* Write a 255 or less character string to a file.
 * This will write the length of the string in the first
 * byte then the string itself. */
{
UBYTE bLen;
int len = strlen(s);

if (len > 255)
    {
    warn("String too long in writeString (%d chars):\n%s", len, s);
    len = 255;
    }
bLen = len;
writeOne(f, bLen);
mustWrite(f, s, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3200
movq %rax, %r15
cmpl $0x100, %r15d           # imm = 0x100
jl 0x8814
leaq 0xed90(%rip), %rdi      # 0x17591
movl %r15d, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xa3aa
movl $0xff, %r15d
leaq 0xf(%rsp), %rsi
movb %r15b, (%rsi)
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x870b
movslq %r15d, %rdx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x870b
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: readString
char *readString(FILE *f)
/* Read a string (written with writeString) into
 * memory.  freeMem the result when done. */
{
UBYTE bLen;
int len;
char *s;

if (!readOne(f, bLen))
    return NULL;
len = bLen;
s = needMem(len+1);
if (len > 0)
    mustRead(f, s, len);
return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xf(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %rbx, %rcx
callq 0x3150
cmpq $0x1, %rax
jne 0x888a
movzbl 0xf(%rsp), %r15d
leaq 0x1(%r15), %rdi
callq 0xd87c
movq %rax, %r14
testq %r15, %r15
je 0x888d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x8763
jmp 0x888d
xorl %r14d, %r14d
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: mustReadString
char *mustReadString(FILE *f)
/* Read a string.  Squawk and die at EOF or if any problem. */
{
char *s = readString(f);
if (s == NULL)
    errAbort("Couldn't read string");
return s;
}

// Assembly:
pushq %rbx
callq 0x883e
movq %rax, %rbx
testq %rax, %rax
jne 0x88b6
leaq 0xed10(%rip), %rdi      # 0x175bf
xorl %eax, %eax
callq 0xa61f
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: fastReadString
boolean fastReadString(FILE *f, char buf[256])
/* Read a string into buffer, which must be long enough
 * to hold it.  String is in 'writeString' format. */
{
UBYTE bLen;
int len;
if (!readOne(f, bLen))
    return FALSE;
if ((len = bLen)> 0)
    mustRead(f, buf, len);
buf[len] = 0;
return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xf(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %r14, %rcx
callq 0x3150
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x1, %rcx
jne 0x890e
movzbl 0xf(%rsp), %r15d
testq %r15, %r15
je 0x8903
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x8763
jmp 0x8906
xorl %r15d, %r15d
movb $0x0, (%rbx,%r15)
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: msbFirstWriteBits64
void msbFirstWriteBits64(FILE *f, bits64 x)
/* Write out 64 bit number in manner that is portable across architectures */
{
int i;
UBYTE buf[8];
for (i=7; i>=0; --i)
    {
    buf[i] = (UBYTE)(x&0xff);
    x >>= 8;
    }
mustWrite(f, buf, 8);
}

// Assembly:
pushq %rax
pushq $0x7
popq %rax
testl %eax, %eax
js 0x892e
movl %eax, %ecx
movb %sil, (%rsp,%rcx)
shrq $0x8, %rsi
decl %eax
jmp 0x891c
movq %rsp, %rsi
pushq $0x8
popq %rdx
callq 0x870b
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: msbFirstReadBits64
bits64 msbFirstReadBits64(FILE *f)
/* Write out 64 bit number in manner that is portable across architectures */
{
int i;
UBYTE buf[8];
bits64 x = 0;
mustRead(f, buf, 8);
for (i=0; i<8; ++i)
    {
    x <<= 8;
    x |= buf[i];
    }
return x;
}

// Assembly:
pushq %rax
movq %rsp, %rsi
pushq $0x8
popq %rdx
callq 0x8763
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x8, %rcx
je 0x8961
shlq $0x8, %rax
movzbl (%rsp,%rcx), %edx
orq %rdx, %rax
incq %rcx
jmp 0x894b
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: mustGetLine
void mustGetLine(FILE *file, char *buf, int charCount)
/* Read at most charCount-1 bytes from file, but stop after newline if one is
 * encountered.  The string in buf is '\0'-terminated.  (See man 3 fgets.)
 * Die if there is an error. */
{
char *success = fgets(buf, charCount, file);
if (success == NULL && charCount > 0)
    buf[0] = '\0';
if (ferror(file))
    errAbort("mustGetLine: fgets failed: %s", strerror(ferror(file)));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
movq %rbx, %rdx
callq 0x3400
testl %ebp, %ebp
jle 0x8989
testq %rax, %rax
jne 0x8989
movb $0x0, (%r14)
movq %rbx, %rdi
callq 0x3110
testl %eax, %eax
je 0x89b1
movl %eax, %edi
callq 0x3720
leaq 0xec31(%rip), %rdi      # 0x175d4
movq %rax, %rsi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0xa61f
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: mustOpenFd
int mustOpenFd(char *fileName, int flags)
/* Open a file descriptor (see man 2 open) or squawk and die. */
{
if (sameString(fileName, "stdin"))
    return STDIN_FILENO;
if (sameString(fileName, "stdout"))
    return STDOUT_FILENO;
// mode is necessary when O_CREAT is given, ignored otherwise
int mode = 00664;
int fd = open(fileName, flags, mode);
if (fd < 0)
    {
    char *modeName = "";
    if ((flags & (O_WRONLY | O_CREAT | O_TRUNC)) == (O_WRONLY | O_CREAT | O_TRUNC))
	modeName = " to create and truncate";
    else if ((flags & (O_WRONLY | O_CREAT)) == (O_WRONLY | O_CREAT))
	modeName = " to create";
    else if ((flags & O_WRONLY) == O_WRONLY)
	modeName = " to write";
    else if ((flags & O_RDWR) == O_RDWR)
	modeName = " to append";
    else
	modeName = " to read";
    errnoAbort("Can't open %s%s", fileName, modeName);
    }
return fd;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x10a04(%rip), %rsi     # 0x193cb
callq 0x3440
testl %eax, %eax
je 0x8a0f
leaq 0x10a08(%rip), %rsi     # 0x193df
movq %rbx, %rdi
callq 0x3440
testl %eax, %eax
je 0x8a13
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1b4, %edx            # imm = 0x1B4
xorl %eax, %eax
callq 0x35b0
movl %eax, %ebp
testl %eax, %eax
jns 0x8a5b
movl %r14d, %eax
notl %eax
testw $0x241, %ax             # imm = 0x241
jne 0x8a18
leaq 0xebe5(%rip), %rdx      # 0x175f2
jmp 0x8a4a
xorl %ebp, %ebp
jmp 0x8a5b
pushq $0x1
popq %rbp
jmp 0x8a5b
testb $0x41, %al
jne 0x8a25
leaq 0xebe7(%rip), %rdx      # 0x1760a
jmp 0x8a4a
testb $0x1, %r14b
jne 0x8a43
testb $0x2, %r14b
leaq 0xeacf(%rip), %rax      # 0x17505
leaq 0xeadb(%rip), %rdx      # 0x17518
cmoveq %rax, %rdx
jmp 0x8a4a
leaq 0xeac4(%rip), %rdx      # 0x1750e
leaq 0xebc4(%rip), %rdi      # 0x17615
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa721
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: mustReadFd
void mustReadFd(int fd, void *buf, size_t size)
/* Read size bytes from a file or squawk and die. */
{
ssize_t actualSize;
char *cbuf = buf;
// using a loop because linux was not returning all data in a single request when request size exceeded 2GB.
while (size > 0)
    {
    actualSize = read(fd, cbuf, size);
    if (actualSize < 0)
	errnoAbort("Error reading %lld bytes", (long long)size);
    if (actualSize == 0)
	errAbort("End of file reading %llu bytes (got %lld)", (unsigned long long)size, (long long)actualSize);
    cbuf += actualSize;
    size -= actualSize;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
leaq 0xeba9(%rip), %r15      # 0x17625
leaq 0xebbb(%rip), %r12      # 0x1763e
testq %rbx, %rbx
je 0x8ac5
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x33d0
movq %rax, %r13
testq %rax, %rax
js 0x8ab0
jne 0x8abd
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0xa61f
jmp 0x8abd
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa721
addq %r13, %r14
subq %r13, %rbx
jmp 0x8a83
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: mustWriteFd
void mustWriteFd(int fd, void *buf, size_t size)
/* Write size bytes to file descriptor fd or die.  (See man 2 write.) */
{
ssize_t result = write(fd, buf, size);
if (result < size)
    {
    if (result < 0)
	errnoAbort("mustWriteFd: write failed");
    else 
        errAbort("mustWriteFd only wrote %lld of %lld bytes. Likely the disk is full.",
	    (long long)result, (long long)size);
    }
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
callq 0x31a0
cmpq %rbx, %rax
jae 0x8afc
testq %rax, %rax
js 0x8afe
leaq 0xeb94(%rip), %rdi      # 0x17682
movq %rax, %rsi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
jmp 0xa61f
popq %rbx
retq
leaq 0xeb63(%rip), %rdi      # 0x17668
xorl %eax, %eax
popq %rbx
jmp 0xa721
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: mustLseek
off_t mustLseek(int fd, off_t offset, int whence)
/* Seek to given offset, relative to whence (see man lseek) in file descriptor fd or errAbort.
 * Return final offset (e.g. if this is just an (fd, 0, SEEK_CUR) query for current position). */
{
off_t ret = lseek(fd, offset, whence);
if (ret < 0)
    errnoAbort("lseek(%d, %lld, %s (%d)) failed", fd, (long long)offset,
	       ((whence == SEEK_SET) ? "SEEK_SET" : (whence == SEEK_CUR) ? "SEEK_CUR" :
		(whence == SEEK_END) ? "SEEK_END" : "invalid 'whence' value"), whence);
return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %ebp
callq 0x3700
movq %rax, %r15
testq %rax, %rax
jns 0x8b6e
testl %ebx, %ebx
je 0x8b3a
cmpl $0x1, %ebx
jne 0x8b43
leaq 0xebb7(%rip), %rcx      # 0x176ef
jmp 0x8b58
leaq 0xeba5(%rip), %rcx      # 0x176e6
jmp 0x8b58
cmpl $0x2, %ebx
leaq 0xebab(%rip), %rax      # 0x176f8
leaq 0xebad(%rip), %rcx      # 0x17701
cmoveq %rax, %rcx
leaq 0xeb67(%rip), %rdi      # 0x176c6
movl %ebp, %esi
movq %r14, %rdx
movl %ebx, %r8d
xorl %eax, %eax
callq 0xa721
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: mustCloseFd
void mustCloseFd(int *pFd)
/* Close file descriptor *pFd if >= 0, abort if there's an error, set *pFd = -1. */
{
if (pFd != NULL && *pFd >= 0)
    {
    if (close(*pFd) < 0)
	errnoAbort("close failed");
    *pFd = -1;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x8ba6
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
js 0x8ba5
callq 0x3350
testl %eax, %eax
jns 0x8ba2
leaq 0xeb7e(%rip), %rdi      # 0x17719
xorl %eax, %eax
callq 0xa721
orl $-0x1, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: addSuffix
char *addSuffix(char *head, char *suffix)
/* Return a needMem'd string containing "headsuffix". Should be free'd
 when finished. */
{
char *ret = NULL;
int size = strlen(head) + strlen(suffix) +1;
ret = needMem(sizeof(char)*size);
snprintf(ret, size, "%s%s", head, suffix);
return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3200
movq %rax, %r15
movq %rbx, %rdi
callq 0x3200
addl %r15d, %eax
incl %eax
movslq %eax, %r15
movq %r15, %rdi
callq 0xd87c
movq %rax, %r12
leaq 0xf5c8(%rip), %rdx      # 0x181a7
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x32a0
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: carefulCloseWarn
boolean carefulCloseWarn(FILE **pFile)
/* Close file if open and null out handle to it.
 * Return FALSE and print a warning message if there
 * is a problem.*/
{
FILE *f;
boolean ok = TRUE;
if ((pFile != NULL) && ((f = *pFile) != NULL))
    {
    if (f != stdin && f != stdout)
        {
        if (fclose(f) != 0)
	    {
            errnoWarn("fclose failed");
	    ok = FALSE;
	    }
        }
    *pFile = NULL;
    }
return ok;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
pushq $0x1
popq %rbp
testq %rdi, %rdi
je 0x8c93
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x8c93
movq 0x1d36b(%rip), %rax     # 0x25fd0
cmpq (%rax), %rdi
je 0x8c8f
movq 0x1d357(%rip), %rax     # 0x25fc8
cmpq (%rax), %rdi
je 0x8c8f
callq 0x31c0
testl %eax, %eax
je 0x8c8f
leaq 0xea92(%rip), %rdi      # 0x17718
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xa50e
andq $0x0, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: firstWordInFile
char *firstWordInFile(char *fileName, char *wordBuf, int wordBufSize)
/* Read the first word in file into wordBuf. */
{
FILE *f = mustOpen(fileName, "r");
mustGetLine(f, wordBuf, wordBufSize);
fclose(f);
return trimSpaces(wordBuf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
leaq 0x11b6f(%rip), %rsi     # 0x1a830
callq 0x8645
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x8963
movq %r15, %rdi
callq 0x31c0
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x835e
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: fileOffsetSizeMerge
struct fileOffsetSize *fileOffsetSizeMerge(struct fileOffsetSize *inList)
/* Returns a new list which is inList transformed to have adjacent blocks
 * merged.  Best to use this with a sorted list. */
{
struct fileOffsetSize *newList = NULL, *newEl = NULL, *oldEl, *nextOld;

for (oldEl = inList; oldEl != NULL; oldEl = nextOld)
    {
    nextOld = oldEl->next;
    if (nextOld != NULL && nextOld->offset < oldEl->offset)
        errAbort("Unsorted inList in fileOffsetSizeMerge %llu %llu", oldEl->offset, nextOld->offset);
    if (newEl == NULL || newEl->offset + newEl->size < oldEl->offset)
        {
	newEl = CloneVar(oldEl);
	slAddHead(&newList, newEl);
	}
    else
        {
	newEl->size = oldEl->offset + oldEl->size - newEl->offset;
	}
    }
slReverse(&newList);
return newList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r15
pushq $0x18
popq %rbx
leaq 0xe9ff(%rip), %r14      # 0x17726
xorl %r12d, %r12d
movq %r15, %r13
testq %r15, %r15
je 0x8d9b
movq (%r13), %r15
testq %r15, %r15
je 0x8d52
movq 0x8(%r15), %rdx
movq 0x8(%r13), %rsi
cmpq %rsi, %rdx
jae 0x8d52
movq %r14, %rdi
xorl %eax, %eax
callq 0xa61f
testq %r12, %r12
je 0x8d7b
movq 0x8(%r12), %rax
movq 0x10(%r12), %rdx
addq %rax, %rdx
movq 0x8(%r13), %rcx
cmpq %rcx, %rdx
jb 0x8d7b
subq %rax, %rcx
addq 0x10(%r13), %rcx
movq %rcx, 0x10(%r12)
jmp 0x8d2a
movq %rbx, %rdi
callq 0xd684
movups (%r13), %xmm0
movups %xmm0, (%rax)
movq 0x10(%r13), %rcx
movq %rcx, 0x10(%rax)
movq %r12, (%rax)
movq %rax, %r12
jmp 0x8d2a
leaq 0x8(%rsp), %rbx
movq %r12, (%rbx)
movq %rbx, %rdi
callq 0x613f
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: mustSystem
void mustSystem(char *cmd)
/* Execute cmd using "sh -c" or die.  (See man 3 system.) fail on errors */
{
if (cmd == NULL) // don't allow (system() supports testing for shell this way)
    errAbort("mustSystem: called with NULL command.");
int status = system(cmd);
if (status == -1)
    errnoAbort("error starting command: %s", cmd);
else if (WIFSIGNALED(status))
    errAbort("command terminated by signal %d: %s", WTERMSIG(status), cmd);
else if (WIFEXITED(status))
    {
    if (WEXITSTATUS(status) != 0)
        errAbort("command exited with %d: %s", WEXITSTATUS(status), cmd);
    }
else
    errAbort("bug: invalid exit status for command: %s", cmd);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x8df3
leaq 0xe96b(%rip), %rdi      # 0x17757
xorl %eax, %eax
callq 0xa61f
movq %rbx, %rdi
callq 0x3230
cmpl $-0x1, %eax
je 0x8e2a
movl %eax, %esi
andl $0x7f, %esi
movl %esi, %ecx
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
cmpl $0x2000000, %ecx        # imm = 0x2000000
jl 0x8e3c
leaq 0xe979(%rip), %rdi      # 0x17798
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
jmp 0xa61f
leaq 0xe94c(%rip), %rdi      # 0x1777d
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
jmp 0xa721
testl %esi, %esi
je 0x8e52
leaq 0xe990(%rip), %rdi      # 0x177d7
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
jmp 0xa61f
shrl $0x8, %eax
andl $0xff, %eax
je 0x8e67
leaq 0xe959(%rip), %rdi      # 0x177bc
movl %eax, %esi
jmp 0x8e1f
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: roundingScale
int roundingScale(int a, int p, int q)
/* returns rounded a*p/q */
{
if (a > 100000 || p > 100000)
    {
    double x = a;
    x *= p;
    x /= q;
    return round(x);
    }
else
    return (a*p + q/2)/q;
}

// Assembly:
movl %edx, %ecx
movl $0x186a1, %eax          # imm = 0x186A1
cmpl %eax, %edi
setl %dl
cmpl %eax, %esi
setl %al
testb %al, %dl
jne 0x8e9f
cvtsi2sd %edi, %xmm0
cvtsi2sd %esi, %xmm1
mulsd %xmm0, %xmm1
cvtsi2sd %ecx, %xmm0
divsd %xmm0, %xmm1
addsd 0xd16e(%rip), %xmm1     # 0x16008
cvttsd2si %xmm1, %eax
retq
imull %edi, %esi
pushq $0x2
popq %rdi
movl %ecx, %eax
cltd
idivl %edi
addl %esi, %eax
cltd
idivl %ecx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: readBits64
bits64 readBits64(FILE *f, boolean isSwapped)
/* Read and optionally byte-swap 64 bit entity. */
{
bits64 val;
mustReadOne(f, val);
if (isSwapped)
    val = byteSwap64(val);
return val;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rsp, %r14
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x8763
movq (%r14), %rcx
movq %rcx, %rax
bswapq %rax
testl %ebx, %ebx
cmoveq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: fdReadBits64
bits64 fdReadBits64(int fd, boolean isSwapped)
/* Read and optionally byte-swap 64 bit entity. */
{
bits64 val;
mustReadOneFd(fd, val);
if (isSwapped)
    val = byteSwap64(val);
return val;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rsp, %r14
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x8a62
movq (%r14), %rcx
movq %rcx, %rax
bswapq %rax
testl %ebx, %ebx
cmoveq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: readBits32
bits32 readBits32(FILE *f, boolean isSwapped)
/* Read and optionally byte-swap 32 bit entity. */
{
bits32 val;
mustReadOne(f, val);
if (isSwapped)
    val = byteSwap32(val);
return val;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
leaq 0x4(%rsp), %r14
pushq $0x4
popq %rdx
movq %r14, %rsi
callq 0x8763
testl %ebx, %ebx
movl (%r14), %ecx
movl %ecx, %eax
bswapl %eax
cmovel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: fdReadBits32
bits32 fdReadBits32(int fd, boolean isSwapped)
/* Read and optionally byte-swap 32 bit entity. */
{
bits32 val;
mustReadOneFd(fd, val);
if (isSwapped)
    val = byteSwap32(val);
return val;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
leaq 0x4(%rsp), %r14
pushq $0x4
popq %rdx
movq %r14, %rsi
callq 0x8a62
testl %ebx, %ebx
movl (%r14), %ecx
movl %ecx, %eax
bswapl %eax
cmovel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: readDouble
double readDouble(FILE *f, boolean isSwapped)
/* Read and optionally byte-swap double-precision floating point entity. */
{
double val;
mustReadOne(f, val);
if (isSwapped)
    val = byteSwapDouble(val);
return val;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
leaq 0x8(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x8763
testl %ebx, %ebx
je 0x9070
movq 0x8(%rsp), %rax
bswapq %rax
movq %rax, %xmm0
jmp 0x9076
movq 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: memReadDouble
double memReadDouble(char **pPt, boolean isSwapped)
/* Read and optionally byte-swap double-precision floating point entity
 * from memory buffer pointed to by *pPt, and advance *pPt past read area. */
{
double val;
memcpy(&val, *pPt, sizeof(val));
if (isSwapped)
    val = byteSwapDouble(val);
*pPt += sizeof(val);
return val;
}

// Assembly:
movq (%rdi), %rax
movq (%rax), %xmm0
testl %esi, %esi
je 0x9094
movq %xmm0, %rcx
bswapq %rcx
movq %rcx, %xmm0
addq $0x8, %rax
movq %rax, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: memReadFloat
float memReadFloat(char **pPt, boolean isSwapped)
/* Read and optionally byte-swap single-precision floating point entity
 * from memory buffer pointed to by *pPt, and advance *pPt past read area. */
{
float val;
memcpy(&val, *pPt, sizeof(val));
if (isSwapped)
    val = byteSwapFloat(val);
*pPt += sizeof(val);
return val;
}

// Assembly:
movq (%rdi), %rax
movd (%rax), %xmm0
testl %esi, %esi
je 0x90ed
movd %xmm0, %ecx
bswapl %ecx
movd %ecx, %xmm0
addq $0x4, %rax
movq %rax, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: readLine
char* readLine(FILE* fh)
/* Read a line of any size into dynamic memory, return null on EOF */
{
int bufCapacity = 256;
int bufSize = 0;
char* buf = needMem(bufCapacity);
int ch;

/* loop until EOF of EOLN */
while (((ch = getc(fh)) != EOF) && (ch != '\n'))
    {
    /* expand if almost full, always keep one extra char for
     * zero termination */
    if (bufSize >= bufCapacity-2)
        {
        bufCapacity *= 2;
        buf = realloc(buf, bufCapacity);
        if (buf == NULL)
            {
            errAbort("Out of memory in readline - request size %d bytes", bufCapacity);
            }
        }
    buf[bufSize++] = ch;
    }

/* only return EOF if no data was read */
if ((ch == EOF) && (bufSize == 0))
    {
    freeMem(buf);
    return NULL;
    }
buf[bufSize] = '\0';
return buf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
movl $0x100, %edi            # imm = 0x100
callq 0xd87c
movq %rax, %rbx
movl $0x100, %r14d           # imm = 0x100
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x3740
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x9176
cmpl $0xa, %ebp
je 0x9176
leal -0x2(%r14), %eax
cltq
cmpq %rax, %r12
jl 0x916d
addl %r14d, %r14d
movslq %r14d, %rsi
movq %rbx, %rdi
callq 0x3570
testq %rax, %rax
je 0x91a8
movq %rax, %rbx
movb %bpl, (%rbx,%r12)
incq %r12
jmp 0x9138
cmpl $-0x1, %ebp
sete %al
testq %r12, %r12
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x9195
movq %rbx, %rdi
callq 0xd8f9
xorl %ebx, %ebx
jmp 0x919c
movl %r12d, %eax
movb $0x0, (%rbx,%rax)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe651(%rip), %rdi      # 0x17800
movl %r14d, %esi
xorl %eax, %eax
callq 0xa61f
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: fileExists
boolean fileExists(char *fileName)
/* Return TRUE if file exists (may replace this with non-
 * portable faster way some day). */
{
/* To make piping easier stdin and stdout always exist. */
if (sameString(fileName, "stdin")) return TRUE;
if (sameString(fileName, "stdout")) return TRUE;

return fileSize(fileName) != -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x10204(%rip), %rsi     # 0x193cb
callq 0x3440
pushq $0x1
popq %rbx
testl %eax, %eax
je 0x91f7
leaq 0x10205(%rip), %rsi     # 0x193df
movq %r14, %rdi
callq 0x3440
testl %eax, %eax
je 0x91f7
movq %r14, %rdi
callq 0xf518
xorl %ebx, %ebx
cmpq $-0x1, %rax
setne %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: strstrNoCase
char *strstrNoCase(char *haystack, char *needle)
/*
  A case-insensitive strstr function
Will also robustly handle null strings
param haystack - The string to be searched
param needle - The string to look for in the haystack string

return - The position of the first occurence of the desired substring
or -1 if it is not found
 */
{
char *haystackCopy = NULL;
char *needleCopy = NULL;
int index = 0;
int haystackLen = 0;
int needleLen = 0;
char *p, *q;

if (NULL == haystack || NULL == needle)
    {
    return NULL;
    }

haystackLen = strlen(haystack);
needleLen = strlen(needle);

haystackCopy = (char*) needMem(haystackLen + 1);
needleCopy = (char*) needMem(needleLen + 1);

for(index = 0; index < haystackLen;  index++)
    {
    haystackCopy[index] = tolower(haystack[index]);
    }
haystackCopy[haystackLen] = 0; /* Null terminate */

for(index = 0; index < needleLen;  index++)
    {
    needleCopy[index] = tolower(needle[index]);
    }
needleCopy[needleLen] = 0; /* Null terminate */

p=strstr(haystackCopy, needleCopy);
q=haystackCopy;

freeMem(haystackCopy);
freeMem(needleCopy);

if(p==NULL) return NULL;

return p-q+haystack;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
xorl %r12d, %r12d
orb %al, %cl
jne 0x9338
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3200
movq %rax, %r15
movq %rax, 0x8(%rsp)
movq %r14, %rdi
callq 0x3200
movq %rax, %rbp
shlq $0x20, %r15
movabsq $0x100000000, %r13      # imm = 0x100000000
movq %r15, 0x10(%rsp)
leaq (%r15,%r13), %rdi
sarq $0x20, %rdi
callq 0xd87c
movq %rax, %r15
movq %rbp, 0x18(%rsp)
shlq $0x20, %rbp
movq %rbp, 0x20(%rsp)
addq %rbp, %r13
sarq $0x20, %r13
movq %r13, %rdi
callq 0xd87c
movq %rax, %r13
movq 0x8(%rsp), %rax
testl %eax, %eax
movl $0x0, %ebp
cmovgl %eax, %ebp
cmpq %r12, %rbp
je 0x92b9
callq 0x3790
movq (%rax), %rax
movsbq (%rbx,%r12), %rcx
movb (%rax,%rcx,4), %al
movb %al, (%r15,%r12)
incq %r12
jmp 0x929b
movq 0x10(%rsp), %rax
sarq $0x20, %rax
movb $0x0, (%r15,%rax)
xorl %r12d, %r12d
movq 0x18(%rsp), %rax
testl %eax, %eax
movl $0x0, %ebp
cmovgl %eax, %ebp
cmpq %r12, %rbp
je 0x92f8
callq 0x3790
movq (%rax), %rax
movsbq (%r14,%r12), %rcx
movb (%rax,%rcx,4), %al
movb %al, (%r13,%r12)
incq %r12
jmp 0x92d9
movq 0x20(%rsp), %rax
sarq $0x20, %rax
movb $0x0, (%r13,%rax)
movq %r15, %rdi
movq %r13, %rsi
callq 0x3760
movq %rax, %r14
movq %r15, %rdi
callq 0xd8f9
movq %r13, %rdi
callq 0xd8f9
testq %r14, %r14
je 0x9335
subq %r15, %r14
addq %r14, %rbx
movq %rbx, %r12
jmp 0x9338
xorl %r12d, %r12d
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: vasafef
int vasafef(char* buffer, int bufSize, char *format, va_list args)
/* Format string to buffer, vsprintf style, only with buffer overflow
 * checking.  The resulting string is always terminated with zero byte. */
{
int sz = vsnprintf(buffer, bufSize, format, args);
/* note that some version return -1 if too small */
if ((sz < 0) || (sz >= bufSize))
    {
    buffer[bufSize-1] = (char) 0;
    errAbort("buffer overflow, size %d, format: %s, buffer: '%s'", bufSize, format, buffer);
    }
return sz;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %r15
movq %r15, %rsi
callq 0x3170
movl %eax, %ebp
testl %eax, %eax
setns %al
cmpl %r15d, %ebp
setl %cl
testb %cl, %al
jne 0x9390
movb $0x0, -0x1(%r14,%r15)
leaq 0xe4b2(%rip), %rdi      # 0x17832
movl %r15d, %esi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xa61f
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: safencpy
void safencpy(char *buf, size_t bufSize, const char *src, size_t n)
/* copy n characters from a string to a buffer, with bounds checking.
 * Unlike strncpy, always null terminates the result */
{
if (n > bufSize-1)
    errAbort("buffer overflow, size %lld, substring size: %lld", (long long)bufSize, (long long)n);
// strlen(src) can take a long time when src is for example a pointer into a chromosome sequence.
// Instead of setting slen to max(strlen(src), n), just stop counting length at n.
size_t slen = 0;
while (src[slen] != '\0' && slen < n)
    slen++;
strncpy(buf, src, n);
buf[slen] = '\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
leaq -0x1(%rsi), %rax
cmpq %rcx, %rax
jae 0x9448
leaq 0xe455(%rip), %rdi      # 0x17893
movq %r14, %rdx
xorl %eax, %eax
callq 0xa61f
xorl %eax, %eax
leaq 0x1(%rax), %r12
cmpq %r14, %rax
jae 0x945d
cmpb $0x0, (%r15,%rax)
movq %r12, %rax
jne 0x944a
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x30d0
movb $0x0, -0x1(%rbx,%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: safecat
void safecat(char *buf, size_t bufSize, const char *src)
/* Append  a string to a buffer, with bounds checking.*/
{
size_t blen = strlen(buf);
size_t slen = strlen(src);
if (blen+slen > bufSize-1)
    errAbort("buffer overflow, size %lld, new string size: %lld", (long long)bufSize, (long long)(blen+slen));
strcat(buf, src);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x3200
movq %rax, %r12
movq %rbx, %rdi
callq 0x3200
addq %r12, %rax
leaq -0x1(%r15), %rcx
cmpq %rcx, %rax
jbe 0x94be
leaq 0xe413(%rip), %rdi      # 0x178c4
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xa61f
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x36b0
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: safencat
void safencat(char *buf, size_t bufSize, const char *src, size_t n)
/* append n characters from a string to a buffer, with bounds checking. */
{
size_t blen = strlen(buf);
if (blen+n > bufSize-1)
    errAbort("buffer overflow, size %lld, new string size: %lld", (long long)bufSize, (long long)(blen+n));
size_t slen = strlen(src);
if (slen > n)
    slen = n;
strncat(buf, src, n);
buf[blen+slen] = '\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
callq 0x3200
movq %rax, %r12
leaq (%rax,%r14), %rdx
leaq -0x1(%r13), %rax
cmpq %rax, %rdx
jbe 0x950f
leaq 0xe3bf(%rip), %rdi      # 0x178c4
movq %r13, %rsi
xorl %eax, %eax
callq 0xa61f
movq %r15, %rdi
callq 0x3200
movq %rax, %r13
cmpq %r14, %rax
cmovaeq %r14, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3330
addq %rbx, %r12
movb $0x0, (%r13,%r12)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: nullIfAllSpace
char *nullIfAllSpace(char *s)
/* Return NULL if s is all spaces, otherwise s. */
{
s = skipLeadingSpaces(s);
if (s != NULL)
    if (s[0] == 0)
        s = NULL;
return s;
}

// Assembly:
pushq %rax
callq 0x722d
testq %rax, %rax
je 0x958f
movq %rax, %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
cmovneq %rcx, %rax
jmp 0x9591
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: uglyTime
void uglyTime(char *label, ...)
/* Print label and how long it's been since last call.  Call with
 * a NULL label to initialize. */
{
static long lastTime = 0;
long time = clock1000();
va_list args;
va_start(args, label);
if (label != NULL)
    {
    fprintf(stdout, "<span class='timing'>");
    vfprintf(stdout, label, args);
    fprintf(stdout, ": %ld millis<BR></span>\n", time - lastTime);
    }
lastTime = time;
va_end(args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r14
leaq 0x20(%rsp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x960b
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
xorl %eax, %eax
callq 0xf58e
movq %rax, %rbx
movq %r15, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
testq %r14, %r14
je 0x967f
movq 0x1c987(%rip), %r15     # 0x25fc8
movq (%r15), %rcx
leaq 0xe2b6(%rip), %rdi      # 0x17901
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x36f0
movq (%r15), %rdi
movq %rsp, %rdx
movq %r14, %rsi
callq 0x3670
movq (%r15), %rdi
movq %rbx, %rdx
subq 0x1d1df(%rip), %rdx     # 0x26850
leaq 0xe29f(%rip), %rsi      # 0x17917
xorl %eax, %eax
callq 0x3470
movq %rbx, 0x1d1ca(%rip)     # 0x26850
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/common.c
// Function: makeDirs
void makeDirs(char* path)
/* make a directory, including parent directories */
{
char pathBuf[PATH_LEN];
char* next = pathBuf;

strcpy(pathBuf, path);
if (*next == '/')
    next++;

while((*next != '\0')
      && (next = strchr(next, '/')) != NULL)
    {
    *next = '\0';
    makeDir(pathBuf);
    *next = '/';
    next++;
    }
makeDir(pathBuf);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x30e0
xorl %eax, %eax
cmpb $0x2f, (%rbx)
sete %al
leaq (%rsp,%rax), %r14
pushq $0x2f
popq %rbp
cmpb $0x0, (%r14)
je 0x96e7
movq %r14, %rdi
movl %ebp, %esi
callq 0x3260
testq %rax, %rax
je 0x96e7
movq %rax, %r14
movb $0x0, (%rax)
movq %rbx, %rdi
callq 0xf870
movb $0x2f, (%r14)
incq %r14
jmp 0x96bb
movq %rsp, %rdi
callq 0xf870
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq