// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, %rbx
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq (%r8,%rdx), %rsi
movq 0x10(%rdi), %rdi
movq %rsi, 0x68(%rsp)
callq 0x31a0c7
movq %r15, %rax
subq %rbx, %rax
movq %rbx, %rbp
cmovbq %r15, %rbp
movq %rax, 0x78(%rsp)
negq %rax
movq %rax, 0x50(%rsp)
movq %r15, %rax
addq $-0x1, %rax
setb %cl
movq %rbx, %rdx
addq $-0x1, %rdx
setb %sil
andb %cl, %sil
movb %sil, 0xf(%rsp)
cmpq %rax, %rdx
cmovaeq %rax, %rdx
incq %rdx
movq %rdx, 0x48(%rsp)
xorl %r8d, %r8d
movq %r13, 0x70(%rsp)
movq %r14, 0x58(%rsp)
movq %rbp, 0x60(%rsp)
leaq (%r8,%r8), %rdx
movq (%r14), %r11
movq 0x8(%r14), %rax
movq %rdx, 0x80(%rsp)
cmpq %rax, %rdx
movq %r8, 0x30(%rsp)
jae 0x31e9b8
movq 0x48(%rsp), %rdx
jmp 0x31ea41
movq %rax, %xmm0
punpckldq 0x28f1b(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x28f23(%rip), %xmm0    # 0x3478f0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x29337(%rip), %xmm1    # 0x347d18
addsd 0xc50ff(%rip), %xmm1    # 0x3e3ae8
cvttsd2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x29323(%rip), %xmm1    # 0x347d20
cvttsd2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0x8(%r14)
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rsi
movq %r11, %rdi
leaq 0xc5114(%rip), %rdx     # 0x3e3b32
movl $0x40a, %ecx            # imm = 0x40A
callq 0x104461
movq 0x30(%rsp), %r8
movq %rax, %r11
movq %rax, (%r14)
testq %rax, %rax
movq 0x48(%rsp), %rdx
je 0x31f0b5
cmpq $0x1, %r8
movq %r11, 0x38(%rsp)
je 0x31ea95
testq %r8, %r8
jne 0x31eb16
movl $0x0, 0x8(%r11)
movb $0x0, 0x11(%r11)
xorl %eax, %eax
cmpb $0x0, 0xf(%rsp)
je 0x31ea88
xorl %eax, %eax
movb (%r12,%rax), %cl
cmpb $-0x3, %cl
ja 0x31ea88
cmpb (%r13,%rax), %cl
jne 0x31ea88
incq %rax
cmpq %rax, %rdx
jne 0x31ea6d
movq %rdx, %rax
movl %eax, 0xc(%r11)
movl %eax, 0x8(%r11)
jmp 0x31eff5
movq 0x10(%r11), %rax
movq %rax, 0x40(%r11)
movupd (%r11), %xmm0
movupd %xmm0, 0x30(%r11)
movupd %xmm0, 0x18(%r11)
movq %rax, 0x28(%r11)
movl 0x8(%r11), %eax
incl %eax
movl %eax, 0x8(%r11)
movb $0x4, 0x11(%r11)
leaq -0x1(%rax), %rcx
cmpq %r15, %rax
setb %dl
cmpq %rbx, %rcx
setb %sil
andb %dl, %sil
movl %eax, %ecx
cmpb $0x1, %sil
jne 0x31ebf3
movq %rax, %rdx
movb (%r12,%rdx), %cl
cmpb $-0x3, %cl
ja 0x31ebf0
cmpb -0x1(%r13,%rdx), %cl
jne 0x31ebf0
leaq 0x1(%rdx), %rcx
cmpq %r15, %rcx
jae 0x31ebf3
cmpq %rbx, %rdx
movq %rcx, %rdx
jb 0x31eae4
jmp 0x31ebf3
leaq (,%r8,8), %rax
leaq (%rax,%rax,2), %rdi
negq %rdi
movq (%r11), %rax
movq %rax, 0x40(%rsp)
movl 0x8(%r11), %ecx
movb 0x10(%r11), %al
movb %al, 0x24(%rsp)
movl 0xc(%r11), %eax
movl %eax, 0x20(%rsp)
movzwl 0x16(%r11), %eax
movw %ax, 0x2c(%rsp)
movl 0x12(%r11), %eax
movl %eax, 0x28(%rsp)
movb 0x10(%r11), %al
movb %al, 0x4(%rsp)
movl 0xc(%r11), %eax
movl %eax, (%rsp)
movl 0x12(%r11), %eax
movl %eax, 0x8(%rsp)
movzwl 0x16(%r11), %eax
movw %ax, 0xc(%rsp)
leal 0x1(%rcx), %r8d
movl %r8d, 0x8(%r11)
movb $0x4, 0x11(%r11)
movl %r8d, %edx
cmpq %r15, %r8
jae 0x31eca2
movq %rdi, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rax
leaq (%rax,%r8), %r9
movl %r8d, %edx
cmpq %rbx, %r9
jae 0x31eca2
leaq (%rax,%r13), %r9
incq %rax
movq %r8, %r10
movb (%r12,%r10), %dl
cmpb $-0x3, %dl
ja 0x31ec9f
cmpb (%r9,%r10), %dl
jne 0x31ec9f
leaq 0x1(%r10), %rdx
cmpq %r15, %rdx
jae 0x31eca2
addq %rax, %r10
cmpq %rbx, %r10
movq %rdx, %r10
jb 0x31ebbc
jmp 0x31eca2
movq %rdx, %rcx
movl %ecx, %edx
subl %eax, %edx
movl %edx, 0xc(%r11)
movl %ecx, 0x8(%r11)
movl 0x20(%r11), %eax
incl %eax
movl %eax, 0x20(%r11)
movb $0x1, 0x29(%r11)
movl %eax, %ecx
cmpq %rax, %rbp
jbe 0x31ec30
movq %rax, %rcx
movb (%r12,%rcx), %dl
cmpb $-0x3, %dl
ja 0x31ec30
cmpb (%r13,%rcx), %dl
jne 0x31ec30
incq %rcx
cmpq %rbp, %rcx
jb 0x31ec18
movl %ecx, %edx
subl %eax, %edx
movl %edx, 0x24(%r11)
movl %ecx, 0x20(%r11)
movb $0x2, 0x41(%r11)
movl 0x38(%r11), %eax
movl %eax, %ecx
leaq 0x1(%rcx), %rdx
cmpq %r15, %rcx
setb %sil
cmpq %rbx, %rdx
setb %dil
andb %sil, %dil
movl %eax, %edx
cmpb $0x1, %dil
jne 0x31ec8e
movb (%r12,%rcx), %dl
cmpb $-0x3, %dl
ja 0x31ec8b
cmpb 0x1(%r13,%rcx), %dl
jne 0x31ec8b
leaq 0x1(%rcx), %rdx
cmpq %r15, %rdx
jae 0x31ec8e
addq $0x2, %rcx
cmpq %rbx, %rcx
movq %rdx, %rcx
jb 0x31ec64
jmp 0x31ec8e
movq %rcx, %rdx
movl %edx, %ecx
subl %eax, %ecx
movl %ecx, 0x3c(%r11)
movl %edx, 0x38(%r11)
jmp 0x31eff5
movq %r10, %rdx
movl %edx, %eax
subl %r8d, %eax
movl %eax, 0xc(%r11)
movl %edx, 0x8(%r11)
movq 0x18(%r11), %r14
movl 0x20(%r11), %edx
leaq 0x24(%r11), %r10
movb 0x28(%r11), %al
movb %al, 0x14(%rsp)
movl 0x24(%r11), %eax
movl %eax, 0x10(%rsp)
leaq 0x2a(%r11), %r9
movzwl 0x2e(%r11), %eax
movw %ax, 0x1c(%rsp)
movl 0x2a(%r11), %eax
movl %eax, 0x18(%rsp)
leal 0x1(%rdx), %ebp
cmpl %ebp, %r8d
jae 0x31ed1a
movb 0x4(%r10), %r8b
movb %r8b, 0x4(%rsp)
movl (%r10), %r8d
movl %r8d, (%rsp)
movl (%r9), %r8d
movl %r8d, 0x8(%rsp)
movzwl 0x4(%r9), %r8d
movw %r8w, 0xc(%rsp)
movl %ebp, %r8d
movq %r9, %rax
movb $0x4, %r9b
movq %r14, %rsi
jmp 0x31ed35
movq %r14, %rsi
cmpl %edx, %ecx
movq %r9, %rax
sete %r9b
shlb $0x2, %r9b
incb %r9b
movl %r8d, %ebp
movq 0x40(%rsp), %r14
movq 0x38(%rsp), %r11
movq %r14, 0x18(%r11)
movl %ebp, 0x20(%r11)
movl %ebp, %r14d
movb 0x4(%rsp), %bpl
movb %bpl, 0x4(%r10)
movl (%rsp), %ebp
movl %ebp, (%r10)
movl %r14d, %ebp
movb %r9b, 0x29(%r11)
movzwl 0xc(%rsp), %r9d
movw %r9w, 0x4(%rax)
movl 0x8(%rsp), %r9d
movl %r9d, (%rax)
movl %r14d, %r9d
cmpq %r15, %r8
jae 0x31edc8
addq $0x18, %rdi
sarq $0x3, %rdi
movabsq $-0x5555555555555555, %r9 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r9, %rdi
leaq (%r8,%rdi), %r10
movl %ebp, %r9d
cmpq %rbx, %r10
jae 0x31edc8
leaq (%rdi,%r13), %r10
incq %rdi
movb (%r12,%r8), %r9b
cmpb $-0x3, %r9b
ja 0x31edc5
cmpb (%r10,%r8), %r9b
jne 0x31edc5
leaq 0x1(%r8), %r9
cmpq %r15, %r9
jae 0x31edc8
addq %rdi, %r8
cmpq %rbx, %r8
movq %r9, %r8
jb 0x31ed9f
jmp 0x31edc8
movq %r8, %r9
movq 0x30(%rsp), %rdi
shlq $0x4, %rdi
leaq (%rdi,%rdi,2), %rdi
movl %r9d, %r8d
subl %ebp, %r8d
movl %r8d, 0x24(%r11)
movl %r9d, 0x20(%r11)
cmpq $0x30, %rdi
jl 0x31eff0
movq 0x30(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0x38(%rsp), %r8
leaq (%r8,%rax,8), %rax
movq %rax, 0x88(%rsp)
addq %r8, %rdi
leaq 0x30(%r8), %r9
leaq -0x18(%rdi), %rax
movq %rax, 0x90(%rsp)
leaq -0x30(%rdi), %r11
movb 0x24(%rsp), %al
movb %al, 0x4(%rsp)
movl 0x20(%rsp), %eax
movl %eax, (%rsp)
movl 0x28(%rsp), %eax
movl %eax, 0x8(%rsp)
movzwl 0x2c(%rsp), %eax
movw %ax, 0xc(%rsp)
movb $0x2, %r8b
movl %ecx, %r14d
movq 0x40(%rsp), %rax
cmpq 0x90(%rsp), %r9
ja 0x31ee96
leal 0x1(%rdx), %r14d
cmpl %r14d, %ecx
jae 0x31ee86
movb 0x14(%rsp), %al
movb %al, 0x4(%rsp)
movl 0x10(%rsp), %eax
movl %eax, (%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x8(%rsp)
movzwl 0x1c(%rsp), %eax
movw %ax, 0xc(%rsp)
movb $0x1, %r8b
movq %rsi, %rax
jmp 0x31ee96
sete %r8b
orb $0x2, %r8b
movl %ecx, %r14d
movq 0x40(%rsp), %rax
cmpq %r11, %r9
ja 0x31eee6
movl 0x8(%r9), %ebp
incl %ebp
cmpl %ebp, %r14d
jae 0x31eed3
movq (%r9), %rax
movb 0x10(%r9), %r8b
movb %r8b, 0x4(%rsp)
movl 0xc(%r9), %r8d
movl %r8d, (%rsp)
movl 0x12(%r9), %r8d
movl %r8d, 0x8(%rsp)
movzwl 0x16(%r9), %r8d
movw %r8w, 0xc(%rsp)
movb $0x4, %r8b
jmp 0x31eee9
leal 0x4(%r8), %r10d
cmpl %ebp, %r14d
movzbl %r8b, %ebp
movzbl %r10b, %r8d
cmovnel %ebp, %r8d
movl %r14d, %ebp
movq %rsi, %r10
cmpq %rdi, %r9
jae 0x31ef47
movb 0x14(%rsp), %cl
movb %cl, 0x24(%rsp)
movl 0x10(%rsp), %ecx
movl %ecx, 0x20(%rsp)
movzwl 0x1c(%rsp), %ecx
movw %cx, 0x2c(%rsp)
movl 0x18(%rsp), %ecx
movl %ecx, 0x28(%rsp)
movq %r10, 0x40(%rsp)
movq (%r9), %rsi
movl %edx, %ecx
movl 0x8(%r9), %edx
movb 0x10(%r9), %r14b
movb %r14b, 0x14(%rsp)
movl 0xc(%r9), %r14d
movl %r14d, 0x10(%rsp)
movzwl 0x16(%r9), %r14d
movw %r14w, 0x1c(%rsp)
movl 0x12(%r9), %r14d
movl %r14d, 0x18(%rsp)
movq %rax, (%r9)
movl %ebp, 0x8(%r9)
movl (%rsp), %eax
movl %eax, 0xc(%r9)
movb 0x4(%rsp), %al
movb %al, 0x10(%r9)
movb %r8b, 0x11(%r9)
movl 0x8(%rsp), %eax
movl %eax, 0x12(%r9)
movzwl 0xc(%rsp), %eax
movw %ax, 0x16(%r9)
movl %ebp, %eax
movl %ebp, %r14d
cmpq %r15, %rax
jae 0x31efd6
movq %r9, %r8
subq 0x88(%rsp), %r8
sarq $0x3, %r8
movabsq $-0x5555555555555555, %r10 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r10, %r8
leaq (%r8,%rax), %r10
movl %ebp, %r14d
cmpq %rbx, %r10
jae 0x31efd6
leaq (%r8,%r13), %r10
incq %r8
movb (%r12,%rax), %r14b
cmpb $-0x3, %r14b
ja 0x31efd3
cmpb (%r10,%rax), %r14b
jne 0x31efd3
leaq 0x1(%rax), %r14
cmpq %r15, %r14
jae 0x31efd6
addq %r8, %rax
cmpq %rbx, %rax
movq %r14, %rax
jb 0x31efad
jmp 0x31efd6
movq %rax, %r14
movl %r14d, %eax
subl %ebp, %eax
movl %eax, 0xc(%r9)
movl %r14d, 0x8(%r9)
addq $0x18, %r9
cmpq %rdi, %r9
jbe 0x31ee1e
movq 0x30(%rsp), %r8
shlq $0x4, %r8
leaq (%r8,%r8,2), %rax
testq %rax, %rax
js 0x31f041
movq 0x58(%rsp), %rax
movq 0x10(%rax), %r14
movq 0x80(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0x38(%rsp), %r13
leaq (,%rax,8), %rbp
addq %r13, %rbp
movzbl 0x11(%r13), %esi
movl 0xc(%r13), %edx
movq %r14, %rdi
callq 0x31a257
addq $0x18, %r13
cmpq %rbp, %r13
jbe 0x31f027
cmpq %r15, %rbx
seta %al
movq 0x30(%rsp), %r8
cmpq %r8, 0x50(%rsp)
setbe %dl
cmpq %r8, 0x78(%rsp)
seta %cl
testb %dl, %al
jne 0x31f064
orb %cl, %al
jne 0x31f07e
movq 0x50(%rsp), %rax
addq %r8, %rax
leaq (%rax,%rax,2), %rax
movq 0x38(%rsp), %rcx
movl 0x8(%rcx,%rax,8), %eax
cmpq %r15, %rax
je 0x31f0a0
incq %r8
cmpq 0x68(%rsp), %r8
movq 0x70(%rsp), %r13
movq 0x58(%rsp), %r14
movq 0x60(%rsp), %rbp
jbe 0x31e991
callq 0x93696
movq %r8, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x9365d