// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_suf_lcp_iterator_new
GtSainSufLcpIterator *gt_sain_suf_lcp_iterator_new(bool withlcp,
                                                   GtUchar *sequence,
                                                   GtUword len,
                                                   GtReadmode readmode,
                                                   GtUword numofchars,
                                                   GtError *err)
{
  GtSainSufLcpIterator *suflcpiterator;

  if (gt_sain_checkmaxsequencelength(len,false,err) != 0)
  {
    return NULL;
  }
  suflcpiterator = gt_malloc(sizeof *suflcpiterator);
  suflcpiterator->suftab = NULL;
  suflcpiterator->plcptab = NULL;
  suflcpiterator->currentsuftabindex = 0;
  suflcpiterator->readmode = readmode;
  suflcpiterator->bare_encseq = gt_bare_encseq_new(sequence,len,numofchars);
  gt_assert(suflcpiterator->bare_encseq != NULL);
  if (readmode != GT_READMODE_FORWARD)
  {
    bare_encseq_convert(suflcpiterator->bare_encseq,
                        GT_ISDIRREVERSE(readmode) ? false : true,
                        GT_ISDIRCOMPLEMENT(readmode) ? false : true);
  }
  suflcpiterator->suftab
    = gt_sain_bare_encseq_sortsuffixes(suflcpiterator->bare_encseq,
                                       readmode,
                                       false,
                                       false,
                                       NULL,
                                       NULL);
  if (withlcp)
  {
    GtUword maxlcp = 0,
            totallength
              = gt_bare_encseq_total_length(suflcpiterator->bare_encseq),
            partwidth
              = totallength -
                gt_bare_encseq_specialcharacters(suflcpiterator->bare_encseq);
    suflcpiterator->plcptab = gt_plain_lcp_phialgorithm(true,
                                                        &maxlcp,
                                                        sequence,
                                                        true,
                                                        partwidth,
                                                        totallength,
                                                        suflcpiterator->suftab);
  }
  return suflcpiterator;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movl %ecx, %r15d
movq %rdx, %r13
movq %rsi, %r14
movl %edi, %ebp
xorl %ebx, %ebx
movq %rdx, %rdi
xorl %esi, %esi
movq %r9, %rdx
callq 0x1a5088
testl %eax, %eax
jne 0x1a51c4
leaq 0x1b43f8(%rip), %rsi    # 0x3594f8
pushq $0x28
popq %rdi
movl $0x6bd, %edx            # imm = 0x6BD
callq 0x93160
movq %rax, %rbx
andq $0x0, 0x20(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl %r15d, 0x18(%rax)
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x13377d
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x1a51d6
movq %rax, %rdi
testl %r15d, %r15d
je 0x1a5168
movl %r15d, %eax
andl $-0x3, %eax
xorl %esi, %esi
cmpl $0x1, %eax
setne %sil
movl %r15d, %eax
andl $-0x2, %eax
xorl %edx, %edx
cmpl $0x2, %eax
setne %dl
callq 0x133fbb
movq 0x10(%rbx), %rdi
movl %r15d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a4e59
movq %rax, (%rbx)
testb %bpl, %bpl
je 0x1a51c4
leaq 0x10(%rsp), %r15
andq $0x0, (%r15)
movq 0x10(%rbx), %rdi
callq 0x133da4
movq %rax, %r12
movq 0x10(%rbx), %rdi
callq 0x133e7b
movq %r12, %r8
subq %rax, %r8
movq (%rbx), %rax
movq %rax, (%rsp)
pushq $0x1
popq %rcx
movl %ecx, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %r9
callq 0x19db09
movq %rax, 0x8(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x292d8b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x13fe2c(%rip), %rsi    # 0x2e5013
leaq 0x1b437e(%rip), %rdx    # 0x35956c
leaq 0x1b439b(%rip), %rcx    # 0x359590
leaq 0x1b42fc(%rip), %r8     # 0x3594f8
movl $0x6c3, %r9d            # imm = 0x6C3
xorl %eax, %eax
callq 0x17a50
callq 0x17390