// File: /workspace/github_c_makefile_star2_O1/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 0x303761
movq %rdi, %rbp
testq %rdi, %rdi
je 0x303761
testq %rdx, %rdx
je 0x303761
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 0x163bba
cmpq %rax, %r12
ja 0x303766
movq 0x60(%rsp), %r13
movq %rbp, %rdi
callq 0x163ba0
movq %rax, %r12
movq %rbp, %rdi
callq 0x163b94
movq %rax, (%r12)
leaq (%r15,%r15,2), %rbp
cmpq $0x2, %r14
jb 0x3035ff
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 0x3035ef
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 0x303096
addq $0x30, %rsp
movq %r13, %rdi
callq 0x1797eb
shlq $0x4, %rbp
addq (%r12,%rbx,8), %rbp
movq %rbp, %rdi
movl 0x88(%rsp), %esi
movq %rax, %rdx
callq 0x161ab9
testq %rbx, %rbx
setne %dl
sete %cl
cmpq $0x2, %r15
setb %sil
testb %sil, %cl
movq 0x20(%rsp), %r8
jne 0x303739
movq 0x78(%rsp), %rcx
cmpl $0x2, %eax
je 0x3036fc
cmpl $0x1, %eax
je 0x3036df
testl %eax, %eax
jne 0x303748
movq (%r12,%rbx,8), %rax
leaq (%r15,%r15,2), %rsi
shlq $0x4, %rsi
cmpq %r14, (%rax,%rsi)
je 0x30375c
leaq (%rbx,%rcx), %rdi
decq %rdi
movq %rdi, -0x8(%r8,%r15,8)
testq %r15, %r15
setne %dil
testb %dil, %dl
je 0x303757
decq %rbx
addq %rsi, %rax
addq $0x20, %rax
jmp 0x30371d
testq %rbx, %rbx
je 0x30374d
movq (%r12,%rbx,8), %rax
leaq (%r15,%r15,2), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
addq $0x24, %rax
decq %rbx
jmp 0x303720
leaq (%rbx,%rcx), %rax
movq %rax, -0x8(%r8,%r15,8)
testq %r15, %r15
je 0x303752
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 0x30368f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x8b535
callq 0x8b48a
callq 0x8b451
callq 0x8b4c3
callq 0x8b4fc
callq 0x8b418
callq 0x8b56e