// File: /workspace/github_c_makefile_star2_O2/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 $0x78, %rsp
movl %r9d, 0x3c(%rsp)
movsd %xmm0, 0x20(%rsp)
movl %r8d, 0x4(%rsp)
movl 0xb0(%rsp), %eax
movq %rax, 0x60(%rsp)
movq %rsi, 0x28(%rsp)
subq %rdi, %rsi
leal (%rdx,%rsi), %eax
movq %rcx, 0x50(%rsp)
subl %eax, %ecx
movq %rsi, 0x58(%rsp)
shlq $0x20, %rsi
movabsq $-0x100000000, %r13     # imm = 0xFFFFFFFF00000000
movq %rsi, 0x8(%rsp)
addq %rsi, %r13
sarq $0x20, %r13
movslq %ecx, %rax
testq %rax, %rax
pushq $-0x1
popq %r14
cmovnsq %rax, %r14
movb (%rdi), %bpl
notq %r14
movq %rdi, 0x10(%rsp)
leaq 0x1(%rdi), %rax
movq %rax, 0x18(%rsp)
movq %rdx, 0x48(%rsp)
leaq 0x1(%rdx), %rbx
xorl %r12d, %r12d
movabsq $0x100000000, %r15      # imm = 0x100000000
testq %r14, %r14
je 0x9a5a
cmpb -0x1(%rbx), %bpl
jne 0x9a4f
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x6710
testl %eax, %eax
je 0x9ca5
addq %r15, %r12
incq %rbx
incq %r14
jmp 0x9a2c
xorl %r13d, %r13d
cmpl $0x0, 0x4(%rsp)
je 0x9f60
movq 0x50(%rsp), %r14
movl %r14d, %ebx
movq 0x48(%rsp), %r12
subl %r12d, %ebx
movq 0x8(%rsp), %rdi
sarq $0x20, %rdi
callq 0x20f77
subl %eax, %ebx
cmpl $0x2, %ebx
pushq $0x1
popq %rax
cmovgel %ebx, %eax
cvtsi2sd %eax, %xmm0
movsd 0x20(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd 0x72dd1(%rip), %xmm2    # 0x7c878
leaq 0xab9d2(%rip), %r15     # 0xb5480
movq $0x0, 0x18(%rsp)
xorl %ebx, %ebx
xorl %eax, %eax
movq 0x10(%rsp), %rbp
cltq
leaq (%rax,%rbp), %rsi
movq 0x58(%rsp), %rcx
subl %eax, %ecx
movq 0x28(%rsp), %r13
movq 0xc0(%rsp), %r10
xorl %r11d, %r11d
xorl %eax, %eax
testl %ecx, %ecx
movl $0x0, %edx
cmovgl %ecx, %edx
xorl %r8d, %r8d
movl %eax, %edi
subl %r8d, %edi
incl %edi
movapd %xmm2, %xmm0
cmpq %rax, %rdx
je 0x9c61
movsbq (%rsi,%rax), %r9
movslq (%r15,%r9,4), %r9
testq %r9, %r9
js 0x9b21
mulsd (%r10,%r9,8), %xmm0
ucomisd %xmm0, %xmm1
jae 0x9b29
incq %rax
incl %edi
jmp 0x9af7
incq %rax
movl %eax, %r8d
jmp 0x9aec
movslq %r8d, %r9
leaq (%rsi,%r9), %rbp
subl %r8d, %eax
leal 0x1(%rax), %r8d
addl $0x2, %eax
cltd
pushq $0x2
popq %r13
idivl %r13d
movb (%rsi,%r9), %dl
movslq %r8d, %r13
pushq $0x1
popq %r8
cmpq %r13, %r8
jge 0x9bb6
leaq 0x1(%r8), %r9
cmpb %dl, (%rbp,%r8)
movq %r9, %r8
je 0x9b4d
movl %edi, %edx
pushq $0x2
popq %rdi
cmpq %rdi, %rdx
je 0x9bb6
movl %edi, %r8d
andl $0x1, %r8d
movb (%rbp,%r8), %r8b
leaq 0x1(%rdi), %r9
cmpb (%rbp,%rdi), %r8b
movq %r9, %rdi
je 0x9b65
pushq $0x3
popq %rdx
cmpl %edx, %eax
jl 0x9bd7
xorl %edi, %edi
movq %rdx, %r8
cmpq %r13, %r8
jge 0x9bb6
movslq %edi, %r9
movb (%rbp,%r9), %r9b
cmpb (%rbp,%r8), %r9b
jne 0x9bb1
incl %edi
cmpl %edx, %edi
cmovel %r11d, %edi
incq %r8
jmp 0x9b90
incq %rdx
jmp 0x9b87
addq %r13, %rbp
subl %ebp, %esi
addl %esi, %ecx
movq %rbp, %rsi
testl %ecx, %ecx
movq 0x28(%rsp), %r13
movq 0x10(%rsp), %rbp
jg 0x9add
jmp 0x9c61
movsd %xmm1, 0x68(%rsp)
movl %ebx, 0x8(%rsp)
movq %rbp, %rsi
addq %r13, %rsi
movq %r12, %rbx
movq %rsi, 0x40(%rsp)
movq %rbp, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x8ccd
testq %rax, %rax
je 0x9c3c
movq %rax, %rbx
pushq $0x38
popq %rdi
movq 0xb8(%rsp), %rsi
callq 0x8e0c
movq %rbx, 0x20(%rax)
addq %r13, %rbx
movq %rbx, 0x28(%rax)
movq %rbp, 0x10(%rax)
movq 0x40(%rsp), %rsi
movq %rsi, 0x18(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, (%rax)
movq %rax, 0x18(%rsp)
jmp 0x9bef
movq 0x10(%rsp), %rbp
movq 0x40(%rsp), %rax
subl %ebp, %eax
movl 0x8(%rsp), %ebx
incl %ebx
movsd 0x68(%rsp), %xmm1
movsd 0x72c1c(%rip), %xmm2    # 0x7c878
jmp 0x9ac0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x9f5d
movl %ebx, 0x8(%rsp)
callq 0x236b0
movq %rax, %rbx
movq %rax, %r15
testq %r15, %r15
je 0x9cf7
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x13242
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x13217
movq 0x8(%r15), %r15
jmp 0x9c7e
pushq $0x38
popq %rdi
movq 0xb8(%rsp), %rsi
callq 0x8e0c
movq %rax, %rdx
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rdx)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rdx)
sarq $0x20, %r12
movq 0x48(%rsp), %rcx
addq %r12, %rcx
movq %rcx, 0x20(%rdx)
addq 0x58(%rsp), %rcx
movq 0x50(%rsp), %rax
cmpq %rax, %rcx
cmovaq %rax, %rcx
movq %rdx, %r13
movq %rcx, 0x28(%rdx)
jmp 0x9f60
leaq 0x70(%rsp), %r13
movq %rbx, (%r13)
andq $0x0, 0x30(%rsp)
leaq 0x94de(%rip), %rsi      # 0x131eb
movq %r13, %rdi
callq 0x131a7
movq (%r13), %rbx
movq %rbx, %rsi
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x9d57
movq 0x20(%rbx), %rax
cmpq 0x20(%rsi), %rax
jne 0x9d19
movq 0x28(%rbx), %rax
cmpq 0x28(%rsi), %rax
jne 0x9d19
movq 0x10(%rbx), %rax
cmpq 0x10(%rsi), %rax
jne 0x9d19
movq 0x18(%rbx), %rax
cmpq 0x18(%rsi), %rax
jne 0x9d19
movq %r13, %rdi
callq 0x8ea4
jmp 0x9d19
xorl %ebx, %ebx
leaq 0x70(%rsp), %r15
xorl %ebp, %ebp
movq %r15, %rdi
movq 0xb8(%rsp), %rcx
callq 0x9135
testq %rax, %rax
je 0x9d84
movq %rbx, (%rax)
movq %rax, 0x30(%rsp)
incl %ebp
movq %rax, %rbx
jmp 0x9d60
cmpl $0xc9, %ebp
jb 0x9da1
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0xc8, %esi
callq 0x9216
movq (%rbx), %rbx
movq %rbx, %rdi
callq 0x236b0
leaq 0x30(%rsp), %rbx
movq %rax, (%rbx)
leaq -0xed3(%rip), %rsi      # 0x8ee5
movq %rbx, %rdi
callq 0x131a7
movq %rbx, %rdi
movl 0x4(%rsp), %ebp
movl %ebp, %ecx
callq 0x90e7
leaq 0x942c(%rip), %r15      # 0x13201
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x9dfd
leaq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x131a7
movq 0x10(%rbx), %rdi
movl %ebp, %esi
callq 0x23afc
movl %eax, 0x38(%rbx)
addq $0x8, %rbx
jmp 0x9dd5
leaq -0xf12(%rip), %rsi      # 0x8ef2
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x131a7
movq (%rbx), %rax
movq 0x10(%rax), %rbp
movq 0xc8(%rsp), %rax
cmpl $0x0, (%rax)
movl 0x3c(%rsp), %r15d
movq 0xc0(%rsp), %rax
je 0x9e67
subq $0x8, %rsp
movq %rbp, %rdi
movq %r12, %rcx
movq %r14, %r8
movl 0x10(%rsp), %r9d
pushq %rax
callq 0x8e1a
addq $0x10, %rsp
ucomisd 0x72a2a(%rip), %xmm0    # 0x7c880
ja 0x9f5d
movq 0xc8(%rsp), %rax
andl $0x0, (%rax)
testq %rbp, %rbp
je 0x9f5d
movl 0xb0(%rsp), %eax
testl %eax, %eax
jne 0x9e88
movq %rbp, %rdi
callq 0x23671
movq %rax, 0x60(%rsp)
movsd 0x20(%rsp), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
incl %r15d
xorl %ebx, %ebx
movq %rbp, %r13
movq 0x10(%rsp), %rdi
movq %r12, %rdx
testq %rbx, %rbx
je 0x9eb5
movq 0x18(%rbx), %rdi
movq 0x28(%rbx), %rdx
testq %rbp, %rbp
je 0x9eca
movq 0x10(%rbp), %r8
movq 0x20(%rbp), %rax
movq %r8, %rsi
movq %rax, %rcx
jmp 0x9ed8
movq %r14, %rax
movq 0x28(%rsp), %rsi
movq %rsi, %r8
movq %r14, %rcx
subl %edi, %r8d
cmpl $0x5, %r8d
jl 0x9f3a
subl %edx, %eax
cmpl $0x5, %eax
jl 0x9f3a
movl 0x4(%rsp), %r8d
movsd 0x20(%rsp), %xmm0
movl %r15d, %r9d
pushq 0xc8(%rsp)
pushq 0xc8(%rsp)
pushq 0xc8(%rsp)
pushq 0x78(%rsp)
callq 0x9999
addq $0x20, %rsp
testq %rax, %rax
je 0x9f3a
movq %rax, %rdx
movq %rdx, %rcx
movq 0x8(%rdx), %rdx
testq %rdx, %rdx
jne 0x9f20
testq %rbx, %rbx
je 0x9f41
movq %rax, 0x8(%rbx)
movq %rbx, (%rax)
jmp 0x9f44
testq %rbp, %rbp
jne 0x9f51
jmp 0x9f60
movq %rax, %r13
testq %rbp, %rbp
je 0x9f60
movq %rcx, (%rbp)
movq %rbp, 0x8(%rcx)
movq %rbp, %rbx
movq 0x8(%rbp), %rbp
jmp 0x9ea0
xorl %r13d, %r13d
movq %r13, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq