// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/rdj-ovlfind-bf.c
// Function: gt_ovlfind_bf
GtContfind gt_ovlfind_bf(const char *u, GtUword u_length,
    const char *v, GtUword v_length, GtOvlfindMode m,
    GtUword min_length, bool find_nonmaximal,
    void(*spmproc) (GtUword /* overlap length */,
        bool /* true if suffix of u == prefix of v;
            false if prefix of u == suffix of v */,
        void* /* spmprocdata */), void* spmprocdata)
{
  GtContfind retval = GT_CONTFIND_OFF;
  bool self_comparison;

  gt_assert(u != NULL);
  gt_assert(u_length > 0);
  self_comparison = (v == NULL);
  gt_assert(self_comparison || v_length > 0);
  gt_assert(!self_comparison || m == GT_OVLFIND_SPM || m == GT_OVLFIND_ALL);

  if (self_comparison && m == GT_OVLFIND_ALL)
    retval = GT_CONTFIND_EQ;
  if (m != GT_OVLFIND_SPM && !self_comparison)
  {
    if (u_length == v_length)
      retval = memcmp(u, v, (size_t)u_length) == 0
               ? GT_CONTFIND_EQ : GT_CONTFIND_NO;
    else if (u_length < v_length)
      retval = contfind_bf(u, u_length, v, v_length)
               ? GT_CONTFIND_U : GT_CONTFIND_NO;
    else /* u_length > v_length */
      retval = contfind_bf(v, v_length, u, u_length)
               ? GT_CONTFIND_V : GT_CONTFIND_NO;
    if (m == GT_OVLFIND_PROPER_SPM && retval != GT_CONTFIND_NO)
      return retval;
  }
  if (m != GT_OVLFIND_CNT)
  {
    if (self_comparison)
    {
      spmfind_bf(u, u_length, u, u_length, min_length, find_nonmaximal,
                 self_comparison, spmproc, true, spmprocdata);
    }
    else
    {
      spmfind_bf(u, u_length, v, v_length, min_length, find_nonmaximal,
                 self_comparison, spmproc, true, spmprocdata);
      spmfind_bf(v, v_length, u, u_length, min_length, find_nonmaximal,
                 self_comparison, spmproc, false, spmprocdata);
    }
  }
  return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
testq %rdi, %rdi
je 0x324dd4
movq %rsi, %r12
testq %rsi, %rsi
je 0x324dd9
movq %rdx, %r13
testq %rdx, %rdx
sete %al
cmpq $0x0, 0x10(%rsp)
setne %cl
orb %al, %cl
je 0x324dde
movq %r9, %rbx
movq %rdi, %r14
movq 0x60(%rsp), %rbp
testq %r13, %r13
je 0x324c0d
testl %r8d, %r8d
je 0x324c34
movq %r12, %r15
subq 0x10(%rsp), %r15
movl %r8d, 0xc(%rsp)
jne 0x324c3b
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x17830
xorl %edx, %edx
cmpl $0x1, %eax
adcl $0x1, %edx
jmp 0x324cc0
testl $0xfffffffd, %r8d       # imm = 0xFFFFFFFD
jne 0x324de3
xorl %edx, %edx
cmpl $0x2, %r8d
sete %dl
addl %edx, %edx
cmpl $0x1, %r8d
jne 0x324d7d
jmp 0x324dc3
xorl %edx, %edx
jmp 0x324ce9
jae 0x324c80
movq 0x10(%rsp), %r15
subq %r12, %r15
movl $0x1, %ebp
leaq -0x1(,%rbp), %rsi
addq %r13, %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x17830
testl %eax, %eax
je 0x324c70
leaq 0x1(%rbp), %rcx
cmpq %r15, %rbp
movq %rcx, %rbp
jbe 0x324c4a
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leal 0x1(,%rcx,2), %edx
jmp 0x324cbb
jbe 0x324de8
movl $0x1, %ebp
leaq (%r14,%rbp), %rsi
decq %rsi
movq %r13, %rdi
movq 0x10(%rsp), %rdx
callq 0x17830
testl %eax, %eax
je 0x324caf
leaq 0x1(%rbp), %rcx
cmpq %r15, %rbp
movq %rcx, %rbp
jbe 0x324c8b
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leal (%rcx,%rcx,2), %edx
incl %edx
movq 0x60(%rsp), %rbp
movl 0xc(%rsp), %esi
cmpl $0x3, %esi
sete %al
cmpl $0x1, %edx
setne %cl
andb %al, %cl
cmpl $0x1, %esi
sete %al
orb %cl, %al
jne 0x324dc3
testq %r13, %r13
je 0x324d7d
movq 0x10(%rsp), %r15
cmpq %r15, %r12
cmovbq %r12, %r15
cmpq %rbx, %r15
jb 0x324dc3
movl %edx, 0xc(%rsp)
addq %r14, %r12
movq %r15, %rbp
movq %r12, %rdi
subq %rbp, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x17830
testl %eax, %eax
jne 0x324d35
movq %rbp, %rdi
movl $0x1, %esi
movq 0x60(%rsp), %rdx
callq *0x58(%rsp)
cmpb $0x0, 0x50(%rsp)
je 0x324d3d
decq %rbp
cmpq %rbx, %rbp
jae 0x324d08
addq 0x10(%rsp), %r13
movq 0x60(%rsp), %r12
movq %r13, %rdi
subq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x17830
testl %eax, %eax
jne 0x324d6f
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq *0x58(%rsp)
cmpb $0x0, 0x50(%rsp)
je 0x324d77
decq %r15
cmpq %rbx, %r15
jae 0x324d47
movl 0xc(%rsp), %edx
jmp 0x324dc3
leaq -0x1(%r12), %r15
cmpq %rbx, %r15
jb 0x324dc3
movl %edx, %r13d
addq %r14, %r12
movq %r12, %rdi
subq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x17830
testl %eax, %eax
jne 0x324db8
movq %r15, %rdi
movl $0x1, %esi
movq %rbp, %rdx
callq *0x58(%rsp)
cmpb $0x0, 0x50(%rsp)
je 0x324dc0
decq %r15
cmpq %rbx, %r15
jae 0x324d8d
movl %r13d, %edx
movl %edx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x950da
callq 0x950a3
callq 0x94ffe
callq 0x9506c
callq 0x95035