// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/jkOwnLib/genoFind.c
// Function: targetClump
static void targetClump(struct genoFind *gf, struct gfClump **pClumpList, struct gfClump *clump)
/* Add target sequence to clump.  If clump had multiple targets split it into
 * multiple clumps, one per target.  Add clump(s) to list. */
{
struct gfSeqSource *ss = findSource(gf, clump->tStart);
if (ss->end >= clump->tEnd)
    {
    /* Usual simple case: all of clump hits single target. */
    clump->target = ss;
    slAddHead(pClumpList, clump);
    }
else
    {
    /* If we've gotten here, then the clump is split across multiple targets.
     * We'll have to split it into multiple clumps... */
    struct gfHit *hit, *nextHit, *inList, *outList, *oldList = clump->hitList;
    int hCount;

    while (oldList != NULL)
        {
	inList = outList = NULL;
	hCount = 0;
	for (hit = oldList; hit != NULL; hit = nextHit)
	    {
	    nextHit = hit->next;
	    if (ss->start <= hit->tStart  && hit->tStart < ss->end)
	        {
		++hCount;
		slAddHead(&inList, hit);
		}
	    else
	        {
		slAddHead(&outList, hit);
		}
	    }
	slReverse(&inList);
	slReverse(&outList);
	if (hCount >= gf->minMatch)
	    {
	    struct gfClump *newClump;
	    AllocVar(newClump);
	    newClump->hitList = inList;
	    newClump->hitCount = hCount;
	    newClump->target = ss;
	    findClumpBounds(newClump, gf->tileSize);
	    slAddHead(pClumpList, newClump);
	    }
	else
	    {
	    inList = NULL;
	    }
	oldList = outList;
	if (oldList != NULL)
	    {
	    ss = findSource(gf, oldList->tStart);
	    }
	}
    clump->hitList = NULL;	/* We ate up the hit list. */
    gfClumpFree(&clump);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x10f20
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jb 0x11516
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10f80
jmp 0x11661
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x1164c
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x115af
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0xc(%rcx), %eax
ja 0x11596
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x11596
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x10f80
jmp 0x115a3
movq -0x28(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x10f80
jmp 0x115a5
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x1154c
leaq -0x38(%rbp), %rdi
callq 0x2aad0
leaq -0x40(%rbp), %rdi
callq 0x2aad0
movl -0x4c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jl 0x1161c
movl $0x38, %edi
callq 0x40c50
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x4c(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x113c0
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x10f80
jmp 0x11624
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x11647
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x10f20
movq %rax, -0x20(%rbp)
jmp 0x11522
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
leaq -0x18(%rbp), %rdi
callq 0xe5c0
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)