// File: /workspace/github_c_makefile_star2_O0/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 %rbx
subq $0xc0, %rsp
movq 0xe0(%rsp), %rax
movq 0xd8(%rsp), %rax
movq 0xd0(%rsp), %rax
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movq %r9, 0x88(%rsp)
cmpq $0x0, 0xe0(%rsp)
jne 0x152d23
movq 0x4e92ae(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3c3317(%rip), %rsi    # 0x516013
leaq 0x40f650(%rip), %rdx    # 0x562353
leaq 0x3fa71a(%rip), %rcx    # 0x54d424
leaq 0x3fa68b(%rip), %r8     # 0x54d39c
movl $0x127, %r9d            # imm = 0x127
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x152d25
movq 0xd0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x88(%rsp), %rcx
subq 0xa0(%rsp), %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jge 0x152d52
xorl %eax, %eax
movq %rax, 0x60(%rsp)
jmp 0x152d67
movq 0x88(%rsp), %rax
subq 0xa0(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rcx
cmpq %rcx, %rax
jg 0x152dc7
movq 0xd8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x88(%rsp), %rcx
subq 0xa0(%rsp), %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jle 0x152da3
xorl %eax, %eax
movq %rax, 0x50(%rsp)
jmp 0x152db8
movq 0x88(%rsp), %rax
subq 0xa0(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %rcx
cmpq %rcx, %rax
jge 0x152dde
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0xb8(%rsp)
jmp 0x1530e5
movq 0xa0(%rsp), %rdi
addq $0x1, %rdi
shlq $0x3, %rdi
leaq 0x3fa5a7(%rip), %rsi    # 0x54d39c
movl $0x12f, %edx            # imm = 0x12F
callq 0xe80f0
movq %rax, 0x78(%rsp)
movq 0xa0(%rsp), %rax
addq $0x1, %rax
imulq $0x30, %rax, %rdi
movq 0x88(%rsp), %rax
addq $0x1, %rax
imulq %rax, %rdi
leaq 0x3fa571(%rip), %rsi    # 0x54d39c
movl $0x12f, %edx            # imm = 0x12F
callq 0xe80f0
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
movq $0x1, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq 0xa0(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x152ea2
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x88(%rsp), %rax
addq $0x1, %rax
imulq $0x30, %rax, %rax
addq %rax, %rdx
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0x152e49
movq 0x78(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq 0xa0(%rsp), %rcx
movq 0x98(%rsp), %r8
movq 0x90(%rsp), %r9
movq 0x88(%rsp), %rbx
movq 0xd0(%rsp), %r11
movq 0xd8(%rsp), %r10
movq 0xe0(%rsp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl $0x3, 0x18(%rsp)
movl $0x3, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x151570
movq 0x78(%rsp), %rax
movq 0xa0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x88(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x78(%rsp), %rcx
movq 0xa0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
imulq $0x30, 0x88(%rsp), %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jge 0x152ffd
movq 0x78(%rsp), %rax
movq 0xa0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x88(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x78(%rsp), %rcx
movq 0xa0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
imulq $0x30, 0x88(%rsp), %rdx
addq %rdx, %rcx
cmpq 0x10(%rcx), %rax
jge 0x152fc8
movq 0x78(%rsp), %rax
movq 0xa0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x88(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
jmp 0x152fee
movq 0x78(%rsp), %rax
movq 0xa0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x88(%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x153099
movq 0x78(%rsp), %rax
movq 0xa0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x88(%rsp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq 0x78(%rsp), %rcx
movq 0xa0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
imulq $0x30, 0x88(%rsp), %rdx
addq %rdx, %rcx
cmpq 0x10(%rcx), %rax
jge 0x153069
movq 0x78(%rsp), %rax
movq 0xa0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x88(%rsp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x15308f
movq 0x78(%rsp), %rax
movq 0xa0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x88(%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rdi
leaq 0x3fa2e7(%rip), %rsi    # 0x54d39c
movl $0x138, %edx            # imm = 0x138
callq 0xe88c0
movq 0x78(%rsp), %rdi
leaq 0x3fa2d1(%rip), %rsi    # 0x54d39c
movl $0x138, %edx            # imm = 0x138
callq 0xe88c0
movq 0x80(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
addq $0xc0, %rsp
popq %rbx
retq
nopw %cs:(%rax,%rax)