// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: fillInExact
static struct ffAli *fillInExact(char *nStart, char *nEnd, char *hStart, char *hEnd, 
	boolean isRc, boolean scanLeft, boolean scanRight, int resolveLimit)
/* Try and add exact match to the region, adding splice sites to
 * the area to search for small query sequences. scanRight and scanLeft
 * specify which way to scan and which side of the splice site to
 * include.  One or the other or neither should be set. */
{
struct ffAli *ff = NULL;
char *hPos = NULL;
int nGap = nEnd - nStart;
int hGap = hEnd - hStart;
int minGap = min(nGap, hGap);

if (minGap <= 2)
    return NULL;
if (scanLeft)
    {
    if ((hPos = scanExactLeft(nStart, nGap, hGap, hEnd, resolveLimit)) != NULL)
	{
	AllocVar(ff);
	ff->nStart = nStart;
	ff->nEnd = nEnd;
	ff->hStart = hPos;
	ff->hEnd = hPos + nGap;
	return ff;
	}
    }
else
    {
    if ((hPos = scanExactRight(nStart, nGap, hGap, hStart, resolveLimit)) != NULL)
	{
	AllocVar(ff);
	ff->nStart = nStart;
	ff->nEnd = nEnd;
	ff->hStart = hPos;
	ff->hEnd = hPos + nGap;
	return ff;
	}
    }
return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rax
movq %rdx, %r15
movq %rsi, %rbp
subq %rdi, %rbp
movl %eax, %edx
subl %r15d, %edx
cmpl %edx, %ebp
movl %edx, %ecx
cmovll %ebp, %ecx
cmpl $0x3, %ecx
jge 0x16b39
xorl %eax, %eax
jmp 0x16c8c
movq %rsi, %r14
movq %rdi, %r13
leaq 0x1(%rdi), %r12
movb (%rdi), %bl
testl %r8d, %r8d
je 0x16b5a
cmpl $0xe, %ebp
jl 0x16b7b
leaq 0xaa01a(%rip), %rcx     # 0xc0b70
movl (%rcx), %esi
jmp 0x16b9a
cmpl $0xe, %ebp
movq %r14, 0x10(%rsp)
movq %r13, 0x8(%rsp)
jl 0x16bfe
leaq 0xa9ffc(%rip), %rax     # 0xc0b70
movl (%rax), %eax
jmp 0x16c1d
leal (,%rbp,2), %ecx
subl %r9d, %ecx
movl $0x1, %esi
shll %cl, %esi
leaq 0xa9fdd(%rip), %rcx     # 0xc0b70
movl (%rcx), %ecx
cmpl %ecx, %esi
cmovgel %ecx, %esi
cmpl %edx, %esi
cmovll %esi, %edx
leal -0x1(%rbp), %ecx
cmpl %ecx, %edx
jge 0x16bab
xorl %r15d, %r15d
jmp 0x16bf4
movq %r13, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movslq %edx, %rdx
movq %rax, %r14
subq %rdx, %r14
movslq %ecx, %r13
subq %r13, %rax
movq %rax, %r15
cmpb (%r15), %bl
jne 0x16bdf
leaq 0x1(%r15), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x6710
testl %eax, %eax
je 0x16bea
decq %r15
cmpq %r14, %r15
jae 0x16bc7
xorl %r15d, %r15d
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %r13
testq %r15, %r15
jne 0x16c6c
jmp 0x16b32
leal (,%rbp,2), %ecx
subl %r9d, %ecx
movl $0x1, %eax
shll %cl, %eax
leaq 0xa9f5a(%rip), %rcx     # 0xc0b70
movl (%rcx), %ecx
cmpl %ecx, %eax
cmovgel %ecx, %eax
cmpl %edx, %eax
cmovll %eax, %edx
movslq %edx, %r14
addq %r15, %r14
leal -0x1(%rbp), %eax
movslq %eax, %r13
subq %r13, %r14
cmpq %r15, %r14
jb 0x16c56
cmpb (%r15), %bl
jne 0x16c4e
leaq 0x1(%r15), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x6710
testl %eax, %eax
je 0x16c59
incq %r15
cmpq %r14, %r15
jbe 0x16c36
xorl %r15d, %r15d
testq %r15, %r15
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %r13
je 0x16b32
movl $0x38, %edi
callq 0x2dc95
movq %r13, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %r15, 0x20(%rax)
movslq %ebp, %rcx
addq %r15, %rcx
movq %rcx, 0x28(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq