// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/squarealign.c
// Function: gt_squarealign_calculate_generic
GtUword gt_squarealign_calculate_generic (GtLinspaceManagement *spacemanager,
                                          GtAlignment *align,
                                          const GtUchar *useq,
                                          GtUword ustart,
                                          GtUword ulen,
                                          const GtUchar *vseq,
                                          GtUword vstart,
                                          GtUword vlen,
                                          const GtScoreHandler *scorehandler)
{
  GtUword **E, distance;
  gt_assert(align && scorehandler);

  if (spacemanager == NULL)
  {
    /*use it in normally case*/
    gt_array2dim_malloc(E, (ulen+1), (vlen+1));
  }
  else
  {
    /*use it in lineraspace context*/
    E = gt_linspace_management_change_to_square(spacemanager,ulen,vlen);
  }
  fillDPtab_in_square_space(E, useq, ustart, ulen,
                            vseq, vstart, vlen, scorehandler);

  distance = E[ulen][vlen];
  /* reconstruct alignment from 2dimarray E */
  gt_reconstructalignment_from_EDtab(align, E, useq, ustart, ulen, vseq, vstart,
                                     vlen, scorehandler);
  if (spacemanager == NULL)
  {
    gt_array2dim_delete(E);
  }
  return distance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x20(%rsp)
testq %rsi, %rsi
je 0x11ec0f
cmpq $0x0, 0x70(%rsp)
je 0x11ec0f
movq %r9, %r13
movq %r8, %r15
movq %rcx, %rbp
movq %rsi, 0x18(%rsp)
movq 0x68(%rsp), %rax
testq %rdi, %rdi
movq %rdi, 0x10(%rsp)
je 0x11eafc
movq %r15, %rsi
movq %rax, %r12
movq %rax, %rdx
callq 0xf99eb
movq %rax, %r14
jmp 0x11eb70
movq %rbp, (%rsp)
movq %r13, 0x8(%rsp)
leaq 0x1(%r15), %r13
leaq 0x8(,%r15,8), %r12
leaq 0x215e7e(%rip), %rsi    # 0x334996
pushq $0x54
popq %rdx
movq %r12, %rdi
movq %rax, %rbp
callq 0x93160
movq %rax, %r14
incq %rbp
imulq %rbp, %r12
movq %r12, %rdi
leaq 0x215e5c(%rip), %rsi    # 0x334996
pushq $0x54
popq %rdx
callq 0x93160
movq %rax, (%r14)
pushq $0x1
popq %rax
shlq $0x3, %rbp
cmpq %r13, %rax
jae 0x11eb62
movq -0x8(%r14,%rax,8), %rcx
addq %rbp, %rcx
movq %rcx, (%r14,%rax,8)
incq %rax
jmp 0x11eb4c
movq 0x8(%rsp), %r13
movq (%rsp), %rbp
movq 0x68(%rsp), %r12
movq %r14, %rdi
movq 0x20(%rsp), %rbx
movq %rbx, %rsi
movq %rbp, %rdx
movq %r15, %rcx
movq %r13, %r8
movq 0x60(%rsp), %r9
movq 0x70(%rsp), %rax
pushq %rax
pushq %r12
callq 0x11ec45
popq %rax
popq %rcx
movq (%r14,%r15,8), %rax
movq %rbx, %rdx
movq (%rax,%r12,8), %rbx
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %rbp, %rcx
movq %r15, %r8
movq %r13, %r9
pushq 0x78(%rsp)
pushq %r12
pushq 0x78(%rsp)
callq 0x10ed2a
addq $0x20, %rsp
cmpq $0x0, 0x10(%rsp)
jne 0x11ebfd
movq (%r14), %rdi
movq %rbx, %r15
leaq 0x215db6(%rip), %rbx    # 0x334996
pushq $0x64
popq %rbp
movq %rbx, %rsi
movl %ebp, %edx
callq 0x936f9
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rbx
movl %ebp, %edx
callq 0x936f9
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x319352(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1c63f3(%rip), %rsi    # 0x2e5013
leaq 0x1fc2fd(%rip), %rdx    # 0x31af24
leaq 0x215d47(%rip), %rcx    # 0x334975
leaq 0x215d61(%rip), %r8     # 0x334996
pushq $0x4f
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390