// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/ft-front-generation.c
// Function: front_trace2eoplist_directed
static void front_trace2eoplist_directed(GtEoplist *eoplist,
                                         const GtFrontTrace *front_trace,
                                         const GtUchar *useq,
                                         GT_UNUSED GtUword ulen,
                                         const GtUchar *vseq,
                                         GT_UNUSED GtUword vlen,
                                         const GtFtPolished_point *pp)
{
  GtUword distance, localoffset, globaloffset, remainingvalidfronts,
          trimleft;
  GtWord diagonal;
  unsigned int row, lcs;
  uint8_t trace, preferred_eop = FT_EOP_MISMATCH;

  gt_assert(front_trace != NULL && front_trace->gen_nextfree > 0 && pp != NULL);
  localoffset = polished_point2offset(front_trace,pp);
  remainingvalidfronts = valid_total_fronts(front_trace->gen_table,
                                            pp->distance,
                                            front_trace->gen_nextfree);
  gt_assert(remainingvalidfronts <= front_trace->backref_nextfree);
  globaloffset = front_trace->backref_nextfree - remainingvalidfronts;
  distance = pp->distance;
  diagonal = (GtWord) pp->alignedlen - (GtWord) GT_MULT2(pp->row);
  trace = front_trace->backref_table[globaloffset + localoffset].bits;
  lcs = front_trace->backref_table[globaloffset + localoffset].lcs;
  row = pp->row;
  trimleft = pp->trimleft;
  gt_assert(distance < front_trace->gen_nextfree);
  while (distance > 0)
  {
    GtUword nextrowadd;
    GtWord base_diagonal;

    if (eoplist != NULL)
    {
      if (lcs > 0)
      {
        gt_eoplist_match_add(eoplist,lcs);
      }
    } else
    {
      gt_check_diagonal_run(useq, vseq, diagonal, row - lcs, row);
    }
    if (trace & 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 (trace & FT_EOP_MISMATCH)
      {
        preferred_eop = FT_EOP_MISMATCH;
        nextrowadd = 1;
      } else
      {
        if (trace & FT_EOP_INSERTION)
        {
          gt_assert(-(GtWord) ulen < diagonal);
          diagonal--;
          preferred_eop = FT_EOP_INSERTION;
          nextrowadd = 0;
        } else
        {
          gt_assert(trace & 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);
        }
      }
    }
    gt_assert(trimleft >=
              (GtUword) front_trace->gen_table[distance].trimleft_diff);
    trimleft -= (GtUword) front_trace->gen_table[distance].trimleft_diff;
    distance--;
    base_diagonal = (GtWord) trimleft - (GtWord) distance;
    gt_assert(base_diagonal <= diagonal);
    gt_assert(diagonal <
              base_diagonal + (GtWord) front_trace->gen_table[distance].valid);
    localoffset = (GtUword) (diagonal - base_diagonal);
    gt_assert((GtUword) front_trace->gen_table[distance].valid
              <= globaloffset);
    globaloffset -= (GtUword) front_trace->gen_table[distance].valid;
    gt_assert(row >= lcs + nextrowadd);
    row -= lcs + nextrowadd;
    trace = front_trace->backref_table[globaloffset + localoffset].bits;
    lcs = front_trace->backref_table[globaloffset + localoffset].lcs;
  }
  /*printf("avg runlength=%.2f\n",(double) pp->distance/totalrunlength);*/
  gt_assert(globaloffset + localoffset == 0 && trace == 0);
  if (eoplist != NULL && lcs > 0)
  {
    gt_eoplist_match_add(eoplist,lcs);
  }
}

// Assembly:
subq $0x88, %rsp
movq 0x90(%rsp), %rax
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movq %r9, 0x58(%rsp)
movb $0x1, 0x1e(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x4c7644
movq 0x78(%rsp), %rax
cmpq $0x0, 0x50(%rax)
jbe 0x4c7644
cmpq $0x0, 0x90(%rsp)
jne 0x4c767c
movq 0x174955(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e9be(%rip), %rsi     # 0x516013
leaq 0xf17ad(%rip), %rdx     # 0x5b8e09
leaq 0xf1aee(%rip), %rcx     # 0x5b9151
leaq 0xf1449(%rip), %r8      # 0x5b8ab3
movl $0x11a, %r9d            # imm = 0x11A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c767e
movq 0x78(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x4c8560
movq %rax, 0x48(%rsp)
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x78(%rsp), %rax
movq 0x50(%rax), %rdx
callq 0x4c86f0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x78(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x4c7705
movq 0x1748cc(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e935(%rip), %rsi     # 0x516013
leaq 0xf1784(%rip), %rdx     # 0x5b8e69
leaq 0xf1a65(%rip), %rcx     # 0x5b9151
leaq 0xf13c0(%rip), %r8      # 0x5b8ab3
movl $0x11f, %r9d            # imm = 0x11F
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7707
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
subq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq 0x8(%rcx), %rcx
shlq %rcx
subq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
addq 0x48(%rsp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x7, %eax
movb %al, 0x1f(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
addq 0x48(%rsp), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x3, %eax
movl %eax, 0x20(%rsp)
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
movl %eax, 0x24(%rsp)
movq 0x90(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq 0x78(%rsp), %rcx
cmpq 0x50(%rcx), %rax
jb 0x4c77ee
movq 0x1747e3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e84c(%rip), %rsi     # 0x516013
leaq 0xf172f(%rip), %rdx     # 0x5b8efd
leaq 0xf197c(%rip), %rcx     # 0x5b9151
leaq 0xf12d7(%rip), %r8      # 0x5b8ab3
movl $0x127, %r9d            # imm = 0x127
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c77f0
jmp 0x4c77f2
cmpq $0x0, 0x50(%rsp)
jbe 0x4c7d87
cmpq $0x0, 0x80(%rsp)
je 0x4c7825
cmpl $0x0, 0x20(%rsp)
jbe 0x4c7823
movq 0x80(%rsp), %rdi
movl 0x20(%rsp), %eax
movl %eax, %esi
callq 0x4c28f0
jmp 0x4c7846
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x28(%rsp), %rdx
movl 0x24(%rsp), %ecx
subl 0x20(%rsp), %ecx
movl 0x24(%rsp), %r8d
callq 0x4c8460
movzbl 0x1f(%rsp), %eax
movzbl 0x1e(%rsp), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x4c798f
movzbl 0x1e(%rsp), %eax
cmpl $0x1, %eax
jne 0x4c7873
movq $0x1, 0x10(%rsp)
jmp 0x4c798a
movzbl 0x1e(%rsp), %eax
cmpl $0x2, %eax
jne 0x4c78e3
jmp 0x4c787f
xorl %eax, %eax
subq 0x68(%rsp), %rax
cmpq 0x28(%rsp), %rax
jl 0x4c78c5
movq 0x17470c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e775(%rip), %rsi     # 0x516013
leaq 0xf1469(%rip), %rdx     # 0x5b8d0e
leaq 0xf18a5(%rip), %rcx     # 0x5b9151
leaq 0xf1200(%rip), %r8      # 0x5b8ab3
movl $0x140, %r9d            # imm = 0x140
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c78c7
movq 0x28(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x28(%rsp)
movq $0x0, 0x10(%rsp)
jmp 0x4c7988
jmp 0x4c78e5
movzbl 0x1e(%rsp), %eax
cmpl $0x4, %eax
je 0x4c7927
movq 0x1746aa(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e713(%rip), %rsi     # 0x516013
leaq 0xf1421(%rip), %rdx     # 0x5b8d28
leaq 0xf1843(%rip), %rcx     # 0x5b9151
leaq 0xf119e(%rip), %r8      # 0x5b8ab3
movl $0x145, %r9d            # imm = 0x145
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7929
jmp 0x4c792b
movq 0x28(%rsp), %rax
cmpq 0x58(%rsp), %rax
jl 0x4c796f
movq 0x174662(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e6cb(%rip), %rsi     # 0x516013
leaq 0xf13fa(%rip), %rdx     # 0x5b8d49
leaq 0xf17fb(%rip), %rcx     # 0x5b9151
leaq 0xf1156(%rip), %r8      # 0x5b8ab3
movl $0x146, %r9d            # imm = 0x146
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7971
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq $0x1, 0x10(%rsp)
jmp 0x4c798a
jmp 0x4c7ad8
movzbl 0x1f(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4c79af
movb $0x1, 0x1e(%rsp)
movq $0x1, 0x10(%rsp)
jmp 0x4c7ad6
movzbl 0x1f(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4c7a27
jmp 0x4c79be
xorl %eax, %eax
subq 0x68(%rsp), %rax
cmpq 0x28(%rsp), %rax
jl 0x4c7a04
movq 0x1745cd(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e636(%rip), %rsi     # 0x516013
leaq 0xf132a(%rip), %rdx     # 0x5b8d0e
leaq 0xf1766(%rip), %rcx     # 0x5b9151
leaq 0xf10c1(%rip), %r8      # 0x5b8ab3
movl $0x155, %r9d            # imm = 0x155
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7a06
movq 0x28(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x28(%rsp)
movb $0x2, 0x1e(%rsp)
movq $0x0, 0x10(%rsp)
jmp 0x4c7ad4
jmp 0x4c7a29
movzbl 0x1f(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x4c7a6e
movq 0x174563(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e5cc(%rip), %rsi     # 0x516013
leaq 0xf1720(%rip), %rdx     # 0x5b916e
leaq 0xf16fc(%rip), %rcx     # 0x5b9151
leaq 0xf1057(%rip), %r8      # 0x5b8ab3
movl $0x15b, %r9d            # imm = 0x15B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7a70
jmp 0x4c7a72
movq 0x28(%rsp), %rax
cmpq 0x58(%rsp), %rax
jl 0x4c7ab6
movq 0x17451b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e584(%rip), %rsi     # 0x516013
leaq 0xf12b3(%rip), %rdx     # 0x5b8d49
leaq 0xf16b4(%rip), %rcx     # 0x5b9151
leaq 0xf100f(%rip), %r8      # 0x5b8ab3
movl $0x15c, %r9d            # imm = 0x15C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7ab8
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movb $0x4, 0x1e(%rsp)
movq $0x1, 0x10(%rsp)
jmp 0x4c7ad6
jmp 0x4c7ad8
cmpq $0x0, 0x80(%rsp)
je 0x4c7b26
movzbl 0x1e(%rsp), %eax
cmpl $0x4, %eax
jne 0x4c7afc
movq 0x80(%rsp), %rdi
callq 0x4c24d0
jmp 0x4c7b24
movzbl 0x1e(%rsp), %eax
cmpl $0x2, %eax
jne 0x4c7b15
movq 0x80(%rsp), %rdi
callq 0x4c26c0
jmp 0x4c7b22
movq 0x80(%rsp), %rdi
callq 0x4c2d60
jmp 0x4c7b24
jmp 0x4c7b26
jmp 0x4c7b28
movq 0x30(%rsp), %rax
movq 0x78(%rsp), %rcx
movq 0x20(%rcx), %rcx
movq 0x50(%rsp), %rdx
movzwl (%rcx,%rdx,4), %ecx
cmpq %rcx, %rax
jae 0x4c7b7c
movq 0x174455(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e4be(%rip), %rsi     # 0x516013
leaq 0xf162a(%rip), %rdx     # 0x5b9186
leaq 0xf15ee(%rip), %rcx     # 0x5b9151
leaq 0xf0f49(%rip), %r8      # 0x5b8ab3
movl $0x174, %r9d            # imm = 0x174
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7b7e
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x50(%rsp), %rcx
movzwl (%rax,%rcx,4), %eax
movl %eax, %ecx
movq 0x30(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x50(%rsp)
movq 0x30(%rsp), %rax
subq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x28(%rsp), %rax
jle 0x4c7c00
movq 0x1743d1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e43a(%rip), %rsi     # 0x516013
leaq 0xf14c0(%rip), %rdx     # 0x5b90a0
leaq 0xf156a(%rip), %rcx     # 0x5b9151
leaq 0xf0ec5(%rip), %r8      # 0x5b8ab3
movl $0x178, %r9d            # imm = 0x178
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7c02
jmp 0x4c7c04
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x78(%rsp), %rdx
movq 0x20(%rdx), %rdx
movq 0x50(%rsp), %rsi
movzwl 0x2(%rdx,%rsi,4), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jl 0x4c7c61
movq 0x174370(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e3d9(%rip), %rsi     # 0x516013
leaq 0xf158a(%rip), %rdx     # 0x5b91cb
leaq 0xf1509(%rip), %rcx     # 0x5b9151
leaq 0xf0e64(%rip), %r8      # 0x5b8ab3
movl $0x17a, %r9d            # imm = 0x17A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7c63
movq 0x28(%rsp), %rax
subq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x50(%rsp), %rcx
movzwl 0x2(%rax,%rcx,4), %eax
cmpq 0x40(%rsp), %rax
jbe 0x4c7cc4
movq 0x17430d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e376(%rip), %rsi     # 0x516013
leaq 0xf1572(%rip), %rdx     # 0x5b9216
leaq 0xf14a6(%rip), %rcx     # 0x5b9151
leaq 0xf0e01(%rip), %r8      # 0x5b8ab3
movl $0x17d, %r9d            # imm = 0x17D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7cc6
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x50(%rsp), %rcx
movzwl 0x2(%rax,%rcx,4), %eax
movl %eax, %ecx
movq 0x40(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x40(%rsp)
movl 0x24(%rsp), %eax
movl 0x20(%rsp), %ecx
addq 0x10(%rsp), %rcx
cmpq %rcx, %rax
jae 0x4c7d32
movq 0x17429f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e308(%rip), %rsi     # 0x516013
leaq 0xf1545(%rip), %rdx     # 0x5b9257
leaq 0xf1438(%rip), %rcx     # 0x5b9151
leaq 0xf0d93(%rip), %r8      # 0x5b8ab3
movl $0x17f, %r9d            # imm = 0x17F
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7d34
movl 0x20(%rsp), %eax
movl %eax, %ecx
addq 0x10(%rsp), %rcx
movl 0x24(%rsp), %eax
subq %rcx, %rax
movl %eax, 0x24(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
addq 0x48(%rsp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x7, %eax
movb %al, 0x1f(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
addq 0x48(%rsp), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x3, %eax
movl %eax, 0x20(%rsp)
jmp 0x4c77f2
jmp 0x4c7d89
movq 0x40(%rsp), %rax
addq 0x48(%rsp), %rax
cmpq $0x0, %rax
jne 0x4c7da3
movzbl 0x1f(%rsp), %eax
cmpl $0x0, %eax
je 0x4c7ddb
movq 0x1741f6(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e25f(%rip), %rsi     # 0x516013
leaq 0xf14b4(%rip), %rdx     # 0x5b926f
leaq 0xf138f(%rip), %rcx     # 0x5b9151
leaq 0xf0cea(%rip), %r8      # 0x5b8ab3
movl $0x185, %r9d            # imm = 0x185
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c7ddd
cmpq $0x0, 0x80(%rsp)
je 0x4c7e02
cmpl $0x0, 0x20(%rsp)
jbe 0x4c7e02
movq 0x80(%rsp), %rdi
movl 0x20(%rsp), %eax
movl %eax, %esi
callq 0x4c28f0
addq $0x88, %rsp
retq
nopw (%rax,%rax)