// File: /workspace/github_c_makefile_star2_O2/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 $0x18, %rsp
movq %r8, (%rsp)
movq %rcx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
testq %rsi, %rsi
je 0x2952c3
movq %rdi, %rbp
testq %rdi, %rdi
je 0x2952c3
movq %rdx, %r14
testq %rdx, %rdx
je 0x2952c3
movq %r9, %rbx
movq 0x60(%rsp), %r15
leaq 0x1(%r9), %r13
leaq 0x1(%r15), %rax
imulq %r13, %rax
imulq $0x30, %rax, %r12
movq %rbp, %rdi
callq 0xf999b
cmpq %rax, %r12
ja 0x2952f1
movq %rbp, %rdi
callq 0xf9981
movq %rax, %r12
movq %rbp, %rdi
callq 0xf9975
movq %rax, (%r12)
pushq $0x1
popq %rax
imulq $0x30, %r15, %rbp
cmpq %r13, %rax
jae 0x2950a3
movq -0x8(%r12,%rax,8), %rcx
addq %rbp, %rcx
addq $0x30, %rcx
movq %rcx, (%r12,%rax,8)
incq %rax
jmp 0x295089
movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF
movq 0x8(%rsp), %rsi
addq (%rsp), %rsi
movq 0x50(%rsp), %rcx
addq 0x58(%rsp), %rcx
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, %rdx
movq %r15, %r8
movq 0x18(%rsp), %r13
pushq %r13
movl 0x80(%rsp), %eax
pushq %rax
pushq %r9
pushq %r9
pushq %r9
callq 0x294a84
addq $0x30, %rsp
movq %r13, %rdi
callq 0x114a29
addq (%r12,%rbx,8), %rbp
movq %rbp, %rdi
movl 0x78(%rsp), %esi
movq %rax, %rdx
callq 0xf7884
movabsq $0x7fffffffffffffff, %rdi # imm = 0x7FFFFFFFFFFFFFFF
movq 0x68(%rsp), %rsi
testq %rbx, %rbx
setne %cl
cmpq $0x2, %r15
setae %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x2951be
cmpl $0x2, %eax
je 0x295193
cmpl $0x1, %eax
je 0x295176
testl %eax, %eax
jne 0x2951cd
movq (%r12,%rbx,8), %rax
imulq $0x30, %r15, %rcx
cmpq %rdi, (%rax,%rcx)
je 0x2951fe
addq $-0x1, %rbx
leaq (%rbx,%rsi), %rdx
movq %rdx, -0x8(%r14,%r15,8)
jae 0x29522f
testq %r15, %r15
je 0x29522f
addq %rcx, %rax
addq $0x20, %rax
jmp 0x2951b4
testq %rbx, %rbx
je 0x29525d
movq (%r12,%rbx,8), %rax
imulq $0x30, %r15, %rcx
addq %rcx, %rax
addq $0x24, %rax
decq %rbx
jmp 0x2951b7
leaq (%rbx,%rsi), %rax
movq %rax, -0x8(%r14,%r15,8)
testq %r15, %r15
je 0x29528b
movq (%r12,%rbx,8), %rax
imulq $0x30, %r15, %rcx
addq %rcx, %rax
addq $0x28, %rax
decq %r15
movl (%rax), %eax
jmp 0x295115
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1a2d94(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x4fe35(%rip), %rsi     # 0x2e5013
leaq 0x91807(%rip), %rdx     # 0x3269ec
leaq 0xe740d(%rip), %rcx     # 0x37c5f9
leaq 0xe7229(%rip), %r8      # 0x37c41c
movl $0x10c, %r9d            # imm = 0x10C
jmp 0x2952b7
movq 0x1a2d63(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x4fe04(%rip), %rsi     # 0x2e5013
leaq 0xe740b(%rip), %rdx     # 0x37c621
leaq 0xe73dc(%rip), %rcx     # 0x37c5f9
leaq 0xe71f8(%rip), %r8      # 0x37c41c
movl $0xf9, %r9d
jmp 0x2952b7
movq 0x1a2d32(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x4fdd3(%rip), %rsi     # 0x2e5013
leaq 0x86360(%rip), %rdx     # 0x31b5a7
leaq 0xe73ab(%rip), %rcx     # 0x37c5f9
leaq 0xe71c7(%rip), %r8      # 0x37c41c
movl $0xfc, %r9d
jmp 0x2952b7
movq 0x1a2d04(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x4fda5(%rip), %rsi     # 0x2e5013
leaq 0x7992e(%rip), %rdx     # 0x30eba3
leaq 0xe737d(%rip), %rcx     # 0x37c5f9
leaq 0xe7199(%rip), %r8      # 0x37c41c
movl $0x102, %r9d            # imm = 0x102
jmp 0x2952b7
movq 0x1a2cd6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x4fd77(%rip), %rsi     # 0x2e5013
leaq 0x6b0ac(%rip), %rdx     # 0x30034f
leaq 0xe734f(%rip), %rcx     # 0x37c5f9
leaq 0xe716b(%rip), %r8      # 0x37c41c
movl $0x108, %r9d            # imm = 0x108
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x1a2c9e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x4fd3f(%rip), %rsi     # 0x2e5013
leaq 0x9f713(%rip), %rdx     # 0x3349ee
leaq 0xe7228(%rip), %rcx     # 0x37c50a
leaq 0xe7133(%rip), %r8      # 0x37c41c
movl $0x120, %r9d            # imm = 0x120
jmp 0x2952b7
movq 0x1a2c70(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x4fd11(%rip), %rsi     # 0x2e5013
leaq 0xe71a4(%rip), %rdx     # 0x37c4ad
leaq 0xe71fa(%rip), %rcx     # 0x37c50a
leaq 0xe7105(%rip), %r8      # 0x37c41c
movl $0x122, %r9d            # imm = 0x122
jmp 0x2952b7