// File: /workspace/github_c_makefile_star2_O1/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), %r13
movq %r13, %rdi
callq 0xf02da
movq %rax, %rdi
callq 0xd3713
movl %eax, %ebp
leaq 0x1f5ca5(%rip), %r14    # 0x3b0cf4
movl $0x148, %edi            # imm = 0x148
movq %r14, %rsi
movl $0xe8, %edx
callq 0x1092b2
movq %rax, %rbx
leal 0x1(%rbp), %r12d
leaq (,%r12,8), %rax
leaq (%rax,%rax,2), %rdi
movq %r14, %rsi
movl $0xeb, %edx
callq 0x1092b2
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, %ebp            # imm = 0x100
jae 0x1bb1fd
movq 0x78(%rsp), %r14
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rcx
movq 0x60(%rsp), %rdx
movb %bpl, 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 %r13, 0xf8(%rbx)
movq 0x18(%rsp), %r12
movq %r12, 0xe8(%rbx)
movl 0xc(%rsp), %eax
movb %al, 0xc8(%rbx)
movq 0x20(%rsp), %r13
testq %r13, %r13
je 0x1bb13e
leaq 0x1f5bd3(%rip), %rsi    # 0x3b0cf4
movq %r13, %rdi
movl $0xff, %edx
callq 0x1092b2
movq %rax, 0x118(%rbx)
movq %r13, 0x120(%rbx)
jmp 0x1bb149
movq $0x0, 0x118(%rbx)
movzbl 0xc9(%rbx), %edi
callq *0x8(%r14)
movq %rax, (%rbx)
cmpb $0x0, 0x18(%r15)
je 0x1bb162
xorl %eax, %eax
jmp 0x1bb17d
movzbl 0xc9(%rbx), %edi
shll $0x4, %edi
leaq 0x1f5b81(%rip), %rsi    # 0x3b0cf4
movl $0x10f, %edx            # imm = 0x10F
callq 0x1092b2
movq %rax, 0xf0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x100(%rbx)
movq $0x0, 0x110(%rbx)
testq %r12, %r12
je 0x1bb1c5
leaq (,%r12,8), %rdi
leaq 0x1f5b47(%rip), %rsi    # 0x3b0cf4
movl $0x116, %edx            # imm = 0x116
callq 0x1092b2
movq %rax, 0x100(%rbx)
movq %r12, 0x108(%rbx)
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x1bb1eb
cmpb $0x0, 0xc8(%rbx)
jne 0x1bb1eb
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 0x66ad4