// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/aligned_segments_pile.c
// Function: gt_aligned_segments_pile_move_over_position
void gt_aligned_segments_pile_move_over_position(
    GtAlignedSegmentsPile *asp, GtUword position)
{
  int retvalue;
  if (asp->position != GT_UNDEF_UWORD)
  {
    gt_assert(position > asp->position);
    gt_aligned_segments_pile_delete_finishing_before(asp, position);
  }
  while (true)
  {
    if (asp->next_as == NULL && !asp->all_consumed)
    {
      retvalue = gt_aligned_segments_pile_fetch_sa(asp);
      if (retvalue == -1)
      {
        asp->all_consumed = true;
        gt_assert(asp->next_as == NULL);
      }
    }
    if (asp->next_as != NULL)
    {
      if (gt_aligned_segment_refregion_endpos(asp->next_as) < position)
      {
        if (asp->process_skipped != NULL)
        {
          asp->process_skipped(asp->next_as, asp->process_unmapped_data);
        }
        if (asp->delete_processed_segments)
          gt_aligned_segment_delete(asp->next_as);
        asp->next_as = NULL;
      }
      else
      {
        if (gt_aligned_segment_refregion_startpos(asp->next_as) <= position)
        {
          gt_dlist_add(asp->set, asp->next_as);
          asp->next_as = NULL;
        }
        else
        {
          break;
        }
      }
    }
    else
    {
      break;
    }
  }
  asp->position = position;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq $-0x1, 0x58(%rax)
je 0x1297f5
jmp 0x12979c
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq 0x58(%rcx), %rax
ja 0x1297e4
movq 0x5127ed(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3ec856(%rip), %rsi    # 0x516013
leaq 0x41d5b6(%rip), %rdx    # 0x546d7a
leaq 0x41d5c8(%rip), %rcx    # 0x546d93
leaq 0x41d3fc(%rip), %r8     # 0x546bce
movl $0xc7, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1297e6
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x129950
jmp 0x1297f7
movq 0x10(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x129876
movq 0x10(%rsp), %rax
testb $0x1, 0x20(%rax)
jne 0x129876
movq 0x10(%rsp), %rdi
callq 0x129a50
movl %eax, 0x4(%rsp)
cmpl $-0x1, 0x4(%rsp)
jne 0x129874
movq 0x10(%rsp), %rax
movb $0x1, 0x20(%rax)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x129870
movq 0x512761(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3ec7ca(%rip), %rsi    # 0x516013
leaq 0x41d56f(%rip), %rdx    # 0x546dbf
leaq 0x41d53c(%rip), %rcx    # 0x546d93
leaq 0x41d370(%rip), %r8     # 0x546bce
movl $0xd2, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x129872
jmp 0x129874
jmp 0x129876
movq 0x10(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x12992d
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x4883a0
cmpq 0x8(%rsp), %rax
jae 0x1298ec
movq 0x10(%rsp), %rax
cmpq $0x0, 0x48(%rax)
je 0x1298c4
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rdi
movq 0x10(%rsp), %rcx
movq 0x40(%rcx), %rsi
callq *%rax
movq 0x10(%rsp), %rax
testb $0x1, 0x61(%rax)
je 0x1298dd
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x488de0
movq 0x10(%rsp), %rax
movq $0x0, 0x18(%rax)
jmp 0x12992b
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x488350
cmpq 0x8(%rsp), %rax
ja 0x129927
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0xa61a0
movq 0x10(%rsp), %rax
movq $0x0, 0x18(%rax)
jmp 0x129929
jmp 0x129934
jmp 0x12992b
jmp 0x12992f
jmp 0x129934
jmp 0x1297f7
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x58(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)