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

  eptr = edges;
  *eptr = 0;
  for (*scol = 0, scolptr = scol+1, uptr = useq, eptr++; uptr < useq + ulen;
       scolptr++, uptr++, eptr++)
  {
    *scolptr = *(scolptr-1) + scorevalues->gapextend;
    *eptr = DELETIONBIT;
  }
  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;
    *scol = nw + scorevalues->gapextend;
    *eptr = INSERTIONBIT;
    for (scolptr = scol+1, uptr = useq, eptr++; uptr < useq + ulen;
         scolptr++, uptr++, eptr++)
    {
      gt_assert(*uptr != (GtUchar) GT_SEPARATOR);
      we = *scolptr;
      *scolptr = *(scolptr-1) + scorevalues->gapextend;
      *eptr = DELETIONBIT;
      if ((val = nw + REPLACEMENTSCORE(scorevalues,*uptr,vcurrent))
               >= *scolptr)
      {
        if (val == *scolptr)
        {
          *eptr = *eptr | REPLACEMENTBIT;
        } else
        {
          *eptr = REPLACEMENTBIT;
        }
        *scolptr = val;
      }
      if ((val = we + scorevalues->gapextend) >= *scolptr)
      {
        if (val == *scolptr)
        {
          *eptr = *eptr | INSERTIONBIT;
        } else
        {
          *eptr = INSERTIONBIT;
        }
        *scolptr = val;
      }
      nw = we;
    }
  }
}

// Assembly:
subq $0x88, %rsp
movq 0x98(%rsp), %rax
movq 0x90(%rsp), %rax
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movq %r9, 0x58(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movq 0x78(%rsp), %rax
movq $0x0, (%rax)
movq 0x78(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq 0x68(%rsp), %rcx
addq 0x60(%rsp), %rcx
cmpq %rcx, %rax
jae 0x25b4f1
movq 0x38(%rsp), %rax
movq -0x8(%rax), %rcx
movq 0x70(%rsp), %rax
addq 0x18(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movb $0x2, (%rax)
movq 0x38(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x25b48f
movq 0x90(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x98(%rsp), %rax
jae 0x25b791
movq 0x58(%rsp), %rdi
movq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0xa9da0
movb %al, 0x2f(%rsp)
movzbl 0x2f(%rsp), %eax
cmpl $0xff, %eax
jne 0x25b56a
movq 0x3e0a67(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2baad0(%rip), %rsi    # 0x516013
leaq 0x31f553(%rip), %rdx    # 0x57aa9d
leaq 0x31f5be(%rip), %rcx    # 0x57ab0f
leaq 0x31f4e4(%rip), %r8     # 0x57aa3c
movl $0xd2, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x25b56c
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rcx
movq 0x70(%rsp), %rax
addq 0x18(%rax), %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movb $0x4, (%rax)
movq 0x78(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq 0x68(%rsp), %rcx
addq 0x60(%rsp), %rcx
cmpq %rcx, %rax
jae 0x25b77c
jmp 0x25b5d7
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
jne 0x25b61e
movq 0x3e09b3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2baa1c(%rip), %rsi    # 0x516013
leaq 0x31f4d9(%rip), %rdx    # 0x57aad7
leaq 0x31f50a(%rip), %rcx    # 0x57ab0f
leaq 0x31f430(%rip), %r8     # 0x57aa3c
movl $0xd9, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x25b620
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x38(%rsp), %rax
movq -0x8(%rax), %rcx
movq 0x70(%rsp), %rax
addq 0x18(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movb $0x2, (%rax)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
movzbl 0x2f(%rsp), %ecx
cmpl %ecx, %eax
jne 0x25b679
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jl 0x25b689
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x25b696
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x38(%rsp), %rcx
cmpq (%rcx), %rax
jl 0x25b6ec
movq 0x50(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq (%rcx), %rax
jne 0x25b6d7
movq 0x18(%rsp), %rax
movzbl (%rax), %eax
orl $0x1, %eax
movb %al, %cl
movq 0x18(%rsp), %rax
movb %cl, (%rax)
jmp 0x25b6df
movq 0x18(%rsp), %rax
movb $0x1, (%rax)
movq 0x50(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x48(%rsp), %rax
movq 0x70(%rsp), %rcx
addq 0x18(%rcx), %rax
movq %rax, 0x50(%rsp)
movq 0x38(%rsp), %rcx
cmpq (%rcx), %rax
jl 0x25b743
movq 0x50(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq (%rcx), %rax
jne 0x25b72e
movq 0x18(%rsp), %rax
movzbl (%rax), %eax
orl $0x4, %eax
movb %al, %cl
movq 0x18(%rsp), %rax
movb %cl, (%rax)
jmp 0x25b736
movq 0x18(%rsp), %rax
movb $0x4, (%rax)
movq 0x50(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x48(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x25b5bd
jmp 0x25b77e
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x25b4fe
addq $0x88, %rsp
retq
nopl (%rax)