// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/diagonalbandalign.c
// Function: firstDBtabcolumn
static void firstDBtabcolumn(GtUword *EDtabcolumn,
                             GtUword *Rtabcolumn,
                             GtDiagAlignentry *Diagcolumn,
                             LinearAlignEdge edge,
                             const GtWord offset,
                             GtWord left_dist,
                             GtWord right_dist,
                             GtUword gapcost)
{
  GtUword rowindex, low_row, high_row;
  GtWord diag;

  diag = GT_DIV2(left_dist + right_dist);
  low_row = 0;
  high_row = -left_dist;

  EDtabcolumn[low_row] = 0;
  if (diag == 0)
  {
    Diagcolumn[0].last_type = edge;
    Diagcolumn[0].lastcpoint = GT_UWORD_MAX;
    Diagcolumn[0].currentrowindex = 0 + offset;
    Rtabcolumn[0] = 0;
  }
  else
  {
    Rtabcolumn[low_row] = GT_UWORD_MAX;
  }

  for (rowindex = low_row+1; rowindex <= high_row; rowindex++)
  {
    EDtabcolumn[rowindex-low_row] = EDtabcolumn[rowindex-low_row-1] + gapcost;

    if (diag == -(GtWord)rowindex)
    {
      Diagcolumn[0].last_type = Linear_D;
      Diagcolumn[0].lastcpoint = GT_UWORD_MAX;
      Diagcolumn[0].currentrowindex = rowindex + offset;
      Rtabcolumn[rowindex-low_row] = 0;
    }
    else
    {
      Rtabcolumn[rowindex-low_row] = Rtabcolumn[rowindex-low_row-1];
    }
  }
}

// Assembly:
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rax
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movl %ecx, -0x1c(%rsp)
movq %r8, -0x28(%rsp)
movq %r9, -0x30(%rsp)
movq -0x30(%rsp), %rax
addq 0x8(%rsp), %rax
sarq %rax
movq %rax, -0x50(%rsp)
movq $0x0, -0x40(%rsp)
xorl %eax, %eax
subq -0x30(%rsp), %rax
movq %rax, -0x48(%rsp)
movq -0x8(%rsp), %rax
movq -0x40(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
cmpq $0x0, -0x50(%rsp)
jne 0x150f20
movl -0x1c(%rsp), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rsp), %rax
movq $-0x1, (%rax)
movq -0x28(%rsp), %rcx
addq $0x0, %rcx
movq -0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0x150f32
movq -0x10(%rsp), %rax
movq -0x40(%rsp), %rcx
movq $-0x1, (%rax,%rcx,8)
movq -0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rsp)
movq -0x38(%rsp), %rax
cmpq -0x48(%rsp), %rax
ja 0x151013
movq -0x8(%rsp), %rax
movq -0x38(%rsp), %rcx
subq -0x40(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
addq 0x10(%rsp), %rdx
movq -0x8(%rsp), %rax
movq -0x38(%rsp), %rcx
subq -0x40(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x50(%rsp), %rax
xorl %ecx, %ecx
subq -0x38(%rsp), %rcx
cmpq %rcx, %rax
jne 0x150fd4
movq -0x18(%rsp), %rax
movl $0x1, 0x10(%rax)
movq -0x18(%rsp), %rax
movq $-0x1, (%rax)
movq -0x38(%rsp), %rcx
addq -0x28(%rsp), %rcx
movq -0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rsp), %rax
movq -0x38(%rsp), %rcx
subq -0x40(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x150ffe
movq -0x10(%rsp), %rax
movq -0x38(%rsp), %rcx
subq -0x40(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rsp), %rax
movq -0x38(%rsp), %rcx
subq -0x40(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x151000
movq -0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rsp)
jmp 0x150f40
retq
nopw %cs:(%rax,%rax)