// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/ft-front-prune.c
// Function: gt_full_front_edist_trace_distance
GtUword gt_full_front_edist_trace_distance(GtFullFrontEdistTrace *fet,
                                           const GtUchar *useq,
                                           GtUword ulen,
                                           const GtUchar *vseq,
                                           GtUword vlen)
{
  const GtUword sumseqlength = ulen + vlen;
  GtUword distance;

  front_trace_reset(fet->front_trace,ulen+vlen);
  for (distance = 0; distance <= sumseqlength; distance++)
  {
    GtFtFrontvalue *basefront;
    if (2 * distance >= fet->allocatedGtFtFrontvalue)
    {
      fet->allocatedGtFtFrontvalue = fet->allocatedGtFtFrontvalue * 1.2 + 32;
      fet->spaceGtFtFrontvalue = gt_realloc(fet->spaceGtFtFrontvalue,
                                            sizeof *fet->spaceGtFtFrontvalue *
                                            fet->allocatedGtFtFrontvalue);
      gt_assert(fet->spaceGtFtFrontvalue != NULL);
    }
    basefront = fet->spaceGtFtFrontvalue;
    if (distance == 0)
    {
      basefront->row = 0;
      basefront->backreference = 0; /* No back reference */
      gt_full_front_prune_add_matches(basefront,basefront,useq,ulen,vseq,vlen);
    } else
    {
      if (distance == 1)
      {
        gt_full_front_second_inplace(basefront + distance,basefront,
                                     useq,ulen,vseq,vlen);
      } else
      {
        gt_full_front_next_inplace(basefront + distance,basefront,
                                   basefront + 2 * distance,
                                   useq,ulen,vseq,vlen);
      }
    }
    gt_full_front_trace_add_gen(fet->front_trace,basefront,
                                basefront + 2 * distance);
    if ((vlen > ulen && vlen - ulen <= distance) ||
        (vlen <= ulen && ulen - vlen <= distance))
    {
      if (basefront[distance + vlen - ulen].row == ulen)
      {
        break;
      }
    }
  }
  gt_assert(distance <= sumseqlength);
  return distance;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq 0x30(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x30(%rsp), %rsi
addq 0x20(%rsp), %rsi
callq 0x4c68d0
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
ja 0x4cffb6
movq 0x10(%rsp), %rax
shlq %rax
movq 0x40(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jb 0x4cfe4c
movq 0x40(%rsp), %rax
movq 0x8(%rax), %xmm0
movaps 0x48bbb(%rip), %xmm1    # 0x518930
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x48bbf(%rip), %xmm1    # 0x518940
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x48fd0(%rip), %xmm1    # 0x518d68
mulsd %xmm1, %xmm0
movsd 0xc896c(%rip), %xmm1    # 0x598710
addsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
movsd 0x48fb1(%rip), %xmm1    # 0x518d70
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rax
movq (%rax), %rdi
movq 0x40(%rsp), %rax
imulq $0x18, 0x8(%rax), %rsi
leaq 0xe9562(%rip), %rdx     # 0x5b9352
movl $0x40a, %ecx            # imm = 0x40A
callq 0xe8540
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movq 0x40(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x4cfe48
movq 0x16c189(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x461f2(%rip), %rsi     # 0x516013
leaq 0xe95b9(%rip), %rdx     # 0x5b93e1
leaq 0xe95d3(%rip), %rcx     # 0x5b9402
leaq 0xe951c(%rip), %r8      # 0x5b9352
movl $0x40b, %r9d            # imm = 0x40B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4cfe4a
jmp 0x4cfe4c
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x4cfe9b
movq 0x8(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x8(%rsp), %rax
movb $0x0, 0x11(%rax)
movq 0x8(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x20(%rsp), %r9
callq 0x4d0010
jmp 0x4cff17
cmpq $0x1, 0x10(%rsp)
jne 0x4cfed1
movq 0x8(%rsp), %rdi
imulq $0x18, 0x10(%rsp), %rax
addq %rax, %rdi
movq 0x8(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x20(%rsp), %r9
callq 0x4d0130
jmp 0x4cff15
movq 0x8(%rsp), %rdi
imulq $0x18, 0x10(%rsp), %rax
addq %rax, %rdi
movq 0x8(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rax
shlq %rax
imulq $0x18, %rax, %rax
addq %rax, %rdx
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x28(%rsp), %r9
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
callq 0x4d0240
jmp 0x4cff17
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x8(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rax
shlq %rax
imulq $0x18, %rax, %rax
addq %rax, %rdx
callq 0x4d05b0
movq 0x20(%rsp), %rax
cmpq 0x30(%rsp), %rax
jbe 0x4cff5b
movq 0x20(%rsp), %rax
subq 0x30(%rsp), %rax
cmpq 0x10(%rsp), %rax
jbe 0x4cff78
movq 0x20(%rsp), %rax
cmpq 0x30(%rsp), %rax
ja 0x4cffa1
movq 0x30(%rsp), %rax
subq 0x20(%rsp), %rax
cmpq 0x10(%rsp), %rax
ja 0x4cffa1
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
addq 0x20(%rsp), %rcx
subq 0x30(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpq 0x30(%rsp), %rax
jne 0x4cff9f
jmp 0x4cffb6
jmp 0x4cffa1
jmp 0x4cffa3
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x4cfd3d
jmp 0x4cffb8
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jbe 0x4cfffc
movq 0x16bfd5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4603e(%rip), %rsi     # 0x516013
leaq 0xe9449(%rip), %rdx     # 0x5b9425
leaq 0xe941f(%rip), %rcx     # 0x5b9402
leaq 0xe9368(%rip), %r8      # 0x5b9352
movl $0x42b, %r9d            # imm = 0x42B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4cfffe
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)