// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/affinealign.c
// Function: gt_affinealign_traceback
GtWord gt_affinealign_traceback(GtAlignment *align,
                                GtAffinealignDPentry * const *dptable,
                                GtUword i, GtUword j)
{
  GtWord minvalue;
  GtAffineAlignEdge edge;
  gt_assert(align && dptable);
  /* determine min{A_affine(m,n,x) | x in {R,D,I}} */
  minvalue = GT_MIN3(dptable[i][j].Rvalue, dptable[i][j].Dvalue,
                  dptable[i][j].Ivalue);
  if (dptable[i][j].Rvalue == minvalue)
    edge = Affine_R;
  else if (dptable[i][j].Dvalue == minvalue)
    edge = Affine_D;
  else /* dptable[i][j].Ivalue == minvalue */
    edge = Affine_I;
  /* backtracing */
  while (i > 0 || j > 0) {
    switch (edge) {
      case Affine_R:
        gt_assert(dptable[i][j].Rvalue != LONG_MAX);
        gt_alignment_add_replacement(align);
        edge = dptable[i][j].Redge;
        gt_assert(i > 0 && j > 0);
        i--;
        j--;
        break;
      case Affine_D:
        gt_alignment_add_deletion(align);
        edge = dptable[i][j].Dedge;
        gt_assert(i);
        i--;
        break;
      case Affine_I:
        gt_alignment_add_insertion(align);
        edge = dptable[i][j].Iedge;
        gt_assert(j);
        j--;
        break;
      default:
        gt_assert(false);
    }
  }
  return minvalue;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x483bd8
cmpq $0x0, 0x48(%rsp)
jne 0x483c10
movq 0x1b83c1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x9242a(%rip), %rsi     # 0x516013
leaq 0x12d7f2(%rip), %rdx    # 0x5b13e2
leaq 0x12d7fc(%rip), %rcx    # 0x5b13f3
leaq 0x12d80e(%rip), %r8     # 0x5b140c
movl $0x93, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x483c12
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
imulq $0x30, 0x38(%rsp), %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jge 0x483cd4
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
imulq $0x30, 0x38(%rsp), %rdx
addq %rdx, %rcx
cmpq 0x10(%rcx), %rax
jge 0x483ca5
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x483cc5
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x483d58
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
imulq $0x30, 0x38(%rsp), %rdx
addq %rdx, %rcx
cmpq 0x10(%rcx), %rax
jge 0x483d2e
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x483d4e
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq 0x30(%rsp), %rax
jne 0x483d8d
movl $0x0, 0x2c(%rsp)
jmp 0x483dc3
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq 0x30(%rsp), %rax
jne 0x483db9
movl $0x1, 0x2c(%rsp)
jmp 0x483dc1
movl $0x2, 0x2c(%rsp)
jmp 0x483dc3
jmp 0x483dc5
movb $0x1, %al
cmpq $0x0, 0x40(%rsp)
movb %al, 0xf(%rsp)
ja 0x483de0
cmpq $0x0, 0x38(%rsp)
seta %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x483ded
jmp 0x484047
movl 0x2c(%rsp), %eax
movl %eax, 0x8(%rsp)
testl %eax, %eax
je 0x483e1c
jmp 0x483dfb
movl 0x8(%rsp), %eax
subl $0x1, %eax
je 0x483f11
jmp 0x483e0a
movl 0x8(%rsp), %eax
subl $0x2, %eax
je 0x483f8e
jmp 0x484008
jmp 0x483e1e
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, (%rax)
jne 0x483e7c
movq 0x1b8155(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x921be(%rip), %rsi     # 0x516013
leaq 0x12d5cb(%rip), %rdx    # 0x5b1427
leaq 0x12d590(%rip), %rcx    # 0x5b13f3
leaq 0x12d5a2(%rip), %r8     # 0x5b140c
movl $0xa1, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x483e7e
movq 0x50(%rsp), %rdi
callq 0x12a410
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
movl %eax, 0x2c(%rsp)
cmpq $0x0, 0x40(%rsp)
jbe 0x483eb6
cmpq $0x0, 0x38(%rsp)
ja 0x483eee
movq 0x1b80e3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x9214c(%rip), %rsi     # 0x516013
leaq 0xc982e(%rip), %rdx     # 0x54d6fc
leaq 0x12d51e(%rip), %rcx    # 0x5b13f3
leaq 0x12d530(%rip), %r8     # 0x5b140c
movl $0xa4, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x483ef0
movq 0x40(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x484042
movq 0x50(%rsp), %rdi
callq 0x12a480
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
movl %eax, 0x2c(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x483f79
movq 0x1b8058(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x920c1(%rip), %rsi     # 0x516013
leaq 0xbc642(%rip), %rdx     # 0x54059b
leaq 0x12d493(%rip), %rcx    # 0x5b13f3
leaq 0x12d4a5(%rip), %r8     # 0x5b140c
movl $0xab, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x483f7b
movq 0x40(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x484042
movq 0x50(%rsp), %rdi
callq 0x12a4f0
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x30, 0x38(%rsp), %rcx
addq %rcx, %rax
movl 0x28(%rax), %eax
movl %eax, 0x2c(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x483ff6
movq 0x1b7fdb(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x92044(%rip), %rsi     # 0x516013
leaq 0xad5b6(%rip), %rdx     # 0x53158c
leaq 0x12d416(%rip), %rcx    # 0x5b13f3
leaq 0x12d428(%rip), %r8     # 0x5b140c
movl $0xb1, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x483ff8
movq 0x38(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x484042
jmp 0x48400a
movq 0x1b7f8f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x91ff8(%rip), %rsi     # 0x516013
leaq 0xd4d41(%rip), %rdx     # 0x558d63
leaq 0x12d3ca(%rip), %rcx    # 0x5b13f3
leaq 0x12d3dc(%rip), %r8     # 0x5b140c
movl $0xb5, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x483dc5
movq 0x30(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)