// File: /workspace/github_c_makefile_star2_O1/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 0x17bd4f
movq %rsi, %r13
cmpb $0x0, (%r15)
je 0x17bd72
xorl %ebx, %ebx
cmpq %r13, 0x30(%r14)
jne 0x17bde0
movq %rsp, %rax
movq $0x0, (%rax)
movq %r14, %rdi
movq %rsp, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x17bdfb
testl %eax, %eax
jne 0x17bd6e
cmpb $0x1, (%r12)
je 0x17bdb7
movq (%rsp), %rax
cmpq %r13, %rax
ja 0x17bdc7
movq 0x8(%rsp), %rax
cmpq %r13, %rax
jb 0x17bd08
movb $0x1, (%r15)
incq %rax
movq %rax, 0x30(%r14)
jmp 0x17bde0
movq %rsp, %rsi
movq %r14, %rdi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x17bdfb
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x28(%r14)
testl %eax, %eax
je 0x17bd91
movl %eax, %ebx
jmp 0x17bde0
movq 0x28(%r14), %rax
cmpq %r13, %rax
jb 0x17bdf1
xorl %ebx, %ebx
cmpq %r13, %rax
jne 0x17bde0
movb $0x1, (%r15)
cmpq %rax, 0x30(%r14)
ja 0x17bde0
callq 0x55203
xorl %ebx, %ebx
cmpb $0x0, (%r12)
jne 0x17bde0
movq (%rsp), %rax
movq %rax, 0x28(%r14)
movq 0x8(%rsp), %rcx
incq %rcx
movq %rcx, 0x30(%r14)
testq %rax, %rax
sete (%r15)
jmp 0x17bde0
movb $0x0, (%r15)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x28(%r14)
jmp 0x17bde0
movb $0x0, (%r15)
movq 0x8(%rsp), %rcx
cmpq %r13, %rcx
jbe 0x17bdf6
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 0x5523c
callq 0x55275