// File: /workspace/github_c_makefile_star2_O3/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 0x134e36
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 0x134e1d
cmpq 0x58(%rsp), %rax
jg 0x134e1d
movq %rsi, (%rsp)
movq %rcx, 0x8(%rsp)
movq %r8, 0x10(%rsp)
leaq 0x1(%rbx), %rbp
leaq 0x8(,%rbx,8), %rdi
leaq 0x2461d2(%rip), %r13    # 0x37af0a
movq %r13, %rsi
movl $0x12f, %edx            # imm = 0x12F
callq 0x104226
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 0x104226
movq %rax, (%r12)
leaq (%r14,%r14,2), %r13
cmpq $0x2, %rbp
jb 0x134d97
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 0x134d87
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 0x13473e
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 0x24610f(%rip), %r14    # 0x37af0a
movq %r14, %rsi
movl $0x138, %edx            # imm = 0x138
callq 0x1045eb
movq %r12, %rdi
movq %r14, %rsi
movl $0x138, %edx            # imm = 0x138
callq 0x1045eb
movq %rbx, %rax
jmp 0x134e27
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3f3e9