// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
xorl %edi, %edi
movl $0x1, %esi
callq 0x10f70
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5ba2
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5b93
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x10900
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x5b63
jmp 0x5b95
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x5b50
xorl %edi, %edi
movl $0x1, %esi
callq 0x10f70
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5c80
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x79f0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x104b0
cmpq $0x0, %rax
jne 0x5c6e
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x10d00
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x5c6c
movl $0x18, %edi
callq 0x152f0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x39e0
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x10900
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x3, %edi
leaq 0x1e000(%rip), %rsi     # 0x23c65
movb $0x0, %al
callq 0x1adf0
jmp 0x5c6e
jmp 0x5c70
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x5bba
leaq -0x28(%rbp), %rdi
callq 0x11620
leaq -0x18(%rbp), %rdi
callq 0x7bb0
leaq -0x38(%rbp), %rdi
callq 0x11620
movq -0x18(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)