// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/fuzzyFind.c
// Function: expandAlis
static struct ffAli *expandAlis(struct ffAli *ali, DNA *nStart, DNA *nEnd, DNA *hStart, DNA *hEnd,
                                int gapPenalty, int maxSkip, struct lm **ffMemPool)
/* Expand alignment to cover in-between tiles as well. */
{
    struct ffAli *a, *left, *right;
    DNA *ns, *ne, *hs, *he;
    boolean expanded = TRUE;

    while (expanded)
    {
        expanded = FALSE;
        /* Loop through expanding three times. */
        /* First just expand through N's that don't require an insertion/deletion. */
        for (a = ali; a != NULL; a = a->right)
        {
            if ((left = a->left) != NULL)
            {
                ns = left->nEnd;
                hs = left->hEnd;
            }
            else
            {
                ns = nStart;
                hs = hStart;
            }
            if ((right = a->right) != NULL)
            {
                ne = right->nStart;
                he = right->hStart;
            }
            else
            {
                ne = nEnd;
                he = hEnd;
            }
            expanded |= expandThroughNLeft(a, ns, ne, hs, he);
            expanded |= expandThroughNRight(a, ns, ne, hs, he);
        }
        /* Second do other expansion that doesn't require an insertion/deletion. */
        for (a = ali; a != NULL; a = a->right)
        {
            if ((left = a->left) != NULL)
            {
                ns = left->nEnd;
                hs = left->hEnd;
            }
            else
            {
                ns = nStart;
                hs = hStart;
            }
            if ((right = a->right) != NULL)
            {
                ne = right->nStart;
                he = right->hStart;
            }
            else
            {
                ne = nEnd;
                he = hEnd;
            }
            expanded |= expandLeft(a, ns, ne, hs, he, 0, gapPenalty, maxSkip, ffMemPool);
            expanded |= expandRight(a, ns, ne, hs, he, 0, gapPenalty, maxSkip, ffMemPool);
        }
        /* Finally do insertion/deletion. */
        for (a = ali; a != NULL; a = a->right)
        {
            if ((left = a->left) != NULL)
            {
                ns = left->nEnd;
                hs = left->hEnd;
            }
            else
            {
                ns = nStart;
                hs = hStart;
            }
            if ((right = a->right) != NULL)
            {
                ne = right->nStart;
                he = right->hStart;
            }
            else
            {
                ne = nEnd;
                he = hEnd;
            }
            expanded |= expandLeft(a, ns, ne, hs, he, 1, gapPenalty, maxSkip, ffMemPool);
            expanded |= expandRight(a, ns, ne, hs, he, 1, gapPenalty, maxSkip, ffMemPool);
        }
        while (ali->left)
            ali = ali->left;
    }
    return ali;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, %rbp
pushq $0x1
popq %rbx
testl %ebx, %ebx
je 0x9987
xorl %ebx, %ebx
movq %rbp, 0x10(%rsp)
testq %rbp, %rbp
je 0x9838
movq (%rbp), %rax
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rcx
testq %rax, %rax
je 0x97f9
movq 0x18(%rax), %rsi
movq 0x28(%rax), %rcx
movq 0x8(%rbp), %rax
movq 0x20(%rsp), %r15
movq 0x30(%rsp), %r12
testq %rax, %rax
je 0x9814
movq 0x10(%rax), %r15
movq 0x20(%rax), %r12
movq %rbp, %rdi
callq 0x8c09
movl %eax, %r13d
movq %rbp, %rdi
movq %r15, %rdx
movq %r12, %r8
callq 0x8b67
orl %r13d, %eax
orl %eax, %ebx
movq 0x8(%rbp), %rbp
jmp 0x97d9
movq 0x10(%rsp), %rbp
testq %rbp, %rbp
je 0x98d1
movq (%rbp), %rax
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdx
testq %rax, %rax
je 0x9861
movq 0x18(%rax), %rsi
movq 0x28(%rax), %rdx
movl %ebx, 0x8(%rsp)
movq 0x8(%rbp), %rax
movq 0x20(%rsp), %r12
movq 0x30(%rsp), %r15
testq %rax, %rax
je 0x9880
movq 0x10(%rax), %r12
movq 0x20(%rax), %r15
movq 0x78(%rsp), %rbx
movq %rbx, (%rsp)
movq %rbp, %rdi
xorl %ecx, %ecx
movl 0xc(%rsp), %r14d
movl %r14d, %r8d
movl 0x70(%rsp), %r9d
callq 0x9f72
movl %eax, %r13d
movq %rbx, (%rsp)
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movl %r14d, %r8d
movl 0x70(%rsp), %r9d
callq 0xa3dc
orl %r13d, %eax
movl 0x8(%rsp), %ebx
orl %eax, %ebx
movq 0x8(%rbp), %rbp
jmp 0x983d
movq 0x10(%rsp), %rbp
testq %rbp, %rbp
je 0x9972
movq (%rbp), %rax
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdx
testq %rax, %rax
je 0x98fa
movq 0x18(%rax), %rsi
movq 0x28(%rax), %rdx
movl %ebx, 0x8(%rsp)
movq 0x8(%rbp), %rax
movq 0x20(%rsp), %r12
movq 0x30(%rsp), %r15
testq %rax, %rax
je 0x9919
movq 0x10(%rax), %r12
movq 0x20(%rax), %r15
movq 0x78(%rsp), %rax
movq %rax, (%rsp)
movq %rbp, %rdi
pushq $0x1
popq %rbx
movl %ebx, %ecx
movl 0xc(%rsp), %r14d
movl %r14d, %r8d
movl 0x70(%rsp), %r9d
callq 0x9f72
movl %eax, %r13d
movq 0x78(%rsp), %rax
movq %rax, (%rsp)
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %ebx, %ecx
movl %r14d, %r8d
movl 0x70(%rsp), %r9d
callq 0xa3dc
orl %r13d, %eax
movl 0x8(%rsp), %ebx
orl %eax, %ebx
movq 0x8(%rbp), %rbp
jmp 0x98d6
movq 0x10(%rsp), %rax
movq %rax, %rbp
movq (%rax), %rax
testq %rax, %rax
jne 0x9977
jmp 0x97ca
movq %rbp, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq