// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/jkOwnLib/fuzzyFind.c
// Function: recursiveWeave
static struct ffAli *recursiveWeave(DNA *ns, DNA *ne, DNA *hs, DNA *he,
                                    enum ffStringency stringency, double probMax, int level, int orientation,
                                    struct lm **ffMemPool, double rwFreq[4], boolean *rwIsCdna, boolean *rwCheckGoodEnough)
/* Find a set of tiles, then recurse to find set of tiles between the tiles
 * at somewhat lower stringency. */
{
    struct ffAli *left = NULL, *right = NULL, *aliList;

    if ((left = exactAli(ns, ne, hs, he, ffMemPool)) != NULL)
        return left;
    if (stringency == ffExact)
        return NULL;

    aliList = rwFindTilesBetween(ns, ne, hs, he, stringency, probMax, ffMemPool, rwFreq, rwIsCdna, rwCheckGoodEnough);
    if (aliList != NULL)
    {
        DNA *lne, *rns, *lhe, *rhs;
        int ndif, hdif;
        right = aliList;
        if (orientation == 0)
            orientation = ffIntronOrientation(aliList);
        for (;;)
        {
            /* Figure out the end points to recurse to. */
            if (left != NULL)
            {
                lne = left->nEnd;
                lhe = left->hEnd;
            }
            else
            {
                lne = ns;
                lhe = hs;
            }
            if (right != NULL)
            {
                rns = right->nStart;
                rhs = right->hStart;
            }
            else
            {
                rns = ne;
                rhs = he;
            }
            ndif = rns-lne;
            hdif = rhs-lhe;
            /* If a big enough gap left recurse. */
            if (ndif >= 5 && hdif >= 5)
            {
                struct ffAli *newLeft = NULL, *newRight;

                newLeft = recursiveWeave(lne, rns, lhe, rhs, stringency, probMax*2, level+1,
                                         orientation, ffMemPool, rwFreq, rwIsCdna, rwCheckGoodEnough);
                if (newLeft != NULL)
                {
                    /* Insert new tiles between left and right. */

                    /* Find right end of tile set. */
                    newRight = newLeft;
                    while (newRight->right != NULL)
                        newRight = newRight->right;


                    if (left != NULL)
                    {
                        left->right = newLeft;
                        newLeft->left = left;
                    }
                    else
                    {
                        aliList = newLeft;
                    }
                    if (right != NULL)
                    {
                        right->left = newRight;
                        newRight->right = right;
                    }
                }
            }
            if ((left = right) == NULL)
                break;
            right = right->right;
        }
    }
    return aliList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %r9d, %ebp
movsd %xmm0, 0x48(%rsp)
movl %r8d, %r14d
movq %rdi, %r13
movq %rsi, 0x68(%rsp)
movq %rsi, %r15
subq %rdi, %r15
movq %rcx, 0x20(%rsp)
movq %rcx, %rsi
subq %rdx, %rsi
cmpl %r15d, %esi
movq %rdx, 0x10(%rsp)
movq %rdi, 0x58(%rsp)
movq %r15, 0x30(%rsp)
movq %rsi, 0x8(%rsp)
jge 0xb5a7
movb $0x1, %al
movq $-0x1, %rbx
jmp 0xb61b
movl %r14d, 0x18(%rsp)
movl %ebp, 0x1c(%rsp)
movb (%r13), %bpl
leaq 0x1(%r13), %rbx
leal -0x1(%r15), %eax
movq %r15, %rcx
movslq %eax, %r15
movl %esi, %r13d
subl %ecx, %r13d
incl %r13d
leaq 0x1(%rdx), %r14
xorl %r12d, %r12d
cmpb (%rdx,%r12), %bpl
jne 0xb5f0
leaq (%r14,%r12), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x6710
movq 0x10(%rsp), %rdx
testl %eax, %eax
je 0xb603
incq %r12
cmpq %r12, %r13
jne 0xb5d2
movb $0x1, %al
movq $-0x1, %r12
jmp 0xb605
xorl %eax, %eax
movslq %r12d, %rbx
movl 0x1c(%rsp), %ebp
movl 0x18(%rsp), %r14d
movq 0x58(%rsp), %r13
movq 0x30(%rsp), %r15
movq 0xc8(%rsp), %rcx
testb %al, %al
je 0xb62c
xorl %r12d, %r12d
jmp 0xb668
movq (%rcx), %rdi
movl $0x38, %esi
callq 0x2bfa9
movq %rax, %r12
movq %r13, 0x10(%rax)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%r12)
addq 0x10(%rsp), %rbx
movq %rbx, 0x20(%r12)
addq %r15, %rbx
movq 0x20(%rsp), %rax
cmpq %rax, %rbx
cmovaq %rax, %rbx
movq %rbx, 0x28(%r12)
testq %r12, %r12
je 0xb682
movq %r12, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
testl %r14d, %r14d
je 0xb66d
movl %r14d, 0x18(%rsp)
movl %ebp, 0x1c(%rsp)
movq 0xd0(%rsp), %rbp
movl 0xc0(%rsp), %eax
movq %rax, 0x70(%rsp)
movslq %r15d, %rdi
callq 0x253bb
movq 0x8(%rsp), %rcx
subl %eax, %ecx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovgel %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x48(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd 0x8219e(%rip), %xmm2    # 0x8d878
leaq 0xb5d7f(%rip), %r9      # 0xc1460
movq %rax, 0x8(%rsp)
movq $0x0, 0x50(%rsp)
movl $0x0, 0x44(%rsp)
xorl %r14d, %r14d
movsd %xmm1, 0x80(%rsp)
movslq %r14d, %rax
leaq (%rax,%r13), %rcx
movl %r15d, %r10d
subl %eax, %r10d
movb $0x1, %r11b
testl %r10d, %r10d
jle 0xb8c1
movl %r10d, %esi
xorl %eax, %eax
movl $0x1, %ebx
xorl %edx, %edx
movapd %xmm2, %xmm0
movsbq (%rcx,%rax), %r8
movslq (%r9,%r8,4), %r8
testq %r8, %r8
js 0xb749
mulsd (%rbp,%r8,8), %xmm0
ucomisd %xmm0, %xmm1
jb 0xb750
jmp 0xb75f
leal 0x1(%rax), %edx
movapd %xmm2, %xmm0
incq %rax
incl %ebx
cmpq %rax, %rsi
jne 0xb72c
jmp 0xb8c1
movq %r14, 0x28(%rsp)
movslq %edx, %r9
leaq (%rcx,%r9), %rdi
movl %edx, %r8d
negl %r8d
leaq (%r8,%rax), %r10
incq %r10
movq %r10, 0x8(%rsp)
cmpl $0x1, %r10d
jle 0xb7ec
leaq (%r8,%rax), %r10
decq %r10
addq %rax, %r8
movl %r8d, %r11d
addl $0x2, %r11d
shrl $0x1f, %r11d
addl %r11d, %r8d
addl $0x2, %r8d
sarl %r8d
movb (%rcx,%r9), %r11b
movl 0x8(%rsp), %r9d
movq %r9, 0x78(%rsp)
subl %edx, %ebx
movl $0x1, %r14d
cmpb %r11b, (%rdi,%r14)
jne 0xb7c8
incq %r14
cmpq %r14, %rbx
jne 0xb7b8
jmp 0xb7ec
testl %r10d, %r10d
je 0xb7ec
movl $0x2, %r10d
movl %r10d, %r11d
andl $0x1, %r11d
movb (%rdi,%r11), %r11b
cmpb (%rdi,%r10), %r11b
jne 0xb824
incq %r10
cmpq %r10, %rbx
jne 0xb7d3
movslq 0x8(%rsp), %r8
addq %rdi, %r8
movl %ecx, %r10d
subl %r8d, %r10d
addl %esi, %r10d
testl %r10d, %r10d
cmovlel %esi, %r10d
cmovgq %r8, %rcx
movq 0x30(%rsp), %r15
leaq 0xb5c4c(%rip), %r9      # 0xc1460
movq 0x28(%rsp), %r14
jg 0xb710
jmp 0xb8b5
cmpl $0x4, 0x8(%rsp)
jle 0xb896
cmpl $0x4, %r8d
movl $0x3, %r10d
cmovll %r10d, %r8d
incl %r8d
movl $0x3, %r10d
movq %rdi, %r11
cmpq 0x78(%rsp), %r10
je 0xb7ec
xorl %r14d, %r14d
movl $0x3, %r15d
movslq %r14d, %r12
movq %rdi, %r9
movb (%rdi,%r12), %r12b
cmpb (%r11,%r15), %r12b
jne 0xb885
incl %r14d
cmpl %r10d, %r14d
movl $0x0, %r12d
cmovel %r12d, %r14d
incq %r15
cmpq %r15, %rbx
movq %r9, %rdi
jne 0xb855
jmp 0xb7ec
incq %r10
decq %rbx
incq %r11
cmpq %r8, %r10
movq %r9, %rdi
jne 0xb845
subl %edx, %eax
incl %eax
xorl %r11d, %r11d
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %r15
leaq 0xb5bb2(%rip), %r9      # 0xc1460
movq 0x28(%rsp), %r14
jmp 0xb8c1
subl %edx, %eax
incl %eax
movq %rax, 0x8(%rsp)
movb $0x1, %r11b
testb %r11b, %r11b
jne 0xb98b
movl %r11d, 0x28(%rsp)
movslq 0x8(%rsp), %r13
leaq (%rdi,%r13), %rsi
movq %rdi, %rbx
movq %rsi, %r14
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0xa74b
testq %rax, %rax
je 0xb948
movq %rax, %r12
movq 0x50(%rsp), %rbp
movq 0xc8(%rsp), %rax
movq (%rax), %rdi
movl $0x38, %esi
callq 0x2bfa9
movq %rax, %r15
movq %r12, 0x20(%rax)
addq %r13, %r12
movq %r12, 0x28(%rax)
movq %rbx, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rbp, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq 0x20(%rsp), %rcx
callq 0xa74b
movq %rax, %r12
movq %r15, %rbp
testq %rax, %rax
jne 0xb8fa
jmp 0xb94d
movq 0x50(%rsp), %r15
movq 0x58(%rsp), %r13
subl %r13d, %r14d
incl 0x44(%rsp)
movq %r15, 0x50(%rsp)
movq 0xd0(%rsp), %rbp
movq 0x30(%rsp), %r15
movsd 0x80(%rsp), %xmm1
movsd 0x81efc(%rip), %xmm2    # 0x8d878
leaq 0xb5add(%rip), %r9      # 0xc1460
movq %rbx, %rdi
movl 0x28(%rsp), %r11d
testb %r11b, %r11b
je 0xb703
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xbbaa
callq 0x27f4d
movq %rax, 0x8(%rsp)
testq %rax, %rax
movl 0x18(%rsp), %r13d
movq 0x20(%rsp), %rbp
movq 0x10(%rsp), %r14
movq 0x68(%rsp), %r12
movq 0x58(%rsp), %rbx
je 0xb9f4
movq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x160a9
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x16069
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xb9cf
leaq 0x60(%rsp), %r15
movq 0x8(%rsp), %rax
movq %rax, (%r15)
movq $0x0, 0x38(%rsp)
leaq 0xa62c(%rip), %rsi      # 0x1603d
movq %r15, %rdi
callq 0x15fee
movq (%r15), %rax
movq 0x8(%rax), %rdx
testq %rdx, %rdx
movq 0xc8(%rsp), %r14
je 0xba87
xorpd %xmm0, %xmm0
movq %rax, %rcx
movq %rdx, %rax
movq 0x20(%rdx), %rdx
cmpq 0x20(%rcx), %rdx
jne 0xba7e
movq 0x28(%rax), %rdx
cmpq 0x28(%rcx), %rdx
jne 0xba7e
movq 0x10(%rax), %rdx
cmpq 0x10(%rcx), %rdx
jne 0xba7e
movq 0x18(%rax), %rdx
cmpq 0x18(%rcx), %rdx
jne 0xba7e
movq (%rcx), %rdx
cmpq %rcx, 0x60(%rsp)
jne 0xba6e
movq %rax, 0x60(%rsp)
movq %rdx, (%rax)
testq %rdx, %rdx
je 0xba7a
movq %rax, 0x8(%rdx)
movupd %xmm0, (%rcx)
movq 0x8(%rax), %rdx
testq %rdx, %rdx
jne 0xba31
leaq 0x60(%rsp), %rdi
movq %r14, %rcx
callq 0xac24
testq %rax, %rax
je 0xbade
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x60(%rsp), %rbx
movq 0x38(%rsp), %rcx
movq %rcx, (%rax)
movq %rax, 0x38(%rsp)
movq %rbx, %rdi
movq %r14, %rcx
callq 0xac24
incl %ebp
testq %rax, %rax
jne 0xbaa3
cmpl $0xc8, %ebp
movq 0x20(%rsp), %rbp
jb 0xbade
leaq 0x38(%rsp), %rdi
movl $0xc8, %esi
callq 0xad22
leaq 0x38(%rsp), %rbx
movq (%rbx), %rdi
callq 0x27f4d
movq %rax, (%rbx)
leaq -0x1149(%rip), %rsi     # 0xa9ac
movq %rbx, %rdi
callq 0x15fee
movq %rbx, %rdi
movl %r13d, %ecx
callq 0xabc0
movq (%rbx), %r14
testq %r14, %r14
je 0xbb3c
leaq 0xa53c(%rip), %rbx      # 0x16053
leaq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x15fee
movq 0x10(%r14), %rdi
movl %r13d, %esi
callq 0x28417
movl %eax, 0x38(%r14)
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0xbb17
leaq -0x118a(%rip), %rsi     # 0xa9b9
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x15fee
movq (%rbx), %rax
movq 0x10(%rax), %r15
movq 0xd8(%rsp), %rax
cmpl $0x0, (%rax)
je 0xbbb7
subq $0x8, %rsp
movq %r15, %rdi
movq 0x18(%rsp), %rcx
movq %rbp, %r8
movl 0x4c(%rsp), %r9d
pushq 0xd8(%rsp)
callq 0xa8ac
addq $0x10, %rsp
ucomisd 0x81cf0(%rip), %xmm0    # 0x8d880
movq 0xc8(%rsp), %r14
ja 0xbbc1
movq 0xd8(%rsp), %rax
movl $0x0, (%rax)
jmp 0xbbc4
xorl %r15d, %r15d
movl 0x18(%rsp), %r13d
movq 0x20(%rsp), %rbp
movq 0xc8(%rsp), %r14
jmp 0xbbc4
xorl %r15d, %r15d
testq %r15, %r15
je 0xbcc1
movl 0xc0(%rsp), %eax
testl %eax, %eax
movq 0x10(%rsp), %rdx
jne 0xbbef
movq %r15, %rdi
callq 0x27f02
movq 0x10(%rsp), %rdx
movq %rax, 0x70(%rsp)
movsd 0x48(%rsp), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
incl 0x1c(%rsp)
xorl %ebx, %ebx
movq %r15, %r12
movq 0x58(%rsp), %rdi
testq %rbx, %rbx
je 0xbc1a
movq 0x18(%rbx), %rdi
movq 0x28(%rbx), %rdx
movq 0x68(%rsp), %rsi
movq %rbp, %rcx
testq %r15, %r15
je 0xbc2f
movq 0x10(%r15), %rsi
movq 0x20(%r15), %rcx
movl %esi, %eax
subl %edi, %eax
cmpl $0x5, %eax
jl 0xbc91
movl %ecx, %eax
subl %edx, %eax
cmpl $0x5, %eax
jl 0xbc91
movl %r13d, %r8d
movsd 0x48(%rsp), %xmm0
movl 0x1c(%rsp), %r9d
pushq 0xd8(%rsp)
pushq 0xd8(%rsp)
pushq %r14
pushq 0x88(%rsp)
callq 0xb54d
addq $0x20, %rsp
testq %rax, %rax
je 0xbc91
movq %rax, %rdx
movq %rdx, %rcx
movq 0x8(%rdx), %rdx
testq %rdx, %rdx
jne 0xbc77
testq %rbx, %rbx
je 0xbc98
movq %rax, 0x8(%rbx)
movq %rbx, (%rax)
jmp 0xbc9b
movq 0x10(%rsp), %rdx
jmp 0xbcac
movq %rax, %r12
movq 0x10(%rsp), %rdx
testq %r15, %r15
je 0xbcac
movq %rcx, (%r15)
movq %r15, 0x8(%rcx)
testq %r15, %r15
je 0xb66d
movq %r15, %rbx
movq 0x8(%r15), %r15
jmp 0xbc08
xorl %r12d, %r12d
jmp 0xb66d