// File: /workspace/github_c_makefile_star2_O3/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 0xb111
movq %rcx, %r14
movq %rdx, %r15
cmpq %rcx, %rdx
ja 0xb130
movl %r8d, %ebp
movq %rsi, %r12
movq %rdi, %r13
movl $0x800, %edi            # imm = 0x800
callq 0x2c220
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
movl %ebx, %eax
callq 0x25e47
leaq 0xb61b1(%rip), %rdi     # 0xc0ed0
callq 0x6ab0
testl %eax, %eax
je 0xad2d
jmp 0xb0d7
movq %r14, %rax
movl %ebp, %r14d
movq %rax, 0x10(%rsp)
movq %rax, %rbp
subq %r15, %rbp
movq %rbp, %rdi
callq 0x256c8
movl %eax, %ebx
incl %ebx
movl %r14d, 0x4(%rsp)
movl %r14d, %r14d
leaq 0x82b67(%rip), %rax     # 0x8d8c0
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 0xb0cb
movl %ebp, %esi
leaq 0x40(%rsp), %rbp
movq %r15, %rdi
movq %rbp, %rdx
callq 0x25959
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 0xadc3
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
jmp 0xadcb
movsd 0x82aad(%rip), %xmm0    # 0x8d878
movl 0x4(%rsp), %r8d
movq 0x10(%rsp), %r9
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
xorl %eax, %eax
cvtdq2pd 0x40(%rsp,%rax,4), %xmm1
divpd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp,%rax,8)
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, %rax
cmpq $0x4, %rcx
jne 0xaddb
movl %r8d, %eax
decl %eax
xorl %ecx, %ecx
cmpl $0x2, %eax
setb %al
movb %al, %cl
leaq 0x1c(%rsp), %rax
movl %ecx, (%rax)
leaq 0x82b48(%rip), %rcx     # 0x8d960
movsd (%rcx,%r14,8), %xmm0
leaq 0x20(%rsp), %r10
leaq 0x8(%rsp), %r11
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rbp
movq %r15, %rdx
movq %r9, %rcx
movq %r9, %r14
movl $0x1, %r9d
pushq %rax
pushq %r10
pushq %r11
pushq $0x0
callq 0xb4c5
addq $0x20, %rsp
testq %rax, %rax
je 0xb0cb
movq %rax, %rdi
xorl %esi, %esi
callq 0x165c9
leaq 0x82a36(%rip), %rcx     # 0x8d8a0
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 0xb2b7
addq $0x10, %rsp
movq %rax, %rdi
xorl %esi, %esi
callq 0x165c9
leaq 0x82a11(%rip), %rcx     # 0x8d8b0
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 0xb2b7
addq $0x10, %rsp
movq %rax, %rdi
testq %rax, %rax
je 0xaf75
movq %rdi, %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
movq 0x20(%rax), %rsi
movb (%rdx), %r8b
cmpb (%rsi), %r8b
je 0xaf29
incq %rdx
incq %rsi
movq %rsi, %r8
movq %rdx, %r9
movq %r8, %rdx
leaq -0x1(%r9), %r8
cmpq %rcx, %r8
jae 0xaf26
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 0xaef5
decq %rsi
movq %rsi, %rdx
jmp 0xaf29
movq %r8, %rdx
cmpq %rdx, %rcx
jbe 0xaf65
movq 0x28(%rax), %rsi
movb -0x1(%rsi), %r8b
cmpb %r8b, -0x1(%rcx)
je 0xaf65
decq %rcx
decq %rsi
movq %rcx, %r8
movq %r8, 0x18(%rax)
movq %rsi, 0x28(%rax)
cmpq %rdx, %r8
jbe 0xaf65
movq %r8, %rcx
decq %r8
movb -0x1(%rsi), %r9b
decq %rsi
cmpb %r9b, -0x1(%rcx)
jne 0xaf45
movq 0x8(%rax), %rcx
movq %rcx, %rax
testq %rcx, %rcx
jne 0xaed5
xorl %esi, %esi
callq 0x165c9
movq %rax, %rdi
callq 0x16566
movq %rax, %r14
testq %rax, %rax
je 0xb006
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xb006
movq %r14, %r12
movq %rax, %r15
movq 0x10(%rax), %rax
movq 0x20(%r15), %rcx
subq 0x18(%r12), %rax
movslq %eax, %rdx
subq 0x28(%r12), %rcx
cmpq %rcx, %rdx
jne 0xaff7
movl %eax, %ebp
movq %r12, %rdi
movq %r15, %rsi
callq 0x28623
movl %eax, %ebx
negl %ebx
movq 0x18(%r12), %rdi
movq 0x28(%r12), %rsi
movl %ebp, %edx
callq 0x25b71
cmpl %ebx, %eax
jle 0xaff7
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 0x8(%r15), %rcx
movq %rcx, %rax
movq %r15, %r12
testq %rcx, %rcx
jne 0xaf98
xorl %ebp, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x1620c
movq %rax, %rdi
movl %ebp, %esi
callq 0x165c9
movq %rax, %r14
cmpl $0x1, 0x4(%rsp)
jne 0xb02e
movq %r14, %rdi
callq 0x16552
xorl %ebx, %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x1620c
movq %rax, %r14
movq %rax, %rdi
callq 0x282b0
testq %r14, %r14
je 0xad28
movq %r14, %r15
xorl %eax, %eax
movl %eax, %ecx
movl $0x38, %r14d
movq %rcx, %rbx
movq %r14, %rdi
callq 0x2dff4
testq %rax, %rax
je 0xb0f8
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 %rbx, (%rax)
movq 0x8(%r15), %rdx
movq %rdx, %r15
movq %rax, %rcx
testq %rdx, %rdx
jne 0xb05b
movq $0x0, 0x8(%rax)
testq %rbx, %rbx
je 0xb0f3
movq %rbx, %rcx
movq (%rcx), %rdx
movq %rax, 0x8(%rcx)
movq %rcx, %rbx
movq %rcx, %rax
movq %rdx, %rcx
testq %rdx, %rdx
jne 0xb0b4
jmp 0xb0d7
xorl %eax, %eax
movl %eax, %ebx
movq %rbx, %rdi
callq 0x282b0
leaq 0x8(%rsp), %rdi
callq 0x2c2c7
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xb0d7
movq %rbx, %rdi
callq 0x20196
leaq 0xb5dc9(%rip), %rdi     # 0xc0ed0
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x6280
leaq 0x827b8(%rip), %rdi     # 0x8d8d0
leaq 0x827ca(%rip), %rsi     # 0x8d8e9
leaq 0x827d8(%rip), %rcx     # 0x8d8fe
movl $0x5a7, %edx            # imm = 0x5A7
callq 0x6460
leaq 0x8280b(%rip), %rdi     # 0x8d942
leaq 0x827ab(%rip), %rsi     # 0x8d8e9
leaq 0x827b9(%rip), %rcx     # 0x8d8fe
movl $0x5a8, %edx            # imm = 0x5A8
callq 0x6460