// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/rdj-ovlfind-kmp.c
// Function: gt_ovlfind_kmp
GtContfind gt_ovlfind_kmp(const char *u, GtUword u_length,
    const gt_kmp_t *u_pi, const char *v, GtUword v_length,
    const gt_kmp_t *v_pi, 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);
  gt_assert(u_pi != NULL);
  self_comparison = (v == NULL);
  gt_assert(self_comparison || v_length > 0);
  gt_assert(self_comparison || v_pi != NULL);
  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_kmp(u, u_length, u_pi, v, v_length)
               ? GT_CONTFIND_U : GT_CONTFIND_NO;
    else /* u_length > v_length */
      retval = contfind_kmp(v, v_length, v_pi, 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_kmp(u, u_length, u, u_length, u_pi, min_length, find_nonmaximal,
                 self_comparison, spmproc, true, spmprocdata);
    }
    else
    {
      spmfind_kmp(u, u_length, v, v_length, v_pi, min_length, find_nonmaximal,
                 self_comparison, spmproc, true, spmprocdata);
      spmfind_kmp(v, v_length, u, u_length, u_pi, 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 $0x28, %rsp
testq %rdi, %rdi
je 0x3282e2
movq %rsi, %r11
testq %rsi, %rsi
je 0x3282e7
movq %rdx, %rbx
testq %rdx, %rdx
je 0x3282ec
movq %r8, %r12
movq %rcx, %rbp
testq %rcx, %rcx
sete %al
testq %r8, %r8
setne %cl
orb %al, %cl
je 0x3282f1
movq %r9, %r15
testq %rbp, %rbp
sete %al
testq %r9, %r9
setne %cl
orb %al, %cl
je 0x3282f6
movq %rdi, %r14
movq 0x68(%rsp), %r10
movl 0x60(%rsp), %r13d
testq %rbp, %rbp
movq %r11, 0x8(%rsp)
je 0x327e9a
testl %r13d, %r13d
je 0x327ec1
cmpq %r12, %r11
jne 0x327ec8
movq %r14, %rdi
movq %rbp, %rsi
movq %r11, %rdx
callq 0x17830
movq 0x8(%rsp), %r11
movq 0x68(%rsp), %r10
xorl %edx, %edx
cmpl $0x1, %eax
adcl $0x1, %edx
jmp 0x327f89
testl $0xfffffffd, %r13d      # imm = 0xFFFFFFFD
jne 0x3282fb
xorl %edx, %edx
cmpl $0x2, %r13d
sete %dl
addl %edx, %edx
cmpl $0x1, %r13d
jne 0x3281d0
jmp 0x3282d1
xorl %edx, %edx
jmp 0x327fb0
jae 0x327f28
movb $0x1, %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %esi, %esi
movb (%rbp,%rcx), %dil
testw %si, %si
je 0x327ef3
movzwl %si, %r8d
cmpb %dil, (%r14,%r8)
je 0x327ef8
addl %eax, %r8d
movzwl (%rbx,%r8,2), %esi
jmp 0x327eda
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpb %dil, (%r14,%r8)
sete %r9b
addl %r9d, %esi
movzwl %si, %edi
cmpq %r11, %rdi
je 0x327f19
incq %rcx
cmpq %r12, %rcx
setb %dl
jne 0x327ed5
movzbl %dl, %eax
andl $0x1, %eax
leal 0x1(,%rax,2), %edx
jmp 0x327f89
jbe 0x328300
movb $0x1, %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %esi, %esi
movb (%r14,%rcx), %dil
testw %si, %si
je 0x327f57
movzwl %si, %r8d
cmpb %dil, (%rbp,%r8)
je 0x327f5c
addl %eax, %r8d
movzwl (%r15,%r8,2), %esi
jmp 0x327f3d
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpb %dil, (%rbp,%r8)
sete %r9b
addl %r9d, %esi
movzwl %si, %edi
cmpq %r12, %rdi
je 0x327f7e
incq %rcx
cmpq %r11, %rcx
setb %dl
jne 0x327f39
movzbl %dl, %eax
andl $0x1, %eax
leal (%rax,%rax,2), %edx
incl %edx
cmpl $0x3, %r13d
sete %al
cmpl $0x1, %edx
setne %cl
andb %al, %cl
cmpl $0x1, %r13d
sete %al
orb %cl, %al
jne 0x3282d1
testq %rbp, %rbp
je 0x3281d0
movl %edx, 0x14(%rsp)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq %r12, %rax
xorl %r12d, %r12d
movq %r11, %rcx
movq %rax, 0x20(%rsp)
subq %rax, %rcx
movl $0x0, %eax
cmovaeq %rcx, %rax
leaq -0x1(%r11), %r8
cmpq %r8, %rax
ja 0x328018
xorl %r12d, %r12d
movb (%r14,%rax), %cl
testw %r12w, %r12w
je 0x327ffe
movzwl %r12w, %edx
cmpb (%rbp,%rdx), %cl
je 0x328003
addl %r13d, %edx
movzwl (%r15,%rdx,2), %r12d
jmp 0x327fe4
xorl %r12d, %r12d
xorl %edx, %edx
xorl %esi, %esi
cmpb (%rbp,%rdx), %cl
sete %sil
addl %esi, %r12d
incq %rax
cmpq %r8, %rax
jbe 0x327fe0
movzwl %r12w, %edi
cmpq %r10, %rdi
movq %r8, 0x18(%rsp)
jb 0x328046
movl $0x1, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x18(%rsp), %r8
movq 0x8(%rsp), %r11
movq 0x68(%rsp), %r10
testw %r12w, %r12w
sete %al
movb 0x70(%rsp), %cl
xorb $0x1, %cl
movb %cl, 0x7(%rsp)
orb %cl, %al
jne 0x3280d5
movzwl %r12w, %ecx
movq %r11, %rax
subq %rcx, %rax
incq %rax
xorl %r12d, %r12d
cmpq %r8, %rax
ja 0x3280a6
movb (%r14,%rax), %cl
testw %r12w, %r12w
je 0x32808f
movzwl %r12w, %edx
cmpb (%rbp,%rdx), %cl
je 0x328094
addl %r13d, %edx
movzwl (%r15,%rdx,2), %r12d
jmp 0x328075
xorl %r12d, %r12d
xorl %edx, %edx
xorl %esi, %esi
cmpb (%rbp,%rdx), %cl
sete %sil
addl %esi, %r12d
incq %rax
jmp 0x32806c
movzwl %r12w, %edi
cmpq %r10, %rdi
jb 0x3280cf
movl $0x1, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x18(%rsp), %r8
movq 0x8(%rsp), %r11
movq 0x68(%rsp), %r10
testw %r12w, %r12w
jne 0x32805c
xorl %r12d, %r12d
movq 0x20(%rsp), %rdx
movq %rdx, %rcx
subq %r11, %rcx
movl $0x0, %eax
cmovaeq %rcx, %rax
leaq -0x1(%rdx), %r15
cmpq %r15, %rax
ja 0x328130
xorl %r12d, %r12d
movb (%rbp,%rax), %cl
testw %r12w, %r12w
je 0x328116
movzwl %r12w, %edx
cmpb (%r14,%rdx), %cl
je 0x32811b
addl %r13d, %edx
movzwl (%rbx,%rdx,2), %r12d
jmp 0x3280fc
xorl %r12d, %r12d
xorl %edx, %edx
xorl %esi, %esi
cmpb (%r14,%rdx), %cl
sete %sil
addl %esi, %r12d
incq %rax
cmpq %r15, %rax
jbe 0x3280f8
movzwl %r12w, %edi
cmpq %r10, %rdi
jb 0x32814c
xorl %esi, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x68(%rsp), %r10
testw %r12w, %r12w
sete %al
orb 0x7(%rsp), %al
jne 0x3281c7
movzwl %r12w, %ecx
movq 0x20(%rsp), %rax
subq %rcx, %rax
incq %rax
xorl %r12d, %r12d
cmpq %r15, %rax
ja 0x3281a5
movb (%rbp,%rax), %cl
testw %r12w, %r12w
je 0x32818e
movzwl %r12w, %edx
cmpb (%r14,%rdx), %cl
je 0x328193
addl %r13d, %edx
movzwl (%rbx,%rdx,2), %r12d
jmp 0x328174
xorl %r12d, %r12d
xorl %edx, %edx
xorl %esi, %esi
cmpb (%r14,%rdx), %cl
sete %sil
addl %esi, %r12d
incq %rax
jmp 0x32816b
movzwl %r12w, %edi
cmpq %r10, %rdi
jb 0x3281c1
xorl %esi, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x68(%rsp), %r10
testw %r12w, %r12w
jne 0x328159
movl 0x14(%rsp), %edx
jmp 0x3282d1
movl %edx, %ebp
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq %r11, %r13
decq %r13
je 0x328222
movl $0x1, %eax
xorl %r12d, %r12d
movb (%r14,%rax), %cl
testw %r12w, %r12w
je 0x328206
movzwl %r12w, %edx
cmpb (%r14,%rdx), %cl
je 0x32820b
addl %r15d, %edx
movzwl (%rbx,%rdx,2), %r12d
jmp 0x3281ec
xorl %r12d, %r12d
xorl %edx, %edx
xorl %esi, %esi
cmpb (%r14,%rdx), %cl
sete %sil
addl %esi, %r12d
incq %rax
cmpq %r11, %rax
jne 0x3281e8
jmp 0x328225
xorl %r12d, %r12d
movzwl %r12w, %edi
cmpq %r10, %rdi
jb 0x328249
movl $0x1, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x8(%rsp), %r11
movq 0x68(%rsp), %r10
testw %r12w, %r12w
sete %al
movb 0x70(%rsp), %cl
xorb $0x1, %cl
orb %al, %cl
jne 0x3282cf
movzwl %r12w, %ecx
movq %r11, %rax
subq %rcx, %rax
incq %rax
xorl %r12d, %r12d
cmpq %r13, %rax
ja 0x3282a5
movb (%r14,%rax), %cl
testw %r12w, %r12w
je 0x32828e
movzwl %r12w, %edx
cmpb (%r14,%rdx), %cl
je 0x328293
addl %r15d, %edx
movzwl (%rbx,%rdx,2), %r12d
jmp 0x328274
xorl %r12d, %r12d
xorl %edx, %edx
xorl %esi, %esi
cmpb (%r14,%rdx), %cl
sete %sil
addl %esi, %r12d
incq %rax
jmp 0x32826b
movzwl %r12w, %edi
cmpq %r10, %rdi
jb 0x3282c9
movl $0x1, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x8(%rsp), %r11
movq 0x68(%rsp), %r10
testw %r12w, %r12w
jne 0x32825b
movl %ebp, %edx
movl %edx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x95456
callq 0x9541f
callq 0x953e8
callq 0x9530c
callq 0x95343
callq 0x953b1
callq 0x9537a