// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/ft-front-prune.c
// Function: front_next_inplace
static GtUword front_next_inplace(GtLongestCommonFunc ft_longest_common,
                                  GtFtFrontvalue *midfront,
                                  GtFtFrontvalue *lowfront,
                                  GtFtFrontvalue *highfront,
                                  GtUword max_history,
                                  GtFtSequenceObject *useq,
                                  GtFtSequenceObject *vseq,
                                  GtFtTrimstat *trimstat)
{
  GtUword alignedlen, maxalignedlen;
  GtFtFrontvalue bestfront, insertion_value, replacement_value, *frontptr;

  insertion_value = *lowfront; /* from previous diag -(d-1) => -d => DELETION */
  bestfront = insertion_value;
  bestfront.row++;
  GT_UPDATE_MATCH_HISTORY(&bestfront);
  *lowfront = bestfront;
  lowfront->backreference = FT_EOP_DELETION;
  front_prune_add_matches(ft_longest_common,midfront,lowfront,
                          max_history,useq,vseq,trimstat);
  maxalignedlen = GT_MULT2(lowfront->row) + GT_FRONT_DIAGONAL(lowfront);

  replacement_value = *(lowfront+1);
  if (bestfront.row < replacement_value.row + 1)
  {
    bestfront = replacement_value;
    bestfront.backreference = FT_EOP_DELETION;
    bestfront.row++;
    GT_UPDATE_MATCH_HISTORY(&bestfront);
  } else
  {
    bestfront.backreference = FT_EOP_MISMATCH;
    bestfront.max_mismatches++;
    if (bestfront.row == replacement_value.row + 1)
    {
      bestfront.backreference |= FT_EOP_DELETION;
      if (bestfront.max_mismatches < replacement_value.max_mismatches)
      {
        bestfront.max_mismatches = replacement_value.max_mismatches;
      }
    }
  }
  *(lowfront+1) = bestfront;
  front_prune_add_matches(ft_longest_common,midfront,lowfront + 1,
                          max_history,useq,vseq,trimstat);
  alignedlen = GT_MULT2((lowfront+1)->row) + GT_FRONT_DIAGONAL(lowfront + 1);
  if (maxalignedlen < alignedlen)
  {
    maxalignedlen = alignedlen;
  }
  for (frontptr = lowfront+2; frontptr <= highfront; frontptr++)
  {
    bestfront = insertion_value;
    bestfront.backreference = FT_EOP_INSERTION;
    if (frontptr <= highfront - 1)
    {
      if (bestfront.row < replacement_value.row + 1)
      {
        bestfront = replacement_value;
        bestfront.backreference = FT_EOP_MISMATCH;
        bestfront.max_mismatches++;
        bestfront.row++;
      } else
      {
        if (bestfront.row == replacement_value.row + 1)
        {
          bestfront.backreference |= FT_EOP_MISMATCH;
          if (bestfront.max_mismatches < replacement_value.max_mismatches + 1)
          {
            bestfront.max_mismatches = replacement_value.max_mismatches + 1;
          }
        }
      }
    }
    if (frontptr <= highfront - 2)
    {
      if (bestfront.row < frontptr->row + 1)
      {
        bestfront = *frontptr;
        bestfront.backreference = FT_EOP_DELETION;
        bestfront.row++;
      } else
      {
        if (bestfront.row == frontptr->row + 1)
        {
          bestfront.backreference |= FT_EOP_DELETION;
        }
      }
    }
    GT_UPDATE_MATCH_HISTORY(&bestfront);
    if (frontptr < highfront)
    {
      insertion_value = replacement_value;
      replacement_value = *frontptr;
    }
    *frontptr = bestfront;
    front_prune_add_matches(ft_longest_common,midfront,frontptr,
                            max_history,useq,vseq,trimstat);
    alignedlen = GT_MULT2(frontptr->row) + GT_FRONT_DIAGONAL(frontptr);
    if (maxalignedlen < alignedlen)
    {
      maxalignedlen = alignedlen;
    }
  }
  return maxalignedlen;
}

// Assembly:
subq $0xb8, %rsp
movq 0xc8(%rsp), %rax
movq 0xc0(%rsp), %rax
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movq %r9, 0x88(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x48(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x50(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x70(%rsp)
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
movzbl 0x70(%rsp), %eax
cmpq 0x90(%rsp), %rax
jae 0x4cf106
jmp 0x4cf0b3
movzbl 0x70(%rsp), %eax
cmpq 0x90(%rsp), %rax
jb 0x4cf0fa
movq 0x16ced7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x46f40(%rip), %rsi     # 0x516013
leaq 0xea6b8(%rip), %rdx     # 0x5b9792
leaq 0xea6df(%rip), %rcx     # 0x5b97c0
leaq 0xea26a(%rip), %r8      # 0x5b9352
movl $0x14a, %r9d            # imm = 0x14A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4cf0fc
movb 0x70(%rsp), %al
addb $0x1, %al
movb %al, 0x70(%rsp)
movq 0x60(%rsp), %rax
shlq %rax
movq %rax, 0x60(%rsp)
movq 0xa0(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, (%rax)
movq 0x68(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x70(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0xa0(%rsp), %rax
movb $0x4, 0x11(%rax)
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0x88(%rsp), %r8
movq 0xc0(%rsp), %r9
movq 0xc8(%rsp), %rax
movq %rax, (%rsp)
callq 0x4cea80
movq 0xa0(%rsp), %rax
movl 0x8(%rax), %eax
shll %eax
movl %eax, %eax
movq %rax, 0x20(%rsp)
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq 0x20(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x78(%rsp)
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x20(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x28(%rax), %rax
movq %rax, 0x40(%rsp)
movl 0x68(%rsp), %eax
movl 0x38(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jae 0x4cf29a
movq 0x30(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x70(%rsp)
movb $0x4, 0x71(%rsp)
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
movzbl 0x70(%rsp), %eax
cmpq 0x90(%rsp), %rax
jae 0x4cf28b
jmp 0x4cf238
movzbl 0x70(%rsp), %eax
cmpq 0x90(%rsp), %rax
jb 0x4cf27f
movq 0x16cd52(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x46dbb(%rip), %rsi     # 0x516013
leaq 0xea533(%rip), %rdx     # 0x5b9792
leaq 0xea55a(%rip), %rcx     # 0x5b97c0
leaq 0xea0e5(%rip), %r8      # 0x5b9352
movl $0x157, %r9d            # imm = 0x157
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4cf281
movb 0x70(%rsp), %al
addb $0x1, %al
movb %al, 0x70(%rsp)
movq 0x60(%rsp), %rax
shlq %rax
movq %rax, 0x60(%rsp)
jmp 0x4cf2db
movb $0x1, 0x71(%rsp)
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
movl 0x68(%rsp), %eax
movl 0x38(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4cf2d9
movzbl 0x71(%rsp), %eax
orl $0x4, %eax
movb %al, 0x71(%rsp)
movl 0x74(%rsp), %eax
cmpl 0x44(%rsp), %eax
jae 0x4cf2d7
movl 0x44(%rsp), %eax
movl %eax, 0x74(%rsp)
jmp 0x4cf2d9
jmp 0x4cf2db
movq 0xa0(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq 0x68(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x70(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq $0x18, %rdx
movq 0x90(%rsp), %rcx
movq 0x88(%rsp), %r8
movq 0xc0(%rsp), %r9
movq 0xc8(%rsp), %rax
movq %rax, (%rsp)
callq 0x4cea80
movq 0xa0(%rsp), %rax
movl 0x20(%rax), %eax
shll %eax
movl %eax, %eax
movq %rax, 0x18(%rsp)
movq 0xa0(%rsp), %rax
addq $0x18, %rax
movq 0xa8(%rsp), %rcx
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq 0x18(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
jae 0x4cf3a7
movq 0x80(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0xa0(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x98(%rsp), %rax
ja 0x4cf693
movq 0x48(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x70(%rsp)
movb $0x2, 0x71(%rsp)
movq 0x28(%rsp), %rax
movq 0x98(%rsp), %rcx
addq $-0x18, %rcx
cmpq %rcx, %rax
ja 0x4cf48d
movl 0x68(%rsp), %eax
movl 0x38(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jae 0x4cf452
movq 0x30(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x70(%rsp)
movb $0x1, 0x71(%rsp)
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x4cf48b
movl 0x68(%rsp), %eax
movl 0x38(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4cf489
movzbl 0x71(%rsp), %eax
orl $0x1, %eax
movb %al, 0x71(%rsp)
movl 0x74(%rsp), %eax
movl 0x44(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jae 0x4cf487
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0x4cf489
jmp 0x4cf48b
jmp 0x4cf48d
movq 0x28(%rsp), %rax
movq 0x98(%rsp), %rcx
addq $-0x30, %rcx
cmpq %rcx, %rax
ja 0x4cf50a
movl 0x68(%rsp), %eax
movq 0x28(%rsp), %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jae 0x4cf4e7
movq 0x28(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x60(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x68(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x70(%rsp)
movb $0x4, 0x71(%rsp)
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x4cf508
movl 0x68(%rsp), %eax
movq 0x28(%rsp), %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4cf506
movzbl 0x71(%rsp), %eax
orl $0x4, %eax
movb %al, 0x71(%rsp)
jmp 0x4cf508
jmp 0x4cf50a
movzbl 0x70(%rsp), %eax
cmpq 0x90(%rsp), %rax
jae 0x4cf56e
jmp 0x4cf51b
movzbl 0x70(%rsp), %eax
cmpq 0x90(%rsp), %rax
jb 0x4cf562
movq 0x16ca6f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x46ad8(%rip), %rsi     # 0x516013
leaq 0xea250(%rip), %rdx     # 0x5b9792
leaq 0xea277(%rip), %rcx     # 0x5b97c0
leaq 0xe9e02(%rip), %r8      # 0x5b9352
movl $0x194, %r9d            # imm = 0x194
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4cf564
movb 0x70(%rsp), %al
addb $0x1, %al
movb %al, 0x70(%rsp)
movq 0x60(%rsp), %rax
shlq %rax
movq %rax, 0x60(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x98(%rsp), %rax
jae 0x4cf5c7
movq 0x30(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x28(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x28(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, (%rax)
movq 0x68(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x70(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0x88(%rsp), %r8
movq 0xc0(%rsp), %r9
movq 0xc8(%rsp), %rax
movq %rax, (%rsp)
callq 0x4cea80
movq 0x28(%rsp), %rax
movl 0x8(%rax), %eax
shll %eax
movl %eax, %eax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0xa8(%rsp), %rcx
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq 0x10(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
jae 0x4cf67e
movq 0x80(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x4cf680
movq 0x28(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x28(%rsp)
jmp 0x4cf3b8
movq 0x78(%rsp), %rax
addq $0xb8, %rsp
retq