// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/ft-front-prune.c
// Function: trim_front
static GtUword trim_front(bool upward,
                          GtUword distance,
                          GtUword ulen,
                          GtUword vlen,
                          GtUword minmatchpercentage128,
                          GtUword minlenfrommaxdiff,
                          GtTrimmingStrategy trimstrategy,
                          const GtFtPolished_point *best_polished_point,
                          const GtFtFrontvalue *midfront,
                          const GtFtFrontvalue *from,
                          const GtFtFrontvalue *stop,
                          uint64_t max_history_mask,
                          bool showfrontinfo)
{
  const GtFtFrontvalue *frontptr;
  const int step = upward ? +1 : -1;

  if (trimstrategy == GT_OUTSENSE_TRIM_NEVER ||
      (trimstrategy == GT_OUTSENSE_TRIM_ON_NEW_PP &&
       best_polished_point != NULL &&
       best_polished_point->distance + 1 < distance &&
       best_polished_point->distance + 30 >= distance))
  {
    return 0;
  }
  gt_assert ((upward && from < stop) || (!upward && stop < from));
  for (frontptr = from; frontptr != stop; frontptr += step)
  {
    if (frontptr->row <= ulen &&
        frontptr->row + GT_FRONT_DIAGONAL(frontptr) <= vlen &&
        !trimthisentry(frontptr->row,
                       GT_FRONT_DIAGONAL(frontptr),
                       frontptr,
                       minmatchpercentage128,
                       minlenfrommaxdiff,
                       max_history_mask,
                       distance,
                       showfrontinfo))
    {
      break;
    }
  }
  if (upward)
  {
    return (GtUword) (frontptr - from);
  }
  return (GtUword) (from - frontptr);
}

// Assembly:
subq $0x68, %rsp
movb 0xa0(%rsp), %al
movq 0x98(%rsp), %r10
movq 0x90(%rsp), %r10
movq 0x88(%rsp), %r10
movq 0x80(%rsp), %r10
movq 0x78(%rsp), %r10
movl 0x70(%rsp), %r10d
andb $0x1, %dil
movb %dil, 0x5f(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq %r8, 0x38(%rsp)
movq %r9, 0x30(%rsp)
andb $0x1, %al
movb %al, 0x2f(%rsp)
movb 0x5f(%rsp), %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, 0x1c(%rsp)
cmpl $0x2, 0x70(%rsp)
je 0x4cf753
cmpl $0x1, 0x70(%rsp)
jne 0x4cf761
cmpq $0x0, 0x78(%rsp)
je 0x4cf761
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
addq $0x1, %rax
cmpq 0x50(%rsp), %rax
jae 0x4cf761
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
addq $0x1e, %rax
cmpq 0x50(%rsp), %rax
jb 0x4cf761
movq $0x0, 0x60(%rsp)
jmp 0x4cf8fe
jmp 0x4cf763
testb $0x1, 0x5f(%rsp)
je 0x4cf77c
movq 0x88(%rsp), %rax
cmpq 0x90(%rsp), %rax
jb 0x4cf7cd
testb $0x1, 0x5f(%rsp)
jne 0x4cf795
movq 0x90(%rsp), %rax
cmpq 0x88(%rsp), %rax
jb 0x4cf7cd
movq 0x16c804(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4686d(%rip), %rsi     # 0x516013
leaq 0xea026(%rip), %rdx     # 0x5b97d3
leaq 0xea053(%rip), %rcx     # 0x5b9807
leaq 0xe9b97(%rip), %r8      # 0x5b9352
movl $0x20e, %r9d            # imm = 0x20E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4cf7cf
movq 0x88(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x90(%rsp), %rax
je 0x4cf8b7
movq 0x20(%rsp), %rax
movl 0x8(%rax), %eax
cmpq 0x48(%rsp), %rax
ja 0x4cf898
movq 0x20(%rsp), %rax
movl 0x8(%rax), %eax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x80(%rsp), %rcx
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq 0x10(%rsp), %rax
addq %rcx, %rax
cmpq 0x40(%rsp), %rax
ja 0x4cf898
movq 0x20(%rsp), %rax
movl 0x8(%rax), %edi
movq 0x20(%rsp), %rax
movq 0x80(%rsp), %rcx
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movq %rax, %rsi
movq 0x20(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x98(%rsp), %r9
movq 0x50(%rsp), %r10
movb 0x2f(%rsp), %al
andb $0x1, %al
movq %r10, (%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
callq 0x4d0c90
testb $0x1, %al
jne 0x4cf898
jmp 0x4cf8b7
jmp 0x4cf89a
movl 0x1c(%rsp), %ecx
movq 0x20(%rsp), %rax
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x4cf7dc
testb $0x1, 0x5f(%rsp)
je 0x4cf8df
movq 0x20(%rsp), %rax
movq 0x88(%rsp), %rcx
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movq %rax, 0x60(%rsp)
jmp 0x4cf8fe
movq 0x88(%rsp), %rax
movq 0x20(%rsp), %rcx
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
nopl (%rax,%rax)