// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/jkOwnLib/fuzzyFind.c
// Function: findBestAli
static struct ffAli *findBestAli(DNA *ns, DNA *ne, DNA *hs, DNA *he, enum ffStringency stringency, struct lm **ffMemPool)
{
    static int iniExpGapPen[] = {0 /* (exact) */, 4 /* cDna */, 4 /* tight */, 4 /* loose */};
    static int addExpGapPen[] = {0 /* (exact) */, 3 /* cDna */, 3 /* tight */, 3 /* loose */};
    static int midTileMinSize[] = {0 /*(exact) */,12 /* cDNA */, 12 /* tight */, 4 /* loose */};

    struct ffAli *bestAli;
    int matchSize;

    matchSize = nextPowerOfFour(he-hs)+1;
    if (matchSize < midTileMinSize[stringency])
        matchSize = midTileMinSize[stringency];

    bestAli = findWovenTiles(ns, ne, hs, he, stringency, ffMemPool);
    if (bestAli == NULL)
        return NULL;

    bestAli = ffMergeNeedleAlis(bestAli, FALSE);
    bestAli = expandAlis(bestAli,ns,ne,hs,he,iniExpGapPen[stringency], 1, ffMemPool);
    bestAli = ffMergeNeedleAlis(bestAli, FALSE);
    bestAli = expandAlis(bestAli,ns,ne,hs,he,addExpGapPen[stringency], 2*matchSize, ffMemPool);
    bestAli = trimAlis(bestAli);
    bestAli = ffMergeNeedleAlis(bestAli, FALSE);
    bestAli = ffMergeHayOverlaps(bestAli);
    bestAli = reconsiderAlignedGaps(bestAli);
    bestAli = ffRemoveEmptyAlis(bestAli, FALSE);
    bestAli = ffMergeNeedleAlis(bestAli, FALSE);
    if (stringency == ffCdna)
        ffSlideIntrons(bestAli);
    bestAli = ffRemoveEmptyAlis(bestAli, FALSE);
    return bestAli;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
subq %rax, %rdi
callq 0x33760
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl -0x2c(%rbp), %ecx
movl %ecx, %edx
leaq 0xfb21b(%rip), %rcx     # 0x105990
cmpl (%rcx,%rdx,4), %eax
jge 0xa78c
movl -0x2c(%rbp), %eax
movl %eax, %ecx
leaq 0xfb20a(%rip), %rax     # 0x105990
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq 0xabf0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xa7c1
movq $0x0, -0x8(%rbp)
jmp 0xa8d9
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x1b4f0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %eax
movl %eax, %r9d
leaq 0xfb17f(%rip), %rax     # 0x105970
movl (%rax,%r9,4), %r9d
movq -0x38(%rbp), %rax
movl $0x1, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xad20
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x1b4f0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %eax
movl %eax, %r9d
leaq 0xfb142(%rip), %rax     # 0x105980
movl (%rax,%r9,4), %r9d
movl -0x44(%rbp), %r10d
shll %r10d
movq -0x38(%rbp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xad20
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xb0a0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x1b4f0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x1b400
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xb1c0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x1ae30
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x1b4f0
movq %rax, -0x40(%rbp)
cmpl $0x1, -0x2c(%rbp)
jne 0xa8c2
movq -0x40(%rbp), %rdi
callq 0x1b3d0
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x1ae30
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)