LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/hash.c
// Function: freeHash
void freeHash(struct hash **pHash)
/* Free up hash table. */
{
struct hash *hash = *pHash;
if (hash == NULL)
    return;
if (hash->lm)
    lmCleanup(&hash->lm);
else
    {
    int i;
    struct hashEl *hel, *next;
    for (i=0; i<hash->size; ++i)
	{
	for (hel = hash->table[i]; hel != NULL; hel = next)
	    {
	    next = hel->next;
	    freeHashEl(hel);
	    }
	}
    }
freeMem(hash->table);
freez(pHash);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0xb345
movq %rdi, %rbx
cmpq $0x0, 0x20(%r14)
je 0xb351
leaq 0x20(%r14), %rdi
callq 0xd3c6
movq 0x10(%r14), %rdi
callq 0xd8f9
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd909
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r15d, %r15d
movslq 0x1c(%r14), %rax
cmpq %rax, %r15
jge 0xb329
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0xb377
movq (%rdi), %r12
callq 0xade9
movq %r12, %rdi
jmp 0xb365
incq %r15
jmp 0xb354
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/hash.c
// Function: hashFreeWithVals
void hashFreeWithVals(struct hash **pHash, void (freeFunc)())
/* Free up hash table and all values associated with it. freeFunc is a
 * function to free an entry, should take a pointer to a pointer to an
 * entry. */
{
struct hash *hash = *pHash;
if (hash != NULL)
    {
    struct hashCookie cookie = hashFirst(hash);
    struct hashEl *hel;
    while ((hel = hashNext(&cookie)) != NULL)
        freeFunc(&hel->val);
    hashFree(pHash);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq (%rdi), %rsi
testq %rsi, %rsi
je 0xb3e6
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xb23b
movq %r15, %rdi
callq 0xb275
testq %rax, %rax
je 0xb3de
addq $0x10, %rax
movq %rax, %rdi
xorl %eax, %eax
callq *%r14
jmp 0xb3c3
movq %rbx, %rdi
callq 0xb306
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/hash.c
// Function: hashFreeList
void hashFreeList(struct hash **pList)
/* Free up a list of hashes. */
{
struct hash *el, *next;

for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    hashFree(&el);
    }
*pList = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r15
leaq 0x8(%rsp), %r14
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0xb41b
movq (%r15), %r15
movq %r14, %rdi
callq 0xb306
jmp 0xb404
andq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/hash.c
// Function: hashHisto
void hashHisto(struct hash *hash, char *fname)
/* Output bucket usage counts to a file for producing a histogram  */
{
FILE* fh = mustOpen(fname, "w");
int i;

for (i=0; i<hash->size; ++i)
    fprintf(fh, "%d\n", bucketLen(hash->table[i]));
carefulClose(&fh);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
leaq 0xc5f5(%rip), %rsi      # 0x17a33
movq %rax, %rdi
callq 0x8645
movq %rax, %r14
movq %rax, (%rsp)
leaq 0xc80b(%rip), %r15      # 0x17c5f
xorl %r12d, %r12d
movslq 0x1c(%rbx), %rax
cmpq %rax, %r12
jge 0xb481
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0xb495
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x3470
incq %r12
jmp 0xb457
movq %rsp, %rdi
callq 0x8c9c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/hash.c
// Function: bucketLen
static int bucketLen(struct hashEl *hel)
/* determine how many elements are in a hash bucket */
{
int nel = 0;
for (; hel != NULL; hel = hel->next)
    nel++;
return nel;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0xb4a3
incl %eax
movq (%rdi), %rdi
jmp 0xb497
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/hash.c
// Function: hashPrintStats
void hashPrintStats(struct hash *hash, char *label, FILE *fh)
/* print statistic about a hash table */
{
// count up usage
int i, occupiedCnt = 0, maxBucket = 0;
for (i=0; i<hash->size; ++i)
    {
    if (hash->table[i] != NULL)
        occupiedCnt++;
    int sz = bucketLen(hash->table[i]);
    maxBucket = max(maxBucket, sz);
    }

fprintf(fh, "hashTable\t%s\n", label);
fprintf(fh, "tableSize\t%d\t%d\n", hash->size, hash->powerOfTwoSize);
fprintf(fh, "numElements\t%d\n", hash->elCount);
fprintf(fh, "occupied\t%d\t%0.4f\n", occupiedCnt, ((hash->size == 0) ? 0.0 : ((float)occupiedCnt)/hash->size));
fprintf(fh, "maxBucket\t%d\n", maxBucket);
fprintf(fh, "numResizes\t%d\n", hash->numResizes);
fprintf(fh, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, (%rsp)
movq %rdi, %r14
movl 0x1c(%rdi), %r13d
xorl %r12d, %r12d
testl %r13d, %r13d
cmovlel %r12d, %r13d
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpq %r12, %r13
je 0xb4f0
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rdi
cmpq $0x1, %rdi
sbbl $-0x1, %r15d
callq 0xb495
cmpl %eax, %ebp
cmovlel %eax, %ebp
incq %r12
jmp 0xb4cc
leaq 0xc74d(%rip), %rsi      # 0x17c44
movq %rbx, %rdi
movq (%rsp), %rdx
xorl %eax, %eax
callq 0x3470
movl 0x18(%r14), %ecx
movl 0x1c(%r14), %edx
leaq 0xc73e(%rip), %rsi      # 0x17c52
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3470
movl 0x28(%r14), %edx
leaq 0xc73a(%rip), %rsi      # 0x17c63
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3470
movl 0x1c(%r14), %eax
xorps %xmm0, %xmm0
testl %eax, %eax
je 0xb54f
cvtsi2ss %r15d, %xmm0
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xc71d(%rip), %rsi      # 0x17c73
movq %rbx, %rdi
movl %r15d, %edx
movb $0x1, %al
callq 0x3470
leaq 0xc71c(%rip), %rsi      # 0x17c86
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x3470
movl 0x34(%r14), %edx
leaq 0xc713(%rip), %rsi      # 0x17c94
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3470
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33a0
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/hash.c
// Function: hashToRaString
char *hashToRaString(struct hash *hash)
/* Convert hash to string in ra format. */
{
struct hashEl *el, *list = hashElListHash(hash);
struct dyString *dy = dyStringNew(0);
slSort(&list, hashElCmp);
for (el = list; el != NULL; el = el->next)
   {
   dyStringAppend(dy, el->name);
   dyStringAppendC(dy, ' ');
   dyStringAppend(dy, el->val);
   dyStringAppendC(dy, '\n');
   }
hashElFreeList(&list);
return dyStringCannibalize(&dy);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
callq 0xb1d8
leaq 0x10(%rsp), %rbx
movq %rax, (%rbx)
xorl %edi, %edi
callq 0x9df0
movq %rax, %r14
movq %rax, 0x8(%rsp)
leaq -0x489(%rip), %rsi      # 0xb17e
movq %rbx, %rdi
callq 0x6183
pushq $0x20
popq %rbp
pushq $0xa
popq %r15
movq (%rbx), %rbx
testq %rbx, %rbx
je 0xb64d
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x9ffe
movq %r14, %rdi
movl %ebp, %esi
callq 0x9f5e
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x9ffe
movq %r14, %rdi
movl %r15d, %esi
callq 0x9f5e
jmp 0xb616
leaq 0x10(%rsp), %rdi
callq 0x615b
leaq 0x8(%rsp), %rdi
callq 0x9e4a
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/hash.c
// Function: hashNumEntries
int hashNumEntries(struct hash *hash)
/* count the number of entries in a hash */
{
int n = 0, i;
for (i=0; i<hash->size; ++i)
    n += bucketLen(hash->table[i]);
return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x1c(%rdi), %r14d
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
xorl %ebp, %ebp
cmpq %r15, %r14
je 0xb69f
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0xb495
addl %eax, %ebp
incq %r15
jmp 0xb686
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/linefile.c
// Function: getFileNameFromHdrSig
char *getFileNameFromHdrSig(char *m)
/* Check if header has signature of supported compression stream,
   and return a phoney filename for it, or NULL if no sig found. */
{
char buf[20];
char *ext=NULL;
if (startsWith("\x1f\x8b",m)) ext = "gz";
else if (startsWith("\x1f\x9d\x90",m)) ext = "Z";
else if (startsWith("BZ",m)) ext = "bz2";
else if (startsWith("PK\x03\x04",m)) ext = "zip";
if (ext==NULL)
    return NULL;
safef(buf, sizeof(buf), "somefile.%s", ext);
return cloneString(buf);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0xc609(%rip), %rdi      # 0x17cc4
movq %rbx, %rsi
callq 0x76a5
testl %eax, %eax
je 0xb6d0
leaq 0xcd5c(%rip), %rcx      # 0x1842a
jmp 0xb722
leaq 0xc5f0(%rip), %rdi      # 0x17cc7
movq %rbx, %rsi
callq 0x76a5
testl %eax, %eax
je 0xb6ec
leaq 0xcd44(%rip), %rcx      # 0x1842e
jmp 0xb722
leaq 0xc5d8(%rip), %rdi      # 0x17ccb
movq %rbx, %rsi
callq 0x76a5
testl %eax, %eax
je 0xb708
leaq 0xcd2b(%rip), %rcx      # 0x18431
jmp 0xb722
leaq 0xc5bf(%rip), %rdi      # 0x17cce
movq %rbx, %rsi
callq 0x76a5
testl %eax, %eax
je 0xb747
leaq 0xcd14(%rip), %rcx      # 0x18436
leaq 0xc5aa(%rip), %rdx      # 0x17cd3
movq %rsp, %rbx
pushq $0x14
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x939d
movq %rbx, %rdi
callq 0x5ede
addq $0x20, %rsp
popq %rbx
retq
xorl %eax, %eax
jmp 0xb741
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileSetMetaDataOutput
void lineFileSetMetaDataOutput(struct lineFile *lf, FILE *f)
/* set file to write meta data to,
 * should be called before reading from input file */
{
struct metaOutput *meta = NULL;
if (lf == NULL)
    return;
AllocVar(meta);
meta->next = NULL;
meta->metaFile = f;
slAddHead(&lf->metaOutput, meta);
}

// Assembly:
testq %rdi, %rdi
je 0xb77c
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0xd87c
andq $0x0, (%rax)
movq %r14, 0x8(%rax)
movq 0x50(%rbx), %rcx
movq %rcx, (%rax)
movq %rax, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileDecompress
struct lineFile *lineFileDecompress(char *fileName, bool zTerm)
/* open a linefile with decompression */
{
struct pipeline *pl;
struct lineFile *lf;
char *testName = NULL;
char *testbytes = NULL;    /* the header signatures for .gz, .bz2, .Z,
			    * .zip are all 2-4 bytes only */
if (fileName==NULL)
  return NULL;
testbytes=headerBytes(fileName,4);
if (!testbytes)
    return NULL;  /* avoid error from pipeline */
testName=getFileNameFromHdrSig(testbytes);
freez(&testbytes);
if (!testName)
    return NULL;  /* avoid error from pipeline */
pl = pipelineOpen1(getDecompressor(fileName), pipelineRead, fileName, NULL);
lf = lineFileAttach(fileName, zTerm, pipelineFd(pl));
lf->pl = pl;
return lf;
}

// Assembly:
testq %rdi, %rdi
je 0xb7e7
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
xorl %esi, %esi
xorl %eax, %eax
callq 0x35b0
testl %eax, %eax
js 0xb850
movl %eax, %r14d
pushq $0x5
popq %rdi
callq 0xd87c
movq %rax, %r15
movq %rax, (%rsp)
pushq $0x4
popq %rdx
movl %r14d, %edi
movq %rax, %rsi
callq 0x33d0
cmpl $0x3, %eax
jg 0xb7ea
movq %rsp, %rdi
callq 0xd909
jmp 0xb7ef
xorl %eax, %eax
retq
movb $0x0, 0x4(%r15)
movl %r14d, %edi
callq 0x3350
movq (%rsp), %rdi
movq %rdi, (%rsp)
testq %rdi, %rdi
je 0xb850
callq 0xb6ac
movq %rax, %r14
movq %rsp, %rdi
callq 0xd909
testq %r14, %r14
je 0xb850
movq %rbx, %rdi
callq 0xb85d
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x10710
movq %rax, %r14
movq %rax, %rdi
callq 0x1074d
movsbl %bpl, %esi
movq %rbx, %rdi
movl %eax, %edx
callq 0xb940
movq %r14, 0x48(%rax)
jmp 0xb852
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/linefile.c
// Function: getDecompressor
static char **getDecompressor(char *fileName)
/* if a file is compressed, return the command to decompress the
 * approriate format, otherwise return NULL */
{
static char *GZ_READ[] = {"gzip", "-dc", NULL};
static char *Z_READ[] = {"gzip", "-dc", NULL};
static char *BZ2_READ[] = {"bzip2", "-dc", NULL};
static char *ZIP_READ[] = {"gzip", "-dc", NULL};

char **result = NULL;
char *fileNameDecoded = cloneString(fileName);
if (startsWith("http://" , fileName)
 || startsWith("https://", fileName)
 || startsWith("ftp://",   fileName))
    cgiDecode(fileName, fileNameDecoded, strlen(fileName));

if      (endsWith(fileNameDecoded, ".gz"))
    result = GZ_READ;
else if (endsWith(fileNameDecoded, ".Z"))
    result = Z_READ;
else if (endsWith(fileNameDecoded, ".bz2"))
    result = BZ2_READ;
else if (endsWith(fileNameDecoded, ".zip"))
    result = ZIP_READ;

freeMem(fileNameDecoded);
return result;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x5ede
movq %rax, %rbx
leaq 0xcb9e(%rip), %rdi      # 0x18411
movq %r14, %rsi
callq 0x76a5
testl %eax, %eax
jne 0xb8a5
leaq 0xcb93(%rip), %rdi      # 0x18419
movq %r14, %rsi
callq 0x76a5
testl %eax, %eax
jne 0xb8a5
leaq 0xcb89(%rip), %rdi      # 0x18422
movq %r14, %rsi
callq 0x76a5
testl %eax, %eax
je 0xb8ba
movq %r14, %rdi
callq 0x3200
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x11ba5
leaq 0xcb68(%rip), %rsi      # 0x18429
movq %rbx, %rdi
callq 0x7904
testl %eax, %eax
je 0xb8d6
leaq 0x1abfc(%rip), %r14     # 0x264d0
jmp 0xb92d
leaq 0xcb50(%rip), %rsi      # 0x1842d
movq %rbx, %rdi
callq 0x7904
testl %eax, %eax
je 0xb8f2
leaq 0x1ac00(%rip), %r14     # 0x264f0
jmp 0xb92d
leaq 0xcb37(%rip), %rsi      # 0x18430
movq %rbx, %rdi
callq 0x7904
testl %eax, %eax
je 0xb90e
leaq 0x1ac04(%rip), %r14     # 0x26510
jmp 0xb92d
leaq 0xcb20(%rip), %rsi      # 0x18435
movq %rbx, %rdi
callq 0x7904
xorl %r14d, %r14d
testl %eax, %eax
leaq 0x1ac07(%rip), %rax     # 0x26530
cmovneq %rax, %r14
movq %rbx, %rdi
callq 0xd8f9
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileAttach
struct lineFile *lineFileAttach(char *fileName, bool zTerm, int fd)
/* Wrap a line file around an open'd file. */
{
struct lineFile *lf;
AllocVar(lf);
lf->fileName = cloneString(fileName);
lf->fd = fd;
lf->bufSize = 64*1024;
lf->zTerm = zTerm;
lf->buf = needMem(lf->bufSize+1);
return lf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl $0xa0, %edi
callq 0xd87c
movq %rax, %r15
movq %r14, %rdi
callq 0x5ede
movq %rax, 0x8(%r15)
movl %ebx, 0x10(%r15)
movl $0x10000, 0x14(%r15)    # imm = 0x10000
movb %bpl, 0x34(%r15)
movl $0x10001, %edi          # imm = 0x10001
callq 0xd87c
movq %rax, 0x40(%r15)
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/linefile.c
// Function: lineFileDecompressFd
struct lineFile *lineFileDecompressFd(char *name, bool zTerm, int fd)
/* open a linefile with decompression from a file or socket descriptor */
{
struct pipeline *pl;
struct lineFile *lf;
pl = pipelineOpenFd1(getDecompressor(name), pipelineRead, fd, STDERR_FILENO);
lf = lineFileAttach(name, zTerm, pipelineFd(pl));
lf->pl = pl;
return lf;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0xb85d
pushq $0x1
popq %rsi
pushq $0x2
popq %rcx
movq %rax, %rdi
movl %ebx, %edx
callq 0x106f4
movq %rax, %rbx
movq %rax, %rdi
callq 0x1074d
movq %r14, %rdi
movl %ebp, %esi
movl %eax, %edx
callq 0xb940
movq %rbx, 0x48(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileDecompressMem
struct lineFile *lineFileDecompressMem(bool zTerm, char *mem, long size)
/* open a linefile with decompression from a memory stream */
{
struct pipeline *pl;
struct lineFile *lf;
char *fileName = getFileNameFromHdrSig(mem);
if (fileName==NULL)
  return NULL;
pl = pipelineOpenMem1(getDecompressor(fileName), pipelineRead, mem, size, STDERR_FILENO);
lf = lineFileAttach(fileName, zTerm, pipelineFd(pl));
lf->pl = pl;
return lf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %ebx
movq %rsi, %rdi
callq 0xb6ac
testq %rax, %rax
je 0xba2e
movq %rax, %r14
movq %rax, %rdi
callq 0xb85d
pushq $0x1
popq %rsi
pushq $0x2
popq %r8
movq %rax, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x1072c
movq %rax, %r15
movq %rax, %rdi
callq 0x1074d
movsbl %bl, %esi
movq %r14, %rdi
movl %eax, %edx
callq 0xb940
movq %r15, 0x48(%rax)
jmp 0xba30
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileOnString
struct lineFile *lineFileOnString(char *name, bool zTerm, char *s)
/* Wrap a line file object around string in memory. This buffer
 * have zeroes written into it and be freed when the line file
 * is closed. */
{
struct lineFile *lf;
AllocVar(lf);
lf->fileName = cloneString(name);
lf->fd = -1;
lf->bufSize = lf->bytesInBuf = strlen(s);
lf->zTerm = zTerm;
lf->buf = s;
return lf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0xa0, %edi
callq 0xd87c
movq %rax, %r15
movq %r14, %rdi
callq 0x5ede
movq %rax, 0x8(%r15)
orl $-0x1, 0x10(%r15)
movq %rbx, %rdi
callq 0x3200
movl %eax, 0x20(%r15)
movl %eax, 0x14(%r15)
movb %bpl, 0x34(%r15)
movq %rbx, 0x40(%r15)
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/linefile.c
// Function: lineFileMayOpen
struct lineFile *lineFileMayOpen(char *fileName, bool zTerm)
/* Try and open up a lineFile. */
{
if (sameString(fileName, "stdin"))
    return lineFileStdin(zTerm);
else if (getDecompressor(fileName) != NULL)
    return lineFileDecompress(fileName, zTerm);
else
    {
    int fd = open(fileName, O_RDONLY);
    if (fd == -1)
        return NULL;
    return lineFileAttach(fileName, zTerm, fd);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0xd884(%rip), %rsi      # 0x193cb
callq 0x3440
testl %eax, %eax
je 0xbb6f
movq %r14, %rdi
callq 0xb85d
testq %rax, %rax
je 0xbb7e
movsbl %bl, %esi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb796
movsbl %bl, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xbb14
movq %r14, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x35b0
cmpl $-0x1, %eax
je 0xbba3
movsbl %bl, %esi
movq %r14, %rdi
movl %eax, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb940
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileOpen
struct lineFile *lineFileOpen(char *fileName, bool zTerm)
/* Open up a lineFile or die trying. */
{
struct lineFile *lf = lineFileMayOpen(fileName, zTerm);
if (lf == NULL)
    errAbort("Couldn't open %s , %s", fileName, strerror(errno));
return lf;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0xbb37
movq %rax, %rbx
testq %rax, %rax
jne 0xbbe1
callq 0x30c0
movl (%rax), %edi
callq 0x3720
leaq 0xc275(%rip), %rdi      # 0x17e49
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xa61f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/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 (whence == SEEK_SET && offset >= lf->bufOffsetInFile
	&& offset < lf->bufOffsetInFile + lf->bytesInBuf)
    {
    lf->lineStart = lf->lineEnd = offset - lf->bufOffsetInFile;
    }
else
    {
    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
movq 0x88(%rdi), %rax
testq %rax, %rax
je 0xbc15
leaq 0xc24f(%rip), %rsi      # 0x17e5f
movq %rbx, %rdi
callq *%rax
cmpq $0x0, 0x48(%rbx)
je 0xbc2e
movq 0x8(%rbx), %rsi
leaq 0xc245(%rip), %rdi      # 0x17e6c
xorl %eax, %eax
callq 0xa721
movb $0x0, 0x3c(%rbx)
testl %ebp, %ebp
jne 0xbc58
movq 0x18(%rbx), %rax
cmpq %rax, %r14
jl 0xbc58
movslq 0x20(%rbx), %rcx
addq %rax, %rcx
cmpq %r14, %rcx
jle 0xbc58
subl %eax, %r14d
movl %r14d, 0x30(%rbx)
movl %r14d, 0x2c(%rbx)
jmp 0xbc78
andl $0x0, 0x20(%rbx)
andq $0x0, 0x2c(%rbx)
movl 0x10(%rbx), %edi
movq %r14, %rsi
movl %ebp, %edx
callq 0x3700
movq %rax, 0x18(%rbx)
cmpq $-0x1, %rax
je 0xbc7d
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8(%rbx), %rsi
leaq 0xc210(%rip), %rdi      # 0x17e98
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0xa721
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileLongNetRead
int lineFileLongNetRead(int fd, char *buf, int size)
/* Keep reading until either get no new characters or
 * have read size */
{
int oneSize, totalRead = 0;

while (size > 0)
    {
    oneSize = read(fd, buf, size);
    if (oneSize <= 0)
        break;
    totalRead += oneSize;
    buf += oneSize;
    size -= oneSize;
    }
return totalRead;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
xorl %ebp, %ebp
testl %ebx, %ebx
jle 0xbcdd
movl %ebx, %edx
movl %r15d, %edi
movq %r14, %rsi
callq 0x33d0
testl %eax, %eax
jle 0xbcdd
addl %eax, %ebp
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq %rcx, %r14
subl %eax, %ebx
jmp 0xbcb7
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/linefile.c
// Function: metaDataAdd
static void metaDataAdd(struct lineFile *lf, char *line)
/* write a line of metaData to output file
 * internal function called by lineFileNext */
{
struct metaOutput *meta = NULL;

if (lf->isMetaUnique)
    {
    /* suppress repetition of comments */
    if (hashLookup(lf->metaLines, line))
        {
        return;
        }
    hashAdd(lf->metaLines, line, NULL);
    }
for (meta = lf->metaOutput ; meta != NULL ; meta = meta->next)
    if (line != NULL && meta->metaFile != NULL)
        fprintf(meta->metaFile,"%s\n", line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x58(%rdi)
je 0xbfd3
movq 0x60(%r14), %rdi
movq %rbx, %rsi
callq 0xaaa4
testq %rax, %rax
je 0xbfc5
popq %rbx
popq %r14
popq %r15
retq
movq 0x60(%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xad17
addq $0x50, %r14
leaq 0xbc70(%rip), %r15      # 0x17c4e
movq (%r14), %r14
testq %r14, %r14
je 0xbfbf
testq %rbx, %rbx
je 0xbfde
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xbfde
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3470
jmp 0xbfde
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/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 */
lf->nlType = nlt_unix;  /* start with default of unix lf type */
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')
	{
	return;
	}
    }
}

// Assembly:
testl %edx, %edx
je 0xc00d
cmpl $0x0, 0x38(%rdi)
je 0xc00e
retq
movl $0x1, 0x38(%rdi)
movslq %edx, %rax
addq %rsi, %rax
incq %rsi
leaq -0x1(%rsi), %rcx
cmpq %rax, %rcx
jae 0xc00d
movb (%rcx), %cl
cmpb $0xd, %cl
je 0xc038
incq %rsi
cmpb $0xa, %cl
jne 0xc01e
jmp 0xc00d
movl $0x3, 0x38(%rdi)
cmpq %rax, %rsi
jae 0xc00d
cmpb $0xa, (%rsi)
jne 0xc00d
movl $0x2, 0x38(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileVaAbort
void lineFileVaAbort(struct lineFile *lf, char *format, va_list args)
/* Print file name, line number, and error message, and abort. */
{
struct dyString *dy = dyStringNew(0);
dyStringPrintf(dy,  "Error line %d of %s: ", lf->lineIx, lf->fileName);
dyStringVaPrintf(dy, format, args);
errAbort("%s", dy->string);
dyStringFree(&dy);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %edi, %edi
callq 0x9df0
movq %rax, %r12
leaq 0x8(%rsp), %r13
movq %rax, (%r13)
movl 0x28(%r15), %edx
movq 0x8(%r15), %rcx
leaq 0xbe59(%rip), %rsi      # 0x17ee2
movq %rax, %rdi
xorl %eax, %eax
callq 0xa0eb
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xa068
movq 0x8(%r12), %rsi
leaq 0xb50f(%rip), %rdi      # 0x175bc
xorl %eax, %eax
callq 0xa61f
movq %r13, %rdi
callq 0x9e2b
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/linefile.c
// Function: lineFileClose
void lineFileClose(struct lineFile **pLf)
/* Close up a line file. */
{
struct lineFile *lf;
if ((lf = *pLf) != NULL)
    {
    if (lf->pl != NULL)
        {
        pipelineWait(lf->pl);
        pipelineFree(&lf->pl);
        }
    else if (lf->fd > 0 && lf->fd != fileno(stdin))
	{
	close(lf->fd);
	freeMem(lf->buf);
	}
#ifdef USE_TABIX
    else if (lf->tabix != NULL)
	{
	if (lf->tabixIter != NULL)
	    ti_iter_destroy(lf->tabixIter);
	ti_close(lf->tabix);
	}
#endif // USE_TABIX
    if (lf->closeCallBack)
        lf->closeCallBack(lf);
    freeMem(lf->fileName);
    metaDataFree(lf);
    freez(pLf);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0xc1ea
movq %rdi, %rbx
movq 0x48(%r14), %rdi
testq %rdi, %rdi
je 0xc1f5
leaq 0x48(%r14), %r15
callq 0x1082c
movq %r15, %rdi
callq 0x102ac
movq 0x98(%r14), %rax
testq %rax, %rax
je 0xc1b5
movq %r14, %rdi
callq *%rax
movq 0x8(%r14), %rdi
callq 0xd8f9
cmpb $0x0, 0x58(%r14)
je 0xc1d8
cmpq $0x0, 0x60(%r14)
je 0xc1d8
addq $0x60, %r14
movq %r14, %rdi
callq 0xb306
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xd909
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x10(%r14), %ebp
testl %ebp, %ebp
jle 0xc1a4
movq 0x19dcc(%rip), %rax     # 0x25fd0
movq (%rax), %rdi
callq 0x34e0
cmpl %eax, %ebp
je 0xc1a4
movl 0x10(%r14), %edi
callq 0x3350
movq 0x40(%r14), %rdi
callq 0xd8f9
jmp 0xc1a4
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileCloseList
void lineFileCloseList(struct lineFile **pList)
/* Close up a list of line files. */
{
struct lineFile *el, *next;

for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    lineFileClose(&el);
    }
*pList = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r15
leaq 0x8(%rsp), %r14
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0xc24f
movq (%r15), %r15
movq %r14, %rdi
callq 0xc178
jmp 0xc238
andq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileNextReal
boolean lineFileNextReal(struct lineFile *lf, char **retStart)
/* Fetch next line from file that is not blank and
 * does not start with a '#'. */
{
char *s, c;
while (lineFileNext(lf, retStart, NULL))
    {
    s = skipLeadingSpaces(*retStart);
    c = s[0];
    if (c != 0 && c != '#')
        return TRUE;
    }
return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rbp
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xbcea
testl %eax, %eax
je 0xc567
movq (%rbx), %rdi
callq 0x722d
movzbl (%rax), %eax
testl %eax, %eax
je 0xc53c
cmpl $0x23, %eax
je 0xc53c
movl %ebp, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileChopNext
int lineFileChopNext(struct lineFile *lf, char *words[], int maxWords)
/* Return next non-blank line that doesn't start with '#' chopped into words. */
{
int lineSize, wordCount;
char *line;

while (lineFileNext(lf, &line, &lineSize))
    {
    if (line[0] == '#')
        continue;
    wordCount = chopByWhite(line, words, maxWords);
    if (wordCount != 0)
        return wordCount;
    }
return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
leaq 0xc(%rsp), %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xbcea
testl %eax, %eax
je 0xc60b
movq (%rsp), %rdi
cmpb $0x23, (%rdi)
je 0xc5e0
movq %r14, %rsi
movl %ebx, %edx
callq 0x805c
testl %eax, %eax
je 0xc5e0
jmp 0xc60d
xorl %eax, %eax
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/linefile.c
// Function: lineFileChopCharNext
int lineFileChopCharNext(struct lineFile *lf, char sep, char *words[], int maxWords)
/* Return next non-blank line that doesn't start with '#' chopped into
   words delimited by sep. */
{
int lineSize, wordCount;
char *line;

while (lineFileNext(lf, &line, &lineSize))
    {
    if (line[0] == '#')
        continue;
    wordCount = chopByChar(line, sep, words, maxWords);
    if (wordCount != 0)
        return wordCount;
    }
return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r12
leaq 0x14(%rsp), %r13
movsbl %sil, %ebp
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xbcea
testl %eax, %eax
je 0xc66d
movq 0x8(%rsp), %rdi
cmpb $0x23, (%rdi)
je 0xc63f
movl %ebp, %esi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x81f2
testl %eax, %eax
je 0xc63f
jmp 0xc66f
xorl %eax, %eax
addq $0x18, %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/linefile.c
// Function: lineFileChopNextTab
int lineFileChopNextTab(struct lineFile *lf, char *words[], int maxWords)
/* Return next non-blank line that doesn't start with '#' chopped into words
 * on tabs */
{
int lineSize, wordCount;
char *line;

while (lineFileNext(lf, &line, &lineSize))
    {
    if (line[0] == '#')
        continue;
    wordCount = chopByChar(line, '\t', words, maxWords);
    if (wordCount != 0)
        return wordCount;
    }
return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r12
leaq 0x14(%rsp), %r13
pushq $0x9
popq %rbp
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xbcea
testl %eax, %eax
je 0xc6cf
movq 0x8(%rsp), %rdi
cmpb $0x23, (%rdi)
je 0xc6a1
movl %ebp, %esi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x81f2
testl %eax, %eax
je 0xc6a1
jmp 0xc6d1
xorl %eax, %eax
addq $0x18, %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/linefile.c
// Function: lineFileNextCharRow
boolean lineFileNextCharRow(struct lineFile *lf, char sep, char *words[], int wordCount)
/* Return next non-blank line that doesn't start with '#' chopped into words
 * delimited by sep. Returns FALSE at EOF.  Aborts on error. */
{
int wordsRead;
wordsRead = lineFileChopCharNext(lf, sep, words, wordCount);
if (wordsRead == 0)
    return FALSE;
if (wordsRead < wordCount)
    lineFileExpectWords(lf, wordCount, wordsRead);
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebx
movq %rdi, %r14
callq 0xc61b
testl %eax, %eax
je 0xc707
pushq $0x1
popq %rbp
cmpl %ebx, %eax
jge 0xc709
movq %r14, %rdi
movl %ebx, %esi
movl %eax, %edx
callq 0xc25d
jmp 0xc709
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileNextRow
boolean lineFileNextRow(struct lineFile *lf, char *words[], int wordCount)
/* Return next non-blank line that doesn't start with '#' chopped into words.
 * Returns FALSE at EOF.  Aborts on error. */
{
int wordsRead;
wordsRead = lineFileChopNext(lf, words, wordCount);
if (wordsRead == 0)
    return FALSE;
if (wordsRead < wordCount)
    lineFileExpectWords(lf, wordCount, wordsRead);
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
callq 0xc5c3
testl %eax, %eax
je 0xc737
pushq $0x1
popq %rbp
cmpl %ebx, %eax
jge 0xc739
movq %r14, %rdi
movl %ebx, %esi
movl %eax, %edx
callq 0xc25d
jmp 0xc739
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileNextRowTab
boolean lineFileNextRowTab(struct lineFile *lf, char *words[], int wordCount)
/* Return next non-blank line that doesn't start with '#' chopped into words
 * at tabs. Returns FALSE at EOF.  Aborts on error. */
{
int wordsRead;
wordsRead = lineFileChopNextTab(lf, words, wordCount);
if (wordsRead == 0)
    return FALSE;
if (wordsRead < wordCount)
    lineFileExpectWords(lf, wordCount, wordsRead);
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
callq 0xc67e
testl %eax, %eax
je 0xc767
pushq $0x1
popq %rbp
cmpl %ebx, %eax
jge 0xc769
movq %r14, %rdi
movl %ebx, %esi
movl %eax, %edx
callq 0xc25d
jmp 0xc769
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileNeedFullNum
int lineFileNeedFullNum(struct lineFile *lf, char *words[], int wordIx)
/* Make sure that words[wordIx] is an ascii integer, and return
 * binary representation of it. Require all chars in word to be digits.*/
{
char *c;
for (c = words[wordIx]; *c; c++)
    {
    if (*c == '-' || isdigit(*c))
        /* NOTE: embedded '-' will be caught by lineFileNeedNum */
        continue;
    errAbort("Expecting integer field %d line %d of %s, got %s",
            wordIx+1, lf->lineIx, lf->fileName, words[wordIx]);
    }
return lineFileNeedNum(lf, words, wordIx);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl %edx, 0x4(%rsp)
movslq %edx, %r13
movq (%rsi,%r13,8), %rbx
leal 0x1(%r13), %ebp
movzbl (%rbx), %eax
cmpl $0x2d, %eax
je 0xc7cc
testl %eax, %eax
je 0xc7d1
movsbq %al, %r12
callq 0x37a0
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r12,2)
jne 0xc7cc
movl 0x28(%r15), %edx
movq 0x8(%r15), %rcx
movq (%r14,%r13,8), %r8
leaq 0xb85b(%rip), %rdi      # 0x1801e
movl %ebp, %esi
xorl %eax, %eax
callq 0xa61f
incq %rbx
jmp 0xc790
movq %r15, %rdi
movq %r14, %rsi
movl 0x4(%rsp), %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc7ee
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileNeedNum
int lineFileNeedNum(struct lineFile *lf, char *words[], int wordIx)
/* Make sure that words[wordIx] is an ascii integer, and return
 * binary representation of it. Conversion stops at first non-digit char. */
{
char *ascii = words[wordIx];
char c = ascii[0];
if (c != '-' && !isdigit(c))
    errAbort("Expecting number field %d line %d of %s, got %s",
    	wordIx+1, lf->lineIx, lf->fileName, ascii);
return atoi(ascii);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq %edx, %rax
movq (%rsi,%rax,8), %rbx
movsbq (%rbx), %r15
cmpq $0x2d, %r15
je 0xc838
movl %edx, %ebp
movq %rdi, %r14
callq 0x37a0
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r15,2)
jne 0xc838
incl %ebp
movl 0x28(%r14), %edx
movq 0x8(%r14), %rcx
leaq 0xb823(%rip), %rdi      # 0x1804f
movl %ebp, %esi
movq %rbx, %r8
xorl %eax, %eax
callq 0xa61f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x36a0
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileAllInts
void lineFileAllInts(struct lineFile *lf, char *words[], int wordIx, void *val,
  boolean isSigned,  int byteCount, char *typeString, boolean noNeg)
/* Returns long long integer from converting the input string. Aborts on error. */
{
char *s = words[wordIx];
char errMsg[256];
int res = lineFileCheckAllIntsNoAbort(s, val, isSigned, byteCount, typeString, noNeg, errMsg, sizeof errMsg);
if (res > 0)
    {
    errAbort("%s in field %d line %d of %s, got %s",
	errMsg, wordIx+1, lf->lineIx, lf->fileName, s);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movl %r9d, %r10d
movl %r8d, %eax
movl %edx, %ebx
movq %rdi, %r15
movq 0x120(%rsp), %r8
movl 0x128(%rsp), %r9d
movslq %edx, %rdx
movq (%rsi,%rdx,8), %r14
movq %rsp, %r11
movq %r14, %rdi
movq %rcx, %rsi
movl %eax, %edx
movl %r10d, %ecx
pushq $0x100                  # imm = 0x100
pushq %r11
callq 0xc84a
addq $0x10, %rsp
testl %eax, %eax
je 0xcac9
incl %ebx
movl 0x28(%r15), %ecx
movq 0x8(%r15), %r8
leaq 0xb6f2(%rip), %rdi      # 0x181ac
movq %rsp, %rsi
movl %ebx, %edx
movq %r14, %r9
xorl %eax, %eax
callq 0xa61f
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileAllIntsArray
int lineFileAllIntsArray(struct lineFile *lf, char *words[], int wordIx, void *array, int arraySize,
  boolean isSigned,  int byteCount, char *typeString, boolean noNeg)
/* Convert comma separated list of numbers to an array.  Pass in
 * array and max size of array. Aborts on error. Returns number of elements in parsed array. */
{
char *s = words[wordIx];
char errMsg[256];
unsigned count = 0;
char *cArray = array;
for (;;)
    {
    char *e;
    if (s == NULL || s[0] == 0 || count == arraySize)
        break;
    e = strchr(s, ',');
    if (e)
        *e = 0;
    int res = lineFileCheckAllIntsNoAbort(s, cArray, isSigned, byteCount, typeString, noNeg, errMsg, sizeof errMsg);
    if (res > 0)
	{
	errAbort("%s in column %d of array field %d line %d of %s, got %s",
	    errMsg, count, wordIx+1, lf->lineIx, lf->fileName, s);
	}
    if (cArray) // NULL means validation only.
	cArray += byteCount;  
    count++;
    if (e)  // restore input string
        *e++ = ',';
    s = e;
    }
return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %r9d, (%rsp)
movl %r8d, 0x4(%rsp)
movq %rcx, %r14
movq %rdi, 0x8(%rsp)
movslq %edx, %rax
movq (%rsi,%rax,8), %r12
incl %eax
movq %rax, 0x10(%rsp)
movslq 0x160(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %r15
xorl %r13d, %r13d
testq %r12, %r12
je 0xcbdf
cmpb $0x0, (%r12)
je 0xcbdf
cmpl %r13d, 0x4(%rsp)
je 0xcbdf
movq %r12, %rdi
pushq $0x2c
popq %rsi
callq 0x3260
movq %rax, %rbx
testq %rax, %rax
je 0xcb50
movb $0x0, (%rbx)
movq %r12, %rdi
movq %r14, %rsi
movl (%rsp), %edx
movl 0x160(%rsp), %ecx
movq 0x168(%rsp), %r8
movl 0x170(%rsp), %r9d
pushq $0x100                  # imm = 0x100
movq %r15, %rbp
pushq %r15
callq 0xc84a
addq $0x10, %rsp
testl %eax, %eax
je 0xcbb5
movq 0x8(%rsp), %rax
movl 0x28(%rax), %r8d
movq 0x8(%rax), %r9
subq $0x8, %rsp
leaq 0xb632(%rip), %rdi      # 0x181d1
movq %rbp, %rsi
movl %r13d, %edx
movq 0x18(%rsp), %rcx
xorl %eax, %eax
pushq %r12
callq 0xa61f
popq %rax
popq %rcx
movq 0x18(%rsp), %rax
addq %r14, %rax
testq %r14, %r14
cmovneq %rax, %r14
testq %rbx, %rbx
je 0xcbd4
movq %rbx, %r12
incq %r12
movb $0x2c, (%rbx)
jmp 0xcbd7
xorl %r12d, %r12d
incl %r13d
jmp 0xcb1b
movl %r13d, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileNeedDouble
double lineFileNeedDouble(struct lineFile *lf, char *words[], int wordIx)
/* Make sure that words[wordIx] is an ascii double value, and return
 * binary representation of it. */
{
char *valEnd;
char *val = words[wordIx];
double doubleValue;

doubleValue = strtod(val, &valEnd);
if ((*val == '\0') || (*valEnd != '\0'))
    errAbort("Expecting double field %d line %d of %s, got %s",
    	wordIx+1, lf->lineIx, lf->fileName, val);
return doubleValue;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rdi, %r15
movslq %edx, %rax
movq (%rsi,%rax,8), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x3160
cmpb $0x0, (%r14)
je 0xcc26
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
je 0xcc4d
incl %ebx
movl 0x28(%r15), %edx
movq 0x8(%r15), %rcx
leaq 0xb5d2(%rip), %rdi      # 0x18209
movl %ebx, %esi
movq %r14, %r8
xorl %eax, %eax
movsd %xmm0, (%rsp)
callq 0xa61f
movsd (%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileSkip
void lineFileSkip(struct lineFile *lf, int lineCount)
/* Skip a number of lines. */
{
int i, lineSize;
char *line;

for (i=0; i<lineCount; ++i)
    {
    if (!lineFileNext(lf, &line, &lineSize))
        errAbort("Premature end of file in %s", lf->fileName);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %ebx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
leaq 0xb5b8(%rip), %r13      # 0x18239
subl $0x1, %ebx
jb 0xcca8
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xbcea
testl %eax, %eax
jne 0xcc81
movq 0x8(%r14), %rsi
movq %r13, %rdi
xorl %eax, %eax
callq 0xa61f
jmp 0xcc81
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/linefile.c
// Function: lineFileReadAll
char *lineFileReadAll(struct lineFile *lf)
/* Read remainder of lineFile and return it as a string. */
{
struct dyString *dy = dyStringNew(1024*4);
lf->zTerm = 0;
int size;
char *line;
while (lineFileNext(lf, &line, &size))
    dyStringAppendN(dy, line, size);
return dyStringCannibalize(&dy);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1000, %edi           # imm = 0x1000
callq 0x9df0
movq %rax, %r14
movq %rax, 0x10(%rsp)
movb $0x0, 0x34(%rbx)
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xbcea
testl %eax, %eax
je 0xcd61
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %edx
movq %r14, %rdi
callq 0x9eec
jmp 0xcd3c
leaq 0x10(%rsp), %rdi
callq 0x9e4a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/linefile.c
// Function: lineFileRemoveInitialCustomTrackLines
void lineFileRemoveInitialCustomTrackLines(struct lineFile *lf)
/* remove initial browser and track lines */
{
char *line;
while (lineFileNextReal(lf, &line))
    {
    if (!(startsWith("browser", line) || startsWith("track", line) ))
        {
        verbose(2, "found line not browser or track: %s\n", line);
        lineFileReuse(lf);
        break;
        }
    verbose(2, "skipping %s\n", line);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
leaq 0xb118(%rip), %r15      # 0x183c2
leaq 0xb119(%rip), %r12      # 0x183ca
leaq 0xb13d(%rip), %r13      # 0x183f5
pushq $0x2
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc52c
testl %eax, %eax
je 0xd315
movq (%rsp), %rsi
movq %r15, %rdi
callq 0x76a5
testl %eax, %eax
jne 0xd2ea
movq (%rsp), %rsi
movq %r12, %rdi
callq 0x76a5
testl %eax, %eax
je 0xd2fc
movq (%rsp), %rdx
movl %ebp, %edi
movq %r13, %rsi
xorl %eax, %eax
callq 0x110f9
jmp 0xd2bb
movq (%rsp), %rdx
leaq 0xb0c9(%rip), %rsi      # 0x183d0
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x110f9
movb $0x1, 0x3c(%rbx)
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/localmem.c
// Function: lmInit
struct lm *lmInit(int blockSize)
/* Create a local memory pool. */
{
struct lm *lm;
int aliSize = sizeof(long);
if (aliSize < sizeof(double))
    aliSize = sizeof(double);
if (aliSize < sizeof(void *))
    aliSize = sizeof(void *);
lm = needMem(sizeof(*lm));
lm->blocks = NULL;
if (blockSize <= 0)
    blockSize = (1<<14);    /* 16k default. */
lm->blockSize = blockSize;
lm->allignAdd = (aliSize-1);
lm->allignMask = ~lm->allignAdd;
newBlock(lm, blockSize);
return lm;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x20
popq %rdi
callq 0xd87c
movq %rax, %r14
andq $0x0, (%rax)
testl %ebx, %ebx
movl $0x4000, %esi           # imm = 0x4000
cmovgl %ebx, %esi
movq %rsi, 0x8(%rax)
movq $0x7, 0x18(%rax)
movq $-0x8, 0x10(%rax)
movq %rax, %rdi
callq 0xd36a
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/localmem.c
// Function: newBlock
static struct lmBlock *newBlock(struct lm *lm, size_t reqSize)
/* Allocate a new block of at least reqSize */
{
size_t size = (reqSize > lm->blockSize ? reqSize : lm->blockSize);
size_t fullSize = size + sizeof(struct lmBlock);
struct lmBlock *mb = needLargeZeroedMem(fullSize);
if (mb == NULL)
    errAbort("Couldn't allocate %lld bytes", (long long)fullSize);
mb->free = (char *)(mb+1);
mb->end = ((char *)mb) + fullSize;
mb->next = lm->blocks;
lm->blocks = mb;
return mb;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpq %rsi, %rax
cmovaq %rax, %r14
addq $0x20, %r14
movq %r14, %rdi
callq 0xd6eb
movq %rax, %r15
testq %rax, %rax
jne 0xd3a5
leaq 0xb09f(%rip), %rdi      # 0x1843a
movq %r14, %rsi
xorl %eax, %eax
callq 0xa61f
leaq 0x20(%r15), %rax
movq %rax, 0x8(%r15)
addq %r15, %r14
movq %r14, 0x10(%r15)
movq (%rbx), %rax
movq %rax, (%r15)
movq %r15, (%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/localmem.c
// Function: lmCleanup
void lmCleanup(struct lm **pLm)
/* Clean up a local memory pool. */
{
    struct lm *lm = *pLm;
    if (lm == NULL)
        return;
    slFreeList(&lm->blocks);
    freeMem(lm);
    *pLm = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0xd3e9
movq %rdi, %rbx
movq %r14, %rdi
callq 0x615b
movq %r14, %rdi
callq 0xd8f9
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/localmem.c
// Function: lmSize
size_t lmSize(struct lm *lm)
// Returns current size of pool, even for memory already allocated
{
size_t fullSize = 0;

struct lmBlock *mb = lm->blocks;
for (;mb != NULL;mb = mb->next)
    fullSize += (mb->end - (char *)(mb+1));

return fullSize;
}

// Assembly:
xorl %eax, %eax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xd417
movq 0x10(%rdi), %rcx
subq %rdi, %rax
addq %rcx, %rax
addq $-0x20, %rax
jmp 0xd3ff
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/localmem.c
// Function: lmAlloc
void *lmAlloc(struct lm *lm, size_t size)
/* Allocate memory from local pool. */
{
struct lmBlock *mb = lm->blocks;
void *ret;
size_t memLeft = mb->end - mb->free;
if (memLeft < size)
    mb = newBlock(lm, size);
ret = mb->free;
mb->free += ((size+lm->allignAdd)&lm->allignMask);
if (mb->free > mb->end)
    mb->free = mb->end;
return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
cmpq %rbx, %rsi
jae 0xd44b
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd36a
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rdx
addq 0x18(%r14), %rbx
andq 0x10(%r14), %rbx
addq %rcx, %rbx
cmpq %rdx, %rbx
cmovaq %rdx, %rbx
movq %rbx, 0x8(%rax)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq