// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/idx-limdfs.c
// Function: esa_splitandprocess
static void esa_splitandprocess(Limdfsresources *limdfsresources,
                                const AbstractDfstransformer *adfst)
{
  GtUword firstspecial;
  GtUchar extendchar;
  GtUword idx;
  const Indexbounds *parent = &(currentparent(limdfsresources)->lcpitv);

  extendchar = gt_lcpintervalextendlcp(
                       limdfsresources->genericindex->suffixarray->encseq,
                       limdfsresources->genericindex->suffixarray->readmode,
                       limdfsresources->genericindex->suffixarray->suftab,
                       limdfsresources->genericindex->totallength,
                       limdfsresources->alphasize,
                       parent->offset,
                       parent->leftbound,
                       parent->rightbound);
  if (extendchar < limdfsresources->alphasize)
  {
    limdfsresources->bwci.spaceBoundswithchar[0].lbound = parent->leftbound;
    limdfsresources->bwci.spaceBoundswithchar[0].rbound = parent->rightbound;
    limdfsresources->bwci.spaceBoundswithchar[0].inchar = extendchar;
    limdfsresources->bwci.nextfreeBoundswithchar = 1UL;
  } else
  {
    limdfsresources->bwci.nextfreeBoundswithchar = 0;
    gt_lcpintervalsplitwithoutspecial(
                     &limdfsresources->bwci,
                     limdfsresources->genericindex->suffixarray->encseq,
                     limdfsresources->genericindex->suffixarray->readmode,
                     limdfsresources->genericindex->totallength,
                     limdfsresources->genericindex->suffixarray->suftab,
                     parent->offset,
                     parent->leftbound,
                     parent->rightbound);
  }
  firstspecial = parent->leftbound;
  for (idx = 0; idx < limdfsresources->bwci.nextfreeBoundswithchar; idx++)
  {
    Indexbounds child;

    /* reset as parentptr may have been moved */
    parent = &(currentparent(limdfsresources)->lcpitv);
    child.inchar = limdfsresources->bwci.spaceBoundswithchar[idx].inchar;
    child.offset = parent->offset+1;
    child.leftbound = limdfsresources->bwci.spaceBoundswithchar[idx].lbound;
    child.rightbound = limdfsresources->bwci.spaceBoundswithchar[idx].rbound;
    child.code = 0; /* not used, but we better define it */
    addpathchar(limdfsresources,(GtUword) parent->offset,child.inchar);
#ifdef SKDEBUG
    printf("%u-child of ",(unsigned int) child.inchar);
    showLCPinterval(limdfsresources->genericindex->withesa,parent);
    printf(" is ");
    showLCPinterval(limdfsresources->genericindex->withesa,&child);
    printf("\n");
#endif
    processchildinterval(limdfsresources, &child, adfst);
    firstspecial = child.rightbound+1;
  }
  if (!limdfsresources->nowildcards)
  {
    Indexbounds child;
    GtUword bound;

    child.inchar = (GtUchar) GT_WILDCARD;
    child.offset = parent->offset+1;
    child.code = 0;  /* not used, but we better define it */
    for (bound = firstspecial; bound <= parent->rightbound; bound++)
    {
      child.leftbound = child.rightbound = bound;
      esa_overcontext(limdfsresources,&child,adfst);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x160b54
movq %rax, %r15
movq 0xd8(%r14), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movq (%rdx), %rdi
movl 0x48(%rdx), %esi
movq 0x58(%rdx), %rdx
movzbl 0xc9(%r14), %r8d
movq (%r15), %r9
movups 0x8(%r15), %xmm0
movups %xmm0, (%rsp)
callq 0x153cf8
cmpb 0xc9(%r14), %al
jae 0x160c79
movq 0x8(%r14), %rcx
movq 0x8(%r15), %r13
movups 0x8(%r15), %xmm0
movups %xmm0, (%rcx)
movb %al, 0x10(%rcx)
movq $0x1, 0x18(%r14)
jmp 0x160cb0
leaq 0x8(%r14), %rdi
andq $0x0, 0x18(%r14)
movq 0xd8(%r14), %rax
movq (%rax), %r8
movq 0x8(%rax), %rcx
movq (%r8), %rsi
movl 0x48(%r8), %edx
movq 0x58(%r8), %r8
movq (%r15), %r9
movups 0x8(%r15), %xmm0
movups %xmm0, (%rsp)
callq 0x153b5f
movq 0x8(%r15), %r13
pushq $0x10
popq %rbp
xorl %r12d, %r12d
cmpq 0x18(%r14), %r12
jae 0x160d1a
movq %r14, %rdi
callq 0x160b54
movq %rax, %r15
movq 0x8(%r14), %rax
movzbl (%rax,%rbp), %edx
movb %dl, 0x30(%rsp)
movq (%r15), %rcx
incq %rcx
movq %rcx, 0x10(%rsp)
movups -0x10(%rax,%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
andq $0x0, 0x28(%rsp)
movq (%r15), %rsi
movq %r14, %rdi
callq 0x160bb4
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x160ff4
movq 0x20(%rsp), %r13
incq %r13
incq %r12
addq $0x18, %rbp
jmp 0x160cb6
cmpb $0x0, 0xe0(%r14)
je 0x160d33
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %r12
movb $-0x2, 0x20(%r12)
movq (%r15), %rax
incq %rax
movq %rax, (%r12)
andq $0x0, 0x18(%r12)
cmpq 0x10(%r15), %r13
ja 0x160d24
movq %r13, 0x20(%rsp)
movq %r13, 0x18(%rsp)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x16125c
incq %r13
jmp 0x160d4e