// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/jkOwnLib/fuzzyFind.c
// Function: ffFind
struct ffAli *ffFind(DNA *needleStart, DNA *needleEnd, DNA *hayStart, DNA *hayEnd,
                     enum ffStringency stringency)
/* Return an alignment of needle in haystack. */
{
    struct lm *ffMemPool = NULL;
    struct ffAli *bestAli;
    int status;

    assert(needleStart <= needleEnd);
    assert(hayStart <= hayEnd);

    ffMemInit(&ffMemPool);
    dnaUtilOpen();


    /* Set up error recovery. */
    status = setjmp(ffRecover);
    if (status == 0)    /* Always true except after long jump. */
    {
        //pushAbortHandler(ffAbort);
        bestAli = findBestAli(needleStart, needleEnd, hayStart, hayEnd, stringency, &ffMemPool);
        ffCountGoodEnds(bestAli);
        bestAli = saveAliToPermanentMem(bestAli);
    }
    else    /* They long jumped here because of an error. */
    {
        bestAli = NULL;
    }
    //popAbortHandler();
    ffMemCleanup(&ffMemPool);
    return bestAli;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
cmpq %rsi, %rdi
ja 0x9600
movq %rcx, %r14
movq %rdx, %r15
cmpq %rcx, %rdx
ja 0x961f
movl %r8d, %ebp
movq %rsi, %r12
movq %rdi, %r13
movl $0x800, %edi            # imm = 0x800
callq 0x26f00
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
movl %ebx, %eax
callq 0x21578
leaq 0xabc4e(%rip), %rdi     # 0xb4ef0
callq 0x6ab0
testl %eax, %eax
je 0x92b0
jmp 0x95cd
movq %r14, %rax
movl %ebp, %r14d
movq %rax, 0x10(%rsp)
movq %rax, %rbp
subq %r15, %rbp
movq %rbp, %rdi
callq 0x20f77
movl %eax, %ebx
incl %ebx
movl %r14d, 0x4(%rsp)
movl %r14d, %r14d
leaq 0x73654(%rip), %rax     # 0x7c930
movl (%rax,%r14,4), %eax
cmpl %eax, %ebx
cmovlel %eax, %ebx
movl %r12d, %ecx
subl %r13d, %ecx
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
cmpl $0x2, %ecx
setge %al
cmpl $0x2, %ebp
setge %cl
testb %cl, %al
je 0x9497
movl %ebp, %esi
leaq 0x40(%rsp), %rbp
movq %r15, %rdi
movq %rbp, %rdx
callq 0x210fe
movdqa (%rbp), %xmm0
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
paddd %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
paddd %xmm1, %xmm0
movd %xmm0, %eax
testl %eax, %eax
je 0x9343
cvtsi2sd %eax, %xmm0
jmp 0x934b
movsd 0x7352d(%rip), %xmm0    # 0x7c878
movl 0x4(%rsp), %r8d
movq 0x10(%rsp), %r11
xorl %eax, %eax
movq %r14, %rbp
cmpq $0x4, %rax
je 0x9375
cvtsi2sdl 0x40(%rsp,%rax,4), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp,%rax,8)
incq %rax
jmp 0x935a
movl %r8d, %eax
decl %eax
xorl %ecx, %ecx
cmpl $0x2, %eax
setb %al
movb %al, %cl
leaq 0x1c(%rsp), %rax
movl %ecx, (%rax)
leaq 0x735ae(%rip), %rcx     # 0x7c940
movsd (%rcx,%rbp,8), %xmm0
leaq 0x20(%rsp), %r10
leaq 0x8(%rsp), %r14
pushq $0x1
popq %r9
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r11, %rcx
pushq %rax
pushq %r10
pushq %r14
pushq $0x0
movq %r11, %r14
callq 0x9999
addq $0x20, %rsp
testq %rax, %rax
je 0x9497
movq %rax, %rdi
xorl %esi, %esi
callq 0x13696
leaq 0x73532(%rip), %rcx     # 0x7c910
movl (%rcx,%rbp,4), %r9d
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
leaq 0x8(%rsp), %rax
pushq %rax
pushq $0x1
callq 0x979d
addq $0x10, %rsp
movq %rax, %rdi
xorl %esi, %esi
callq 0x13696
leaq 0x7350d(%rip), %rcx     # 0x7c920
movl (%rcx,%rbp,4), %r9d
addl %ebx, %ebx
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
leaq 0x8(%rsp), %rax
pushq %rax
movl %ebx, %eax
pushq %rax
callq 0x979d
addq $0x10, %rsp
movq %rax, %rdi
testq %rax, %rax
je 0x94a1
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rsi
incq %rsi
movb (%rcx), %r8b
cmpb -0x1(%rsi), %r8b
je 0x946c
cmpq %rdx, %rcx
jae 0x946c
incq %rcx
movq %rcx, 0x10(%rax)
movq %rsi, 0x20(%rax)
jmp 0x944e
movq 0x28(%rax), %rsi
decq %rsi
decq %rdx
leaq 0x1(%rdx), %r8
cmpq %rcx, %r8
jbe 0x9491
movb (%rsi), %r8b
cmpb %r8b, (%rdx)
je 0x9491
movq %rdx, 0x18(%rax)
movq %rsi, 0x28(%rax)
jmp 0x9470
movq 0x8(%rax), %rax
jmp 0x943d
xorl %eax, %eax
movl %eax, %r14d
jmp 0x9561
xorl %esi, %esi
callq 0x13696
movq %rax, %rdi
callq 0x1363f
movq %rax, %r14
testq %rax, %rax
je 0x952c
movq %r14, %rcx
movq 0x8(%rcx), %r15
testq %r15, %r15
je 0x952c
movq %rcx, %r12
movq 0x10(%r15), %rax
subq 0x18(%rcx), %rax
movq 0x20(%r15), %rsi
movslq %eax, %rdx
subq 0x28(%rcx), %rsi
movq %r15, %rcx
cmpq %rsi, %rdx
jne 0x94bb
movl %eax, %ebp
movq %r12, %rdi
movq %r15, %rsi
callq 0x239f6
movl %eax, %ebx
negl %ebx
movq 0x18(%r12), %rdi
movq 0x28(%r12), %rsi
movl %ebp, %edx
callq 0x21317
movq %r15, %rcx
cmpl %ebx, %eax
jle 0x94bb
movq 0x20(%r12), %rax
movq %rax, 0x28(%r12)
movq %rax, 0x20(%r15)
movq 0x10(%r12), %rax
movq %rax, 0x18(%r12)
movq %rax, 0x10(%r15)
movq %r15, %rcx
jmp 0x94bb
xorl %ebp, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x13352
movq %rax, %rdi
movl %ebp, %esi
callq 0x13696
movq %rax, %r14
cmpl $0x1, 0x4(%rsp)
jne 0x9554
movq %r14, %rdi
callq 0x1362b
movq %r14, %rdi
xorl %esi, %esi
callq 0x13352
movq %rax, %r14
movq %r14, %rdi
callq 0x236c7
xorl %eax, %eax
pushq $0x38
popq %rbx
movq %r14, %r15
movq %rax, %r14
testq %r15, %r15
je 0x95b2
movq %rbx, %rdi
callq 0x28bb0
testq %rax, %rax
je 0x95e9
movups (%r15), %xmm0
movupd 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm0, (%rax)
movq 0x30(%r15), %rcx
movq %rcx, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movupd %xmm1, 0x10(%rax)
movq %r14, (%rax)
movq 0x8(%r15), %r15
jmp 0x9571
xorl %eax, %eax
movl %eax, %ecx
testq %r14, %r14
je 0x95ca
movq %r14, %rax
movq %rcx, 0x8(%r14)
movq (%r14), %r14
movq %rax, %rcx
jmp 0x95b6
movq %rcx, %rbx
leaq 0x8(%rsp), %rdi
callq 0x26fa2
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1c583
leaq 0xab8f8(%rip), %rdi     # 0xb4ef0
pushq $-0x1
popq %rsi
callq 0x6280
leaq 0x73281(%rip), %rdi     # 0x7c888
leaq 0x73293(%rip), %rsi     # 0x7c8a1
leaq 0x732a1(%rip), %rcx     # 0x7c8b6
movl $0x5a7, %edx            # imm = 0x5A7
callq 0x6460
leaq 0x732d4(%rip), %rdi     # 0x7c8fa
leaq 0x73274(%rip), %rsi     # 0x7c8a1
leaq 0x73282(%rip), %rcx     # 0x7c8b6
movl $0x5a8, %edx            # imm = 0x5A8
callq 0x6460