// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
testq %rdi, %rdi
je 0x2c669c
movq %rsi, %r14
testq %rsi, %rsi
je 0x2c66c6
movq %rcx, %r12
movq %rdx, %r13
testq %rdx, %rdx
sete %al
testq %rcx, %rcx
setne %cl
orb %al, %cl
je 0x2c66f0
movq %r9, %r11
movl %r8d, %ebp
movq %rdi, %r15
testq %r13, %r13
jne 0x2c6568
testl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
jne 0x2c6726
cmpl $0x2, %ebp
sete %al
testq %r13, %r13
sete %cl
testl %ebp, %ebp
sete %dl
orb %cl, %dl
je 0x2c65ed
andb %al, %cl
movzbl %cl, %ebx
addl %ebx, %ebx
cmpl $0x1, %ebp
je 0x2c668b
movq 0x50(%rsp), %r10
movb 0x40(%rsp), %al
testq %r13, %r13
je 0x2c662d
movzbl %al, %ebp
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r11, %r8
movl %ebp, %r9d
pushq %r10
pushq $0x1
pushq 0x58(%rsp)
pushq $0x0
movq %r11, 0x20(%rsp)
callq 0x2c67d1
addq $0x20, %rsp
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq (%rsp), %r8
movl %ebp, %r9d
pushq 0x50(%rsp)
pushq $0x0
pushq 0x58(%rsp)
pushq $0x0
jmp 0x2c6651
cmpq %r12, %r14
movq %r11, (%rsp)
jne 0x2c660e
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x177e0
xorl %ebx, %ebx
cmpl $0x1, %eax
adcl $0x1, %ebx
jmp 0x2c6675
jae 0x2c665c
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x2c6750
movzbl %al, %eax
leal 0x1(,%rax,2), %ebx
jmp 0x2c6675
movq %r10, %r12
pushq $0x1
popq %r10
movzbl %al, %r9d
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r11, %r8
pushq %r12
pushq %r10
pushq 0x58(%rsp)
pushq %r10
callq 0x2c67d1
addq $0x20, %rsp
jmp 0x2c668b
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2c6750
movzbl %al, %eax
leal (%rax,%rax,2), %ebx
incl %ebx
cmpl $0x3, %ebp
movq (%rsp), %r11
jne 0x2c6584
cmpl $0x1, %ebx
je 0x2c6584
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1718c5(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1e966(%rip), %rsi     # 0x2e5013
leaq 0xbec28(%rip), %rdx     # 0x3852dc
leaq 0xbec2b(%rip), %rcx     # 0x3852e6
leaq 0xbec32(%rip), %r8      # 0x3852f4
pushq $0x42
jmp 0x2c6718
movq 0x17189b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1e93c(%rip), %rsi     # 0x2e5013
leaq 0xbec31(%rip), %rdx     # 0x38530f
leaq 0xbec01(%rip), %rcx     # 0x3852e6
leaq 0xbec08(%rip), %r8      # 0x3852f4
pushq $0x43
jmp 0x2c6718
movq 0x171871(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1e912(%rip), %rsi     # 0x2e5013
leaq 0xbec14(%rip), %rdx     # 0x38531c
leaq 0xbebd7(%rip), %rcx     # 0x3852e6
leaq 0xbebde(%rip), %r8      # 0x3852f4
pushq $0x45
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x17183b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1e8dc(%rip), %rsi     # 0x2e5013
leaq 0xbebfe(%rip), %rdx     # 0x38533c
leaq 0xbeba1(%rip), %rcx     # 0x3852e6
leaq 0xbeba8(%rip), %r8      # 0x3852f4
pushq $0x46
jmp 0x2c6718