// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: linearSatOneSize
struct dlList *linearSatOneSize(struct alphaStore *store, int outSize)
/* linearSat - assemble alpha repeat regions such as centromeres from reads that have
 * been parsed into various repeat monomer variants.  Cycles of these variants tend to
 * form higher order repeats. Returns list of outSize monomers. */
{
struct wordTree *wt = store->markovChains;
alphaStoreNormalize(store, outSize);
verbose(2, "Normalized Markov Chains\n");

if (optionExists("chain"))
    {
    char *fileName = optionVal("chain", NULL);
    wordTreeWrite(wt, store->maxChainSize, fileName);
    }

struct dlList *ll = wordTreeMakeList(store, store->maxChainSize, 
    pickWeightedRandomFromList(wt->children), outSize);

if (optionExists("afterChain"))
    {
    char *fileName = optionVal("afterChain", NULL);
    wordTreeWrite(wt, store->maxChainSize, fileName);
    }

return ll;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %r14
movq 0x20(%rdi), %rbx
callq 0x5add
leaq 0x13116(%rip), %rsi     # 0x18efb
movl $0x2, %edi
xorl %eax, %eax
callq 0x12c8e
leaq 0x1311d(%rip), %rdi     # 0x18f15
callq 0x10f30
testl %eax, %eax
je 0x5e1e
leaq 0x1310d(%rip), %rdi     # 0x18f15
xorl %esi, %esi
callq 0x10c5a
movl 0x30(%r14), %esi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x5766
movq %r14, 0x8(%rsp)
movl 0x30(%r14), %eax
movl %eax, 0x4(%rsp)
movq %rbx, 0x18(%rsp)
movq 0x8(%rbx), %rdi
callq 0x4014
movq %rax, 0x20(%rsp)
xorl %r14d, %r14d
xorl %eax, %eax
callq 0xab28
movq %rax, %r15
testl %ebp, %ebp
jle 0x5eb6
movl $0x18, %edi
callq 0xf07d
movq %rax, %r13
testl %r14d, %r14d
je 0x5e80
xorl %ebx, %ebx
cmpl 0x4(%rsp), %r14d
setl %bl
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x4586
movq %rax, %r12
addl %ebx, %r14d
jmp 0x5e8b
movl $0x1, %r14d
movq 0x20(%rsp), %r12
testq %r12, %r12
je 0x5eb6
movq 0x18(%r12), %rbx
movq %rbx, 0x10(%r13)
movq %r15, %rdi
movq %r13, %rsi
callq 0xac19
movq %r12, %rdi
callq 0x4606
decl 0x14(%rbx)
incl 0x18(%rbx)
decl %ebp
jne 0x5e4f
movl 0x21964(%rip), %edx     # 0x27820
leaq 0x132dc(%rip), %rsi     # 0x1919f
movl $0x3, %edi
xorl %eax, %eax
callq 0x12c8e
leaq 0x1327b(%rip), %rsi     # 0x19151
movl $0x2, %edi
xorl %eax, %eax
callq 0x12c8e
leaq 0x13287(%rip), %rdi     # 0x19170
xorl %esi, %esi
callq 0x10c5a
testq %rax, %rax
je 0x5f43
leaq 0x13b27(%rip), %rsi     # 0x19a23
movq %rax, %rdi
callq 0x9532
movq %rax, 0x10(%rsp)
movq (%r15), %r14
cmpq $0x0, (%r14)
je 0x5f39
leaq 0x13d25(%rip), %rbx     # 0x19c3e
movq 0x10(%r14), %rax
movq 0x10(%rsp), %rdi
movq 0x8(%rax), %rdx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3470
movq (%r14), %r14
cmpq $0x0, (%r14)
jne 0x5f19
leaq 0x10(%rsp), %rdi
callq 0x9bbc
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4dcd
leaq 0x1321f(%rip), %rsi     # 0x19179
movl $0x2, %edi
xorl %eax, %eax
callq 0x12c8e
leaq 0x12fae(%rip), %rdi     # 0x18f1b
callq 0x10f30
testl %eax, %eax
je 0x5f94
leaq 0x12f9e(%rip), %rdi     # 0x18f1b
xorl %esi, %esi
callq 0x10c5a
movl 0x30(%rbx), %esi
movq 0x18(%rsp), %rdi
movq %rax, %rdx
callq 0x5766
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq