// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/rdj-ovlfind-dp.c
// Function: gt_ovlfind_dp
GtContfind gt_ovlfind_dp(const char *u, GtUword m,
                         const char *v, GtUword n,
                         double max_error, GtOvlfindMode mode,
                         GtUword min_length, bool find_submaximal,
                         void (*smpproc)
                           (GtUword /* length on u */,
                            GtUword /* length on v */,
                            GtUword /* unit edit distance */,
                            bool /* true if suffix comes from u,
                                    false if suffix comes from v */,
                            void* /* procdata */),
                         void* smpprocdata)
{
  GtOvlfindDpCell *row, *col;
  GtUword max_edist;
  GtContfind retval = GT_CONTFIND_OFF;
  bool self_comparison;

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

  if (self_comparison)
  {
    max_edist = (GtUword)(max_error * m);
    row = gt_malloc(sizeof (GtOvlfindDpCell) * (m + 1));
    col = gt_malloc(sizeof (GtOvlfindDpCell) * (m + 1));

    run_dp(u, m, u, m, &row, &col);
  }
  else
  {
    max_edist = (GtUword)(max_error * GT_MAX(m,n));
    row = gt_malloc(sizeof (GtOvlfindDpCell) * (n + 1));
    col = gt_malloc(sizeof (GtOvlfindDpCell) * (m + 1));

    run_dp(u, m, v, n, &row, &col);
    /* decomment to show row and col to debug log: */
    /* print_row_and_col(row, m, col, n); */
  }

  if (self_comparison && mode == GT_OVLFIND_ALL)
    retval = GT_CONTFIND_EQ;
  if (mode != GT_OVLFIND_SPM && !self_comparison)
  {
    if (eqlfind_dp(max_edist, row+n))
      retval = GT_CONTFIND_EQ;
    else if (v_contfind_dp(max_edist, m, &col))
      retval = GT_CONTFIND_V;
    else if (u_contfind_dp(max_edist, n, &row))
      retval = GT_CONTFIND_U;
    else
      retval = GT_CONTFIND_NO;
  }
  if (mode == GT_OVLFIND_SPM || mode == GT_OVLFIND_ALL ||
      (mode == GT_OVLFIND_PROPER_SPM && retval == GT_CONTFIND_NO))
  {
    if (self_comparison)
    {
      u_smpfind_dp(min_length, max_edist, find_submaximal, m, m-1, &row,
                   smpproc, smpprocdata);
    }
    else
    {
      u_smpfind_dp(min_length, max_edist, find_submaximal, m, n, &row,
                   smpproc, smpprocdata);
      v_smpfind_dp(min_length, max_edist, find_submaximal, m, n, &col,
                   smpproc, smpprocdata);
    }
  }

  gt_free(row);
  gt_free(col);
  return retval;
}

// Assembly:
subq $0x88, %rsp
movq 0xa0(%rsp), %rax
movq 0x98(%rsp), %rax
movb 0x90(%rsp), %al
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movsd %xmm0, 0x60(%rsp)
movl %r8d, 0x5c(%rsp)
movq %r9, 0x50(%rsp)
andb $0x1, %al
movb %al, 0x4f(%rsp)
movl $0x0, 0x2c(%rsp)
cmpq $0x0, 0x80(%rsp)
jne 0x4de226
movq 0x15ddab(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x37e14(%rip), %rsi     # 0x516013
leaq 0xdc655(%rip), %rdx     # 0x5ba85b
leaq 0xdc8ee(%rip), %rcx     # 0x5baafb
leaq 0xdc8f5(%rip), %r8      # 0x5bab09
movl $0xd0, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4de228
jmp 0x4de22a
cmpq $0x0, 0x78(%rsp)
ja 0x4de26a
movq 0x15dd67(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x37dd0(%rip), %rsi     # 0x516013
leaq 0xab663(%rip), %rdx     # 0x5898ad
leaq 0xdc8aa(%rip), %rcx     # 0x5baafb
leaq 0xdc8b1(%rip), %r8      # 0x5bab09
movl $0xd1, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4de26c
cmpq $0x0, 0x70(%rsp)
sete %al
andb $0x1, %al
movb %al, 0x2b(%rsp)
testb $0x1, 0x2b(%rsp)
jne 0x4de2c2
cmpq $0x0, 0x68(%rsp)
ja 0x4de2c2
movq 0x15dd0f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x37d78(%rip), %rsi     # 0x516013
leaq 0xdc882(%rip), %rdx     # 0x5bab24
leaq 0xdc852(%rip), %rcx     # 0x5baafb
leaq 0xdc859(%rip), %r8      # 0x5bab09
movl $0xd3, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4de2c4
jmp 0x4de2c6
testb $0x1, 0x2b(%rsp)
je 0x4de313
cmpl $0x0, 0x5c(%rsp)
je 0x4de313
cmpl $0x2, 0x5c(%rsp)
je 0x4de313
movq 0x15dcbe(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x37d27(%rip), %rsi     # 0x516013
leaq 0xdc84a(%rip), %rdx     # 0x5bab3d
leaq 0xdc801(%rip), %rcx     # 0x5baafb
leaq 0xdc808(%rip), %r8      # 0x5bab09
movl $0xd5, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4de315
testb $0x1, 0x2b(%rsp)
je 0x4de3f1
movsd 0x60(%rsp), %xmm0
movaps 0x3a603(%rip), %xmm2    # 0x518930
movq 0x78(%rsp), %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x3a601(%rip), %xmm2    # 0x518940
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x3aa07(%rip), %xmm1    # 0x518d70
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
addq $0x1, %rax
imulq $0x18, %rax, %rdi
leaq 0xdc778(%rip), %rsi     # 0x5bab09
movl $0xda, %edx
callq 0xe80f0
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rax
addq $0x1, %rax
imulq $0x18, %rax, %rdi
leaq 0xdc755(%rip), %rsi     # 0x5bab09
movl $0xdb, %edx
callq 0xe80f0
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
leaq 0x40(%rsp), %r8
leaq 0x38(%rsp), %r9
callq 0x4de6d0
jmp 0x4de4ec
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x68(%rsp), %rax
jbe 0x4de415
movq 0x78(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x4de41f
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movsd 0x20(%rsp), %xmm0
movq 0x18(%rsp), %rax
movq %rax, %xmm1
movaps 0x3a4fa(%rip), %xmm2    # 0x518930
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x3a4fe(%rip), %xmm2    # 0x518940
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x3a904(%rip), %xmm1    # 0x518d70
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rsp), %rax
addq $0x1, %rax
imulq $0x18, %rax, %rdi
leaq 0xdc675(%rip), %rsi     # 0x5bab09
movl $0xe2, %edx
callq 0xe80f0
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rax
addq $0x1, %rax
imulq $0x18, %rax, %rdi
leaq 0xdc652(%rip), %rsi     # 0x5bab09
movl $0xe3, %edx
callq 0xe80f0
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
leaq 0x40(%rsp), %r8
leaq 0x38(%rsp), %r9
callq 0x4de6d0
testb $0x1, 0x2b(%rsp)
je 0x4de502
cmpl $0x2, 0x5c(%rsp)
jne 0x4de502
movl $0x2, 0x2c(%rsp)
cmpl $0x0, 0x5c(%rsp)
je 0x4de592
testb $0x1, 0x2b(%rsp)
jne 0x4de592
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
imulq $0x18, 0x68(%rsp), %rax
addq %rax, %rsi
callq 0x4dea30
testb $0x1, %al
jne 0x4de532
jmp 0x4de53c
movl $0x2, 0x2c(%rsp)
jmp 0x4de590
movq 0x30(%rsp), %rdi
movq 0x78(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x4dea80
testb $0x1, %al
jne 0x4de556
jmp 0x4de560
movl $0x4, 0x2c(%rsp)
jmp 0x4de58e
movq 0x30(%rsp), %rdi
movq 0x68(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x4deb00
testb $0x1, %al
jne 0x4de57a
jmp 0x4de584
movl $0x3, 0x2c(%rsp)
jmp 0x4de58c
movl $0x1, 0x2c(%rsp)
jmp 0x4de58e
jmp 0x4de590
jmp 0x4de592
cmpl $0x0, 0x5c(%rsp)
je 0x4de5b6
cmpl $0x2, 0x5c(%rsp)
je 0x4de5b6
cmpl $0x3, 0x5c(%rsp)
jne 0x4de68b
cmpl $0x1, 0x2c(%rsp)
jne 0x4de68b
testb $0x1, 0x2b(%rsp)
je 0x4de607
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
movb 0x4f(%rsp), %dl
movq 0x78(%rsp), %rcx
movq 0x78(%rsp), %r8
subq $0x1, %r8
movq 0x98(%rsp), %r10
movq 0xa0(%rsp), %rax
leaq 0x40(%rsp), %r9
andb $0x1, %dl
movzbl %dl, %edx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4deb80
jmp 0x4de689
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
movb 0x4f(%rsp), %dl
movq 0x78(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0x98(%rsp), %r10
movq 0xa0(%rsp), %rax
leaq 0x40(%rsp), %r9
andb $0x1, %dl
movzbl %dl, %edx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4deb80
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
movb 0x4f(%rsp), %dl
movq 0x78(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0x98(%rsp), %r10
movq 0xa0(%rsp), %rax
leaq 0x38(%rsp), %r9
andb $0x1, %dl
movzbl %dl, %edx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4ded50
jmp 0x4de68b
movq 0x40(%rsp), %rdi
leaq 0xdc472(%rip), %rsi     # 0x5bab09
movl $0x108, %edx            # imm = 0x108
callq 0xe88c0
movq 0x38(%rsp), %rdi
leaq 0xdc45c(%rip), %rsi     # 0x5bab09
movl $0x109, %edx            # imm = 0x109
callq 0xe88c0
movl 0x2c(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)