// File: /workspace/github_c_makefile_star2_O3/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, %rbx
subq %rdi, %rbx
movl %eax, %edx
subl %r15d, %edx
cmpl %edx, %ebx
movl %edx, %ecx
cmovll %ebx, %ecx
cmpl $0x3, %ecx
jl 0x16c65
leaq 0x1(%rdi), %rcx
movq %rcx, 0x10(%rsp)
movb (%rdi), %r14b
testl %r8d, %r8d
je 0x16b94
cmpl $0xe, %ebx
jl 0x16bab
leaq 0xa9fe1(%rip), %rcx     # 0xc0b70
movl (%rcx), %r8d
jmp 0x16bca
cmpl $0xe, %ebx
jl 0x16c22
leaq 0xa9fcc(%rip), %rax     # 0xc0b70
movl (%rax), %eax
jmp 0x16c3d
leal (%rbx,%rbx), %ecx
subl %r9d, %ecx
movl $0x1, %r8d
shll %cl, %r8d
leaq 0xa9faf(%rip), %rcx     # 0xc0b70
movl (%rcx), %ecx
cmpl %ecx, %r8d
cmovgel %ecx, %r8d
cmpl %edx, %r8d
cmovll %r8d, %edx
leal -0x1(%rbx), %ecx
cmpl %ecx, %edx
jl 0x16c65
movq %rdi, (%rsp)
movq %rsi, 0x8(%rsp)
movslq %edx, %rdx
movq %rax, %r12
subq %rdx, %r12
movslq %ecx, %rbp
subq %rbp, %rax
xorl %r13d, %r13d
movq %rax, %r15
cmpb (%r15), %r14b
jne 0x16c18
leaq 0x1(%r15), %rsi
movq 0x10(%rsp), %rdi
movq %rbp, %rdx
callq 0x6710
testl %eax, %eax
je 0x16caa
decq %r15
cmpq %r12, %r15
jae 0x16bfa
jmp 0x16c68
leal (%rbx,%rbx), %ecx
subl %r9d, %ecx
movl $0x1, %eax
shll %cl, %eax
leaq 0xa9f3a(%rip), %rcx     # 0xc0b70
movl (%rcx), %ecx
cmpl %ecx, %eax
cmovgel %ecx, %eax
cmpl %edx, %eax
cmovll %eax, %edx
movslq %edx, %r12
addq %r15, %r12
shlq $0x20, %rbx
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
addq %rbx, %rbp
sarq $0x20, %rbp
subq %rbp, %r12
cmpq %r15, %r12
jae 0x16c7a
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, (%rsp)
movq %rsi, 0x8(%rsp)
xorl %r13d, %r13d
cmpb (%r15), %r14b
jne 0x16ca0
leaq 0x1(%r15), %rsi
movq 0x10(%rsp), %rdi
movq %rbp, %rdx
callq 0x6710
testl %eax, %eax
je 0x16cd2
incq %r15
cmpq %r12, %r15
jbe 0x16c86
jmp 0x16c68
movl $0x38, %edi
callq 0x2dff4
movq %rax, %r13
movq (%rsp), %rax
movq %rax, 0x10(%r13)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%r13)
movq %r15, 0x20(%r13)
shlq $0x20, %rbx
jmp 0x16cf4
movl $0x38, %edi
callq 0x2dff4
movq %rax, %r13
movq (%rsp), %rax
movq %rax, 0x10(%r13)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%r13)
movq %r15, 0x20(%r13)
sarq $0x20, %rbx
addq %r15, %rbx
movq %rbx, 0x28(%r13)
jmp 0x16c68