// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/squarealign.c
// Function: gt_squarealign_ctab
GtUword gt_squarealign_ctab(GtLinspaceManagement *spacemanager,
                            const GtScoreHandler *scorehandler,
                            GtUword *Ctab,
                            const GtUchar *useq,
                            GtUword ustart,
                            GtUword ulen,
                            const GtUchar *vseq,
                            GtUword vstart,
                            GtUword vlen,
                            GtUword rowoffset)
{
  GtUword **E, distance;

  gt_assert(Ctab && spacemanager && scorehandler);

  E = gt_linspace_management_change_to_square(spacemanager,ulen,vlen);
  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];

  evaluate_crosspoints_from_2dimtab(E, Ctab, scorehandler, useq, ustart, ulen,
                                    vseq, vstart, vlen,  rowoffset);
  return distance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
testq %rsi, %rsi
je 0x18233b
movq %rdi, %r13
testq %rdi, %rdi
je 0x18233b
cmpq $0x0, 0x18(%rsp)
je 0x18233b
movq %r9, %rbx
movq %rcx, %r15
movq %rsi, %r14
movq 0x80(%rsp), %r12
movq 0x70(%rsp), %rbp
movq %r13, %rdi
movq %r9, %rsi
movq %r12, %rdx
callq 0x163bd7
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x163bd7
movq %rax, %r13
movq %rax, %rdi
movq %r15, 0x10(%rsp)
movq %r15, %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
movq %rbp, %r8
movq 0x78(%rsp), %r9
pushq %r14
pushq %r12
callq 0x181df1
addq $0x10, %rsp
testq %r13, %r13
je 0x182340
movq (%r13,%rbx,8), %rax
movq (%rax,%r12,8), %rax
movq %rax, 0x20(%rsp)
movq %r14, 0x30(%rsp)
movq %r14, %rdi
callq 0x1797fb
movq %rax, %rdx
cmpq $0x2, %r12
setb %al
testq %rbx, %rbx
setne %r15b
sete %cl
testb %al, %cl
jne 0x182322
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
addq %rcx, %rax
decq %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rcx
addq %rcx, %rax
decq %rax
movq %rax, 0x28(%rsp)
testq %r12, %r12
sete %al
movl %r15d, %ecx
notb %cl
orb %al, %cl
testb $0x1, %cl
jne 0x1822b9
movq -0x8(%r13,%rbx,8), %rax
movq (%r13,%rbx,8), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, 0x8(%rsp)
movq -0x8(%rax,%r12,8), %rbp
movq 0x10(%rsp), %rax
movzbl (%rax,%rbx), %esi
movq %r13, %r14
movq %rdx, %r13
movq 0x28(%rsp), %rax
movzbl (%rax,%r12), %edx
movq 0x30(%rsp), %rdi
callq 0x17982a
movq %r13, %rdx
movq %r14, %r13
addq %rbp, %rax
cmpq %rax, 0x8(%rsp)
jne 0x1822b9
movq 0x88(%rsp), %rax
addq %rbx, %rax
decq %rax
decq %rbx
jmp 0x1822fe
testb $0x1, %r15b
je 0x1822db
movq -0x8(%r13,%rbx,8), %rax
movq (%r13,%rbx,8), %rcx
movq (%rax,%r12,8), %rax
addq %rdx, %rax
cmpq %rax, (%rcx,%r12,8)
jne 0x1822db
decq %rbx
jmp 0x18230b
testq %r12, %r12
je 0x182336
movq (%r13,%rbx,8), %rax
movq -0x8(%rax,%r12,8), %rcx
addq %rdx, %rcx
cmpq %rcx, (%rax,%r12,8)
jne 0x182336
movq 0x88(%rsp), %rax
addq %rbx, %rax
movq 0x18(%rsp), %rcx
movq %rax, -0x8(%rcx,%r12,8)
decq %r12
cmpq $0x2, %r12
setae %al
testq %rbx, %rbx
setne %r15b
orb %r15b, %al
jne 0x182249
movq 0x20(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x56fbd
callq 0x56f84
callq 0x56ff6