// File: /workspace/github_c_makefile_star2_O1/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 0x332d0e
movq %r9, %rbp
movq %rsi, %r9
testq %rsi, %rsi
je 0x332d13
movq %rdx, %rbx
testq %rdx, %rdx
je 0x332d18
movq %rcx, %r13
testq %rcx, %rcx
sete %al
testq %r8, %r8
setne %cl
orb %al, %cl
je 0x332d1d
testq %r13, %r13
sete %al
testq %rbp, %rbp
setne %cl
orb %al, %cl
je 0x332d22
movq %rdi, %r14
movl 0x60(%rsp), %r12d
testq %r13, %r13
jne 0x332862
testl $0xfffffffd, %r12d      # imm = 0xFFFFFFFD
jne 0x332d27
cmpl $0x2, %r12d
sete %al
testq %r13, %r13
sete %cl
testl %r12d, %r12d
sete %dl
orb %cl, %dl
movq %r9, 0x8(%rsp)
movq %r8, 0x10(%rsp)
je 0x332adf
andb %al, %cl
movzbl %cl, %r15d
addl %r15d, %r15d
cmpl $0x1, %r12d
je 0x332cfc
movq 0x68(%rsp), %r10
testq %r13, %r13
je 0x332b75
movl %r15d, 0x1c(%rsp)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movq %r9, %rcx
subq %r8, %rcx
movl $0x0, %eax
cmovaeq %rcx, %rax
leaq -0x1(%r9), %r11
cmpq %r11, %rax
ja 0x33290f
xorl %r15d, %r15d
movzwl %r15w, %ecx
testw %cx, %cx
je 0x3328f5
movb (%r14,%rax), %dl
cmpb (%r13,%rcx), %dl
je 0x3328f5
addl %r12d, %ecx
movzwl (%rbp,%rcx,2), %ecx
movl %ecx, %r15d
testq %rcx, %rcx
jne 0x3328de
movb (%r14,%rax), %dl
xorl %esi, %esi
cmpb (%r13,%rcx), %dl
sete %sil
addl %esi, %r15d
incq %rax
cmpq %r11, %rax
jbe 0x3328d1
movzwl %r15w, %edi
cmpq %r10, %rdi
movq %r11, 0x20(%rsp)
jb 0x332942
movl $0x1, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x20(%rsp), %r11
movq 0x68(%rsp), %r10
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
testw %r15w, %r15w
sete %al
movb 0x70(%rsp), %cl
xorb $0x1, %cl
movb %cl, 0x7(%rsp)
orb %cl, %al
jne 0x3329e4
movzwl %r15w, %ecx
movq %r9, %rax
subq %rcx, %rax
incq %rax
xorl %r15d, %r15d
cmpq %r11, %rax
ja 0x3329ac
movzwl %r15w, %ecx
testw %cx, %cx
je 0x332995
movb (%r14,%rax), %dl
cmpb (%r13,%rcx), %dl
je 0x332995
addl %r12d, %ecx
movzwl (%rbp,%rcx,2), %ecx
movl %ecx, %r15d
testq %rcx, %rcx
jne 0x33297e
movb (%r14,%rax), %dl
xorl %esi, %esi
cmpb (%r13,%rcx), %dl
sete %sil
addl %esi, %r15d
incq %rax
jmp 0x33296c
movzwl %r15w, %edi
cmpq %r10, %rdi
jb 0x3329da
movl $0x1, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x20(%rsp), %r11
movq 0x68(%rsp), %r10
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
testw %r15w, %r15w
jne 0x33295c
xorl %ebp, %ebp
movq %r8, %rcx
subq %r9, %rcx
movl $0x0, %eax
cmovaeq %rcx, %rax
leaq -0x1(%r8), %r15
cmpq %r15, %rax
ja 0x332a3a
xorl %ebp, %ebp
movzwl %bp, %ecx
testw %cx, %cx
je 0x332a21
movb (%r13,%rax), %dl
cmpb (%r14,%rcx), %dl
je 0x332a21
addl %r12d, %ecx
movzwl (%rbx,%rcx,2), %ecx
movl %ecx, %ebp
testq %rcx, %rcx
jne 0x332a0d
movb (%r13,%rax), %dl
xorl %esi, %esi
cmpb (%r14,%rcx), %dl
sete %sil
addl %esi, %ebp
incq %rax
cmpq %r15, %rax
jbe 0x332a00
movzwl %bp, %edi
cmpq %r10, %rdi
jb 0x332a5a
xorl %esi, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x68(%rsp), %r10
movq 0x10(%rsp), %r8
testw %bp, %bp
sete %al
orb 0x7(%rsp), %al
jne 0x332ad5
movzwl %bp, %ecx
movq %r8, %rax
subq %rcx, %rax
incq %rax
xorl %ebp, %ebp
cmpq %r15, %rax
ja 0x332ab0
movzwl %bp, %ecx
testw %cx, %cx
je 0x332a9a
movb (%r13,%rax), %dl
cmpb (%r14,%rcx), %dl
je 0x332a9a
addl %r12d, %ecx
movzwl (%rbx,%rcx,2), %ecx
movl %ecx, %ebp
testq %rcx, %rcx
jne 0x332a86
movb (%r13,%rax), %dl
xorl %esi, %esi
cmpb (%r14,%rcx), %dl
sete %sil
addl %esi, %ebp
incq %rax
jmp 0x332a74
movzwl %bp, %edi
cmpq %r10, %rdi
jb 0x332ad0
xorl %esi, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x68(%rsp), %r10
movq 0x10(%rsp), %r8
testw %bp, %bp
jne 0x332a66
movl 0x1c(%rsp), %r15d
jmp 0x332cfc
cmpq %r8, %r9
jne 0x332b0b
movq %r14, %rdi
movq %r13, %rsi
movq %r9, %rdx
callq 0x17830
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
xorl %r15d, %r15d
cmpl $0x1, %eax
adcl $0x1, %r15d
jmp 0x332c3d
jae 0x332bd8
movb $0x1, %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %esi, %esi
movzwl %si, %edi
testw %di, %di
je 0x332b3c
movb (%r13,%rcx), %r10b
cmpb %r10b, (%r14,%rdi)
je 0x332b3c
addl %eax, %edi
movzwl (%rbx,%rdi,2), %edi
movl %edi, %esi
testq %rdi, %rdi
jne 0x332b29
movb (%r14,%rdi), %dil
xorl %r10d, %r10d
cmpb (%r13,%rcx), %dil
sete %r10b
addl %r10d, %esi
movzwl %si, %edi
cmpq %r9, %rdi
je 0x332b62
incq %rcx
cmpq %r8, %rcx
setb %dl
jne 0x332b1c
movzbl %dl, %eax
andl $0x1, %eax
leal 0x1(,%rax,2), %r15d
jmp 0x332c3d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %r9, %r13
decq %r13
je 0x332c56
cmpq $0x3, %r9
movl $0x2, %eax
cmovaeq %r9, %rax
movl $0x1, %ecx
xorl %ebp, %ebp
movzwl %bp, %edx
testw %dx, %dx
je 0x332bbb
movb (%r14,%rcx), %sil
cmpb (%r14,%rdx), %sil
je 0x332bbb
addl %r12d, %edx
movzwl (%rbx,%rdx,2), %edx
movl %edx, %ebp
testq %rdx, %rdx
jne 0x332ba7
movb (%r14,%rcx), %sil
xorl %edi, %edi
cmpb (%r14,%rdx), %sil
sete %dil
addl %edi, %ebp
incq %rcx
cmpq %rax, %rcx
jne 0x332b9b
jmp 0x332c58
jbe 0x332d2c
movb $0x1, %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %esi, %esi
movzwl %si, %edi
testw %di, %di
je 0x332c0a
movb (%r14,%rcx), %r10b
cmpb %r10b, (%r13,%rdi)
je 0x332c0a
addl %eax, %edi
movzwl (%rbp,%rdi,2), %edi
movl %edi, %esi
testq %rdi, %rdi
jne 0x332bf5
movb (%r13,%rdi), %dil
xorl %r10d, %r10d
cmpb (%r14,%rcx), %dil
sete %r10b
addl %r10d, %esi
movzwl %si, %edi
cmpq %r8, %rdi
je 0x332c30
incq %rcx
cmpq %r9, %rcx
setb %dl
jne 0x332be9
movzbl %dl, %eax
andl $0x1, %eax
leal (%rax,%rax,2), %r15d
incl %r15d
cmpl $0x3, %r12d
jne 0x332890
cmpl $0x1, %r15d
jne 0x332cfc
jmp 0x332890
xorl %ebp, %ebp
movzwl %bp, %edi
cmpq %r10, %rdi
jb 0x332c7b
movl $0x1, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x68(%rsp), %r10
movq 0x8(%rsp), %r9
testw %bp, %bp
sete %al
movb 0x70(%rsp), %cl
xorb $0x1, %cl
orb %al, %cl
jne 0x332cfc
movzwl %bp, %ecx
movq %r9, %rax
subq %rcx, %rax
incq %rax
xorl %ebp, %ebp
cmpq %r13, %rax
ja 0x332cd4
movzwl %bp, %ecx
testw %cx, %cx
je 0x332cbf
movb (%r14,%rax), %dl
cmpb (%r14,%rcx), %dl
je 0x332cbf
addl %r12d, %ecx
movzwl (%rbx,%rcx,2), %ecx
movl %ecx, %ebp
testq %rcx, %rcx
jne 0x332cab
movb (%r14,%rax), %dl
xorl %esi, %esi
cmpb (%r14,%rcx), %dl
sete %sil
addl %esi, %ebp
incq %rax
jmp 0x332c9a
movzwl %bp, %edi
cmpq %r10, %rdi
jb 0x332cf7
movl $0x1, %esi
movq 0x80(%rsp), %rdx
callq *0x78(%rsp)
movq 0x68(%rsp), %r10
movq 0x8(%rsp), %r9
testw %bp, %bp
jne 0x332c8c
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x9744d
callq 0x97416
callq 0x973df
callq 0x97303
callq 0x9733a
callq 0x973a8
callq 0x97371