// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/linearSat/linearSat.c
// Function: alphaReadListFromFile
void alphaReadListFromFile(char *fileName, struct alphaStore *store)
/* Read in file and turn it into a list of alphaReads. */
{
/* Stuff for processing file a line at a time. */
struct lineFile *lf = lineFileOpen(fileName, TRUE);
char *line, *word;

/* Loop through each line of file making up a read for it. */
struct alphaRead *readList = NULL;
while (lineFileNextReal(lf, &line))
    {
    /* Parse out first word of line into name, and rest into list. */
    char *name = nextWord(&line);
    struct monomerRef *list = NULL;
    while ((word = nextWord(&line)) != NULL)
        {
	struct monomer *monomer = alphaStoreAddMonomer(store, word);
	struct monomerRef *ref;
	AllocVar(ref);
	ref->val = monomer;
	slAddHead(&list, ref);
	}
    slReverse(&list);
    if (list == NULL)
	errAbort("Line %d of %s has no alpha monomers.", lf->lineIx, lf->fileName);

    /* Create data structure and add read to list and hash */
    if (hashLookup(store->readHash, name))
        errAbort("Read ID %s is repeated line %d of %s", name, lf->lineIx, lf->fileName);
    struct alphaRead *read;
    AllocVar(read);
    read->list = list;
    hashAddSaveName(store->readHash, name, read, &read->name);
    slAddHead(&readList, read);
    }
slReverse(&readList);
store->readList = readList;
if (store->readList == NULL)
    errAbort("%s contains no reads", lf->fileName);
lineFileClose(&lf);
connectReadsToMonomers(store);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl $0x1, %esi
callq 0xd12a
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0xdbed
testl %eax, %eax
je 0x50bd
leaq 0x20(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x13c44(%rip), %r13     # 0x18c13
movq %r14, %rdi
callq 0x7371
movq %rax, %rbp
movq $0x0, 0x8(%rsp)
movq %r14, %rdi
callq 0x7371
testq %rax, %rax
je 0x501b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4eec
movq %rax, %r12
movl $0x10, %edi
callq 0xf07d
movq %r12, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movq %rax, 0x8(%rsp)
jmp 0x4fe3
movq %r15, %rdi
callq 0x673b
cmpq $0x0, 0x8(%rsp)
jne 0x5045
movq 0x10(%rsp), %rax
movl 0x28(%rax), %esi
movq 0x8(%rax), %rdx
leaq 0x13bb0(%rip), %rdi     # 0x18bee
xorl %eax, %eax
callq 0xb8d7
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xbd98
testq %rax, %rax
je 0x506f
movq 0x10(%rsp), %rax
movl 0x28(%rax), %edx
movq 0x8(%rax), %rcx
movq %r13, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0xb8d7
movl $0x18, %edi
callq 0xf07d
movq %rax, %r12
movq 0x8(%rsp), %rax
movq %rax, 0x10(%r12)
movq 0x18(%rbx), %rdi
leaq 0x8(%r12), %rcx
movq %rbp, %rsi
movq %r12, %rdx
callq 0xc1a7
movq 0x18(%rsp), %rax
movq %rax, (%r12)
movq %r12, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xdbed
testl %eax, %eax
jne 0x4fcf
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x673b
movq (%r14), %rax
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0x50ed
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x13b52(%rip), %rdi     # 0x18c38
xorl %eax, %eax
callq 0xb8d7
leaq 0x10(%rsp), %rdi
callq 0xd800
movq %rbx, %rdi
callq 0x4f48
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq