// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/jkOwnLib/ffSeedExtend.c
// Function: smoothOneGap
static boolean smoothOneGap(struct ffAli *left, struct ffAli *right, struct ffAli *ffList)
/* If and necessary connect left and right - either directly or
 * with a small intermediate ffAli inbetween.  Do not bother to
 * merge directly abutting regions,  this happens later.  Returns
 * TRUE if any smoothing done. */ 
{
int nGap = right->nStart - left->nEnd;
int hGap = right->hStart - left->hEnd;
if (nGap > 0 && hGap > 0 && nGap < 10 && hGap < 10)
    {
    int sizeDiff = nGap - hGap;
    if (sizeDiff < 0) sizeDiff = -sizeDiff;
    if (sizeDiff <= 3)
	{
	struct axtScoreScheme *ss = axtScoreSchemeRnaDefault();
	char hSym[20], nSym[20];
	int symCount;
	if (bandExt(TRUE, ss, 3, left->nEnd, nGap, left->hEnd, hGap, 1,
		sizeof(hSym), &symCount, nSym, hSym, NULL, NULL))
	    {
	    int gapPenalty = -ffCalcCdnaGapPenalty(hGap, nGap) * ss->matrix['a']['a'];
	    int score = axtScoreSym(ss, symCount, nSym, hSym);
	    if (score >= gapPenalty)
		{
		struct ffAli *l, *r;
		l = ffAliFromSym(symCount, nSym, hSym, NULL, left->nEnd, left->hEnd);
		r = ffRightmost(l);
		left->right = l;
		l->left = left;
		r->right = right;
		right->left = r;
		return TRUE;
		}
	    }
	}
    }
return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x34(%rbp)
jle 0x1ebee
cmpl $0x0, -0x38(%rbp)
jle 0x1ebee
cmpl $0xa, -0x34(%rbp)
jge 0x1ebee
cmpl $0xa, -0x38(%rbp)
jge 0x1ebee
movl -0x34(%rbp), %eax
subl -0x38(%rbp), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jge 0x1ea85
xorl %eax, %eax
subl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x3, -0x3c(%rbp)
jg 0x1ebec
movb $0x0, %al
callq 0x21e40
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
movl -0x34(%rbp), %r8d
movq -0x20(%rbp), %rax
movq 0x28(%rax), %r9
movl -0x38(%rbp), %ebx
leaq -0x80(%rbp), %r10
leaq -0x60(%rbp), %rax
movl $0x1, %edi
movl $0x3, %edx
leaq -0x84(%rbp), %r11
xorl %r14d, %r14d
movl %ebx, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x14, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0x1fac0
cmpl $0x0, %eax
je 0x1ebea
movl -0x38(%rbp), %edi
movl -0x34(%rbp), %esi
callq 0x38000
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movq -0x48(%rbp), %rcx
imull 0x1858c(%rcx), %eax
movl %eax, -0x88(%rbp)
movq -0x48(%rbp), %rdi
movl -0x84(%rbp), %esi
leaq -0x80(%rbp), %rdx
leaq -0x60(%rbp), %rcx
callq 0x21250
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
cmpl -0x88(%rbp), %eax
jl 0x1ebe8
movl -0x84(%rbp), %edi
leaq -0x80(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x18(%rax), %r8
movq -0x20(%rbp), %rax
movq 0x28(%rax), %r9
xorl %eax, %eax
movl %eax, %ecx
callq 0x37dd0
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0x37b90
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x98(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0xa0(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0xa0(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x14(%rbp)
jmp 0x1ebf5
jmp 0x1ebea
jmp 0x1ebec
jmp 0x1ebee
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)