// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/affinealign.c
// Function: gt_affinealign_ctab
void gt_affinealign_ctab(GtLinspaceManagement *spacemanager,
                         const GtScoreHandler *scorehandler,
                         GtUword *Ctab,
                         const GtUchar *useq,
                         GtUword ustart,
                         GtUword ulen,
                         const GtUchar *vseq,
                         GtUword vstart,
                         GtUword vlen,
                         GtUword rowoffset,
                         GtAffineAlignEdge from_edge,
                         GtAffineAlignEdge to_edge)
{
  GtAffinealignDPentry **dptable;
  GtUword idx;
  gt_assert(Ctab && spacemanager && scorehandler);
  gt_assert((ulen+1)*(vlen+1)*sizeof(**dptable) <=
             gt_linspace_management_get_valueTabsize(spacemanager));

  dptable = gt_linspace_management_get_rTabspace(spacemanager);
  *dptable = gt_linspace_management_get_valueTabspace(spacemanager);

  for (idx = 1; idx < ulen+1; idx++)
    dptable[idx] = dptable[idx-1] + vlen + 1;

  affinealign_fill_table(dptable, &useq[ustart], ulen, &vseq[vstart], vlen,
                         GT_WORD_MAX, GT_WORD_MAX, GT_WORD_MAX,
                         GT_WORD_MAX, from_edge, scorehandler);

  evaluate_affinecrosspoints_from_2dimtab(Ctab, dptable, scorehandler, ulen,
                                          vlen, rowoffset, to_edge);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x2f9ab9
movq %rdi, %rbp
testq %rdi, %rdi
je 0x2f9ab9
testq %rdx, %rdx
je 0x2f9ab9
movq %r9, %rbx
movq %r8, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x70(%rsp), %r15
leaq 0x1(%r9), %r14
leaq 0x1(%r15), %rax
imulq %r14, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r12
movq %rbp, %rdi
callq 0x15be4e
cmpq %rax, %r12
ja 0x2f9abe
movq 0x60(%rsp), %r13
movq %rbp, %rdi
callq 0x15be34
movq %rax, %r12
movq %rbp, %rdi
callq 0x15be28
movq %rax, (%r12)
leaq (%r15,%r15,2), %rbp
cmpq $0x2, %r14
jb 0x2f9957
movq %rbp, %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 0x2f9947
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
movq 0x10(%rsp), %rsi
addq 0x8(%rsp), %rsi
addq 0x68(%rsp), %r13
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, %rdx
movq %r13, %rcx
movq %r15, %r8
movq %r14, %r9
movq 0x20(%rsp), %r13
pushq %r13
movl 0x90(%rsp), %eax
pushq %rax
pushq %r14
pushq %r14
pushq %r14
callq 0x2f93fa
addq $0x30, %rsp
movq %r13, %rdi
callq 0x171427
shlq $0x4, %rbp
addq (%r12,%rbx,8), %rbp
movq %rbp, %rdi
movl 0x88(%rsp), %esi
movq %rax, %rdx
callq 0x159dd5
testq %rbx, %rbx
setne %dl
sete %cl
cmpq $0x2, %r15
setb %sil
testb %sil, %cl
movq 0x20(%rsp), %r8
jne 0x2f9a91
movq 0x78(%rsp), %rcx
cmpl $0x2, %eax
je 0x2f9a54
cmpl $0x1, %eax
je 0x2f9a37
testl %eax, %eax
jne 0x2f9aa0
movq (%r12,%rbx,8), %rax
leaq (%r15,%r15,2), %rsi
shlq $0x4, %rsi
cmpq %r14, (%rax,%rsi)
je 0x2f9ab4
leaq (%rbx,%rcx), %rdi
decq %rdi
movq %rdi, -0x8(%r8,%r15,8)
testq %r15, %r15
setne %dil
testb %dil, %dl
je 0x2f9aaf
decq %rbx
addq %rsi, %rax
addq $0x20, %rax
jmp 0x2f9a75
testq %rbx, %rbx
je 0x2f9aa5
movq (%r12,%rbx,8), %rax
leaq (%r15,%r15,2), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
addq $0x24, %rax
decq %rbx
jmp 0x2f9a78
leaq (%rbx,%rcx), %rax
movq %rax, -0x8(%r8,%r15,8)
testq %r15, %r15
je 0x2f9aaa
movq (%r12,%rbx,8), %rax
leaq (%r15,%r15,2), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
addq $0x28, %rax
decq %r15
movl (%rax), %eax
testq %rbx, %rbx
setne %dl
cmpq $0x2, %r15
setae %sil
orb %dl, %sil
jne 0x2f99e7
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x89852
callq 0x897a7
callq 0x8976e
callq 0x897e0
callq 0x89819
callq 0x89735
callq 0x8988b