// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/diagonalbandalign.c
// Function: gt_diagonalbandalignment_in_square_space_generic
GtUword gt_diagonalbandalignment_in_square_space_generic(GtLinspaceManagement
                                                         *space,
                                                         GtAlignment *align,
                                                         const GtUchar *useq,
                                                         GtUword ustart,
                                                         GtUword ulen,
                                                         const GtUchar *vseq,
                                                         GtUword vstart,
                                                         GtUword vlen,
                                                         GtWord left_dist,
                                                         GtWord right_dist,
                                                         const GtScoreHandler
                                                         *scorehandler)
{
  GtUword **EDtabcolumn, distance;

  gt_assert(align && scorehandler);

  if ((left_dist > GT_MIN(0, (GtWord)vlen-(GtWord)ulen))||
      (right_dist < GT_MAX(0, (GtWord)vlen-(GtWord)ulen)))
  {
    gt_assert(false);
  }

  if (space == NULL)
  {
    /*use it in normally case*/
    gt_array2dim_malloc(EDtabcolumn, (ulen+1), (vlen+1));
  }
  else
  {
    /*use it in lineraspace context*/
    EDtabcolumn = gt_linspace_management_change_to_square(space, ulen, vlen);
  }

  diagonalband_fillDPtab_in_square_space(EDtabcolumn, useq, ustart, ulen,
                                         vseq, vstart, vlen,
                                         left_dist, right_dist, scorehandler);

  distance = EDtabcolumn[ulen][vlen];
  /* reconstruct alignment from 2dimarray EDtabcolumn */
  gt_reconstructalignment_from_EDtab(align, EDtabcolumn, useq, ustart, ulen,
                                     vseq, vstart, vlen, scorehandler);

  if (space == NULL)
  {
    gt_array2dim_delete(EDtabcolumn);
  }
  return distance;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq 0xc0(%rsp), %rax
movq 0xb8(%rsp), %rax
movq 0xb0(%rsp), %rax
movq 0xa8(%rsp), %rax
movq 0xa0(%rsp), %rax
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq %r8, 0x68(%rsp)
movq %r9, 0x60(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x14cd5a
cmpq $0x0, 0xc0(%rsp)
jne 0x14cd92
movq 0x4ef23f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3c92a8(%rip), %rsi    # 0x516013
leaq 0x4002e3(%rip), %rdx    # 0x54d055
leaq 0x4002f2(%rip), %rcx    # 0x54d06b
leaq 0x40031c(%rip), %r8     # 0x54d09c
movl $0xa1, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x14cd94
movq 0xb0(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa8(%rsp), %rcx
subq 0x68(%rsp), %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jge 0x14cdbe
xorl %eax, %eax
movq %rax, 0x38(%rsp)
jmp 0x14cdd0
movq 0xa8(%rsp), %rax
subq 0x68(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq %rcx, %rax
jg 0x14ce2a
movq 0xb8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa8(%rsp), %rcx
subq 0x68(%rsp), %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jle 0x14ce09
xorl %eax, %eax
movq %rax, 0x28(%rsp)
jmp 0x14ce1b
movq 0xa8(%rsp), %rax
subq 0x68(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq %rcx, %rax
jge 0x14ce64
jmp 0x14ce2c
movq 0x4ef16d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3c91d6(%rip), %rsi    # 0x516013
leaq 0x40bf1f(%rip), %rdx    # 0x558d63
leaq 0x400220(%rip), %rcx    # 0x54d06b
leaq 0x40024a(%rip), %r8     # 0x54d09c
movl $0xa6, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
cmpq $0x0, 0x88(%rsp)
jne 0x14cf30
movq 0x68(%rsp), %rdi
addq $0x1, %rdi
shlq $0x3, %rdi
leaq 0x400215(%rip), %rsi    # 0x54d09c
movl $0xac, %edx
callq 0xe80f0
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rdi
addq $0x1, %rdi
shlq $0x3, %rdi
movq 0xa8(%rsp), %rax
addq $0x1, %rax
imulq %rax, %rdi
leaq 0x4001e2(%rip), %rsi    # 0x54d09c
movl $0xac, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq $0x1, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq 0x68(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x14cf2e
movq 0x58(%rsp), %rax
movq 0x48(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movq 0xa8(%rsp), %rax
addq $0x1, %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x58(%rsp), %rax
movq 0x48(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0x14ced8
jmp 0x14cf4f
movq 0x88(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0x1a3830
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x60(%rsp), %r8
movq 0xa0(%rsp), %r9
movq 0xa8(%rsp), %rbx
movq 0xb0(%rsp), %r11
movq 0xb8(%rsp), %r10
movq 0xc0(%rsp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x14d060
movq 0x58(%rsp), %rax
movq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xa8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x50(%rsp)
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0x60(%rsp), %r9
movq 0xa0(%rsp), %r11
movq 0xa8(%rsp), %r10
movq 0xc0(%rsp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x1c6820
cmpq $0x0, 0x88(%rsp)
jne 0x14d04d
movq 0x58(%rsp), %rax
movq (%rax), %rdi
leaq 0x40006f(%rip), %rsi    # 0x54d09c
movl $0xbf, %edx
callq 0xe88c0
movq 0x58(%rsp), %rdi
leaq 0x400059(%rip), %rsi    # 0x54d09c
movl $0xbf, %edx
callq 0xe88c0
movq 0x50(%rsp), %rax
addq $0x90, %rsp
popq %rbx
retq
nopl (%rax,%rax)