// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/idx-limdfs.c
// Function: gt_newLimdfsresources
Limdfsresources *gt_newLimdfsresources(const Genericindex *genericindex,
                                    bool nowildcards,
                                    GtUword maxintervalwidth,
                                    GtUword maxpathlength,
                                    bool keepexpandedonstack,
                                    ProcessIdxMatch processmatch,
                                    void *processmatchinfo,
                                    Processresult processresult,
                                    void *patterninfo,
                                    const AbstractDfstransformer *adfst)
{
  Limdfsresources *limdfsresources;
  unsigned int numofchars;
  const GtEncseq *encseq;

  encseq = genericindex->suffixarray->encseq;
  numofchars = gt_alphabet_num_of_chars(gt_encseq_alphabet(encseq));
  limdfsresources = gt_malloc(sizeof *limdfsresources);
  limdfsresources->bwci.spaceBoundswithchar
    = gt_malloc(sizeof *limdfsresources->bwci.spaceBoundswithchar
                * (numofchars+1));
  limdfsresources->bwci.nextfreeBoundswithchar = 0;
  limdfsresources->bwci.allocatedBoundswithchar
    = (GtUword) (numofchars+1);
  GT_INITARRAY(&limdfsresources->stack,Lcpintervalwithinfo);
  gt_assert(numofchars <= GT_MAXALPHABETCHARACTER);
  limdfsresources->alphasize = (GtUchar) numofchars;
  limdfsresources->processmatch = processmatch;
  limdfsresources->processmatchinfo = processmatchinfo;
  limdfsresources->processresult = processresult;
  limdfsresources->patterninfo = patterninfo;
  limdfsresources->genericindex = genericindex;
  limdfsresources->nowildcards = nowildcards;
  limdfsresources->encseq = encseq;
  limdfsresources->maxintervalwidth = maxintervalwidth;
  limdfsresources->keepexpandedonstack = keepexpandedonstack;
  if (maxpathlength > 0)
  {
    limdfsresources->currentpathspace
      = gt_malloc(sizeof *limdfsresources->currentpathspace
                  * maxpathlength);
    limdfsresources->allocatedpathspace = maxpathlength;
  } else
  {
    limdfsresources->currentpathspace = NULL;
  }
  /* Application specific */
  limdfsresources->dfsconstinfo
    = adfst->allocatedfsconstinfo((unsigned int) limdfsresources->alphasize);
  if (genericindex->withesa)
  {
    limdfsresources->rangeOccs = NULL;
  } else
  {
    limdfsresources->rangeOccs
      = gt_malloc(sizeof *limdfsresources->rangeOccs
                  * GT_MULT2(limdfsresources->alphasize));
  }
  GT_INITARRAY(&limdfsresources->mstatspos,GtUword);
  if (maxintervalwidth > 0)
  {
    limdfsresources->mstatspos.spaceGtUword
      = gt_malloc(sizeof *limdfsresources->mstatspos.spaceGtUword
                  * maxintervalwidth);
    limdfsresources->mstatspos.allocatedGtUword = maxintervalwidth;
  }
  if (adfst->initLimdfsstackelem != NULL &&
      !limdfsresources->keepexpandedonstack)
  {
    adfst->initLimdfsstackelem(limdfsresources->copyofcopyofparentstate);
    adfst->initLimdfsstackelem(limdfsresources->copyofparent.aliasstate);
  }
  return limdfsresources;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, 0xc(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movl %esi, 0x8(%rsp)
movq %rdi, %r15
movq (%rdi), %rax
movq (%rax), %rbp
movq %rbp, %rdi
callq 0xebcd9
movq %rax, %rdi
callq 0xd11be
movl %eax, %r13d
leaq 0x1f52b4(%rip), %r14    # 0x3a7738
movl $0x148, %edi            # imm = 0x148
movq %r14, %rsi
movl $0xe8, %edx
callq 0x104226
movq %rax, %rbx
leal 0x1(%r13), %r12d
leaq (,%r12,8), %rax
leaq (%rax,%rax,2), %rdi
movq %r14, %rsi
movl $0xeb, %edx
callq 0x104226
movq %rax, 0x8(%rbx)
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movq %r12, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq %rax, 0x30(%rbx)
cmpl $0x100, %r13d           # imm = 0x100
jae 0x1b262e
movq 0x78(%rsp), %r14
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rcx
movq 0x60(%rsp), %rdx
movb %r13b, 0xc9(%rbx)
movq 0x10(%rsp), %rsi
movq %rsi, 0x130(%rbx)
movq %rdx, 0x138(%rbx)
movq %rcx, 0x140(%rbx)
movq %rax, 0xd0(%rbx)
movq %r15, 0xd8(%rbx)
movl 0x8(%rsp), %eax
movb %al, 0xe0(%rbx)
movq %rbp, 0xf8(%rbx)
movq 0x18(%rsp), %r12
movq %r12, 0xe8(%rbx)
movl 0xc(%rsp), %eax
movb %al, 0xc8(%rbx)
movq 0x20(%rsp), %rbp
testq %rbp, %rbp
je 0x1b2574
leaq 0x1f51e1(%rip), %rsi    # 0x3a7738
movq %rbp, %rdi
movl $0xff, %edx
callq 0x104226
movq %rbp, 0x120(%rbx)
movb 0xc9(%rbx), %r13b
jmp 0x1b2576
xorl %eax, %eax
movq %rax, 0x118(%rbx)
movzbl %r13b, %edi
callq *0x8(%r14)
movq %rax, (%rbx)
cmpb $0x0, 0x18(%r15)
je 0x1b2593
xorl %eax, %eax
jmp 0x1b25ae
movzbl 0xc9(%rbx), %edi
shll $0x4, %edi
leaq 0x1f5194(%rip), %rsi    # 0x3a7738
movl $0x10f, %edx            # imm = 0x10F
callq 0x104226
movq %rax, 0xf0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x100(%rbx)
movq $0x0, 0x110(%rbx)
testq %r12, %r12
je 0x1b25f6
leaq (,%r12,8), %rdi
leaq 0x1f515a(%rip), %rsi    # 0x3a7738
movl $0x116, %edx            # imm = 0x116
callq 0x104226
movq %rax, 0x100(%rbx)
movq %r12, 0x108(%rbx)
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x1b261c
cmpb $0x0, 0xc8(%rbx)
jne 0x1b261c
leaq 0x98(%rbx), %rdi
callq *%rax
movq %rbx, %rdi
addq $0x60, %rdi
callq *0x30(%r14)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x65315