// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/diagonalbandalign_affinegapcost.c
// Function: gt_diagonalbandalign_affinegapcost_square_space_distance_only
GtWord gt_diagonalbandalign_affinegapcost_square_space_distance_only(
                                                           const GtUchar *useq,
                                                           GtUword ustart,
                                                           GtUword ulen,
                                                           const GtUchar *vseq,
                                                           GtUword vstart,
                                                           GtUword vlen,
                                                           GtWord left_dist,
                                                           GtWord right_dist,
                                                           const GtScoreHandler
                                                           *scorehandler)
{
  GtUword  distance;
  GtAffinealignDPentry **Atabcolumn;
  gt_assert(scorehandler);

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

  gt_array2dim_malloc(Atabcolumn, (ulen+1), (vlen+1));
  diagonalband_fillDPtab_affine(Atabcolumn, useq, ustart, ulen, vseq, vstart,
                                vlen, left_dist, right_dist,
                                Affine_X, Affine_X, scorehandler);

  distance = GT_MIN3(Atabcolumn[ulen][vlen].Rvalue,
                  Atabcolumn[ulen][vlen].Dvalue,
                  Atabcolumn[ulen][vlen].Ivalue);

  gt_array2dim_delete(Atabcolumn);
  return distance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, 0x60(%rsp)
je 0xcb75d
movq %r9, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %r9, %rsi
subq %rdx, %rsi
movq %rsi, %rdx
sarq $0x3f, %rdx
andq %rsi, %rdx
xorl %eax, %eax
testq %rsi, %rsi
cmovgq %rsi, %rax
cmpq 0x50(%rsp), %rdx
jl 0xcb6c5
cmpq 0x58(%rsp), %rax
jg 0xcb6c5
movq %rdi, (%rsp)
movq %r8, 0x10(%rsp)
leaq 0x1(%r14), %rbp
leaq 0x8(,%r14,8), %rdi
leaq 0x24fbee(%rip), %rsi    # 0x31b25a
movl $0x12f, %edx            # imm = 0x12F
movq %rcx, 0x8(%rsp)
callq 0x93160
movq %rax, %r13
leaq 0x1(%rbx), %r15
movq %rbp, %rax
imulq %r15, %rax
imulq $0x30, %rax, %rdi
leaq 0x24fbc6(%rip), %rsi    # 0x31b25a
movl $0x12f, %edx            # imm = 0x12F
callq 0x93160
movq 0x8(%rsp), %r8
movq %rax, (%r13)
pushq $0x1
popq %rax
imulq $0x30, %r15, %rcx
cmpq %rbp, %rax
jae 0xcb6d1
movq -0x8(%r13,%rax,8), %rsi
addq %rcx, %rsi
movq %rsi, (%r13,%rax,8)
incq %rax
jmp 0xcb6ae
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
jmp 0xcb74e
pushq $0x3
popq %rax
movq %r13, %rdi
movq (%rsp), %rsi
movq %r12, %rdx
movq %r14, %rcx
movq 0x10(%rsp), %r9
pushq 0x60(%rsp)
pushq %rax
pushq %rax
pushq 0x70(%rsp)
pushq 0x70(%rsp)
pushq %rbx
callq 0xcb098
addq $0x30, %rsp
movq (%r13,%r14,8), %rax
imulq $0x30, %rbx, %rcx
movq (%rax,%rcx), %rdx
movq 0x8(%rax,%rcx), %rbx
movq 0x10(%rax,%rcx), %rax
cmpq %rbx, %rdx
cmovlq %rdx, %rbx
cmpq %rax, %rbx
cmovgeq %rax, %rbx
movq (%r13), %rdi
leaq 0x24fb2c(%rip), %r14    # 0x31b25a
movq %r14, %rsi
movl $0x138, %edx            # imm = 0x138
callq 0x936f9
movq %r13, %rdi
movq %r14, %rsi
movl $0x138, %edx            # imm = 0x138
callq 0x936f9
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x36c804(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2198a5(%rip), %rsi    # 0x2e5013
leaq 0x26472b(%rip), %rdx    # 0x32fea0
leaq 0x24fb66(%rip), %rcx    # 0x31b2e2
leaq 0x24fad7(%rip), %r8     # 0x31b25a
movl $0x127, %r9d            # imm = 0x127
xorl %eax, %eax
callq 0x17a50
callq 0x17390