// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/diagonalbandalign_affinegapcost.c
// Function: gt_diagonalbandalign_affinegapcost_in_square_space_generic
GtWord gt_diagonalbandalign_affinegapcost_in_square_space_generic(
                                             GtLinspaceManagement *space,
                                             const GtScoreHandler *scorehandler,
                                             GtAlignment *align,
                                             const GtUchar *useq,
                                             GtUword ustart,
                                             GtUword ulen,
                                             const GtUchar *vseq,
                                             GtUword vstart,
                                             GtUword vlen,
                                             GtWord left_dist,
                                             GtWord right_dist)
{
  GtWord distance;
  GtUword idx;
  GtAffinealignDPentry **Atabcolumn;

  gt_assert(align && scorehandler);
  if (space == NULL)
  {
    gt_array2dim_malloc(Atabcolumn, (ulen+1), (vlen+1));
  }
  else
  {
    gt_assert((ulen+1)*(vlen+1)*sizeof(**Atabcolumn) <=
               gt_linspace_management_get_valueTabsize(space));

    Atabcolumn = gt_linspace_management_get_rTabspace(space);
    *Atabcolumn = gt_linspace_management_get_valueTabspace(space);

    for (idx=1; idx<ulen+1; idx++)
      Atabcolumn[idx]=Atabcolumn[idx-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);

  /* reconstruct alignment from 2dimarray Atabcolumn */
  gt_affinealign_traceback(align, Atabcolumn, ulen, vlen);

  if (space == NULL)
  {
    gt_array2dim_delete(Atabcolumn);
  }
  return distance;
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movq 0xd0(%rsp), %rax
movq 0xc8(%rsp), %rax
movq 0xc0(%rsp), %rax
movq 0xb8(%rsp), %rax
movq 0xb0(%rsp), %rax
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movq %rcx, 0x80(%rsp)
movq %r8, 0x78(%rsp)
movq %r9, 0x70(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0x151120
cmpq $0x0, 0x90(%rsp)
jne 0x151158
movq 0x4eae79(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3c4ee2(%rip), %rsi    # 0x516013
leaq 0x3fbf1d(%rip), %rdx    # 0x54d055
leaq 0x3fc222(%rip), %rcx    # 0x54d361
leaq 0x3fc256(%rip), %r8     # 0x54d39c
movl $0xd6, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x15115a
cmpq $0x0, 0x98(%rsp)
jne 0x151229
movq 0x70(%rsp), %rdi
addq $0x1, %rdi
shlq $0x3, %rdi
leaq 0x3fc21f(%rip), %rsi    # 0x54d39c
movl $0xd9, %edx
callq 0xe80f0
movq %rax, 0x58(%rsp)
movq 0x70(%rsp), %rax
addq $0x1, %rax
imulq $0x30, %rax, %rdi
movq 0xc0(%rsp), %rax
addq $0x1, %rax
imulq %rax, %rdi
leaq 0x3fc1ec(%rip), %rsi    # 0x54d39c
movl $0xd9, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq $0x1, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq 0x70(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x151224
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movq 0xc0(%rsp), %rax
addq $0x1, %rax
imulq $0x30, %rax, %rax
addq %rax, %rdx
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x1511ce
jmp 0x151329
jmp 0x15122b
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq 0xc0(%rsp), %rcx
addq $0x1, %rcx
imulq %rcx, %rax
imulq $0x30, %rax, %rax
movq %rax, 0x48(%rsp)
movq 0x98(%rsp), %rdi
callq 0x1a37b0
movq %rax, %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jbe 0x15129f
movq 0x4ead32(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3c4d9b(%rip), %rsi    # 0x516013
leaq 0x3fc14c(%rip), %rdx    # 0x54d3cb
leaq 0x3fc0db(%rip), %rcx    # 0x54d361
leaq 0x3fc10f(%rip), %r8     # 0x54d39c
movl $0xde, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1512a1
movq 0x98(%rsp), %rdi
callq 0x1a3750
movq %rax, 0x58(%rsp)
movq 0x98(%rsp), %rdi
callq 0x1a3720
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq $0x1, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq 0x70(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x151327
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
imulq $0x30, 0xc0(%rsp), %rax
addq %rax, %rdx
addq $0x30, %rdx
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x1512d4
jmp 0x151329
movq 0x58(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0xb0(%rsp), %r8
movq 0xb8(%rsp), %r9
movq 0xc0(%rsp), %rbx
movq 0xc8(%rsp), %r11
movq 0xd0(%rsp), %r10
movq 0x90(%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 0x58(%rsp), %rax
movq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0xc0(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x58(%rsp), %rcx
movq 0x70(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
imulq $0x30, 0xc0(%rsp), %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jge 0x15146c
movq 0x58(%rsp), %rax
movq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0xc0(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x58(%rsp), %rcx
movq 0x70(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
imulq $0x30, 0xc0(%rsp), %rdx
addq %rdx, %rcx
cmpq 0x10(%rcx), %rax
jge 0x15143a
movq 0x58(%rsp), %rax
movq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0xc0(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x40(%rsp)
jmp 0x15145d
movq 0x58(%rsp), %rax
movq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0xc0(%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x1514fc
movq 0x58(%rsp), %rax
movq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0xc0(%rsp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq 0x58(%rsp), %rcx
movq 0x70(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
imulq $0x30, 0xc0(%rsp), %rdx
addq %rdx, %rcx
cmpq 0x10(%rcx), %rax
jge 0x1514cf
movq 0x58(%rsp), %rax
movq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0xc0(%rsp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
jmp 0x1514f2
movq 0x58(%rsp), %rax
movq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0xc0(%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x88(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0xc0(%rsp), %rcx
callq 0x483bb0
cmpq $0x0, 0x98(%rsp)
jne 0x15155f
movq 0x58(%rsp), %rax
movq (%rax), %rdi
leaq 0x3fbe5d(%rip), %rsi    # 0x54d39c
movl $0xf4, %edx
callq 0xe88c0
movq 0x58(%rsp), %rdi
leaq 0x3fbe47(%rip), %rsi    # 0x54d39c
movl $0xf4, %edx
callq 0xe88c0
movq 0x68(%rsp), %rax
addq $0xa0, %rsp
popq %rbx
retq
nopl (%rax)