// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/ft-front-generation.c
// Function: gt_front_trace2eoplist_full_front_directed
void gt_front_trace2eoplist_full_front_directed(GtEoplist *eoplist,
                                                const GtFrontTrace *front_trace,
                                                GtUword distance,
                                                const GtUchar *useq,
                                                GtUword ulen,
                                                const GtUchar *vseq,
                                                GtUword vlen)
{
  const GtBackreftable *basefront, *current;
  GtUword firstindex;
  GtWord diagonal = (GtWord) vlen - (GtWord) ulen;
  uint32_t row;
  uint8_t preferred_eop = FT_EOP_MISMATCH;

  gt_assert(front_trace != NULL &&
            front_trace->backref_nextfree >= 2 * distance + 1);
  basefront = front_trace->backref_table + front_trace->backref_nextfree
                                         - (2 * distance + 1);
  current = basefront + distance + diagonal;
  firstindex = gt_eoplist_length(eoplist);
  gt_assert(ulen <= (GtUword) UINT32_MAX);
  row = ulen;
  while (distance > 0)
  {
    GtUword nextrowadd;

    if (eoplist != NULL)
    {
      if (current->lcs > 0)
      {
        gt_eoplist_match_add(eoplist,current->lcs);
      }
    } else
    {
      gt_check_diagonal_run(useq, vseq, diagonal, row - current->lcs, row);
    }
    if (current->bits & preferred_eop)
    {
      if (preferred_eop == FT_EOP_MISMATCH)
      {
        nextrowadd = 1;
      } else
      {
        if (preferred_eop == FT_EOP_INSERTION)
        {
          gt_assert(-(GtWord) ulen < diagonal);
          diagonal--;
          nextrowadd = 0;
        } else
        {
          gt_assert(preferred_eop == FT_EOP_DELETION);
          gt_assert(diagonal < (GtWord) vlen);
          diagonal++;
          nextrowadd = 1;
        }
      }
    } else
    {
      if (current->bits & FT_EOP_MISMATCH)
      {
        preferred_eop = FT_EOP_MISMATCH;
        nextrowadd = 1;
      } else
      {
        if (current->bits & FT_EOP_INSERTION)
        {
          gt_assert(-(GtWord) ulen < diagonal);
          diagonal--;
          preferred_eop = FT_EOP_INSERTION;
          nextrowadd = 0;
        } else
        {
          gt_assert(current->bits & FT_EOP_DELETION);
          gt_assert(diagonal < (GtWord) vlen);
          diagonal++;
          preferred_eop = FT_EOP_DELETION;
          nextrowadd = 1;
        }
      }
    }
    if (eoplist != NULL)
    {
      if (preferred_eop == FT_EOP_DELETION)
      {
        gt_eoplist_deletion_add(eoplist);
      } else
      {
        if (preferred_eop == FT_EOP_INSERTION)
        {
          gt_eoplist_insertion_add(eoplist);
        } else
        {
          gt_eoplist_mismatch_add(eoplist);
        }
      }
    }
    distance--;
    basefront -= (2 * distance + 1);
    gt_assert(basefront >= front_trace->backref_table);
    gt_assert(row >= current->lcs + nextrowadd);
    row -= current->lcs + nextrowadd;
    current = basefront + distance + diagonal;
  }
  gt_assert(basefront == front_trace->backref_table && current->bits == 0);
  if (eoplist != NULL)
  {
    if (current->lcs > 0)
    {
      gt_eoplist_match_add(eoplist,current->lcs);
    }
    gt_eoplist_reverse_end(eoplist,firstindex);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
testq %rsi, %rsi
je 0x3250fe
movq %rdx, %r14
movq 0x10(%rsi), %rbx
leaq (%rdx,%rdx), %r12
cmpq %r12, %rbx
jbe 0x3250fe
movq %r8, %r13
movq 0x80(%rsp), %rbp
movq %rsi, 0x28(%rsp)
movq (%rsi), %r15
movq %rdi, (%rsp)
callq 0x322a1c
movq %r13, %rcx
shrq $0x20, %rcx
jne 0x325117
movq %rax, 0x30(%rsp)
movq %rbp, 0x20(%rsp)
movq %rbp, %rdx
subq %r13, %rdx
leaq (%r15,%rbx,4), %rax
movq %r12, %rcx
notq %rcx
leaq (%rax,%rcx,4), %rbp
leaq (,%r14,4), %rax
addq %rbp, %rax
leaq (%rax,%rdx,4), %r15
testq %r14, %r14
je 0x32508d
movq %r13, %rax
negq %rax
movq %rax, 0x18(%rsp)
decq %r14
movl $0x1, %ebx
subq %r12, %rbx
movb $0x1, %r8b
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x324f13
movl (%r15), %esi
cmpq $0x8, %rsi
jb 0x324f50
shrl $0x3, %esi
movq (%rsp), %rdi
movq %rdx, %r12
movq %r14, 0x8(%rsp)
movq %r15, %r14
movl %r8d, %r15d
callq 0x322783
jmp 0x324f3e
movl (%r15), %eax
shrl $0x3, %eax
movl %r13d, %ecx
subl %eax, %ecx
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq %rdx, %r12
movq %r14, 0x8(%rsp)
movq %r15, %r14
movl %r8d, %r15d
movl %r13d, %r8d
callq 0x32511c
movl %r15d, %r8d
movq %r14, %r15
movq 0x8(%rsp), %r14
movq %r12, %rdx
movq (%rsp), %rdi
movl (%r15), %eax
movl %r8d, %ecx
andb $0x7, %cl
movzbl %cl, %ecx
testl %ecx, %eax
je 0x324f8a
movzbl %r8b, %r12d
cmpb $0x1, %r8b
je 0x324fe0
cmpl $0x4, %r12d
je 0x324fb6
cmpl $0x2, %r12d
jne 0x3250ef
cmpq 0x18(%rsp), %rdx
jle 0x3250f4
decq %rdx
jmp 0x324fdd
movl $0x1, %r12d
movb $0x1, %r8b
testb $0x1, %al
jne 0x324fe0
testb $0x2, %al
jne 0x324fcc
testb $0x4, %al
je 0x325112
cmpq 0x20(%rsp), %rdx
jge 0x32510d
incq %rdx
movb $0x4, %r8b
jmp 0x324fe0
cmpq 0x20(%rsp), %rdx
jge 0x3250f9
incq %rdx
movl $0x1, %r12d
jmp 0x324fe0
cmpq 0x18(%rsp), %rdx
jle 0x325108
decq %rdx
movb $0x2, %r8b
xorl %r12d, %r12d
testq %rdi, %rdi
je 0x32504a
cmpb $0x2, %r8b
movq %rdx, 0x10(%rsp)
je 0x325009
movb %r8b, 0x8(%rsp)
movzbl %r8b, %eax
cmpl $0x4, %eax
jne 0x325033
movq (%rsp), %rdi
callq 0x322629
jmp 0x32503c
movq (%rsp), %rdi
movq %r14, 0x8(%rsp)
movq %r15, %r14
movl %r8d, %r15d
callq 0x3226d6
movl %r15d, %r8d
movq %r14, %r15
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %rdx
movq (%rsp), %rdi
jmp 0x32504a
movq (%rsp), %rdi
callq 0x3228fe
movq (%rsp), %rdi
movq 0x10(%rsp), %rdx
movb 0x8(%rsp), %r8b
leaq (%rbp,%rbx,4), %rbp
movq 0x28(%rsp), %rax
cmpq (%rax), %rbp
jb 0x3250e5
movl %r13d, %r13d
movl (%r15), %eax
shrl $0x3, %eax
addq %rax, %r12
subq %r12, %r13
jb 0x3250ea
leaq (,%r14,4), %rax
addq %rbp, %rax
leaq (%rax,%rdx,4), %r15
addq $0x2, %rbx
addq $-0x1, %r14
jb 0x324ee9
jmp 0x325091
movq (%rsp), %rdi
movq 0x28(%rsp), %rax
cmpq (%rax), %rbp
jne 0x325103
movl (%r15), %esi
testb $0x7, %sil
jne 0x325103
testq %rdi, %rdi
je 0x3250d6
testq %rsi, %rsi
je 0x3250be
shrl $0x3, %esi
movq (%rsp), %rdi
callq 0x322783
movq (%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x322a28
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x94e58
callq 0x94e1f
callq 0x94d74
callq 0x94d3b
callq 0x94d02
callq 0x94f03
callq 0x94eca
callq 0x94dad
callq 0x94de6
callq 0x94e91
callq 0x94cc9