// File: /workspace/github_c_makefile_star2_O2/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, %rbp
movq (%rdi), %rax
movq (%rax), %r15
movq %r15, %rdi
callq 0x754dd
movq %rax, %rdi
callq 0x56c8e
movl %eax, %r13d
leaq 0x1e7bb2(%rip), %r14    # 0x347ab8
movl $0x148, %edi            # imm = 0x148
movq %r14, %rsi
movl $0xe8, %edx
callq 0x93160
movq %rax, %rbx
leal 0x1(%r13), %r12d
imulq $0x18, %r12, %rdi
movq %r14, %rsi
movl $0xeb, %edx
callq 0x93160
movq %rax, 0x8(%rbx)
andq $0x0, 0x18(%rbx)
movq %r12, 0x10(%rbx)
andq $0x0, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
cmpl $0x100, %r13d           # imm = 0x100
jae 0x1600a4
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 %rbp, 0xd8(%rbx)
movl 0x8(%rsp), %eax
movb %al, 0xe0(%rbx)
movq %r15, 0xf8(%rbx)
movq 0x18(%rsp), %r15
movq %r15, 0xe8(%rbx)
movl 0xc(%rsp), %eax
movb %al, 0xc8(%rbx)
movq 0x20(%rsp), %r12
testq %r12, %r12
je 0x15ffee
leaq 0x1e7ae7(%rip), %rsi    # 0x347ab8
movq %r12, %rdi
movl $0xff, %edx
callq 0x93160
movq %r12, 0x120(%rbx)
movb 0xc9(%rbx), %r13b
jmp 0x15fff0
xorl %eax, %eax
movq %rax, 0x118(%rbx)
movzbl %r13b, %edi
callq *0x8(%r14)
movq %rax, (%rbx)
cmpb $0x0, 0x18(%rbp)
je 0x16000c
xorl %eax, %eax
jmp 0x160027
movzbl 0xc9(%rbx), %edi
shll $0x4, %edi
leaq 0x1e7a9b(%rip), %rsi    # 0x347ab8
movl $0x10f, %edx            # imm = 0x10F
callq 0x93160
movq %rax, 0xf0(%rbx)
andq $0x0, 0x110(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x100(%rbx)
testq %r15, %r15
je 0x16006c
leaq (,%r15,8), %rdi
leaq 0x1e7a64(%rip), %rsi    # 0x347ab8
movl $0x116, %edx            # imm = 0x116
callq 0x93160
movq %rax, 0x100(%rbx)
movq %r15, 0x108(%rbx)
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x160092
cmpb $0x0, 0xc8(%rbx)
jne 0x160092
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
movq 0x2d7ebd(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x184f5e(%rip), %rsi    # 0x2e5013
leaq 0x1e7b1c(%rip), %rdx    # 0x347bd8
leaq 0x1e7b3b(%rip), %rcx    # 0x347bfe
leaq 0x1e79ee(%rip), %r8     # 0x347ab8
movl $0xf0, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390