// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/seed-extend.c
// Function: gt_align_front_prune_edist
void gt_align_front_prune_edist(bool rightextension,
                                GtFtPolished_point *best_polished_point,
                                GtFrontTrace *front_trace,
                                const GtSeqorEncseq *dbes,
                                const GtSeqorEncseq *queryes,
                                GtReadmode query_readmode,
                                GtUword query_seqstart,
                                GtUword query_seqlen,
                                GtGreedyextendmatchinfo *ggemi,
                                bool greedyextension,
                                GtUword seedlength,
                                GtUword ustart,
                                GtUword ulen,
                                GtUword vstart,
                                GtUword vlen)
{
  GtUword distance = 0, iteration, maxiterations;
  GtFTsequenceResources ufsr, vfsr;
  const GtUword vseqstartpos = queryes->encseq != NULL ? query_seqstart : 0;

  gt_assert(ggemi != NULL);
  gt_greedy_extend_init(&ufsr,&vfsr,
                        dbes,queryes,query_readmode,
                        query_seqlen,ggemi);
  maxiterations = greedyextension ? 1 : ggemi->perc_mat_history;
  gt_assert(best_polished_point != NULL);
  for (iteration = 0; iteration <= maxiterations; iteration++)
  {
    GtTrimmingStrategy trimstrategy;
#ifdef SKDEBUG
    printf("%s: iteration " GT_WU "\n",__func__,iteration);
#endif
    if (iteration == maxiterations)
    {
      trimstrategy = GT_OUTSENSE_TRIM_NEVER;
    } else
    {
      trimstrategy = ggemi->trimstrategy;
    }
    gt_assert(iteration < ggemi->perc_mat_history);
    distance = front_prune_edist_inplace(rightextension,
                                         &ggemi->frontspace_reservoir,
                                         best_polished_point,
                                         front_trace,
                                         ggemi->pol_info,
                                         trimstrategy,
                                         ggemi->history,
                                         ggemi->perc_mat_history - iteration,
                                         ggemi->maxalignedlendifference
                                           + iteration,
                                         ggemi->showfrontinfo,
                                         seedlength,
                                         &ufsr,
                                         ustart,
                                         ulen,
                                         vseqstartpos,
                                         &vfsr,
                                         vstart,
                                         vlen,
                                         ggemi->cam_generic,
                                         NULL); /* trimstat */
    if (distance < ulen + vlen + 1)
    {
#ifdef SKDEBUG
      GtUword u_ext = best_polished_point->row, v_ext;
      gt_assert(best_polished_point->alignedlen >= u_ext);
      v_ext = best_polished_point->alignedlen - u_ext;
      printf("greedy(%s): align=" GT_WU ",row=" GT_WU ",distance=" GT_WU "\n",
          rightextension ? "right" : "left",
          u_ext + v_ext,
          u_ext,
          best_polished_point->distance);
#endif
      break;
    }
    if (front_trace != NULL)
    {
      front_trace_reset(front_trace,ulen + vlen);
    }
    best_polished_point->alignedlen = 0;
    best_polished_point->row = 0;
    best_polished_point->distance = 0;
    best_polished_point->trimleft = 0;
    best_polished_point->max_mismatches = 0;
  }
  gt_assert(distance >= best_polished_point->distance &&
            distance < ulen + vlen + 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq 0x200(%rsp), %rax
movq 0x1f8(%rsp), %rax
movq 0x1f0(%rsp), %rax
movq 0x1e8(%rsp), %rax
movq 0x1e0(%rsp), %rax
movb 0x1d8(%rsp), %al
movq 0x1d0(%rsp), %r10
movq 0x1c8(%rsp), %r10
movq 0x1c0(%rsp), %r10
andb $0x1, %dil
movb %dil, 0x187(%rsp)
movq %rsi, 0x178(%rsp)
movq %rdx, 0x170(%rsp)
movq %rcx, 0x168(%rsp)
movq %r8, 0x160(%rsp)
movl %r9d, 0x15c(%rsp)
andb $0x1, %al
movb %al, 0x15b(%rsp)
movq $0x0, 0x150(%rsp)
movq 0x160(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2ac272
movq 0x1c0(%rsp), %rax
movq %rax, 0xa8(%rsp)
jmp 0x2ac27e
xorl %eax, %eax
movq %rax, 0xa8(%rsp)
jmp 0x2ac27e
movq 0xa8(%rsp), %rax
movq %rax, 0xb8(%rsp)
cmpq $0x0, 0x1d0(%rsp)
jne 0x2ac2d1
movq 0x38fd00(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x269d69(%rip), %rsi    # 0x516013
leaq 0x2db6a9(%rip), %rdx    # 0x58795a
leaq 0x2db70d(%rip), %rcx    # 0x5879c5
leaq 0x2db415(%rip), %r8     # 0x5876d4
movl $0x30f, %r9d            # imm = 0x30F
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2ac2d3
movq 0x168(%rsp), %rdx
movq 0x160(%rsp), %rcx
movl 0x15c(%rsp), %r8d
movq 0x1c8(%rsp), %r9
movq 0x1d0(%rsp), %rax
leaq 0x100(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movq %rax, (%rsp)
callq 0x2ac710
testb $0x1, 0x15b(%rsp)
je 0x2ac32d
movl $0x1, %eax
movq %rax, 0xa0(%rsp)
jmp 0x2ac341
movq 0x1d0(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x140(%rsp)
cmpq $0x0, 0x178(%rsp)
jne 0x2ac394
movq 0x38fc3d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x269ca6(%rip), %rsi    # 0x516013
leaq 0x2db66c(%rip), %rdx    # 0x5879e0
leaq 0x2db64a(%rip), %rcx    # 0x5879c5
leaq 0x2db352(%rip), %r8     # 0x5876d4
movl $0x314, %r9d            # imm = 0x314
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2ac396
movq $0x0, 0x148(%rsp)
movq 0x148(%rsp), %rax
cmpq 0x140(%rsp), %rax
ja 0x2ac683
movq 0x148(%rsp), %rax
cmpq 0x140(%rsp), %rax
jne 0x2ac3d7
movl $0x2, 0xb4(%rsp)
jmp 0x2ac3ec
movq 0x1d0(%rsp), %rax
movl 0xb0(%rax), %eax
movl %eax, 0xb4(%rsp)
jmp 0x2ac3ee
movq 0x148(%rsp), %rax
movq 0x1d0(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jb 0x2ac43c
movq 0x38fb95(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x269bfe(%rip), %rsi    # 0x516013
leaq 0x2db5e0(%rip), %rdx    # 0x5879fc
leaq 0x2db5a2(%rip), %rcx    # 0x5879c5
leaq 0x2db2aa(%rip), %r8     # 0x5876d4
movl $0x322, %r9d            # imm = 0x322
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2ac43e
movb 0x187(%rsp), %dil
movq 0x1d0(%rsp), %rsi
addq $0x98, %rsi
movq 0x178(%rsp), %rdx
movq 0x170(%rsp), %rcx
movq 0x1d0(%rsp), %rax
movq 0x10(%rax), %r8
movl 0xb4(%rsp), %r9d
movq 0x1d0(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x1d0(%rsp), %rax
movq 0x28(%rax), %rax
subq 0x148(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x1d0(%rsp), %rax
movq 0x20(%rax), %rax
addq 0x148(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x1d0(%rsp), %rax
movb 0xbd(%rax), %al
movb %al, 0x7e(%rsp)
movq 0x1e0(%rsp), %rbp
movq 0x1e8(%rsp), %r12
movq 0x1f0(%rsp), %r15
movq 0xb8(%rsp), %r14
movq 0x1f8(%rsp), %r11
movq 0x200(%rsp), %r10
movq 0x1d0(%rsp), %rax
movb 0xc2(%rax), %al
movb %al, 0x7f(%rsp)
leaq 0x100(%rsp), %r13
leaq 0xc0(%rsp), %rbx
xorl %eax, %eax
movb 0x7e(%rsp), %al
andb $0x1, %dil
andb $0x1, %al
movb %al, 0x9e(%rsp)
movb 0x7f(%rsp), %al
andb $0x1, %al
movb %al, 0x9f(%rsp)
movq 0x80(%rsp), %rax
movzbl %dil, %edi
movq %rax, (%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
movb 0x9e(%rsp), %al
movzbl %al, %eax
movl %eax, 0x18(%rsp)
movb 0x9f(%rsp), %al
movq %rbp, 0x20(%rsp)
movq %r13, 0x28(%rsp)
movq %r12, 0x30(%rsp)
movq %r15, 0x38(%rsp)
movq %r14, 0x40(%rsp)
movq %rbx, 0x48(%rsp)
movq %r11, 0x50(%rsp)
movq %r10, 0x58(%rsp)
movzbl %al, %eax
movl %eax, 0x60(%rsp)
movq $0x0, 0x68(%rsp)
callq 0x4cd310
movq %rax, 0x150(%rsp)
movq 0x150(%rsp), %rax
movq 0x1f0(%rsp), %rcx
addq 0x200(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x2ac5f3
jmp 0x2ac683
cmpq $0x0, 0x170(%rsp)
je 0x2ac61b
movq 0x170(%rsp), %rdi
movq 0x1f0(%rsp), %rsi
addq 0x200(%rsp), %rsi
callq 0x4c68d0
movq 0x178(%rsp), %rax
movq $0x0, (%rax)
movq 0x178(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x178(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x178(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x178(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x148(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x148(%rsp)
jmp 0x2ac3a2
jmp 0x2ac685
movq 0x150(%rsp), %rax
movq 0x178(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x2ac6bc
movq 0x150(%rsp), %rax
movq 0x1f0(%rsp), %rcx
addq 0x200(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jb 0x2ac6f4
movq 0x38f8dd(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x269946(%rip), %rsi    # 0x516013
leaq 0x2db34c(%rip), %rdx    # 0x587a20
leaq 0x2db2ea(%rip), %rcx    # 0x5879c5
leaq 0x2daff2(%rip), %r8     # 0x5876d4
movl $0x351, %r9d            # imm = 0x351
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2ac6f6
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)