// File: /workspace/github_c_makefile_star2_O2/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, %r13
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %rbx
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, (%rsp)
testq %rsi, %rsi
je 0x1177fe
movq %rsi, %r12
cmpb $0x0, (%r14)
je 0x117849
xorl %eax, %eax
cmpq %r12, 0x30(%rbx)
jne 0x1178bb
movq %rsp, %rbp
andq $0x0, (%rbp)
xorl %eax, %eax
testl %eax, %eax
jne 0x1178bb
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x117930
testl %eax, %eax
jne 0x1177b0
cmpb $0x1, (%r15)
je 0x117891
movq (%rsp), %rcx
cmpq %r12, %rcx
ja 0x1178a0
movq 0x8(%rsp), %rcx
cmpq %r12, %rcx
jb 0x1177b0
movb $0x1, (%r14)
incq %rcx
movq %rcx, 0x30(%rbx)
jmp 0x1178b9
movq %rsp, %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x117930
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x28(%rbx)
testl %eax, %eax
jne 0x1178bb
xorl %eax, %eax
cmpb $0x0, (%r15)
jne 0x1178bb
movq (%rsp), %rcx
movq %rcx, 0x28(%rbx)
movq 0x8(%rsp), %rdx
incq %rdx
movq %rdx, 0x30(%rbx)
testq %rcx, %rcx
sete (%r14)
jmp 0x1178bb
movq 0x28(%rbx), %rcx
cmpq %r12, %rcx
jb 0x1178ca
xorl %eax, %eax
cmpq %r12, %rcx
jne 0x1178bb
movb $0x1, (%r14)
cmpq %r12, 0x30(%rbx)
ja 0x1178bb
movq 0x3206fe(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cd79f(%rip), %rsi    # 0x2e5013
leaq 0x21b767(%rip), %rdx    # 0x332fe2
leaq 0x21b730(%rip), %rcx    # 0x332fb2
leaq 0x21b6e4(%rip), %r8     # 0x332f6d
movl $0xa2, %r9d
jmp 0x1178f6
movb $0x0, (%r14)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x28(%rbx)
jmp 0x1178b9
movb $0x0, (%r14)
movq 0x8(%rsp), %rax
cmpq %r12, %rax
jbe 0x117902
movq %rcx, 0x28(%rbx)
incq %rax
movq %rax, 0x30(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x320697(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cd738(%rip), %rsi    # 0x2e5013
leaq 0x21b6ac(%rip), %rdx    # 0x332f8e
leaq 0x21b6c9(%rip), %rcx    # 0x332fb2
leaq 0x21b67d(%rip), %r8     # 0x332f6d
movl $0x9c, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x32065f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cd700(%rip), %rsi    # 0x2e5013
leaq 0x21b70c(%rip), %rdx    # 0x333026
leaq 0x21b691(%rip), %rcx    # 0x332fb2
leaq 0x21b645(%rip), %r8     # 0x332f6d
movl $0xc7, %r9d
jmp 0x1178f6