// File: /workspace/github_c_makefile_star2_O3/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, 0x3c(%rsp)
movsd %xmm0, 0x48(%rsp)
movl %r8d, 0xc(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdi, 0x18(%rsp)
subq %rdi, %rsi
movq %rcx, 0x10(%rsp)
movq %rdx, 0x60(%rsp)
subq %rdx, %rcx
movq %rsi, 0x40(%rsp)
movq %rcx, 0x28(%rsp)
cmpl %esi, %ecx
jl 0xb570
movq 0x18(%rsp), %rax
movb (%rax), %bl
incq %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rcx
leal -0x1(%rcx), %eax
movslq %eax, %r13
movq 0x28(%rsp), %r14
subl %ecx, %r14d
incl %r14d
movq 0x60(%rsp), %rax
leaq 0x1(%rax), %r15
xorl %r12d, %r12d
movabsq $0x100000000, %rbp      # imm = 0x100000000
cmpb -0x1(%r15), %bl
jne 0xb565
movq (%rsp), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x6710
testl %eax, %eax
je 0xb94b
addq %rbp, %r12
incq %r15
decq %r14
jne 0xb548
movq $0x0, (%rsp)
cmpl $0x0, 0xc(%rsp)
je 0xbb69
movq 0xd0(%rsp), %r12
movl 0xc0(%rsp), %eax
movq %rax, 0x70(%rsp)
movq 0x40(%rsp), %r13
movslq %r13d, %rdi
callq 0x256c8
movq 0x28(%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 0x822a9(%rip), %xmm2    # 0x8d878
leaq 0xb5e8a(%rip), %r15     # 0xc1460
xorl %edi, %edi
movl $0x0, 0x28(%rsp)
xorl %eax, %eax
movq 0x60(%rsp), %r14
movq 0x30(%rsp), %rbx
movq 0x18(%rsp), %rbp
movslq %eax, %rdx
leaq (%rdx,%rbp), %rcx
movl %r13d, %eax
subl %edx, %eax
testl %eax, %eax
jle 0xb804
movl %eax, %edx
xorl %esi, %esi
xorl %r9d, %r9d
movapd %xmm2, %xmm0
movsbq (%rcx,%rsi), %r8
movslq (%r15,%r8,4), %r8
testq %r8, %r8
js 0xb62f
mulsd (%r12,%r8,8), %xmm0
ucomisd %xmm0, %xmm1
jae 0xb643
incq %rsi
jmp 0xb639
incq %rsi
movapd %xmm2, %xmm0
movl %esi, %r9d
cmpq %rdx, %rsi
jne 0xb610
jmp 0xb804
movq %rdi, 0x20(%rsp)
movslq %r9d, %rdi
leaq (%rcx,%rdi), %rbp
subl %edi, %esi
leal 0x1(%rsi), %edx
cmpl $0x2, %edx
jl 0xb6af
movl %esi, %r8d
addl $0x2, %r8d
shrl $0x1f, %r8d
addl %r8d, %esi
addl $0x2, %esi
sarl %esi
movb (%rcx,%rdi), %dil
movl %edx, %r13d
movl $0x1, %r8d
cmpb %dil, (%rbp,%r8)
jne 0xb68a
incq %r8
cmpq %r8, %r13
jne 0xb679
jmp 0xb6af
cmpl $0x2, %edx
je 0xb6af
movl $0x2, %edi
movl %edi, %r8d
andl $0x1, %r8d
movb (%rbp,%r8), %r8b
cmpb (%rbp,%rdi), %r8b
jne 0xb6d3
incq %rdi
cmpq %rdi, %r13
jne 0xb694
movslq %edx, %rdx
addq %rdx, %rbp
subl %ebp, %ecx
addl %ecx, %eax
movq %rbp, %rcx
testl %eax, %eax
movq 0x18(%rsp), %rbp
movq 0x20(%rsp), %rdi
jg 0xb5fd
jmp 0xb804
cmpl $0x5, %edx
jl 0xb73c
cmpl $0x4, %esi
movl $0x3, %edi
cmovll %edi, %esi
incl %esi
movl $0x3, %edi
movq %rbp, %r8
movq %r13, %r9
cmpq %r13, %rdi
je 0xb6af
xorl %r10d, %r10d
movl $0x3, %r11d
movslq %r10d, %rbx
movb (%rbp,%rbx), %bl
cmpb (%r8,%r11), %bl
jne 0xb729
incl %r10d
cmpl %edi, %r10d
movl $0x0, %ebx
cmovel %ebx, %r10d
incq %r11
cmpq %r11, %r9
movq 0x30(%rsp), %rbx
jne 0xb6fe
jmp 0xb6af
incq %rdi
decq %r9
incq %r8
cmpq %rsi, %rdi
movq 0x30(%rsp), %rbx
jne 0xb6f0
movsd %xmm1, 0x78(%rsp)
movq %rbp, %rsi
addq %r13, %rsi
movq %rbp, %rdi
movq %rsi, 0x68(%rsp)
movq %r14, %rdx
movq 0x10(%rsp), %rcx
callq 0xa690
testq %rax, %rax
je 0xb7cc
movq 0x20(%rsp), %rcx
movq %rax, 0x80(%rsp)
movq %rcx, 0x20(%rsp)
movq 0xc8(%rsp), %rcx
movq (%rcx), %rdi
movl $0x38, %esi
callq 0x2c325
movq %rax, %r12
movq 0x80(%rsp), %rdx
movq %rdx, 0x20(%rax)
addq %r13, %rdx
movq %rdx, 0x28(%rax)
movq %rbp, 0x10(%rax)
movq 0x68(%rsp), %rsi
movq %rsi, 0x18(%rax)
movq 0x20(%rsp), %rax
movq %rax, (%r12)
movq %rbp, %rdi
movq 0x10(%rsp), %rcx
callq 0xa690
movq %r12, %rcx
testq %rax, %rax
jne 0xb767
jmp 0xb7d1
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %rbp
movq 0x68(%rsp), %rax
subl %ebp, %eax
incl 0x28(%rsp)
movq %r12, %rdi
movq 0xd0(%rsp), %r12
movq 0x40(%rsp), %r13
movsd 0x78(%rsp), %xmm1
movsd 0x82079(%rip), %xmm2    # 0x8d878
jmp 0xb5f1
testq %rdi, %rdi
je 0xbb61
callq 0x28293
movq %rax, %r15
testq %rax, %rax
movq 0x10(%rsp), %r12
je 0xb847
movq %r15, %r13
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x160ea
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x160aa
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0xb822
leaq 0x58(%rsp), %r13
movq %r15, (%r13)
movq $0x0, 0x50(%rsp)
leaq 0xa81e(%rip), %rsi      # 0x1607e
movq %r13, %rdi
callq 0x1603a
movq (%r13), %rax
movq 0x8(%rax), %rdx
testq %rdx, %rdx
movl 0x3c(%rsp), %r13d
movl 0xc(%rsp), %ebp
movq 0xc8(%rsp), %rcx
je 0xb8e0
xorpd %xmm0, %xmm0
movq %rax, %rsi
movq %rdx, %rax
movq 0x20(%rdx), %rdx
cmpq 0x20(%rsi), %rdx
jne 0xb8d7
movq 0x28(%rax), %rdx
cmpq 0x28(%rsi), %rdx
jne 0xb8d7
movq 0x10(%rax), %rdx
cmpq 0x10(%rsi), %rdx
jne 0xb8d7
movq 0x18(%rax), %rdx
cmpq 0x18(%rsi), %rdx
jne 0xb8d7
movq (%rsi), %rdx
cmpq %rsi, 0x58(%rsp)
jne 0xb8c7
movq %rax, 0x58(%rsp)
movq %rdx, (%rax)
testq %rdx, %rdx
je 0xb8d3
movq %rax, 0x8(%rdx)
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
testq %rdx, %rdx
jne 0xb88a
leaq 0x58(%rsp), %rdi
callq 0xab79
testq %rax, %rax
je 0xb9a3
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
leaq 0x58(%rsp), %r13
movq 0xc8(%rsp), %r12
movq %rax, %r15
movq %rcx, (%rax)
movq %rax, 0x50(%rsp)
movq %r13, %rdi
movq %r12, %rcx
callq 0xab79
incl %ebx
movq %r15, %rcx
testq %rax, %rax
jne 0xb907
cmpl $0xc8, %ebx
movl 0x3c(%rsp), %r13d
jb 0xb9a6
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movl $0xc8, %esi
callq 0xac7c
movq (%r15), %r15
jmp 0xb9a6
movq 0xc8(%rsp), %rax
movq (%rax), %rdi
movl $0x38, %esi
callq 0x2c325
movq %rax, %rdx
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rdx)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rdx)
sarq $0x20, %r12
movq 0x60(%rsp), %rax
addq %r12, %rax
movq %rax, 0x20(%rdx)
addq 0x40(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq %rcx, %rax
cmovaq %rcx, %rax
movq %rdx, (%rsp)
movq %rax, 0x28(%rdx)
jmp 0xbb69
xorl %r15d, %r15d
movq %r15, %rdi
callq 0x28293
leaq 0x50(%rsp), %r15
movq %rax, (%r15)
leaq -0x10cc(%rip), %rsi     # 0xa8f1
movq %r15, %rdi
callq 0x1603a
movq %r15, %rdi
movl %ebp, %ecx
callq 0xab15
movq (%r15), %rbx
testq %rbx, %rbx
movq 0xd8(%rsp), %r12
je 0xba09
leaq 0xa6ae(%rip), %r15      # 0x16094
leaq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x1603a
movq 0x10(%rbx), %rdi
movl %ebp, %esi
callq 0x2877d
movl %eax, 0x38(%rbx)
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0xb9e6
leaq -0x1112(%rip), %rsi     # 0xa8fe
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x1603a
movq (%r15), %rax
movq 0x10(%rax), %rbp
cmpl $0x0, (%r12)
movq 0x30(%rsp), %rbx
je 0xba6a
subq $0x8, %rsp
movq %rbp, %rdi
movq %r14, %rcx
movq 0x18(%rsp), %r8
movl 0x30(%rsp), %r9d
pushq 0xd8(%rsp)
callq 0xa7f1
addq $0x10, %rsp
ucomisd 0x81e24(%rip), %xmm0    # 0x8d880
ja 0xbb61
movl $0x0, (%r12)
testq %rbp, %rbp
je 0xbb61
movl 0xc0(%rsp), %eax
testl %eax, %eax
jne 0xba8b
movq %rbp, %rdi
callq 0x28248
movq %rax, 0x70(%rsp)
movsd 0x48(%rsp), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
incl %r13d
xorl %r15d, %r15d
movq %rbp, (%rsp)
movq 0x18(%rsp), %rdi
movq %r14, %rdx
testq %r15, %r15
je 0xbaba
movq 0x18(%r15), %rdi
movq 0x28(%r15), %rdx
testq %rbp, %rbp
je 0xbacf
movq 0x10(%rbp), %r8
movq 0x20(%rbp), %rax
movq %r8, %rsi
movq %rax, %rcx
jmp 0xbadd
movq 0x10(%rsp), %rcx
movq %rcx, %rax
movq %rbx, %r8
movq %rbx, %rsi
subl %edi, %r8d
cmpl $0x5, %r8d
jl 0xbb3d
subl %edx, %eax
cmpl $0x5, %eax
jl 0xbb3d
movl 0xc(%rsp), %r8d
movsd 0x48(%rsp), %xmm0
movl %r13d, %r9d
pushq %r12
pushq 0xd8(%rsp)
pushq 0xd8(%rsp)
pushq 0x88(%rsp)
callq 0xb4c5
addq $0x20, %rsp
testq %rax, %rax
je 0xbb3d
movq %rax, %rdx
movq %rdx, %rcx
movq 0x8(%rdx), %rdx
testq %rdx, %rdx
jne 0xbb23
testq %r15, %r15
je 0xbb44
movq %rax, 0x8(%r15)
movq %r15, (%rax)
jmp 0xbb48
testq %rbp, %rbp
jne 0xbb55
jmp 0xbb69
movq %rax, (%rsp)
testq %rbp, %rbp
je 0xbb69
movq %rcx, (%rbp)
movq %rbp, 0x8(%rcx)
movq %rbp, %r15
movq 0x8(%rbp), %rbp
jmp 0xbaa5
movq $0x0, (%rsp)
movq (%rsp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq