LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: listUnusedMonomers
struct slRef *listUnusedMonomers(struct alphaStore *store, struct dlList *ll)
/* Return list of references to monomers that are in store but not on ll. */
{
struct slRef *refList = NULL, *ref;
struct hash *usedHash = hashNew(0);
struct dlNode *node;
/* Make hash of used monomers. */
for (node = ll->head; !dlEnd(node); node = node->next)
    {
    struct monomer *monomer = node->val;
    hashAdd(usedHash, monomer->word, monomer);
    }

/* Stream through all monomers looking for ones not used and adding to list. */
struct monomer *monomer;
for (monomer = store->monomerList; monomer != NULL; monomer = monomer->next)
    {
    if (isEmpty(monomer->word))
        continue;
    if (!hashLookup(usedHash, monomer->word))
	{
	AllocVar(ref);
	ref->val = monomer;
	slAddHead(&refList, ref);
	}
    }
hashFree(&usedHash);
slReverse(&refList);
return refList;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, 0x10(%rsp)
xorl %edi, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, 0x8(%rsp)
movq (%r14), %r14
cmpq $0x0, (%r14)
je 0x46b2
movq 0x10(%r14), %rdx
movq 0x8(%rsp), %rdi
movq 0x8(%rdx), %rsi
callq 0xc04f
jmp 0x465d
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x46b2
cmpb $0x0, (%rsi)
je 0x46b2
movq 0x8(%rsp), %rdi
callq 0xbd98
testq %rax, %rax
jne 0x46b2
movl $0x10, %edi
callq 0xf07d
movq %rbx, 0x8(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
movq %rax, 0x10(%rsp)
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x467a
leaq 0x8(%rsp), %rdi
callq 0xc757
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x673b
movq (%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: monomerRefIx
int monomerRefIx(struct monomerRef *list, struct monomer *monomer)
/* Return index of monomer in list. */
{
int i;
struct monomerRef *ref;
for (i=0, ref = list; ref != NULL; ref = ref->next, ++i)
    {
    if (ref->val == monomer)
        return i;
    }
errAbort("Monomer %s not on list\n", monomer->word);
return -1;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x46f4
xorl %eax, %eax
cmpq %rsi, 0x8(%rdi)
je 0x470b
movq (%rdi), %rdi
incl %eax
testq %rdi, %rdi
jne 0x46e4
movq 0x8(%rsi), %rsi
leaq 0x1423d(%rip), %rdi     # 0x1893c
xorl %eax, %eax
callq 0xb8d7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: findNeighborhoodFromReads
struct monomerRef *findNeighborhoodFromReads(struct monomer *center)
/* Find if possible one monomer to either side of center */
{
struct slRef *readRef;
struct monomerRef *before = NULL, *after = NULL;

/* Loop through reads hoping to find a case where center is flanked by two monomers in
 * same read.   As a fallback, keep track of a monomer before and a monomer after in
 * any read. */
for (readRef = center->readList; readRef != NULL; readRef = readRef->next)
    {
    struct alphaRead *read = readRef->val;
    int readSize = slCount(read->list);
    int centerIx = monomerRefIx(read->list, center);
    if (readSize >= 3 && centerIx > 0 && centerIx < readSize-1)
	 {
	 before = slElementFromIx(read->list, centerIx-1);
	 after = slElementFromIx(read->list, centerIx+1);
	 break;
	 }
    else if (readSize >= 2)
         {
	 if (centerIx == 0)
	     after = slElementFromIx(read->list, centerIx+1);
	 else
	     before = slElementFromIx(read->list, centerIx-1);
	 }
    }

/* Make up list from end to start. */
struct monomerRef *retList = NULL, *monoRef;
if (after)
    {
    AllocVar(monoRef);
    monoRef->val = after->val;
    slAddHead(&retList, monoRef);
    }
AllocVar(monoRef);
monoRef->val = center;
slAddHead(&retList, monoRef);
if (before)
    {
    AllocVar(monoRef);
    monoRef->val = before->val;
    slAddHead(&retList, monoRef);
    }
return retList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x28(%rdi), %rbp
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x47d9
movq 0x8(%rbp), %r15
movq 0x10(%r15), %rdi
callq 0x6674
movl %eax, %r13d
movq 0x10(%r15), %rdi
movq %rbx, %rsi
callq 0x46dc
movl %eax, %r12d
cmpl $0x3, %r13d
setl %al
testl %r12d, %r12d
setle %cl
orb %al, %cl
leal -0x1(%r13), %eax
cmpl %eax, %r12d
setge %r14b
orb %cl, %r14b
je 0x47a0
cmpl $0x2, %r13d
jl 0x47c7
movq 0x10(%r15), %rdi
testl %r12d, %r12d
je 0x47d2
decl %r12d
movl %r12d, %esi
callq 0x6683
movq %rax, 0x10(%rsp)
jmp 0x47c7
movq 0x10(%r15), %rdi
leal -0x1(%r12), %esi
callq 0x6683
movq %rax, 0x10(%rsp)
movq 0x10(%r15), %rdi
incl %r12d
movl %r12d, %esi
callq 0x6683
movq %rax, 0x8(%rsp)
testb %r14b, %r14b
jne 0x4734
jmp 0x47d9
movl $0x1, %esi
jmp 0x47bd
movq 0x8(%rsp), %r14
testq %r14, %r14
je 0x4803
movl $0x10, %edi
callq 0xf07d
movq %rax, %r12
movq 0x8(%r14), %rax
movq %rax, 0x8(%r12)
movq $0x0, (%r12)
jmp 0x4806
xorl %r12d, %r12d
movl $0x10, %edi
callq 0xf07d
movq %rax, %r15
movq %rbx, 0x8(%rax)
movq %r12, (%rax)
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x483c
movl $0x10, %edi
callq 0xf07d
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %r15, (%rax)
movq %rax, %r15
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: matchExceptCenter
struct dlNode *matchExceptCenter(struct dlNode *node, struct monomerRef *neighborhood, struct monomer *center)
/* Return center node if node matches neighborhood except for center. */
{
struct dlNode *centerNode = NULL;
struct monomerRef *neighbor;
struct dlNode *n;
for (n = node, neighbor=neighborhood; ; n = n->next, neighbor = neighbor->next)
    {
    if (neighbor == NULL)
        break;
    if (dlEnd(n))
        return NULL;
    if (neighbor->val == center)
        centerNode = n;
    else if (n->val != neighbor->val)
        return NULL;
    }
return centerNode;
}

// Assembly:
xorl %eax, %eax
testq %rsi, %rsi
je 0x487b
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x4879
movq 0x8(%rsi), %r8
cmpq %rdx, %r8
je 0x486e
cmpq %r8, 0x10(%rdi)
je 0x4871
jmp 0x4879
movq %rdi, %rax
movq (%rsi), %rsi
movq %rcx, %rdi
jmp 0x4850
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: printMonomerRefList
void printMonomerRefList(struct monomerRef *refList, FILE *f)
/* Print out a line to file with the list of monomers. */
{
struct monomerRef *ref;
for (ref = refList; ref != NULL; ref = ref->next)
    fprintf(f, "%s ", ref->val->word);
fprintf(f, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
testq %rdi, %rdi
je 0x48b0
movq %rdi, %r14
leaq 0x16d3c(%rip), %r15     # 0x1b5cf
movq 0x8(%r14), %rax
movq 0x8(%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3470
movq (%r14), %r14
testq %r14, %r14
jne 0x4893
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x33a0
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: refsToPossibleCenters
struct slRef *refsToPossibleCenters(struct monomer *center, struct monomerRef *neighborhood, struct dlList *ll)
/* Return a list of dlNodes where neighborhood, but not center matches. */
{
struct slRef *list = NULL;
struct dlNode *node;
for (node = ll->head; !dlEnd(node); node = node->next)
    {
    struct dlNode *centerNode = matchExceptCenter(node, neighborhood, center);
    if (centerNode != NULL)
	refAdd(&list, centerNode);
    }
return list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq $0x0, (%rsp)
movq (%rdx), %r12
cmpq $0x0, (%r12)
je 0x4935
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
testq %rbx, %rbx
je 0x491b
movq %r12, %rcx
movq %rbx, %rax
xorl %esi, %esi
movq (%rcx), %rdx
testq %rdx, %rdx
je 0x491b
movq 0x8(%rax), %rdi
cmpq %r14, %rdi
je 0x490b
cmpq %rdi, 0x10(%rcx)
je 0x490e
jmp 0x491b
movq %rcx, %rsi
movq (%rax), %rax
movq %rdx, %rcx
testq %rax, %rax
jne 0x48f2
jmp 0x491d
xorl %esi, %esi
testq %rsi, %rsi
je 0x492a
movq %r15, %rdi
callq 0x7600
movq (%r12), %r12
cmpq $0x0, (%r12)
jne 0x48e5
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: mostCommonMonomerWord
void mostCommonMonomerWord(struct slRef *refList, char **retWord, int *retCount)
/* Given refs to dlNodes containing monomers, find word associated with most common monomer. */
{
/* Make up a hash that contains counts of all monomers. */
struct hash *countHash = hashNew(0);
struct slRef *ref;
for (ref = refList; ref != NULL; ref = ref->next)
    {
    struct dlNode *node = ref->val;
    struct monomer *monomer = node->val;
    hashIncInt(countHash, monomer->word);
    }

/* Iterate through hash finding max value. */
char *maxWord = NULL;
int maxCount = 0;
struct hashEl *hel;
struct hashCookie cookie = hashFirst(countHash);
while ((hel = hashNext(&cookie)) != NULL)
    {
    int count = ptToInt(hel->val);
    if (count > maxCount)
        {
	maxCount = count;
	maxWord = hel->name;
	}
    }
*retWord = maxWord;
*retCount = maxCount;
hashFree(&countHash);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
xorl %edi, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, 0x8(%rsp)
testq %r15, %r15
je 0x4990
movq 0x8(%r15), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x8(%rax), %rsi
callq 0xc357
movq (%r15), %r15
jmp 0x4970
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xc647
movq %r15, %rdi
callq 0xc6b6
testq %rax, %rax
je 0x49e5
movq %rax, %r12
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
xorl %r13d, %r13d
movq 0x10(%r12), %rdi
callq 0xfc4a
cmpl %r13d, %eax
jle 0x49d3
movq 0x8(%r12), %rbp
movl %eax, %r13d
movq %r15, %rdi
callq 0xc6b6
movq %rax, %r12
testq %rax, %rax
jne 0x49bc
jmp 0x49e7
xorl %ebp, %ebp
movq %rbp, (%r14)
movl %r13d, (%rbx)
leaq 0x8(%rsp), %rdi
callq 0xc757
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: subCenterInNeighborhood
boolean subCenterInNeighborhood(struct alphaStore *store, 
    struct monomer *center, struct monomerRef *neighborhood, struct dlList *ll)
/* Scan ll for cases where neighborhood around center matches.  Replace one of these 
 * cases with center. */
{
int size = slCount(neighborhood);
assert(size == 3 || size == 2);
if (subCommonCenter(store, center, neighborhood, ll))
   return TRUE;
if (size == 3)
    {
    if (subCommonCenter(store, center, neighborhood->next, ll))
       return TRUE;
    struct monomerRef *third = neighborhood->next->next;
    neighborhood->next->next = NULL;
    boolean ok = subCommonCenter(store, center, neighborhood, ll);
    neighborhood->next->next = third;
    return ok;
    }
else
    return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
callq 0x6674
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ecx
jne 0x4c9f
cmpl $0x3, %eax
setne %bpl
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x4a06
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %cl
orb %cl, %bpl
je 0x4c50
movb %cl, %al
jmp 0x4c90
movq (%rbx), %rdx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x4a06
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x4c90
movq (%rbx), %rax
movq (%rax), %r13
movq $0x0, (%rax)
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x4a06
movq (%rbx), %rcx
movq %r13, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13dd2(%rip), %rdi     # 0x18a78
leaq 0x139fa(%rip), %rsi     # 0x186a7
leaq 0x13ddb(%rip), %rcx     # 0x18a8f
movl $0x3d8, %edx            # imm = 0x3D8
callq 0x32e0
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: subIntoFirstMostCommonOfType
boolean subIntoFirstMostCommonOfType(struct alphaStore *store, struct monomer *unused, 
    struct dlList *ll)
/* Substitute unused for first occurence of most common monomer of same type. */
{
struct monomer *common = mostCommonInType(unused->type);
if (common == NULL)
    {
    verbose(3, "No monomers of type %s used at all!\n", unused->type->name);
    return FALSE;
    }
if (common->subbedOutCount < 2)
    {
    verbose(3, "Trying to sub in %s, but there's no monomers of type %s that are used more than once.\n", 
	unused->word, unused->type->name);
    return FALSE;
    }
struct dlNode *node;
for (node = ll->head; !dlEnd(node); node = node->next)
    {
    struct monomer *monomer = node->val;
    if (monomer == common)
        {
	verbose(3, "Subbing %s for %s of type %s\n", unused->word, monomer->word, unused->type->name);
	node->val = unused;
	unused->subbedOutCount += 1;
	monomer->subbedOutCount -= 1;
	break;
	}
    }
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq 0x20(%rsi), %rcx
movq 0x10(%rcx), %rsi
xorl %edx, %edx
xorl %eax, %eax
testq %rsi, %rsi
je 0x4d20
movq 0x8(%rsi), %rdi
movq (%rsi), %r8
movl 0x30(%rdi), %esi
cmpl %edx, %esi
cmovgl %esi, %edx
cmovgq %rdi, %rax
movq %r8, %rsi
testq %r8, %r8
jne 0x4d05
testq %rax, %rax
je 0x4d4a
cmpl $0x2, 0x30(%rax)
jge 0x4d65
movq 0x8(%rbx), %rdx
movq 0x8(%rcx), %rcx
leaq 0x13de3(%rip), %rsi     # 0x18b1d
xorl %ebp, %ebp
movl $0x3, %edi
xorl %eax, %eax
callq 0x12c8e
jmp 0x4daa
movq 0x8(%rcx), %rdx
leaq 0x13da3(%rip), %rsi     # 0x18af8
xorl %ebp, %ebp
movl $0x3, %edi
xorl %eax, %eax
callq 0x12c8e
jmp 0x4daa
movl $0x1, %ebp
movq (%r14), %r14
cmpq $0x0, (%r14)
je 0x4daa
movq 0x10(%r14), %r15
cmpq %rax, %r15
jne 0x4d6a
movq 0x8(%r15), %rcx
movq 0x8(%rbx), %rdx
movq 0x20(%rbx), %rax
movq 0x8(%rax), %r8
leaq 0x13de1(%rip), %rsi     # 0x18b74
movl $0x3, %edi
xorl %eax, %eax
callq 0x12c8e
movq %rbx, 0x10(%r14)
incl 0x30(%rbx)
decl 0x30(%r15)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: subInMissing
void subInMissing(struct alphaStore *store, struct dlList *ll)
/* Go figure out missing monomers in ll, and attempt to substitute them in somewhere they would fit. */
{
setInitialSubbedOutCount(store, ll);
struct slRef *unusedList = listUnusedMonomers(store, ll);
verbose(3, "%d monomers, %d unused\n", slCount(store->monomerList), slCount(unusedList));
struct slRef *unusedRef;
for (unusedRef = unusedList; unusedRef != NULL; unusedRef = unusedRef->next)
    {
    struct monomer *unused = unusedRef->val;
    struct monomerRef *neighborhood = findNeighborhoodFromReads(unused);
    if (!subCenterInNeighborhood(store, unused, neighborhood, ll))
	{
	verbose(3, "Couldn't substitute in %s with context, falling back to type logic\n", 
	    unused->word);
        subIntoFirstMostCommonOfType(store, unused, ll);
	}
    slFreeList(&neighborhood);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
cmpq $0x0, (%rax)
je 0x4df3
movq 0x10(%rax), %rcx
incl 0x30(%rcx)
movq (%rax), %rax
jmp 0x4de1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4636
movq %rax, %r15
movq (%r14), %rdi
callq 0x6674
movl %eax, %ebp
movq %r15, %rdi
callq 0x6674
leaq 0x13d78(%rip), %rsi     # 0x18b92
movl $0x3, %edi
movl %ebp, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x12c8e
testq %r15, %r15
je 0x4e8c
leaq 0x13d74(%rip), %r12     # 0x18baa
movq %rsp, %r13
movq 0x8(%r15), %rbp
movq %rbp, %rdi
callq 0x470d
movq %rax, (%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x4bfd
testl %eax, %eax
jne 0x4e7c
movq 0x8(%rbp), %rdx
movl $0x3, %edi
movq %r12, %rsi
xorl %eax, %eax
callq 0x12c8e
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x4ce7
movq %r13, %rdi
callq 0x675e
movq (%r15), %r15
testq %r15, %r15
jne 0x4e39
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: alphaStoreNew
struct alphaStore *alphaStoreNew(int maxChainSize)
/* Allocate and initialize a new word store. */
{
struct alphaStore *store;
AllocVar(store);
store->maxChainSize = maxChainSize;
store->monomerHash = hashNew(0);
store->typeHash = hashNew(0);
store->readHash = hashNew(0);
return store;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x58, %edi
callq 0xf07d
movq %rax, %r14
movl %ebx, 0x30(%rax)
xorl %edi, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, 0x8(%r14)
xorl %edi, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, 0x40(%r14)
xorl %edi, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, 0x18(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: alphaStoreAddMonomer
struct monomer *alphaStoreAddMonomer(struct alphaStore *store, char *word)
/* Add word to store,  incrementing it's useCount if it's already there, otherwise
 * making up a new record for it. */
{
struct monomer *monomer = hashFindVal(store->monomerHash, word);
if (monomer == NULL)
    {
    AllocVar(monomer);
    hashAddSaveName(store->monomerHash, word, monomer, &monomer->word);
    slAddHead(&store->monomerList, monomer);
    }
monomer->useCount += 1;
monomer->outTarget = monomer->useCount;	    /* Set default value, may be renormalized. */
return monomer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xc2ba
movq %rax, %r14
testq %rax, %rax
jne 0x4f31
movl $0x38, %edi
callq 0xf07d
movq %rax, %r14
movq 0x8(%rbx), %rdi
leaq 0x8(%rax), %rcx
movq %r15, %rsi
movq %rax, %rdx
callq 0xc1a7
movq (%rbx), %rax
movq %rax, (%r14)
movq %r14, (%rbx)
movl 0x10(%r14), %eax
incl %eax
movl %eax, 0x10(%r14)
movl %eax, 0x14(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: connectReadsToMonomers
void connectReadsToMonomers(struct alphaStore *store)
/* Add each read monomer appears in to monomer's readList. */
{
struct alphaRead *read;
for (read = store->readList; read != NULL; read = read->next)
    {
    struct monomerRef *ref;
    for (ref = read->list; ref != NULL; ref = ref->next)
        {
	struct monomer *monomer = ref->val;
	refAdd(&monomer->readList, read);
	}
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rbx
testq %rbx, %rbx
je 0x4f78
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x4f73
movq 0x8(%r14), %rdi
addq $0x28, %rdi
movq %rbx, %rsi
callq 0x7600
movq (%r14), %r14
jmp 0x4f59
movq (%rbx), %rbx
jmp 0x4f50
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: findOrphanStarts
struct alphaOrphan *findOrphanStarts(struct alphaRead *readList, struct alphaStore *store)
/* Return list of monomers that are found only at start of reads. */
{
struct alphaOrphan *orphanList = NULL;

/* Build up hash of things seen later in reads. */
struct alphaRead *read;
struct hash *later = hashNew(0);    /* Hash of monomers found later. */
for (read = readList; read != NULL; read = read->next)
    {
    struct monomerRef *ref;
    for (ref = read->list->next; ref != NULL; ref = ref->next)
        {
	hashAdd(later, ref->val->word, NULL);
	}
    }

/* Pass through again collecting orphans. */
struct hash *orphanHash = hashNew(0);
for (read = readList; read != NULL; read = read->next)
    {
    struct monomer *monomer = read->list->val;
    char *word = monomer->word;
    if (!hashLookup(later, word))
        {
	struct alphaOrphan *orphan = hashFindVal(orphanHash, word);
	if (orphan == NULL)
	    {
	    AllocVar(orphan);
	    orphan->monomer = monomer;
	    slAddHead(&orphanList, orphan);
	    hashAdd(orphanHash, word, orphan);
	    verbose(3, "Adding orphan start %s\n", word);
	    }
	}
    }
hashFree(&later);
hashFree(&orphanHash);
slReverse(&orphanList);
return orphanList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq $0x0, 0x10(%rsp)
xorl %edi, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, 0x8(%rsp)
testq %rbx, %rbx
je 0x516b
movq %rbx, %r14
movq 0x10(%r14), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x5163
movq 0x8(%rsp), %rdi
movq 0x8(%r15), %rax
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0xc04f
movq (%r15), %r15
jmp 0x5145
movq (%r14), %r14
testq %r14, %r14
jne 0x513e
xorl %edi, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, (%rsp)
testq %rbx, %rbx
je 0x51fb
leaq 0x13ac6(%rip), %r14     # 0x18c4d
movq 0x10(%rbx), %rax
movq 0x8(%rax), %r12
movq 0x8(%r12), %r15
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0xbd98
testq %rax, %rax
jne 0x51f3
movq (%rsp), %rdi
movq %r15, %rsi
callq 0xc2ba
testq %rax, %rax
jne 0x51f3
movl $0x18, %edi
callq 0xf07d
movq %r12, 0x8(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
movq %rax, 0x10(%rsp)
movq (%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xc04f
movl $0x3, %edi
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x12c8e
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x5187
leaq 0x8(%rsp), %rdi
callq 0xc757
movq %rsp, %rdi
callq 0xc757
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x673b
movq (%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: findOrphanEnds
struct alphaOrphan *findOrphanEnds(struct alphaRead *readList, struct alphaStore *store)
/* Return list of monomers that are found only at end of reads. */
{
struct alphaOrphan *orphanList = NULL;

/* Build up hash of things seen sooner in reads. */
struct alphaRead *read;
struct hash *sooner = hashNew(0);    /* Hash of monomers found sooner. */
for (read = readList; read != NULL; read = read->next)
    {
    struct monomerRef *ref;
    /* Loop over all but last. */
    for (ref = read->list; ref->next != NULL; ref = ref->next)
        {
	hashAdd(sooner, ref->val->word, NULL);
	}
    }

/* Pass through again collecting orphans. */
struct hash *orphanHash = hashNew(0);
for (read = readList; read != NULL; read = read->next)
    {
    struct monomerRef *lastRef = slLastEl(read->list);
    struct monomer *monomer = lastRef->val;
    if (!hashLookup(sooner, monomer->word))
        {
	struct alphaOrphan *orphan = hashFindVal(orphanHash, monomer->word);
	if (orphan == NULL)
	    {
	    AllocVar(orphan);
	    orphan->monomer = monomer;
	    slAddHead(&orphanList, orphan);
	    hashAdd(orphanHash, monomer->word, orphan);
	    verbose(3, "Adding orphan end %s\n", monomer->word);
	    }
	}
    }
hashFree(&sooner);
slReverse(&orphanList);
hashFree(&orphanHash);
return orphanList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq $0x0, 0x18(%rsp)
xorl %edi, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, 0x10(%rsp)
testq %rbx, %rbx
je 0x5282
movq %rbx, %r14
movq 0x10(%r14), %r15
cmpq $0x0, (%r15)
je 0x527a
movq 0x10(%rsp), %rdi
movq 0x8(%r15), %rax
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0xc04f
movq (%r15), %r15
jmp 0x525b
movq (%r14), %r14
testq %r14, %r14
jne 0x5257
xorl %edi, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, 0x8(%rsp)
testq %rbx, %rbx
je 0x531d
leaq 0x139c2(%rip), %r14     # 0x18c65
movq 0x10(%rbx), %rdi
callq 0x66b9
movq 0x8(%rax), %r15
movq 0x10(%rsp), %rdi
movq 0x8(%r15), %rsi
callq 0xbd98
testq %rax, %rax
jne 0x5315
movq 0x8(%rsp), %rdi
movq 0x8(%r15), %rsi
callq 0xc2ba
testq %rax, %rax
jne 0x5315
movl $0x18, %edi
callq 0xf07d
movq %r15, 0x8(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, (%rax)
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movq 0x8(%r15), %rsi
movq %rax, %rdx
callq 0xc04f
movq 0x8(%r15), %rdx
movl $0x3, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x12c8e
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x52a3
leaq 0x10(%rsp), %rdi
callq 0xc757
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x673b
leaq 0x8(%rsp), %rdi
callq 0xc757
movq (%rbx), %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: addReadOfTwo
struct alphaRead *addReadOfTwo(struct alphaStore *store, struct monomer *a, struct monomer *b)
/* Make up a fake read that goes from a to b and add it to store. */
{
/* Create fake name and start fake read with it. */
static int fakeId = 0;
char name[32];
safef(name, sizeof(name), "fake%d", ++fakeId);

/* Allocate fake read. */
struct alphaRead *read;
AllocVar(read);

/* Add a and b to the read. */
struct monomerRef *aRef, *bRef;
AllocVar(aRef);
aRef->val = a;
AllocVar(bRef);
bRef->val = b;
aRef->next = bRef;
read->list = aRef;

/* Add read to the store. */
slAddHead(&store->readList, read);
hashAddSaveName(store->readHash, name, read, &read->name);

/* Add read to the monomers. */
refAdd(&a->readList, read);
refAdd(&b->readList, read);

a->useCount += 1;
b->useCount += 1;
return read;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movl 0x224bc(%rip), %ecx     # 0x27824
incl %ecx
movl %ecx, 0x224b4(%rip)     # 0x27824
leaq 0x13904(%rip), %rdx     # 0x18c7b
movq %rsp, %r13
movq %r13, %rdi
movl $0x20, %esi
xorl %eax, %eax
callq 0xa2ce
movl $0x18, %edi
callq 0xf07d
movq %rax, %r15
movl $0x10, %edi
callq 0xf07d
movq %rax, %rbp
movq %r14, 0x8(%rax)
movl $0x10, %edi
callq 0xf07d
movq %rbx, 0x8(%rax)
movq %rax, (%rbp)
movq %rbp, 0x10(%r15)
movq 0x10(%r12), %rax
movq %rax, (%r15)
movq %r15, 0x10(%r12)
movq 0x18(%r12), %rdi
leaq 0x8(%r15), %rcx
movq %r13, %rsi
movq %r15, %rdx
callq 0xc1a7
leaq 0x28(%r14), %rdi
movq %r15, %rsi
callq 0x7600
leaq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0x7600
incl 0x10(%r14)
incl 0x10(%rbx)
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: wordTreeSort
static void wordTreeSort(struct wordTree *wt)
/* Sort all children lists in tree. */
{
slSort(&wt->children, wordTreeCmpWord);
struct wordTree *child;
for (child = wt->children; child != NULL; child = child->next)
    wordTreeSort(child);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
leaq -0x1c42(%rip), %rsi     # 0x3b07
callq 0x678c
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x5764
movq %rbx, %rdi
callq 0x573a
movq (%rbx), %rbx
jmp 0x5752
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: wordTreeWrite
void wordTreeWrite(struct wordTree *wt, int maxChainSize, char *fileName)
/* Write out tree to file */
{
FILE *f = mustOpen(fileName, "w");
fprintf(f, "#level\tuseCount\toutTarget\toutCount\tnormVal\tmonomers\n");
wordTreeDump(0, wt, maxChainSize, f);
carefulClose(&f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x142a8(%rip), %rsi     # 0x19a23
movq %rdx, %rdi
callq 0x9532
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x135a8(%rip), %rdi     # 0x18d3a
movl $0x34, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x36f0
movq (%r15), %rcx
xorl %edi, %edi
movq %r14, %rsi
movl %ebx, %edx
callq 0x3f09
movq %r15, %rdi
callq 0x9bbc
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: crossCheckMonomerOrderAndReads
void crossCheckMonomerOrderAndReads(struct alphaStore *store, char *orderedPrefix, char *readFile, char *typeFile)
/* Make sure all monomer that begin with ordered prefix are present in monomer order file. */
{
/* Make hash of all monomers that have type info. */
struct hash *orderHash = hashNew(0);
struct monomerType *type;
for (type = store->typeList; type != NULL; type = type->next)
     {
     struct monomerRef *ref;
     for (ref = type->list; ref != NULL; ref = ref->next)
         hashAdd(orderHash, ref->val->word, ref->val);
     }

/* Go through all monomers and make sure ones with correct prefix are in list. */
struct monomer *mon;
for (mon = store->monomerList; mon != NULL; mon = mon->next)
    {
    char *word = mon->word;
    if (startsWith(orderedPrefix, word) && !hashLookup(orderHash, word))
        {
	errAbort("%s is in %s but not %s", word, readFile, typeFile);
	}
    }
hashFree(&orderHash);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %edi, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, (%rsp)
movq 0x38(%r12), %r13
testq %r13, %r13
je 0x5a36
movq 0x10(%r13), %rbp
testq %rbp, %rbp
je 0x5a30
movq (%rsp), %rdi
movq 0x8(%rbp), %rdx
movq 0x8(%rdx), %rsi
callq 0xc04f
movq (%rbp), %rbp
jmp 0x5a14
movq (%r13), %r13
jmp 0x5a0b
movq (%r12), %rbp
testq %rbp, %rbp
je 0x5a86
leaq 0x13350(%rip), %r12     # 0x18d96
movq 0x8(%rbp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x8214
testl %eax, %eax
je 0x5a7d
movq (%rsp), %rdi
movq %r13, %rsi
callq 0xbd98
testq %rax, %rax
jne 0x5a7d
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xb8d7
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x5a46
movq %rsp, %rdi
callq 0xc757
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: monomerListNormalise
void monomerListNormalise(struct monomer *list, int totalCount, int outputSize)
/* Set outTarget field in all of list to be normalized to outputSize */
{
struct monomer *monomer;
double scale = (double)outputSize/totalCount;
for (monomer = list; monomer != NULL; monomer = monomer->next)
    {
    monomer->outCount = 0;
    monomer->outTarget = round(scale * monomer->useCount);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x5adc
cvtsi2sd %edx, %xmm0
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
movsd 0x12552(%rip), %xmm1    # 0x18008
movl $0x0, 0x18(%rdi)
xorps %xmm2, %xmm2
cvtsi2sdl 0x10(%rdi), %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %eax
movl %eax, 0x14(%rdi)
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x5ab6
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: fillInTypes
void fillInTypes(struct alphaStore *store)
/* We have types for most but not all monomers. Try and fill out types for most of
 * the rest by looking for position in reads they are in that do contain known types */
{
/* Do first pass on ones defined - just have to look them up in hash. */
struct monomer *monomer;
for (monomer = store->monomerList; monomer != NULL; monomer = monomer->next)
    monomer->type = hashFindVal(store->typeHash, monomer->word);

/* Do second pass on ones that are not yet defined */
for (monomer = store->monomerList; monomer != NULL; monomer = monomer->next)
    {
    if (monomer->type == NULL)
	{
	monomer->type = fillInTypeFromReads(monomer, store);
	}
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x5d97
movq 0x40(%rbx), %rdi
movq 0x8(%r14), %rsi
callq 0xc2ba
movq %rax, 0x20(%r14)
movq (%r14), %r14
jmp 0x5d7c
movq (%rbx), %r14
testq %r14, %r14
je 0x5dba
cmpq $0x0, 0x20(%r14)
jne 0x5db5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5b50
movq %rax, 0x20(%r14)
movq (%r14), %r14
jmp 0x5d9a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: countMissingMonomers
int countMissingMonomers(struct dlList *ll, struct monomer *monomerList)
/* Set the outCounts in monomer list to match how often they occur in ll.
 * Return number of monomers that do not occur at all in ll. */
{
/* Zero out output counts. */
struct monomer *monomer;
for (monomer = monomerList; monomer != NULL; monomer = monomer->next)
    monomer->outCount = 0;

/* Increase output count each time a monomer is used. */
struct dlNode *node;
for (node = ll->head; !dlEnd(node); node = node->next)
    {
    monomer = node->val;
    monomer->outCount += 1;
    }

/* Count up unused. */
int missing = 0;
for (monomer = monomerList; monomer != NULL; monomer = monomer->next)
    if (monomer->outCount == 0 && !sameString(monomer->word, ""))
        missing += 1;

return missing;
}

// Assembly:
testq %rsi, %rsi
je 0x5fbd
movq %rsi, %rax
movl $0x0, 0x18(%rax)
movq (%rax), %rax
testq %rax, %rax
jne 0x5fae
movq (%rdi), %rax
cmpq $0x0, (%rax)
je 0x5fd2
movq 0x10(%rax), %rcx
incl 0x18(%rcx)
movq (%rax), %rax
jmp 0x5fc0
xorl %eax, %eax
testq %rsi, %rsi
je 0x5fee
cmpl $0x0, 0x18(%rsi)
jne 0x5fe9
movq 0x8(%rsi), %rcx
cmpb $0x1, (%rcx)
sbbl $-0x1, %eax
movq (%rsi), %rsi
jmp 0x5fd4
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: main
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc != 4)
    usage();
maxChainSize = optionInt("size", maxChainSize);
initialOutSize = optionInt("initialOutSize", initialOutSize);
maxOutSize = optionInt("maxOutSize", initialOutSize);  // Defaults to same as initialOutSize
if (maxOutSize < initialOutSize)
    errAbort("maxOutSize (%d) needs to be bigger than initialOutSize (%d)\n", 
	maxOutSize, initialOutSize);
maxToMiss = optionInt("maxToMiss", maxToMiss);
fullOnly = optionExists("fullOnly");
pseudoCount = optionInt("pseudoCount", pseudoCount);
betweens = optionExists("betweens");
int seed = optionInt("seed", 0);
srand(seed);
linearSat(argv[1], argv[2], argv[3]);
return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x4(%rsp), %r14
movl %edi, (%r14)
leaq 0x2110f(%rip), %rdx     # 0x27400
movq %r14, %rdi
callq 0x10c30
cmpl $0x4, (%r14)
je 0x6326
movl 0x210ef(%rip), %esi     # 0x273f4
movl 0x210ed(%rip), %edx     # 0x273f8
movl 0x212ff(%rip), %ecx     # 0x27610
movl 0x210d8(%rip), %r8d     # 0x273f0
leaq 0x11d01(%rip), %rdi     # 0x18020
xorl %eax, %eax
callq 0xb8d7
movl 0x210c8(%rip), %esi     # 0x273f4
leaq 0x12d95(%rip), %rdi     # 0x190c8
callq 0x10ced
movl %eax, 0x210b6(%rip)     # 0x273f4
movl 0x210b4(%rip), %esi     # 0x273f8
leaq 0x12d82(%rip), %rdi     # 0x190cd
callq 0x10ced
movl %eax, 0x210a2(%rip)     # 0x273f8
leaq 0x12d7f(%rip), %rdi     # 0x190dc
movl %eax, %esi
callq 0x10ced
movl %eax, 0x214be(%rip)     # 0x27828
movl 0x21088(%rip), %edx     # 0x273f8
cmpl %edx, %eax
jge 0x6384
leaq 0x12d6c(%rip), %rdi     # 0x190e7
movl %eax, %esi
xorl %eax, %eax
callq 0xb8d7
movl 0x21286(%rip), %esi     # 0x27610
leaq 0x12d93(%rip), %rdi     # 0x19124
callq 0x10ced
movl %eax, 0x21274(%rip)     # 0x27610
leaq 0x12d8b(%rip), %rdi     # 0x1912e
callq 0x10f30
movl %eax, 0x21266(%rip)     # 0x27614
movl 0x2103c(%rip), %esi     # 0x273f0
leaq 0x12d7c(%rip), %rdi     # 0x19137
callq 0x10ced
movl %eax, 0x2102a(%rip)     # 0x273f0
leaq 0x12d76(%rip), %rdi     # 0x19143
callq 0x10f30
movl %eax, 0x21240(%rip)     # 0x27618
leaq 0x12d6d(%rip), %rdi     # 0x1914c
xorl %esi, %esi
callq 0x10ced
movl %eax, %edi
callq 0x33e0
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
callq 0x5fef
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: cloneString
char *cloneString(const char *s)
/* Make copy of string in dynamic memory */
{
int size = 0;
if (s == NULL)
    return NULL;
size = strlen(s);
return cloneStringZExt(s, size, size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x64b8
movq %rdi, %rbx
callq 0x3200
movq %rax, %r15
incl %eax
movslq %eax, %rdi
callq 0xf07d
movq %rax, %r14
movslq %r15d, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x34a0
movb $0x0, (%r14,%r15)
jmp 0x64bb
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: catTwoStrings
char *catTwoStrings(char *a, char *b)
/* Allocate new string that is a concatenation of two strings. */
{
int aLen = strlen(a), bLen = strlen(b);
int len = aLen + bLen;
char *newBuf = needLargeMem(len+1);
memcpy(newBuf, a, aLen);
memcpy(newBuf+aLen, b, bLen);
newBuf[len] = 0;
return newBuf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3200
movq %rax, %r15
movq %rbx, %rdi
callq 0x3200
movq %rax, %r12
leal (%rax,%r15), %ebp
addl %r15d, %eax
incl %eax
movslq %eax, %rdi
callq 0xee85
movq %rax, %r13
movslq %r15d, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x34a0
addq %r13, %r15
movslq %r12d, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x34a0
movslq %ebp, %rax
movb $0x0, (%r13,%rax)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: reverseBytes
void reverseBytes(char *bytes, long length)
{
long halfLen = (length>>1);
char *end = bytes+length;
char c;
while (--halfLen >= 0)
    {
    c = *bytes;
    *bytes++ = *--end;
    *end = c;
    }
}

// Assembly:
movq %rsi, %rax
sarq %rax
testq %rax, %rax
jle 0x6594
leaq (%rsi,%rdi), %rcx
decq %rcx
incq %rax
movb (%rdi), %dl
movb (%rcx), %sil
movb %sil, (%rdi)
incq %rdi
movb %dl, (%rcx)
decq %rcx
decq %rax
cmpq $0x1, %rax
jg 0x657b
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: reverseInts
void reverseInts(int *a, int length)
/* Reverse the order of the integer array. */
{
int halfLen = (length>>1);
int *end = a+length;
int c;
while (--halfLen >= 0)
    {
    c = *a;
    *a++ = *--end;
    *end = c;
    }
}

// Assembly:
movl %esi, %eax
sarl %eax
testl %eax, %eax
jle 0x65c1
movslq %esi, %rcx
leaq (%rdi,%rcx,4), %rcx
addq $-0x4, %rcx
incl %eax
movl (%rdi), %edx
movl (%rcx), %esi
movl %esi, (%rdi)
addq $0x4, %rdi
movl %edx, (%rcx)
addq $-0x4, %rcx
decl %eax
cmpl $0x1, %eax
jg 0x65aa
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: reverseUnsigned
void reverseUnsigned(unsigned *a, int length)
/* Reverse the order of the unsigned array. */
{
int halfLen = (length>>1);
unsigned *end = a+length;
unsigned c;
while (--halfLen >= 0)
    {
    c = *a;
    *a++ = *--end;
    *end = c;
    }
}

// Assembly:
movl %esi, %eax
sarl %eax
testl %eax, %eax
jle 0x65ee
movslq %esi, %rcx
leaq (%rdi,%rcx,4), %rcx
addq $-0x4, %rcx
incl %eax
movl (%rdi), %edx
movl (%rcx), %esi
movl %esi, (%rdi)
addq $0x4, %rdi
movl %edx, (%rcx)
addq $-0x4, %rcx
decl %eax
cmpl $0x1, %eax
jg 0x65d7
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: reverseDoubles
void reverseDoubles(double *a, int length)
/* Reverse the order of the double array. */
{
int halfLen = (length>>1);
double *end = a+length;
double c;
while (--halfLen >= 0)
    {
    c = *a;
    *a++ = *--end;
    *end = c;
    }
}

// Assembly:
movl %esi, %eax
sarl %eax
testl %eax, %eax
jle 0x6623
movslq %esi, %rcx
leaq (%rdi,%rcx,8), %rcx
addq $-0x8, %rcx
incl %eax
movsd (%rdi), %xmm0
movsd (%rcx), %xmm1
movsd %xmm1, (%rdi)
addq $0x8, %rdi
movsd %xmm0, (%rcx)
addq $-0x8, %rcx
decl %eax
cmpl $0x1, %eax
jg 0x6604
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: reverseStrings
void reverseStrings(char **a, int length)
/* Reverse the order of the char* array. */
{
int halfLen = (length>>1);
char **end = a+length;
char *c;
while (--halfLen >= 0)
    {
    c = *a;
    *a++ = *--end;
    *end = c;
    }
}

// Assembly:
movl %esi, %eax
sarl %eax
testl %eax, %eax
jle 0x6654
movslq %esi, %rcx
leaq (%rdi,%rcx,8), %rcx
addq $-0x8, %rcx
incl %eax
movq (%rdi), %rdx
movq (%rcx), %rsi
movq %rsi, (%rdi)
addq $0x8, %rdi
movq %rdx, (%rcx)
addq $-0x8, %rcx
decl %eax
cmpl $0x1, %eax
jg 0x6639
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: swapBytes
void swapBytes(char *a, char *b, int length)
{
char c;
int i;

for (i=0; i<length; ++i)
    {
    c = a[i];
    a[i] = b[i];
    b[i] = c;
    }
}

// Assembly:
testl %edx, %edx
jle 0x6673
movl %edx, %eax
xorl %ecx, %ecx
movb (%rdi,%rcx), %dl
movb (%rsi,%rcx), %r8b
movb %r8b, (%rdi,%rcx)
movb %dl, (%rsi,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x665d
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: slFreeList
void slFreeList(void *listPt)
/* Free list */
{
struct slList **ppt = (struct slList**)listPt;
struct slList *next = *ppt;
struct slList *el;

while (next != NULL)
    {
    el = next;
    next = el->next;
    freeMem((char*)el);
    }
*ppt = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x677d
movq (%rdi), %r14
callq 0xf129
movq %r14, %rdi
testq %r14, %r14
jne 0x676d
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: slSort
void slSort(void *pList, int (*compare )(const void *elem1,  const void *elem2))
/* Sort a singly linked list with Qsort and a temporary array. */
{
struct slList **pL = (struct slList **)pList;
struct slList *list = *pL;
int count;
count = slCount(list);
if (count > 1)
    {
    struct slList *el;
    struct slList **array;
    int i;
    array = needLargeMem(count * sizeof(*array));
    for (el = list, i=0; el != NULL; el = el->next, i++)
        array[i] = el;
    qsort(array, count, sizeof(array[0]), compare);
    list = NULL;
    for (i=0; i<count; ++i)
        {
        array[i]->next = list;
        list = array[i];
        }
    freeMem(array);
    slReverse(&list);
    *pL = list;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r13
xorl %ebp, %ebp
testq %r13, %r13
je 0x67b4
movq %r13, %rax
incl %ebp
movq (%rax), %rax
testq %rax, %rax
jne 0x67aa
cmpl $0x2, %ebp
jl 0x6845
movl %ebp, %r12d
leaq (,%r12,8), %rdi
callq 0xee85
movq %rax, %r15
testq %r13, %r13
je 0x67e8
movq %r15, %rax
movq %r13, (%rax)
movq (%r13), %r13
addq $0x8, %rax
testq %r13, %r13
jne 0x67d8
movl $0x8, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x3120
cmpl $0x2, %ebp
movl $0x1, %eax
cmovgel %ebp, %eax
xorl %ecx, %ecx
xorl %r14d, %r14d
movq (%r15,%rcx,8), %rdx
movq %r14, (%rdx)
movq (%r15,%rcx,8), %r14
incq %rcx
cmpq %rcx, %rax
jne 0x680b
movq %r15, %rdi
callq 0xf129
testq %r14, %r14
je 0x6840
xorl %ecx, %ecx
movq %r14, %rax
movq (%r14), %r14
movq %rcx, (%rax)
movq %rax, %rcx
testq %r14, %r14
jne 0x682d
jmp 0x6842
xorl %eax, %eax
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: slUniqify
void slUniqify(void *pList, int (*compare )(const void *elem1,  const void *elem2), void (*free)())
/* Return sorted list with duplicates removed.
 * Compare should be same type of function as slSort's compare (taking
 * pointers to pointers to elements.  Free should take a simple
 * pointer to dispose of duplicate element, and can be NULL. */
{
struct slList **pSlList = (struct slList **)pList;
struct slList *oldList = *pSlList;
struct slList *newList = NULL, *el;

slSort(&oldList, compare);
while ((el = slPopHead(&oldList)) != NULL)
    {
    if ((newList == NULL) || (compare(&newList, &el) != 0))
        slAddHead(&newList, el);
    else if (free != NULL)
        free(el);
    }
slReverse(&newList);
*pSlList = newList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rax
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
movq $0x0, (%rsp)
movq %r12, %rdi
callq 0x678c
movq (%r12), %rbp
testq %rbp, %rbp
je 0x68e7
movq %rsp, %r12
leaq 0x8(%rsp), %r13
movq %rbp, %rax
movq (%rbp), %rbp
movq $0x0, (%rax)
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rsp)
je 0x68bf
movq %r12, %rdi
movq %r13, %rsi
callq *%r15
testl %eax, %eax
je 0x68d6
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movq %rcx, (%rax)
movq %rax, (%rsp)
testq %rbp, %rbp
jne 0x6898
jmp 0x68e7
testq %r14, %r14
je 0x68cf
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq *%r14
jmp 0x68cf
movq %rbp, 0x10(%rsp)
movq %rbp, 0x8(%rsp)
movq (%rsp), %rax
testq %rax, %rax
je 0x690f
xorl %edx, %edx
movq %rax, %rcx
movq (%rax), %rax
movq %rdx, (%rcx)
movq %rcx, %rdx
testq %rax, %rax
jne 0x68fc
jmp 0x6911
xorl %ecx, %ecx
movq %rcx, (%rsp)
movq %rcx, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: slRemoveEl
boolean slRemoveEl(void *vpList, void *vToRemove)
/* Remove element from doubly linked list.  Usage:
 *    slRemove(&list, el);
 * Returns TRUE if element in list.  */
{
struct slList **pList = vpList;
struct slList *toRemove = vToRemove;
struct slList *el, *next, *newList = NULL;
boolean didRemove = FALSE;

for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    if (el != toRemove)
	{
	slAddHead(&newList, el);
	}
    else
        didRemove = TRUE;
    }
slReverse(&newList);
*pList = newList;
return didRemove;
}

// Assembly:
movq (%rdi), %rdx
testq %rdx, %rdx
je 0x6991
xorl %eax, %eax
xorl %ecx, %ecx
movq (%rdx), %r8
cmpq %rsi, %rdx
je 0x6982
movq %rcx, (%rdx)
movq %rdx, %rcx
jmp 0x6987
movl $0x1, %eax
movq %r8, %rdx
testq %r8, %r8
jne 0x6972
jmp 0x6995
xorl %ecx, %ecx
xorl %eax, %eax
testq %rcx, %rcx
je 0x69af
xorl %esi, %esi
movq %rcx, %rdx
movq (%rcx), %rcx
movq %rsi, (%rdx)
movq %rdx, %rsi
testq %rcx, %rcx
jne 0x699c
jmp 0x69b1
xorl %edx, %edx
movq %rdx, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: doubleMedian
double doubleMedian(int count, double *array)
/* Return median value in array.  This will sort
 * the array as a side effect. */
{
double median;
doubleSort(count, array);
if ((count&1) == 1)
    median = array[count>>1];
else
    {
    count >>= 1;
    median = (array[count] + array[count-1]) * 0.5;
    }
return median;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x2, %edi
jl 0x6a5d
movl %ebp, %esi
leaq -0x38(%rip), %rcx       # 0x6a18
movl $0x8, %edx
movq %rbx, %rdi
callq 0x3120
movl %ebp, %eax
sarl %eax
cltq
movsd (%rbx,%rax,8), %xmm0
testb $0x1, %bpl
jne 0x6a7c
addsd -0x8(%rbx,%rax,8), %xmm0
mulsd 0x1158c(%rip), %xmm0    # 0x18008
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/common.c
// Function: doubleBoxWhiskerCalc
void doubleBoxWhiskerCalc(int count, double *array, double *retMin,
                          double *retQ1, double *retMedian, double *retQ3, double *retMax)
/* Calculate what you need to draw a box and whiskers plot from an array of doubles. */
{
doubleSort(count, array);
*retMin = array[0];
*retQ1 = array[(count+2)/4];
int halfCount = count>>1;
if ((count&1) == 1)
    *retMedian = array[halfCount];
else
    {
    *retMedian = (array[halfCount] + array[halfCount-1]) * 0.5;
    }
*retQ3 = array[(3*count+2)/4];
*retMax = array[count-1];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r14
movl %edi, %r15d
cmpl $0x2, %edi
jl 0x6abc
movl %r15d, %esi
leaq -0x97(%rip), %rcx       # 0x6a18
movl $0x8, %edx
movq %r14, %rdi
callq 0x3120
movq 0x40(%rsp), %rax
movsd (%r14), %xmm0
movsd %xmm0, (%rbp)
leal 0x2(%r15), %ecx
leal 0x5(%r15), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x2, %edx
movslq %edx, %rcx
movsd (%r14,%rcx,8), %xmm0
movsd %xmm0, (%r13)
movl %r15d, %ecx
sarl %ecx
movslq %ecx, %rcx
movsd (%r14,%rcx,8), %xmm0
testb $0x1, %r15b
jne 0x6b0d
addsd -0x8(%r14,%rcx,8), %xmm0
mulsd 0x114fb(%rip), %xmm0    # 0x18008
leal (%r15,%r15,2), %ecx
addl $0x2, %ecx
leal (%r15,%r15,2), %edx
addl $0x5, %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
movsd %xmm0, (%r12)
sarl $0x2, %edx
movslq %edx, %rcx
movsd (%r14,%rcx,8), %xmm0
movsd %xmm0, (%rbx)
movslq %r15d, %rcx
movsd -0x8(%r14,%rcx,8), %xmm0
movsd %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq