// File: /workspace/github_c_makefile_star2_O1/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 0x13b20b
movq %r9, %r14
movq %rdx, %rbx
movq %rdi, %r15
movq %r9, %rdi
subq %rdx, %rdi
movq %rdi, %rdx
sarq $0x3f, %rdx
andq %rdi, %rdx
xorl %eax, %eax
testq %rdi, %rdi
cmovgq %rdi, %rax
cmpq 0x50(%rsp), %rdx
jl 0x13b1f2
cmpq 0x58(%rsp), %rax
jg 0x13b1f2
movq %rsi, (%rsp)
movq %rcx, 0x8(%rsp)
movq %r8, 0x10(%rsp)
leaq 0x1(%rbx), %rbp
leaq 0x8(,%rbx,8), %rdi
leaq 0x249166(%rip), %r13    # 0x384273
movq %r13, %rsi
movl $0x12f, %edx            # imm = 0x12F
callq 0x1092b2
movq %rax, %r12
leaq 0x1(%r14), %rax
imulq %rbp, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
movq %r13, %rsi
movl $0x12f, %edx            # imm = 0x12F
callq 0x1092b2
movq %rax, (%r12)
leaq (%r14,%r14,2), %r13
cmpq $0x2, %rbp
jb 0x13b16c
movq %r13, %rax
shlq $0x4, %rax
addq $0x30, %rax
movq (%r12), %rcx
addq %rax, %rcx
xorl %edx, %edx
movq %rcx, 0x8(%r12,%rdx,8)
addq %rax, %rcx
incq %rdx
cmpq %rdx, %rbx
jne 0x13b15c
movl $0x3, %eax
movq %r12, %rdi
movq %r15, %rsi
movq (%rsp), %rdx
movq %rbx, %rcx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
pushq 0x60(%rsp)
pushq %rax
pushq %rax
pushq 0x70(%rsp)
pushq 0x70(%rsp)
pushq %r14
callq 0x13ab0a
addq $0x30, %rsp
movq (%r12,%rbx,8), %rax
shlq $0x4, %r13
movq (%rax,%r13), %rcx
movq 0x8(%rax,%r13), %rbx
movq 0x10(%rax,%r13), %rax
cmpq %rbx, %rcx
cmovlq %rcx, %rbx
cmpq %rax, %rbx
cmovgeq %rax, %rbx
movq (%r12), %rdi
leaq 0x2490a3(%rip), %r14    # 0x384273
movq %r14, %rsi
movl $0x138, %edx            # imm = 0x138
callq 0x109670
movq %r12, %rdi
movq %r14, %rsi
movl $0x138, %edx            # imm = 0x138
callq 0x109670
movq %rbx, %rax
jmp 0x13b1fc
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3ff0b