// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/affinealign.c
// Function: evaluate_affinecrosspoints_from_2dimtab
static void evaluate_affinecrosspoints_from_2dimtab(GtUword *Ctab,
                                            GtAffinealignDPentry **Atabcolumn,
                                            const GtScoreHandler *scorehandler,
                                            GtUword ulen, GtUword vlen,
                                            GtUword rowoffset,
                                            GtAffineAlignEdge edge)
{
  GtUword i, j, gap_opening;
  gt_assert(Atabcolumn != NULL);
  gap_opening = gt_scorehandler_get_gap_opening(scorehandler);

  i = ulen;
  j = vlen;
  edge = gt_linearalign_affinegapcost_minAdditionalCosts(&Atabcolumn[i][j],
                                                         edge, gap_opening);

  while (i > 0 || j > 1) {
    switch (edge) {
      case Affine_R:
        gt_assert(Atabcolumn[i][j].Rvalue != LONG_MAX);
        Ctab[j-1] = i-1 + rowoffset;
        edge = Atabcolumn[i][j].Redge;
        gt_assert(i > 0 && j > 0);
        i--;
        j--;
        break;
      case Affine_D:
        edge = Atabcolumn[i][j].Dedge;
        gt_assert(i);
        i--;
        break;
      case Affine_I:
        Ctab[j-1] = i + rowoffset;
        edge = Atabcolumn[i][j].Iedge;
        gt_assert(j);
        j--;
        break;
      default:
        gt_assert(false);
    }
  }
}

// Assembly:
subq $0x58, %rsp
movl 0x60(%rsp), %eax
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x485596
movq 0x1b6a3b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x90aa4(%rip), %rsi     # 0x516013
leaq 0xc8122(%rip), %rdx     # 0x54d698
leaq 0x12c06c(%rip), %rcx    # 0x5b15e9
leaq 0x12be88(%rip), %r8     # 0x5b140c
movl $0xee, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x485598
movq 0x40(%rsp), %rdi
callq 0x1d1180
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
imulq $0x30, 0x18(%rsp), %rax
addq %rax, %rdi
movl 0x60(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0x19e760
movl %eax, 0x60(%rsp)
movb $0x1, %al
cmpq $0x0, 0x20(%rsp)
movb %al, 0xf(%rsp)
ja 0x4855ff
cmpq $0x1, 0x18(%rsp)
seta %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x48560c
jmp 0x485884
movl 0x60(%rsp), %eax
movl %eax, 0x8(%rsp)
testl %eax, %eax
je 0x48563b
jmp 0x48561a
movl 0x8(%rsp), %eax
subl $0x1, %eax
je 0x485746
jmp 0x485629
movl 0x8(%rsp), %eax
subl $0x2, %eax
je 0x4857b9
jmp 0x485845
jmp 0x48563d
movq 0x48(%rsp), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x18(%rsp), %rcx
addq %rcx, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, (%rax)
jne 0x48569b
movq 0x1b6936(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x9099f(%rip), %rsi     # 0x516013
leaq 0x12bf96(%rip), %rdx    # 0x5b1611
leaq 0x12bf67(%rip), %rcx    # 0x5b15e9
leaq 0x12bd83(%rip), %r8     # 0x5b140c
movl $0xf9, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x48569d
movq 0x20(%rsp), %rdx
subq $0x1, %rdx
addq 0x28(%rsp), %rdx
movq 0x50(%rsp), %rax
movq 0x18(%rsp), %rcx
subq $0x1, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x48(%rsp), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x18(%rsp), %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
movl %eax, 0x60(%rsp)
cmpq $0x0, 0x20(%rsp)
jbe 0x4856eb
cmpq $0x0, 0x18(%rsp)
ja 0x485723
movq 0x1b68ae(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x90917(%rip), %rsi     # 0x516013
leaq 0xc7ff9(%rip), %rdx     # 0x54d6fc
leaq 0x12bedf(%rip), %rcx    # 0x5b15e9
leaq 0x12bcfb(%rip), %r8     # 0x5b140c
movl $0xfc, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x485725
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x48587f
movq 0x48(%rsp), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x18(%rsp), %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
movl %eax, 0x60(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x4857a4
movq 0x1b682d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x90896(%rip), %rsi     # 0x516013
leaq 0xbae17(%rip), %rdx     # 0x54059b
leaq 0x12be5e(%rip), %rcx    # 0x5b15e9
leaq 0x12bc7a(%rip), %r8     # 0x5b140c
movl $0x102, %r9d            # imm = 0x102
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4857a6
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x48587f
movq 0x20(%rsp), %rdx
addq 0x28(%rsp), %rdx
movq 0x50(%rsp), %rax
movq 0x18(%rsp), %rcx
subq $0x1, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x48(%rsp), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x18(%rsp), %rcx
addq %rcx, %rax
movl 0x28(%rax), %eax
movl %eax, 0x60(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x485833
movq 0x1b679e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x90807(%rip), %rsi     # 0x516013
leaq 0xabd79(%rip), %rdx     # 0x53158c
leaq 0x12bdcf(%rip), %rcx    # 0x5b15e9
leaq 0x12bbeb(%rip), %r8     # 0x5b140c
movl $0x108, %r9d            # imm = 0x108
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x485835
movq 0x18(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x48587f
jmp 0x485847
movq 0x1b6752(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x907bb(%rip), %rsi     # 0x516013
leaq 0xd3504(%rip), %rdx     # 0x558d63
leaq 0x12bd83(%rip), %rcx    # 0x5b15e9
leaq 0x12bb9f(%rip), %r8     # 0x5b140c
movl $0x10c, %r9d            # imm = 0x10C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4855e4
addq $0x58, %rsp
retq
nopl (%rax)