// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/seqpos_classifier.c
// Function: gt_seqpos_classifier_position_is_inside_feature
int gt_seqpos_classifier_position_is_inside_feature(
    GtSeqposClassifier *seqpos_classifier, GtUword i, bool *inside,
    bool *end_of_annotation, GtError *err)
{
  int had_err = 0;
  GtRange next_specified_ft_range = { GT_UNDEF_UWORD, GT_UNDEF_UWORD };
  if (i == 0)
  {
    had_err = gt_seqpos_classifier_next_specified_ft(seqpos_classifier,
        &next_specified_ft_range, end_of_annotation, err);
    seqpos_classifier->next_inside = ULONG_MAX;
    seqpos_classifier->next_not_inside = ULONG_MAX;
    if (!had_err && !(*end_of_annotation))
    {
      seqpos_classifier->next_inside = next_specified_ft_range.start;
      seqpos_classifier->next_not_inside = next_specified_ft_range.end + 1UL;
      (*inside) = (seqpos_classifier->next_inside == 0);
    }
  }
  else
  {
    if (!(*inside))
    {
      gt_assert(i <= seqpos_classifier->next_inside);
      if (i == seqpos_classifier->next_inside)
      {
        (*inside) = true;
        /*printf(""GT_WU"..", i+1);*/
        gt_assert(seqpos_classifier->next_not_inside >
            seqpos_classifier->next_inside);
      }
    }
    else
    {
      if (i == seqpos_classifier->next_not_inside)
      {
        next_specified_ft_range.start = 0;
        while (!had_err)
        {
          had_err = gt_seqpos_classifier_next_specified_ft(seqpos_classifier,
              &next_specified_ft_range, end_of_annotation, err);
          if (!had_err)
          {
            if (*end_of_annotation)
            {
              (*inside) = false;
              seqpos_classifier->next_inside = ULONG_MAX;
              seqpos_classifier->next_not_inside = ULONG_MAX;
              break;
            }
            else
            {
              if (next_specified_ft_range.start <= i)
              {
                if (next_specified_ft_range.end >= i)
                {
                  (*inside) = true;
                  seqpos_classifier->next_not_inside =
                    next_specified_ft_range.end + 1UL;
                  break;
                }
              }
              else
              {
                /*printf(""GT_WU"\n", i);*/
                (*inside) = false;
                gt_assert(next_specified_ft_range.end > i);
                seqpos_classifier->next_inside = next_specified_ft_range.start;
                seqpos_classifier->next_not_inside =
                  next_specified_ft_range.end + 1UL;
                break;
              }
            }
          }
        }
      }
    }
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbp
movq %rcx, %r12
movq %rdx, %r15
movq %rdi, %r14
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, (%rsp)
testq %rsi, %rsi
je 0x173953
movq %rsi, %r13
cmpb $0x0, (%r15)
je 0x173976
xorl %ebx, %ebx
cmpq %r13, 0x30(%r14)
jne 0x1739e4
movq %rsp, %rax
movq $0x0, (%rax)
movq %r14, %rdi
movq %rsp, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x1739ff
testl %eax, %eax
jne 0x173972
cmpb $0x1, (%r12)
je 0x1739bb
movq (%rsp), %rax
cmpq %r13, %rax
ja 0x1739cb
movq 0x8(%rsp), %rax
cmpq %r13, %rax
jb 0x17390c
movb $0x1, (%r15)
incq %rax
movq %rax, 0x30(%r14)
jmp 0x1739e4
movq %rsp, %rsi
movq %r14, %rdi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x1739ff
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x28(%r14)
testl %eax, %eax
je 0x173995
movl %eax, %ebx
jmp 0x1739e4
movq 0x28(%r14), %rax
cmpq %r13, %rax
jb 0x1739f5
xorl %ebx, %ebx
cmpq %r13, %rax
jne 0x1739e4
movb $0x1, (%r15)
cmpq %r13, 0x30(%r14)
ja 0x1739e4
callq 0x54113
xorl %ebx, %ebx
cmpb $0x0, (%r12)
jne 0x1739e4
movq (%rsp), %rax
movq %rax, 0x28(%r14)
movq 0x8(%rsp), %rcx
incq %rcx
movq %rcx, 0x30(%r14)
testq %rax, %rax
sete (%r15)
jmp 0x1739e4
movb $0x0, (%r15)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x28(%r14)
jmp 0x1739e4
movb $0x0, (%r15)
movq 0x8(%rsp), %rcx
cmpq %r13, %rcx
jbe 0x1739fa
movq %rax, 0x28(%r14)
incq %rcx
movq %rcx, 0x30(%r14)
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5414c
callq 0x54185