// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x36b98c(%rip), %rax    # 0x541508
movq %rax, 0x8(%rsp)
movq 0x36b988(%rip), %rax    # 0x541510
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x1d5c1d
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
leaq 0x8(%rsp), %rsi
callq 0x1d5e30
movl %eax, 0x1c(%rsp)
movq 0x40(%rsp), %rax
movq $-0x1, 0x28(%rax)
movq 0x40(%rsp), %rax
movq $-0x1, 0x30(%rax)
cmpl $0x0, 0x1c(%rsp)
jne 0x1d5c18
movq 0x28(%rsp), %rax
testb $0x1, (%rax)
jne 0x1d5c18
movq 0x8(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x10(%rsp), %rcx
addq $0x1, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x40(%rsp), %rax
cmpq $0x0, 0x28(%rax)
sete %cl
movq 0x30(%rsp), %rax
andb $0x1, %cl
movb %cl, (%rax)
jmp 0x1d5e22
movq 0x30(%rsp), %rax
testb $0x1, (%rax)
jne 0x1d5ce4
jmp 0x1d5c2d
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jbe 0x1d5c75
movq 0x46635c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3403c5(%rip), %rsi    # 0x516013
leaq 0x38f8c0(%rip), %rdx    # 0x565515
leaq 0x38f8dd(%rip), %rcx    # 0x565539
leaq 0x38f891(%rip), %r8     # 0x5654f4
movl $0x9c, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d5c77
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jne 0x1d5cdf
movq 0x30(%rsp), %rax
movb $0x1, (%rax)
movq 0x40(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x40(%rsp), %rcx
cmpq 0x28(%rcx), %rax
ja 0x1d5cdb
movq 0x4662f6(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x34035f(%rip), %rsi    # 0x516013
leaq 0x38f8ae(%rip), %rdx    # 0x565569
leaq 0x38f877(%rip), %rcx    # 0x565539
leaq 0x38f82b(%rip), %r8     # 0x5654f4
movl $0xa2, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d5cdd
jmp 0x1d5cdf
jmp 0x1d5e20
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jne 0x1d5e1e
movq $0x0, 0x8(%rsp)
cmpl $0x0, 0x1c(%rsp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1d5d14
jmp 0x1d5e1c
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
leaq 0x8(%rsp), %rsi
callq 0x1d5e30
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0x1d5e17
movq 0x28(%rsp), %rax
testb $0x1, (%rax)
je 0x1d5d6d
movq 0x30(%rsp), %rax
movb $0x0, (%rax)
movq 0x40(%rsp), %rax
movq $-0x1, 0x28(%rax)
movq 0x40(%rsp), %rax
movq $-0x1, 0x30(%rax)
jmp 0x1d5e1c
movq 0x8(%rsp), %rax
cmpq 0x38(%rsp), %rax
ja 0x1d5da3
movq 0x10(%rsp), %rax
cmpq 0x38(%rsp), %rax
jb 0x1d5da1
movq 0x30(%rsp), %rax
movb $0x1, (%rax)
movq 0x10(%rsp), %rcx
addq $0x1, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x30(%rax)
jmp 0x1d5e1c
jmp 0x1d5e13
movq 0x30(%rsp), %rax
movb $0x0, (%rax)
movq 0x10(%rsp), %rax
cmpq 0x38(%rsp), %rax
ja 0x1d5def
movq 0x4661e2(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x34024b(%rip), %rsi    # 0x516013
leaq 0x38f7de(%rip), %rdx    # 0x5655ad
leaq 0x38f763(%rip), %rcx    # 0x565539
leaq 0x38f717(%rip), %r8     # 0x5654f4
movl $0xc7, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d5df1
movq 0x8(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x10(%rsp), %rcx
addq $0x1, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x30(%rax)
jmp 0x1d5e1c
jmp 0x1d5e15
jmp 0x1d5e17
jmp 0x1d5d01
jmp 0x1d5e1e
jmp 0x1d5e20
jmp 0x1d5e22
movl 0x1c(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)