// File: /workspace/github_c_makefile_star2_O1/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
movl %r8d, 0xc(%rsp)
movq $0x0, 0x10(%rsp)
cmpq %rsi, %rdi
ja 0xb1a1
movq %rcx, %r14
movq %rdx, %r15
cmpq %rcx, %rdx
ja 0xb1c0
movq %rsi, %r12
movq %rdi, %r13
movl $0x800, %edi            # imm = 0x800
callq 0x2bea4
movq %rax, 0x10(%rsp)
xorl %ebx, %ebx
movl %ebx, %eax
callq 0x25b5c
leaq 0xb6100(%rip), %rdi     # 0xc0ed0
callq 0x6ab0
testl %eax, %eax
je 0xadde
jmp 0xb16c
movq %r14, %rbp
subq %r15, %rbp
movq %rbp, %rdi
callq 0x253bb
incl %eax
movl 0xc(%rsp), %ecx
movl %ecx, %ebx
leaq 0x82ac5(%rip), %rcx     # 0x8d8c0
movl (%rcx,%rbx,4), %ecx
cmpl %ecx, %eax
cmovlel %ecx, %eax
movl %eax, 0x18(%rsp)
movl %r12d, %ecx
subl %r13d, %ecx
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
cmpl $0x2, %ecx
setl %al
cmpl $0x2, %ebp
setl %cl
orb %al, %cl
je 0xae3b
xorl %eax, %eax
movl %eax, %edi
jmp 0xaee6
movl %ebp, %esi
leaq 0x40(%rsp), %rbp
movq %r15, %rdi
movq %rbp, %rdx
callq 0x2564c
movl 0x4(%rbp), %eax
addl (%rbp), %eax
addl 0x8(%rbp), %eax
addl 0xc(%rbp), %eax
je 0xae64
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
jmp 0xae6c
movsd 0x82a0c(%rip), %xmm0    # 0x8d878
xorl %eax, %eax
xorps %xmm1, %xmm1
cvtsi2sdl 0x40(%rsp,%rax,4), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp,%rax,8)
movq %rax, %rcx
incq %rcx
movq %rcx, %rax
cmpq $0x4, %rcx
jne 0xae6e
movl 0xc(%rsp), %r8d
movl %r8d, %eax
decl %eax
xorl %ecx, %ecx
cmpl $0x2, %eax
setb %al
movb %al, %cl
leaq 0x1c(%rsp), %rax
movl %ecx, (%rax)
leaq 0x82aae(%rip), %rcx     # 0x8d960
movsd (%rcx,%rbx,8), %xmm0
leaq 0x20(%rsp), %r10
leaq 0x10(%rsp), %r11
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl $0x1, %r9d
pushq %rax
pushq %r10
pushq %r11
pushq $0x0
callq 0xb54d
addq $0x20, %rsp
movq %rax, %rdi
testq %rdi, %rdi
je 0xb0b0
xorl %ebp, %ebp
movl %ebp, %esi
callq 0x16593
leaq 0x829a1(%rip), %rcx     # 0x8d8a0
movl (%rcx,%rbx,4), %r9d
leaq 0x10(%rsp), %r10
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
pushq %r10
pushq $0x1
callq 0xb349
addq $0x10, %rsp
movq %rax, %rdi
movl %ebp, %esi
callq 0x16593
leaq 0x8297b(%rip), %rcx     # 0x8d8b0
movl (%rcx,%rbx,4), %r9d
movl 0x18(%rsp), %r10d
addl %r10d, %r10d
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
leaq 0x10(%rsp), %rax
pushq %rax
movl %r10d, %eax
pushq %rax
callq 0xb349
addq $0x10, %rsp
movq %rax, %rdi
testq %rax, %rax
je 0xb019
movq %rdi, %rax
movq 0x10(%rax), %rdx
movq 0x20(%rax), %rsi
movb (%rdx), %cl
cmpb (%rsi), %cl
jne 0xaf85
movq %rdx, %rcx
jmp 0xafc9
movq 0x18(%rax), %rcx
incq %rdx
incq %rsi
movq %rsi, %r8
movq %rdx, %r9
movq %r8, %rdx
leaq -0x1(%r9), %r8
cmpq %rcx, %r8
jae 0xafc6
movq %r9, %rsi
movq %r9, 0x10(%rax)
movq %rdx, 0x20(%rax)
movb (%r9), %r10b
incq %rsi
leaq 0x1(%rdx), %r8
movq %rsi, %r9
cmpb (%rdx), %r10b
jne 0xaf95
decq %rsi
movq %rsi, %rcx
jmp 0xafc9
movq %r8, %rcx
movq 0x18(%rax), %rdx
cmpq %rcx, %rdx
jbe 0xb009
movq 0x28(%rax), %rsi
movb -0x1(%rsi), %r8b
cmpb %r8b, -0x1(%rdx)
je 0xb009
decq %rdx
decq %rsi
movq %rdx, %r8
movq %r8, 0x18(%rax)
movq %rsi, 0x28(%rax)
cmpq %rcx, %r8
jbe 0xb009
movq %r8, %rdx
decq %r8
movb -0x1(%rsi), %r9b
decq %rsi
cmpb %r9b, -0x1(%rdx)
jne 0xafe9
movq 0x8(%rax), %rcx
movq %rcx, %rax
testq %rcx, %rcx
jne 0xaf72
xorl %ebp, %ebp
movl %ebp, %esi
callq 0x16593
movq %rax, %rdi
callq 0x16534
testq %rax, %rax
je 0xb0b7
movq %rax, %rbx
movq 0x8(%rax), %rax
testq %rax, %rax
je 0xb0ab
movq %rbx, %r15
movq %rax, %r14
movq 0x10(%rax), %rax
movq 0x20(%r14), %rcx
subq 0x18(%r15), %rax
movslq %eax, %rdx
subq 0x28(%r15), %rcx
cmpq %rcx, %rdx
jne 0xb09c
movl %eax, %ebp
movq %r15, %rdi
movq %r14, %rsi
callq 0x282df
movl %eax, %r12d
negl %r12d
movq 0x18(%r15), %rdi
movq 0x28(%r15), %rsi
movl %ebp, %edx
callq 0x25866
cmpl %r12d, %eax
jle 0xb09c
movq 0x20(%r15), %rax
movq %rax, 0x28(%r15)
movq %rax, 0x20(%r14)
movq 0x10(%r15), %rax
movq %rax, 0x18(%r15)
movq %rax, 0x10(%r14)
movq 0x8(%r14), %rcx
movq %rcx, %rax
movq %r14, %r15
testq %rcx, %rcx
jne 0xb042
movq %rbx, %rdi
jmp 0xb0b9
xorl %eax, %eax
movl %eax, %r14d
jmp 0xb0eb
movl %ebp, %edi
xorl %ebp, %ebp
movl %ebp, %esi
callq 0x161cb
movq %rax, %rdi
movl %ebp, %esi
callq 0x16593
movq %rax, %r14
cmpl $0x1, 0xc(%rsp)
jne 0xb0de
movq %r14, %rdi
callq 0x16520
movq %r14, %rdi
xorl %esi, %esi
callq 0x161cb
movq %rax, %r14
movq %r14, %rdi
callq 0x27f6a
xorl %eax, %eax
testq %r14, %r14
je 0xb147
movl $0x38, %ebx
movq %r14, %r15
movq %rax, %r14
movq %rbx, %rdi
callq 0x2dc95
testq %rax, %rax
je 0xb188
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), %rcx
movq %rax, %r14
movq %rcx, %r15
testq %rcx, %rcx
jne 0xb105
testq %rax, %rax
je 0xb168
movq %rax, %rcx
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq (%rcx), %rdx
movq %rcx, %rbx
movq %rcx, %rax
movq %rdx, %rcx
testq %rdx, %rdx
jne 0xb151
jmp 0xb16c
xorl %eax, %eax
movl %eax, %ebx
leaq 0x10(%rsp), %rdi
callq 0x2bf4b
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1fcd6
leaq 0xb5d39(%rip), %rdi     # 0xc0ed0
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x6280
leaq 0x82728(%rip), %rdi     # 0x8d8d0
leaq 0x8273a(%rip), %rsi     # 0x8d8e9
leaq 0x82748(%rip), %rcx     # 0x8d8fe
movl $0x5a7, %edx            # imm = 0x5A7
callq 0x6460
leaq 0x8277b(%rip), %rdi     # 0x8d942
leaq 0x8271b(%rip), %rsi     # 0x8d8e9
leaq 0x82729(%rip), %rcx     # 0x8d8fe
movl $0x5a8, %edx            # imm = 0x5A8
callq 0x6460