// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x12400
movq %rax, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x13510
cmpl $0x0, %eax
je 0x5950
leaq -0x20(%rbp), %rdi
callq 0x9050
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x9050
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x58a2
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x56f0
movq %rax, -0x48(%rbp)
movl $0x10, %edi
callq 0x152f0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x39e0
jmp 0x5855
leaq -0x40(%rbp), %rdi
callq 0x7bb0
cmpq $0x0, -0x40(%rbp)
jne 0x58cf
movq -0x18(%rbp), %rax
movl 0x28(%rax), %esi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x1e326(%rip), %rdi     # 0x23bee
movb $0x0, %al
callq 0xfd50
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x104b0
cmpq $0x0, %rax
je 0x5907
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x1e313(%rip), %rdi     # 0x23c13
movb $0x0, %al
callq 0xfd50
movl $0x18, %edi
callq 0x152f0
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x58(%rbp), %rcx
addq $0x8, %rcx
callq 0x10b20
movq -0x58(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x39e0
jmp 0x582a
leaq -0x30(%rbp), %rdi
callq 0x7bb0
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x5986
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x1e2b9(%rip), %rdi     # 0x23c38
movb $0x0, %al
callq 0xfd50
leaq -0x18(%rbp), %rdi
callq 0x12ea0
movq -0x10(%rbp), %rdi
callq 0x5780
addq $0x60, %rsp
popq %rbp
retq
nop