// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/jkOwnLib/fuzzyFind.c
// Function: canAdd
boolean canAdd(struct protoGene *a, struct protoGene *b)
/* Can b fit into a?  It can if it doesn't overlap
 * by more than 1/4 with what's already there. */
{
struct ffAli *pa;
DNA *bnEnd = b->nEnd;
DNA *bnStart = b->nStart;
DNA *bhEnd = b->hEnd;
DNA *bhStart = b->hStart;
int bSize = bnEnd - bnStart;
int maxOverlap;
for (pa = a->hits; pa != NULL; pa = pa->right)
    {
    int aSize = pa->nEnd - pa->nStart;
    DNA *start = (bnStart > pa->nStart ? bnStart : pa->nStart);
    DNA *end = (bnEnd < pa->nEnd ? bnEnd : pa->nEnd);
    maxOverlap = (aSize < bSize ? aSize : bSize) / 4;
    if (maxOverlap < 2) maxOverlap = 2;
    if (end - start >= maxOverlap)
       return FALSE;
    start = (bhStart > pa->hStart ? bhStart : pa->hStart);
    end = (bhEnd < pa->hEnd ? bhEnd : pa->hEnd);
    if (end - start >= maxOverlap)
        return FALSE;
    }
return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xa0c2
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x4c(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x9fa0
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x9fac
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x9fcc
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x9fd8
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x9ff0
movl -0x4c(%rbp), %eax
movl %eax, -0x74(%rbp)
jmp 0x9ff6
movl -0x44(%rbp), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, -0x48(%rbp)
cmpl $0x2, -0x48(%rbp)
jge 0xa011
movl $0x2, -0x48(%rbp)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rcx, %rax
movslq -0x48(%rbp), %rcx
cmpq %rcx, %rax
jl 0xa031
movl $0x0, -0x4(%rbp)
jmp 0xa0c9
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jbe 0xa049
movq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0xa055
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jae 0xa078
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0xa087
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rcx, %rax
movslq -0x48(%rbp), %rcx
cmpq %rcx, %rax
jl 0xa0af
movl $0x0, -0x4(%rbp)
jmp 0xa0c9
jmp 0xa0b1
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x9f67
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x8, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)