// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/diagonalbandalign.c
// Function: diagonalband_fillDPtab_in_square_space
static void diagonalband_fillDPtab_in_square_space(GtUword **EDtabcolumn,
                                                   const GtUchar *useq,
                                                   GtUword ustart,
                                                   GtUword ulen,
                                                   const GtUchar *vseq,
                                                   GtUword vstart,
                                                   GtUword vlen,
                                                   GtWord left_dist,
                                                   GtWord right_dist,
                                                   const GtScoreHandler
                                                   *scorehandler)
{
  GtUword i,j, val, low_row, high_row, gapcost;
  gt_assert(EDtabcolumn && scorehandler);

  low_row = 0;
  high_row = -left_dist;
  gapcost = gt_scorehandler_get_gapscore(scorehandler);

  /* first column */
  EDtabcolumn[0][0] = 0;

  for (i = 1; i <= high_row; i++)
  {
      EDtabcolumn[i][0] = add_safe_umax(EDtabcolumn[i-1][0], gapcost);
  }
  for (; i <= ulen; i++)
  {
      EDtabcolumn[i][0] = GT_UWORD_MAX; /* invalid value */
  }

  /* next columns */
  for (j = 1; j <= vlen; j++)
  {
    /* below diagonal band*/
    for (i = 0; i <= low_row; i++)
    {
      if (j <= right_dist)
      {
        EDtabcolumn[i][j] = add_safe_umax(EDtabcolumn[i][j-1], gapcost);
      }
      else{
        EDtabcolumn[i][j] = GT_UWORD_MAX;
      }
    }
    if (j > right_dist)
      low_row ++;
    if (high_row < ulen)
      high_row ++;

    /* diagonaldband */
    for (; i <= high_row; i++)
    {
      EDtabcolumn[i][j] = add_safe_umax(EDtabcolumn[i][j-1], gapcost);

      val = add_safe_umax(EDtabcolumn[i-1][j-1],
                          gt_scorehandler_get_replacement(scorehandler,
                                    useq[ustart+i-1],vseq[vstart+j-1]));
      if (val <= EDtabcolumn[i][j])
      {
        EDtabcolumn[i][j] = val;
      }

      if ((val = add_safe_umax(EDtabcolumn[i-1][j],gapcost))
                                        < EDtabcolumn[i][j])
      {
        EDtabcolumn[i][j] = val;
      }
    }
    /* above diagonal band */
    for (; i <= ulen; i++)
      EDtabcolumn[i][j] = GT_UWORD_MAX;
  }
}

// Assembly:
subq $0x98, %rsp
movq 0xb8(%rsp), %rax
movq 0xb0(%rsp), %rax
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)
cmpq $0x0, 0x90(%rsp)
je 0x14d0c4
cmpq $0x0, 0xb8(%rsp)
jne 0x14d0fc
movq 0x4eeed5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3c8f3e(%rip), %rsi    # 0x516013
leaq 0x400164(%rip), %rdx    # 0x54d240
leaq 0x400179(%rip), %rcx    # 0x54d25c
leaq 0x3fffb2(%rip), %r8     # 0x54d09c
movl $0x30, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x14d0fe
movq $0x0, 0x48(%rsp)
xorl %eax, %eax
subq 0xa8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x1d11d0
movq %rax, 0x38(%rsp)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
movq $0x1, 0x60(%rsp)
movq 0x60(%rsp), %rax
cmpq 0x40(%rsp), %rax
ja 0x14d1c8
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
cmpq $-0x1, (%rax)
je 0x14d18e
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x14d19c
movq $-0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x14d19c
movq 0x30(%rsp), %rcx
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq %rcx, (%rax)
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x14d143
jmp 0x14d1ca
movq 0x60(%rsp), %rax
cmpq 0x78(%rsp), %rax
ja 0x14d1fe
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq $-0x1, (%rax)
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x14d1ca
movq $0x1, 0x58(%rsp)
movq 0x58(%rsp), %rax
cmpq 0xa0(%rsp), %rax
ja 0x14d5ad
movq $0x0, 0x60(%rsp)
movq 0x60(%rsp), %rax
cmpq 0x48(%rsp), %rax
ja 0x14d2ef
movq 0x58(%rsp), %rax
cmpq 0xb0(%rsp), %rax
ja 0x14d2bc
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
subq $0x1, %rcx
cmpq $-0x1, (%rax,%rcx,8)
je 0x14d28d
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x14d29b
movq $-0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x14d29b
movq 0x28(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x14d2da
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
movq $-0x1, (%rax,%rcx,8)
jmp 0x14d2dc
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x14d223
movq 0x58(%rsp), %rax
cmpq 0xb0(%rsp), %rax
jbe 0x14d30c
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x78(%rsp), %rax
jae 0x14d326
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x14d328
movq 0x60(%rsp), %rax
cmpq 0x40(%rsp), %rax
ja 0x14d55c
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
subq $0x1, %rcx
cmpq $-0x1, (%rax,%rcx,8)
je 0x14d383
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x14d391
movq $-0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x14d391
movq 0x20(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
subq $0x1, %rcx
cmpq $-0x1, (%rax,%rcx,8)
je 0x14d451
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0xb8(%rsp), %rdi
movq 0x88(%rsp), %rax
movq 0x80(%rsp), %rcx
addq 0x60(%rsp), %rcx
subq $0x1, %rcx
movb (%rax,%rcx), %dl
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rcx
addq 0x58(%rsp), %rcx
subq $0x1, %rcx
movzbl %dl, %esi
movzbl (%rax,%rcx), %edx
callq 0x1d12c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x14d45f
movq $-0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x14d45f
movq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq 0x90(%rsp), %rcx
movq 0x60(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x58(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
ja 0x14d4a9
movq 0x50(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
je 0x14d4f4
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
movq (%rax,%rcx,8), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x14d502
movq $-0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x14d502
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x90(%rsp), %rcx
movq 0x60(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x58(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
jae 0x14d547
movq 0x50(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x14d549
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x14d328
jmp 0x14d55e
movq 0x60(%rsp), %rax
cmpq 0x78(%rsp), %rax
ja 0x14d598
movq 0x90(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rsp), %rcx
movq $-0x1, (%rax,%rcx,8)
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x14d55e
jmp 0x14d59a
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x14d207
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)