// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/jkOwnLib/fuzzyFind.c
// Function: bestMerger
boolean bestMerger(struct protoGene *list, enum ffStringency stringency,
    DNA *ns, DNA *hs, struct protoGene **retA, struct protoGene **retB)
/* Figure out best scoring merger in list. */
{
int bestScore = -0x7fffffff;
int score;
struct protoGene *bestA = NULL, *bestB = NULL;
struct protoGene *a, *b;
boolean isCdna = (stringency == ffCdna);

if (list == NULL)
    return FALSE;

for (a = list; a != NULL; a = a->right)
    {
    for (b = a->right; b != NULL; b = b->right)
        {
        if (canAdd(a,b))
            {
            int hGap = b->hStart - a->hEnd;
            int nGap = b->nStart - a->nEnd;
            if (hGap < 0)
                {
                hGap = -8*hGap;
                if (!isCdna || hGap < 32)
                    hGap = (hGap*hGap);
                }
            if (nGap < 0)
                nGap = -8*nGap;
            score = -hGap - nGap*nGap;
            if (score > bestScore)
                {
                bestA = a;
                bestB = b;
                bestScore = score;
                }
            }
        }
    }
*retA = bestA;
*retB = bestB;
return bestA != NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x80000001, -0x3c(%rbp) # imm = 0x80000001
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
cmpl $0x1, -0x14(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x64(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa138
movl $0x0, -0x4(%rbp)
jmp 0xa259
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0xa233
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0xa220
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x9f10
cmpl $0x0, %eax
je 0xa20d
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x58(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x58(%rbp), %rcx
movq 0x30(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x68(%rbp)
jge 0xa1cc
imull $0xfffffff8, -0x68(%rbp), %eax # imm = 0xFFFFFFF8
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x64(%rbp)
je 0xa1c0
cmpl $0x20, -0x68(%rbp)
jge 0xa1ca
movl -0x68(%rbp), %eax
imull -0x68(%rbp), %eax
movl %eax, -0x68(%rbp)
jmp 0xa1cc
cmpl $0x0, -0x6c(%rbp)
jge 0xa1dc
imull $0xfffffff8, -0x6c(%rbp), %eax # imm = 0xFFFFFFF8
movl %eax, -0x6c(%rbp)
xorl %eax, %eax
subl -0x68(%rbp), %eax
movl -0x6c(%rbp), %ecx
imull -0x6c(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jle 0xa20b
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0xa20d
jmp 0xa20f
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0xa157
jmp 0xa222
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0xa140
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x48(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)