// File: /workspace/github_c_makefile_star2_O2/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 0x2bb874
movq %rdx, %r14
movq 0x10(%rsi), %rbx
leaq (%rdx,%rdx), %r15
cmpq %r15, %rbx
jbe 0x2bb874
movq %r8, %r12
movq 0x80(%rsp), %rbp
movq %rsi, 0x28(%rsp)
movq (%rsi), %r13
movq %rdi, (%rsp)
callq 0x2b8578
movq %rax, 0x30(%rsp)
movq %r12, %rax
shrq $0x20, %rax
jne 0x2bb8d6
movq %rbp, 0x20(%rsp)
movq %rbp, %rdx
subq %r12, %rdx
leaq (,%rbx,4), %rax
addq %r13, %rax
movq %r15, %rcx
notq %rcx
leaq (%rax,%rcx,4), %r13
leaq (,%r14,4), %rax
addq %r13, %rax
leaq (%rax,%rdx,4), %rbp
movq %r12, %rax
negq %rax
movq %rax, 0x18(%rsp)
decq %r14
pushq $0x1
popq %rbx
subq %r15, %rbx
movb $0x1, %cl
movq (%rsp), %rdi
cmpq $-0x1, %r14
je 0x2bb692
movl (%rbp), %esi
testq %rdi, %rdi
je 0x2bb558
cmpl $0x8, %esi
jb 0x2bb584
shrl $0x3, %esi
movq (%rsp), %rdi
movq %rbx, 0x8(%rsp)
movq %r14, %rbx
movq %rdx, %r14
movl %ecx, %r15d
callq 0x2b821a
movl %r15d, %ecx
movq %r14, %rdx
movq %rbx, %r14
movq 0x8(%rsp), %rbx
jmp 0x2bb580
shrl $0x3, %esi
movb %cl, 0x8(%rsp)
movl %r12d, %ecx
subl %esi, %ecx
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq %rdx, %r15
movl %r12d, %r8d
callq 0x2bb907
movb 0x8(%rsp), %cl
movq %r15, %rdx
movq (%rsp), %rdi
movl (%rbp), %eax
movzbl %cl, %r15d
testl %r15d, %eax
je 0x2bb5b1
cmpb $0x1, %cl
je 0x2bb5fb
cmpl $0x4, %r15d
je 0x2bb5d2
cmpl $0x2, %r15d
jne 0x2bb754
cmpq 0x18(%rsp), %rdx
jg 0x2bb5f3
jmp 0x2bb782
movb $0x1, %cl
testb $0x1, %al
jne 0x2bb5e2
testb $0x2, %al
jne 0x2bb5e8
testb $0x4, %al
movq 0x20(%rsp), %rax
je 0x2bb843
cmpq %rax, %rdx
jl 0x2bb5dd
jmp 0x2bb812
cmpq 0x20(%rsp), %rdx
jge 0x2bb7b0
incq %rdx
movb $0x4, %cl
pushq $0x1
popq %r15
jmp 0x2bb5fb
cmpq 0x18(%rsp), %rdx
jle 0x2bb7e1
decq %rdx
movb $0x2, %cl
xorl %r15d, %r15d
testq %rdi, %rdi
je 0x2bb64f
cmpb $0x2, %cl
movq %rdx, 0x10(%rsp)
movb %cl, 0x8(%rsp)
je 0x2bb621
movzbl %cl, %eax
cmpl $0x4, %eax
jne 0x2bb639
movq (%rsp), %rdi
callq 0x2b8018
jmp 0x2bb642
movq (%rsp), %rdi
callq 0x2b810f
movb 0x8(%rsp), %cl
movq 0x10(%rsp), %rdx
movq (%rsp), %rdi
jmp 0x2bb64f
movq (%rsp), %rdi
callq 0x2b8413
movq (%rsp), %rdi
movq 0x10(%rsp), %rdx
movb 0x8(%rsp), %cl
leaq (%r13,%rbx,4), %r13
movq 0x28(%rsp), %rax
cmpq (%rax), %r13
jb 0x2bb6ee
movl %r12d, %r12d
movl (%rbp), %eax
shrl $0x3, %eax
addq %rax, %r15
subq %r15, %r12
jb 0x2bb71c
leaq (,%r14,4), %rax
addq %r13, %rax
leaq (%rax,%rdx,4), %rbp
decq %r14
addq $0x2, %rbx
jmp 0x2bb517
movq 0x28(%rsp), %rax
cmpq (%rax), %r13
jne 0x2bb8a5
movl (%rbp), %esi
testb $0x7, %sil
jne 0x2bb8a5
testq %rdi, %rdi
je 0x2bb6df
testq %rsi, %rsi
je 0x2bb6c7
shrl $0x3, %esi
movq (%rsp), %rdi
callq 0x2b821a
movq (%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b8584
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x17c873(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29914(%rip), %rsi     # 0x2e5013
leaq 0xc826a(%rip), %rdx     # 0x383970
leaq 0xc81a7(%rip), %rcx     # 0x3838b4
leaq 0xc7f8d(%rip), %r8      # 0x3836a1
movl $0x347, %r9d            # imm = 0x347
jmp 0x2bb748
movq 0x17c845(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x298e6(%rip), %rsi     # 0x2e5013
leaq 0xc8264(%rip), %rdx     # 0x383998
leaq 0xc8179(%rip), %rcx     # 0x3838b4
leaq 0xc7f5f(%rip), %r8      # 0x3836a1
movl $0x348, %r9d            # imm = 0x348
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x17c80d(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x298ae(%rip), %rsi     # 0x2e5013
leaq 0xc81aa(%rip), %rdx     # 0x383916
leaq 0xc8141(%rip), %rcx     # 0x3838b4
leaq 0xc7f27(%rip), %r8      # 0x3836a1
movl $0x317, %r9d            # imm = 0x317
jmp 0x2bb748
movq 0x17c7df(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29880(%rip), %rsi     # 0x2e5013
leaq 0xc8162(%rip), %rdx     # 0x3838fc
leaq 0xc8113(%rip), %rcx     # 0x3838b4
leaq 0xc7ef9(%rip), %r8      # 0x3836a1
movl $0x312, %r9d            # imm = 0x312
jmp 0x2bb748
movq 0x17c7b1(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29852(%rip), %rsi     # 0x2e5013
leaq 0xc816f(%rip), %rdx     # 0x383937
leaq 0xc80e5(%rip), %rcx     # 0x3838b4
leaq 0xc7ecb(%rip), %r8      # 0x3836a1
movl $0x318, %r9d            # imm = 0x318
jmp 0x2bb748
movq 0x17c780(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29821(%rip), %rsi     # 0x2e5013
leaq 0xc8103(%rip), %rdx     # 0x3838fc
leaq 0xc80b4(%rip), %rcx     # 0x3838b4
leaq 0xc7e9a(%rip), %r8      # 0x3836a1
movl $0x327, %r9d            # imm = 0x327
jmp 0x2bb748
movq 0x17c74f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x297f0(%rip), %rsi     # 0x2e5013
leaq 0xc810d(%rip), %rdx     # 0x383937
leaq 0xc8083(%rip), %rcx     # 0x3838b4
leaq 0xc7e69(%rip), %r8      # 0x3836a1
movl $0x32e, %r9d            # imm = 0x32E
jmp 0x2bb748
movq 0x17c71e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x297bf(%rip), %rsi     # 0x2e5013
leaq 0xc80f5(%rip), %rdx     # 0x383950
leaq 0xc8052(%rip), %rcx     # 0x3838b4
leaq 0xc7e38(%rip), %r8      # 0x3836a1
movl $0x32d, %r9d            # imm = 0x32D
jmp 0x2bb748
movq 0x17c6ed(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2978e(%rip), %rsi     # 0x2e5013
leaq 0xc7fdf(%rip), %rdx     # 0x38386b
leaq 0xc8021(%rip), %rcx     # 0x3838b4
leaq 0xc7e07(%rip), %r8      # 0x3836a1
movl $0x2f4, %r9d            # imm = 0x2F4
jmp 0x2bb748
movq 0x17c6bc(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2975d(%rip), %rsi     # 0x2e5013
leaq 0xc80fc(%rip), %rdx     # 0x3839b9
leaq 0xc7ff0(%rip), %rcx     # 0x3838b4
leaq 0xc7dd6(%rip), %r8      # 0x3836a1
movl $0x34c, %r9d            # imm = 0x34C
jmp 0x2bb748
movq 0x17c68b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2972c(%rip), %rsi     # 0x2e5013
leaq 0xc7ff1(%rip), %rdx     # 0x3838df
leaq 0xc7fbf(%rip), %rcx     # 0x3838b4
leaq 0xc7da5(%rip), %r8      # 0x3836a1
movl $0x2f9, %r9d            # imm = 0x2F9
jmp 0x2bb748