// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/jkOwnLib/genoFind.c
// Function: clumpNear
static struct gfClump *clumpNear(struct genoFind *gf, struct gfClump *oldClumps, int minMatch)
/* Go through clump list and make sure hits are also near each other.
 * If necessary divide clumps. */
{
struct gfClump *newClumps = NULL, *clump, *nextClump;
struct gfHit *hit, *nextHit;
int tileSize = gf->tileSize;
bits32 lastT;
int nearEnough = (gf->isPep ? gfNearEnough/3 : gfNearEnough);

for (clump = oldClumps; clump != NULL; clump = nextClump)
    {
    struct gfHit *newHits = NULL, *oldHits = clump->hitList;
    int clumpSize = 0;
    clump->hitCount = 0;
    clump->hitList = NULL;	/* Clump no longer owns list. */
    nextClump = clump->next;
    slSort(&oldHits, gfHitCmpTarget);
    lastT = oldHits->tStart;
    for (hit = oldHits; hit != NULL; hit = nextHit)
        {
	nextHit = hit->next;
	if (hit->tStart > nearEnough + lastT)
	     {
	     if (clumpSize >= minMatch)
	         {
		 slReverse(&newHits);
		 clump->hitList = newHits;
		 newHits = NULL;
		 clump->hitCount = clumpSize;
		 findClumpBounds(clump, tileSize);
		 targetClump(gf, &newClumps, clump);
		 AllocVar(clump);
		 }
	     else
	         {
		 newHits = NULL;
		 clump->hitCount = 0;
		 }
	     clumpSize = 0;
	     }
	lastT = hit->tStart;
	slAddHead(&newHits, hit);
	++clumpSize;
	}
    slReverse(&newHits);
    clump->hitList = newHits;
    if (clumpSize >= minMatch)
        {
	clump->hitCount = clumpSize;
	findClumpBounds(clump, tileSize);
	targetClump(gf, &newClumps, clump);
	}
    else
        {
	gfClumpFree(&clump);
	}
    }
return newClumps;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x28(%rax), %eax
cmpl $0x0, %eax
je 0x11065
movl 0xf4d88(%rip), %eax     # 0x105de0
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, -0x68(%rbp)
jmp 0x1106e
movl 0xf4d75(%rip), %eax     # 0x105de0
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1120e
movq $0x0, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x28(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq -0x60(%rbp), %rdi
leaq 0x291(%rip), %rsi       # 0x11360
callq 0x2ab90
movq -0x60(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x111b0
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movl 0xc(%rax), %eax
movl -0x4c(%rbp), %ecx
addl -0x48(%rbp), %ecx
cmpl %ecx, %eax
jbe 0x11183
movl -0x64(%rbp), %eax
cmpl -0x14(%rbp), %eax
jl 0x11169
leaq -0x58(%rbp), %rdi
callq 0x2aad0
movq -0x58(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movq $0x0, -0x58(%rbp)
movl -0x64(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x28(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x113c0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rsi
callq 0x114c0
movl $0x38, %edi
callq 0x40c50
movq %rax, -0x28(%rbp)
jmp 0x1117c
movq $0x0, -0x58(%rbp)
movq -0x28(%rbp), %rax
movl $0x0, 0x20(%rax)
movl $0x0, -0x64(%rbp)
movq -0x38(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x38(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x10f80
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x110e6
leaq -0x58(%rbp), %rdi
callq 0x2aad0
movq -0x58(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x64(%rbp), %eax
cmpl -0x14(%rbp), %eax
jl 0x111f6
movl -0x64(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x28(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x113c0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rsi
callq 0x114c0
jmp 0x111ff
leaq -0x28(%rbp), %rdi
callq 0xe5c0
jmp 0x11201
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x1107c
movq -0x20(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)