// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/idxlocalisw.c
// Function: swlocalsimilarityregion
static void swlocalsimilarityregion(DPpoint *scol,
                                    DPregion *maxentry,
                                    const Scorevalues *scorevalues,
                                    const GtUchar *useq,
                                    GtUword ulen,
                                    const GtEncseq *vencseq,
                                    GtUword startpos,
                                    GtUword endpos)
{
  Scoretype val;
  DPpoint *scolptr, we, nw;
  const GtUchar *uptr;
  GtUchar vcurrent;
  GtUword j;

  maxentry->similarity = 0;
  maxentry->len1 = 0;
  maxentry->len2 = 0;
  maxentry->start1 = 0;
  maxentry->start2 = 0;
  for (scolptr = scol; scolptr <= scol + ulen; scolptr++)
  {
    scolptr->similarity = 0;
    scolptr->lu = 0;
    scolptr->lv = 0;
  }
  for (j = startpos; j < endpos; j++)
  {
    vcurrent = gt_encseq_get_encoded_char(vencseq,j,
                                                   GT_READMODE_FORWARD);
    gt_assert(vcurrent != (GtUchar) GT_SEPARATOR);
    nw = *scol;
    for (scolptr = scol+1, uptr = useq; uptr < useq + ulen; scolptr++, uptr++)
    {
      gt_assert(*uptr != (GtUchar) GT_SEPARATOR);
      we = *scolptr;
      scolptr->similarity = (scolptr-1)->similarity + scorevalues->gapextend;
      scolptr->lu = (scolptr-1)->lu + 1;
      scolptr->lv = (scolptr-1)->lv;
      if ((val = nw.similarity + REPLACEMENTSCORE(scorevalues,*uptr,vcurrent))
               > scolptr->similarity)
      {
        scolptr->similarity = val;
        scolptr->lu = nw.lu + 1;
        scolptr->lv = nw.lv + 1;
      }
      if ((val = we.similarity + scorevalues->gapextend)
               > scolptr->similarity)
      {
        scolptr->similarity = val;
        scolptr->lu = we.lu;
        scolptr->lv = we.lv + 1;
      }
      if (scolptr->similarity < 0)
      {
        scolptr->similarity = 0;
        scolptr->lu = 0;
        scolptr->lv = 0;
      } else
      {
        if (scolptr->similarity > maxentry->similarity)
        {
          maxentry->similarity = scolptr->similarity;
          maxentry->len1 = scolptr->lu;
          maxentry->len2 = scolptr->lv;
          maxentry->start1 = (GtUword) (uptr - useq) - scolptr->lu + 1;
          maxentry->start2 = (j - startpos) - scolptr->lv + 1;
        }
      }
      nw = we;
    }
  }
}

// Assembly:
subq $0x98, %rsp
movq 0xa8(%rsp), %rax
movq 0xa0(%rsp), %rax
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq %r8, 0x70(%rsp)
movq %r9, 0x68(%rsp)
movq 0x88(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x88(%rsp), %rax
movq $0x0, (%rax)
movq 0x88(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x88(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x88(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x90(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq 0x90(%rsp), %rcx
imulq $0x18, 0x70(%rsp), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x25af2b
movq 0x58(%rsp), %rax
movq $0x0, (%rax)
movq 0x58(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x58(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x58(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x58(%rsp)
jmp 0x25aeda
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x25b2bd
movq 0x68(%rsp), %rdi
movq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0xa9da0
movb %al, 0x1f(%rsp)
movzbl 0x1f(%rsp), %eax
cmpl $0xff, %eax
jne 0x25afa4
movq 0x3e102d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2bb096(%rip), %rsi    # 0x516013
leaq 0x31fb19(%rip), %rdx    # 0x57aa9d
leaq 0x31fb6c(%rip), %rcx    # 0x57aaf7
leaq 0x31faaa(%rip), %r8     # 0x57aa3c
movl $0x8b, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x25afa6
movq 0x90(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x28(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x90(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x58(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x78(%rsp), %rcx
addq 0x70(%rsp), %rcx
cmpq %rcx, %rax
jae 0x25b2a8
jmp 0x25affd
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
jne 0x25b044
movq 0x3e0f8d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2baff6(%rip), %rsi    # 0x516013
leaq 0x31fab3(%rip), %rdx    # 0x57aad7
leaq 0x31facc(%rip), %rcx    # 0x57aaf7
leaq 0x31fa0a(%rip), %r8     # 0x57aa3c
movl $0x8f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x25b046
movq 0x58(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x40(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x48(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq -0x18(%rax), %rcx
movq 0x80(%rsp), %rax
addq 0x18(%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x58(%rsp), %rax
movq -0x10(%rax), %rcx
addq $0x1, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x58(%rsp), %rax
movq -0x8(%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
movzbl 0x1f(%rsp), %ecx
cmpl %ecx, %eax
jne 0x25b0d4
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jl 0x25b0e6
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
jmp 0x25b0f5
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rcx
cmpq (%rcx), %rax
jle 0x25b141
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rcx
addq $0x1, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x38(%rsp), %rcx
addq $0x1, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x40(%rsp), %rax
movq 0x80(%rsp), %rcx
addq 0x18(%rcx), %rax
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rcx
cmpq (%rcx), %rax
jle 0x25b18e
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x48(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rcx
addq $0x1, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x58(%rsp), %rax
cmpq $0x0, (%rax)
jge 0x25b1c4
movq 0x58(%rsp), %rax
movq $0x0, (%rax)
movq 0x58(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x58(%rsp), %rax
movq $0x0, 0x10(%rax)
jmp 0x25b269
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq 0x88(%rsp), %rcx
cmpq 0x20(%rcx), %rax
jle 0x25b267
movq 0x58(%rsp), %rax
movq (%rax), %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x88(%rsp), %rax
movq %rcx, (%rax)
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x20(%rsp), %rcx
movq 0x78(%rsp), %rax
subq %rax, %rcx
movq 0x58(%rsp), %rax
subq 0x8(%rax), %rcx
addq $0x1, %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rcx
subq 0xa0(%rsp), %rcx
movq 0x58(%rsp), %rax
subq 0x10(%rax), %rcx
addq $0x1, %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x25b269
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x58(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x25afe3
jmp 0x25b2aa
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x25af38
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)