// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0xc9350
cmpq $0x0, 0x80(%rsp)
je 0xc9350
movq %r8, %r15
movq %rdx, %rbx
movq 0x68(%rsp), %r14
movq %r14, %r10
subq %r8, %r10
movq %r10, %rdx
sarq $0x3f, %rdx
andq %r10, %rdx
xorl %eax, %eax
testq %r10, %r10
cmovgq %r10, %rax
cmpq 0x70(%rsp), %rdx
jl 0xc937e
cmpq 0x78(%rsp), %rax
jg 0xc937e
movq %rsi, 0x20(%rsp)
testq %rdi, %rdi
movq %rdi, 0x18(%rsp)
je 0xc921c
movq %r15, %rsi
movq %r14, %rdx
movq %r9, %rbp
movq %rcx, %r13
callq 0xf99eb
movq %rax, %r12
jmp 0xc929c
movq %rcx, 0x8(%rsp)
movq %r9, 0x10(%rsp)
leaq 0x1(%r15), %rbp
movq %rbx, (%rsp)
leaq 0x8(,%r15,8), %r13
leaq 0x251d2e(%rip), %rsi    # 0x31af6b
movq %r13, %rdi
movl $0xac, %edx
callq 0x93160
movq %rax, %r12
incq %r14
imulq %r14, %r13
movq %r13, %rdi
movq (%rsp), %rbx
leaq 0x251d09(%rip), %rsi    # 0x31af6b
movl $0xac, %edx
callq 0x93160
movq %rax, (%r12)
pushq $0x1
popq %rax
shlq $0x3, %r14
cmpq %rbp, %rax
jae 0xc928d
movq -0x8(%r12,%rax,8), %rcx
addq %r14, %rcx
movq %rcx, (%r12,%rax,8)
incq %rax
jmp 0xc9277
movq 0x10(%rsp), %rbp
movq 0x8(%rsp), %r13
movq 0x68(%rsp), %r14
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %rbp, %r8
movq 0x60(%rsp), %r9
movq 0x80(%rsp), %rax
pushq %rax
pushq 0x80(%rsp)
pushq 0x80(%rsp)
pushq %r14
callq 0xc93b6
addq $0x20, %rsp
movq (%r12,%r15,8), %rax
movq %rbx, %rdx
movq (%rax,%r14,8), %rbx
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rcx
movq %r15, %r8
movq %rbp, %r9
pushq 0x88(%rsp)
pushq %r14
pushq 0x78(%rsp)
callq 0x10ed2a
addq $0x20, %rsp
cmpq $0x0, 0x18(%rsp)
jne 0xc933e
movq (%r12), %rdi
movq %rbx, %r14
leaq 0x251c4d(%rip), %rbx    # 0x31af6b
movq %rbx, %rsi
movl $0xbf, %edx
callq 0x936f9
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rbx
movl $0xbf, %edx
callq 0x936f9
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x36ec11(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x21bcb2(%rip), %rsi    # 0x2e5013
leaq 0x251bbc(%rip), %rdx    # 0x31af24
leaq 0x251bcb(%rip), %rcx    # 0x31af3a
leaq 0x251bf5(%rip), %r8     # 0x31af6b
movl $0xa1, %r9d
jmp 0xc93aa
movq 0x36ebe3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x21bc84(%rip), %rsi    # 0x2e5013
leaq 0x25d656(%rip), %rdx    # 0x3269ec
leaq 0x251b9d(%rip), %rcx    # 0x31af3a
leaq 0x251bc7(%rip), %r8     # 0x31af6b
movl $0xa6, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390