// File: /workspace/github_c_makefile_star2_O1/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, 0x40(%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq (%r8,%rdx), %rsi
movq 0x10(%rdi), %rdi
movq %rsi, 0x78(%rsp)
callq 0x3243af
movq %r15, %rax
subq %rbx, %rax
movq %rbx, %r13
cmovbq %r15, %r13
movq %rax, 0x80(%rsp)
negq %rax
movq %rax, 0x58(%rsp)
movq %r15, %rax
addq $-0x1, %rax
setb %cl
movq %rbx, %rdx
addq $-0x1, %rdx
setb %sil
andb %cl, %sil
movb %sil, 0x17(%rsp)
cmpq %rax, %rdx
cmovaeq %rax, %rdx
incq %rdx
movq %rdx, 0x68(%rsp)
xorl %r9d, %r9d
movq %r14, 0x60(%rsp)
movq %r13, 0x70(%rsp)
leaq (%r9,%r9), %rdx
movq 0x8(%r14), %rax
movq %rdx, 0x88(%rsp)
cmpq %rax, %rdx
movq %r9, 0x38(%rsp)
jb 0x328ce4
movq %rax, %xmm0
punpckldq 0x27c70(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x27c78(%rip), %xmm0    # 0x3508f0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x2808c(%rip), %xmm1    # 0x350d18
addsd 0xc4604(%rip), %xmm1    # 0x3ed298
cvttsd2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x28078(%rip), %xmm1    # 0x350d20
cvttsd2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0x8(%r14)
movq (%r14), %rdi
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rsi
leaq 0xc4619(%rip), %rdx     # 0x3ed2e2
movl $0x40a, %ecx            # imm = 0x40A
callq 0x1094e6
movq 0x38(%rsp), %r9
movq %rax, (%r14)
testq %rax, %rax
je 0x32933a
movq (%r14), %r11
cmpq $0x1, %r9
movq %r11, 0x48(%rsp)
je 0x328d40
testq %r9, %r9
jne 0x328dc6
movl $0x0, 0x8(%r11)
movb $0x0, 0x11(%r11)
xorl %eax, %eax
cmpb $0x0, 0x17(%rsp)
movq 0x68(%rsp), %rsi
je 0x328d33
xorl %eax, %eax
movq 0x40(%rsp), %rdx
movb (%r12,%rax), %cl
cmpb $-0x3, %cl
ja 0x328d33
cmpb (%rdx,%rax), %cl
jne 0x328d33
incq %rax
cmpq %rax, %rsi
jne 0x328d1d
movl %eax, 0xc(%r11)
movl %eax, 0x8(%r11)
jmp 0x329283
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
movq 0x40(%rsp), %r8
jne 0x3291dd
movq %rax, %rdx
movb (%r12,%rdx), %cl
cmpb $-0x3, %cl
ja 0x3291da
cmpb -0x1(%r8,%rdx), %cl
jne 0x3291da
leaq 0x1(%rdx), %rcx
cmpq %rbx, %rdx
jae 0x3291dd
movq %rcx, %rdx
cmpq %r15, %rcx
jb 0x328d94
jmp 0x3291dd
leaq (,%r9,8), %rax
leaq (%rax,%rax,2), %rdi
negq %rdi
movq (%r11), %rax
movq %rax, 0x50(%rsp)
movl 0x8(%r11), %ecx
movb 0x10(%r11), %al
movb %al, 0x2c(%rsp)
movl 0xc(%r11), %eax
movl %eax, 0x28(%rsp)
movzwl 0x16(%r11), %eax
movw %ax, 0x34(%rsp)
movl 0x12(%r11), %eax
movl %eax, 0x30(%rsp)
movb 0x10(%r11), %al
movb %al, 0xc(%rsp)
movl 0xc(%r11), %eax
movl %eax, 0x8(%rsp)
movl 0x12(%r11), %eax
movl %eax, 0x10(%rsp)
movzwl 0x16(%r11), %eax
movw %ax, 0x14(%rsp)
leal 0x1(%rcx), %r8d
movl %r8d, 0x8(%r11)
movb $0x4, 0x11(%r11)
movl %r8d, %eax
cmpq %r15, %r8
jae 0x328e8b
movq %rdi, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
leaq (%rdx,%r8), %r9
movl %r8d, %eax
cmpq %rbx, %r9
jae 0x328e8b
movq 0x40(%rsp), %rax
leaq (%rax,%rdx), %r9
incq %rdx
movq %r8, %rax
movb (%r12,%rax), %r10b
cmpb $-0x3, %r10b
ja 0x328e8b
cmpb (%r9,%rax), %r10b
jne 0x328e8b
leaq (%rdx,%rax), %r10
incq %rax
cmpq %rbx, %r10
jae 0x328e8b
cmpq %r15, %rax
jb 0x328e6a
movl %eax, %edx
subl %r8d, %edx
movl %edx, 0xc(%r11)
movl %eax, 0x8(%r11)
movq 0x18(%r11), %r14
movl 0x20(%r11), %edx
leaq 0x24(%r11), %r9
movb 0x28(%r11), %al
movb %al, 0x1c(%rsp)
movl 0x24(%r11), %eax
movl %eax, 0x18(%rsp)
leaq 0x2a(%r11), %r10
movzwl 0x2e(%r11), %eax
movw %ax, 0x24(%rsp)
movl 0x2a(%r11), %eax
movl %eax, 0x20(%rsp)
leal 0x1(%rdx), %eax
cmpl %eax, %r8d
jae 0x328f01
movb 0x4(%r9), %r8b
movb %r8b, 0xc(%rsp)
movl (%r9), %r8d
movl %r8d, 0x8(%rsp)
movl (%r10), %r8d
movl %r8d, 0x10(%rsp)
movzwl 0x4(%r10), %r8d
movw %r8w, 0x14(%rsp)
movb $0x4, %r11b
movq %r14, %rsi
movq %r14, %r8
jmp 0x328f19
movq %r14, %rsi
cmpl %edx, %ecx
sete %r11b
shlb $0x2, %r11b
incb %r11b
movl %r8d, %eax
movq 0x50(%rsp), %r8
movq 0x48(%rsp), %r14
movq %r8, 0x18(%r14)
movl %eax, 0x20(%r14)
movb 0xc(%rsp), %r8b
movb %r8b, 0x4(%r9)
movl 0x8(%rsp), %r8d
movl %r8d, (%r9)
movb %r11b, 0x29(%r14)
movq %r14, %r11
movzwl 0x14(%rsp), %r8d
movw %r8w, 0x4(%r10)
movl 0x10(%rsp), %r8d
movl %r8d, (%r10)
movl %eax, %r8d
movl %eax, %r9d
cmpq %r15, %r8
jae 0x328fad
addq $0x18, %rdi
sarq $0x3, %rdi
movabsq $-0x5555555555555555, %r9 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r9, %rdi
leaq (%rdi,%r8), %r10
movl %eax, %r9d
cmpq %rbx, %r10
jae 0x328fad
movq 0x40(%rsp), %r9
addq %rdi, %r9
incq %rdi
movb (%r12,%r8), %r10b
cmpb $-0x3, %r10b
ja 0x328faa
cmpb (%r9,%r8), %r10b
jne 0x328faa
leaq (%rdi,%r8), %r10
incq %r8
cmpq %rbx, %r10
jae 0x328faa
cmpq %r15, %r8
jb 0x328f89
movl %r8d, %r9d
movq 0x38(%rsp), %rdi
shlq $0x4, %rdi
leaq (%rdi,%rdi,2), %rdi
movl %r9d, %r8d
subl %eax, %r8d
movl %r8d, 0x24(%r11)
movl %r9d, 0x20(%r11)
cmpq $0x30, %rdi
jl 0x3291d0
movq 0x38(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0x48(%rsp), %r8
leaq (%r8,%rax,8), %rax
movq %rax, 0x90(%rsp)
addq %r8, %rdi
leaq 0x30(%r8), %r9
leaq -0x18(%rdi), %r10
leaq -0x30(%rdi), %r11
movb 0x2c(%rsp), %al
movb %al, 0xc(%rsp)
movl 0x28(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x10(%rsp)
movzwl 0x34(%rsp), %eax
movw %ax, 0x14(%rsp)
movb $0x2, %r8b
movl %ecx, %r13d
movq 0x50(%rsp), %rax
cmpq %r10, %r9
movq %rsi, %r14
ja 0x329073
leal 0x1(%rdx), %r13d
cmpl %r13d, %ecx
jae 0x329063
movb 0x1c(%rsp), %al
movb %al, 0xc(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0x10(%rsp)
movzwl 0x24(%rsp), %eax
movw %ax, 0x14(%rsp)
movb $0x1, %r8b
movq %r14, %rax
jmp 0x329073
sete %r8b
orb $0x2, %r8b
movl %ecx, %r13d
movq 0x50(%rsp), %rax
cmpq %r11, %r9
ja 0x3290c7
movl 0x8(%r9), %ebp
incl %ebp
cmpl %ebp, %r13d
jae 0x3290b1
movq (%r9), %rax
movb 0x10(%r9), %r8b
movb %r8b, 0xc(%rsp)
movl 0xc(%r9), %r8d
movl %r8d, 0x8(%rsp)
movl 0x12(%r9), %r8d
movl %r8d, 0x10(%rsp)
movzwl 0x16(%r9), %r8d
movw %r8w, 0x14(%rsp)
movb $0x4, %r8b
jmp 0x3290ca
leal 0x4(%r8), %r14d
cmpl %ebp, %r13d
movzbl %r8b, %ebp
movzbl %r14b, %r8d
movq %rsi, %r14
cmovnel %ebp, %r8d
movl %r13d, %ebp
cmpq %rdi, %r9
jae 0x329125
movb 0x1c(%rsp), %cl
movb %cl, 0x2c(%rsp)
movl 0x18(%rsp), %ecx
movl %ecx, 0x28(%rsp)
movzwl 0x24(%rsp), %ecx
movw %cx, 0x34(%rsp)
movl 0x20(%rsp), %ecx
movl %ecx, 0x30(%rsp)
movq %r14, 0x50(%rsp)
movq (%r9), %rsi
movl %edx, %ecx
movl 0x8(%r9), %edx
movb 0x10(%r9), %r13b
movb %r13b, 0x1c(%rsp)
movl 0xc(%r9), %r13d
movl %r13d, 0x18(%rsp)
movzwl 0x16(%r9), %r13d
movw %r13w, 0x24(%rsp)
movl 0x12(%r9), %r13d
movl %r13d, 0x20(%rsp)
movq %rax, (%r9)
movl %ebp, 0x8(%r9)
movl 0x8(%rsp), %eax
movl %eax, 0xc(%r9)
movb 0xc(%rsp), %al
movb %al, 0x10(%r9)
movb %r8b, 0x11(%r9)
movl 0x10(%rsp), %eax
movl %eax, 0x12(%r9)
movzwl 0x14(%rsp), %eax
movw %ax, 0x16(%r9)
movl %ebp, %eax
movl %ebp, %r14d
cmpq %r15, %rax
jae 0x3291b6
movq %r9, %r8
subq 0x90(%rsp), %r8
sarq $0x3, %r8
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r14, %r8
leaq (%r8,%rax), %r13
movl %ebp, %r14d
cmpq %rbx, %r13
jae 0x3291b6
movq 0x40(%rsp), %r14
leaq (%r14,%r8), %r13
incq %r8
movb (%r12,%rax), %r14b
cmpb $-0x3, %r14b
ja 0x3291b3
cmpb (%r13,%rax), %r14b
jne 0x3291b3
leaq (%r8,%rax), %r14
incq %rax
cmpq %rbx, %r14
jae 0x3291b3
cmpq %r15, %rax
jb 0x329191
movl %eax, %r14d
movl %r14d, %eax
subl %ebp, %eax
movl %eax, 0xc(%r9)
movl %r14d, 0x8(%r9)
addq $0x18, %r9
cmpq %rdi, %r9
jbe 0x328ffb
movq 0x38(%rsp), %r9
jmp 0x329283
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, %r13
jbe 0x329219
movq %rax, %rcx
movb (%r12,%rcx), %dl
cmpb $-0x3, %dl
ja 0x329219
cmpb (%r8,%rcx), %dl
jne 0x329219
incq %rcx
cmpq %r13, %rcx
jb 0x329202
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 0x329277
movb (%r12,%rcx), %dl
cmpb $-0x3, %dl
ja 0x329274
cmpb 0x1(%r8,%rcx), %dl
jne 0x329274
leaq 0x1(%rcx), %rdx
addq $0x2, %rcx
cmpq %rbx, %rcx
jae 0x329277
movq %rdx, %rcx
cmpq %r15, %rdx
jb 0x32924d
jmp 0x329277
movq %rcx, %rdx
movl %edx, %ecx
subl %eax, %ecx
movl %ecx, 0x3c(%r11)
movl %edx, 0x38(%r11)
shlq $0x4, %r9
leaq (%r9,%r9,2), %rax
testq %rax, %rax
js 0x3292c8
movq 0x60(%rsp), %rax
movq 0x10(%rax), %r13
movq 0x88(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0x48(%rsp), %r14
leaq (%r14,%rax,8), %rbp
movzbl 0x11(%r14), %esi
movl 0xc(%r14), %edx
movq %r13, %rdi
callq 0x324540
addq $0x18, %r14
cmpq %rbp, %r14
jbe 0x3292ae
cmpq %r15, %rbx
seta %al
movq 0x38(%rsp), %r9
cmpq %r9, 0x58(%rsp)
setbe %dl
cmpq %r9, 0x80(%rsp)
seta %cl
testb %dl, %al
jne 0x3292ee
orb %cl, %al
jne 0x329308
movq 0x58(%rsp), %rax
addq %r9, %rax
leaq (%rax,%rax,2), %rax
movq 0x48(%rsp), %rcx
movl 0x8(%rcx,%rax,8), %eax
cmpq %r15, %rax
je 0x329325
incq %r9
cmpq 0x78(%rsp), %r9
movq 0x60(%rsp), %r14
movq 0x70(%rsp), %r13
jbe 0x328c45
callq 0x9561b
movq %r9, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x955e2