// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/esa-seqread.c
// Function: gt_nextSequentiallcpvalue
int gt_nextSequentiallcpvalue(GtUword *currentlcp,
                              Sequentialsuffixarrayreader *ssar,
                              GtError *err)
{
  GtUchar tmpsmalllcpvalue;
  int retval;

  gt_assert(ssar != NULL);
  if (ssar->scanfile)
  {
    retval = gt_readnextfromstream_GtUchar(&tmpsmalllcpvalue,
                                           &ssar->suffixarray->lcptabstream);
    if (retval > 0)
    {
      if (tmpsmalllcpvalue < (GtUchar) LCPOVERFLOW)
      {
        *currentlcp = (GtUword) tmpsmalllcpvalue;
      } else
      {
        Largelcpvalue tmpexception;

        retval = gt_readnextfromstream_Largelcpvalue(&tmpexception,
                                          &ssar->suffixarray->llvtabstream);
        if (retval == 0)
        {
          gt_error_set(err,"file %s: line %d: unexpected end of file when "
                           "reading llvtab",__FILE__,__LINE__);
          return -1;
        }
        *currentlcp = tmpexception.value;
      }
    } else
    {
      return 0;
    }
  } else
  {
    if (ssar->nextlcptabindex < ssar->numberofsuffixes)
    {
      tmpsmalllcpvalue = ssar->suffixarray->lcptab[ssar->nextlcptabindex++];
      if (tmpsmalllcpvalue < (GtUchar) LCPOVERFLOW)
      {
        *currentlcp = (GtUword) tmpsmalllcpvalue;
      } else
      {
        gt_assert(ssar->suffixarray->llvtab[ssar->largelcpindex].position ==
                  ssar->nextlcptabindex-1);
        *currentlcp = ssar->suffixarray->llvtab[ssar->largelcpindex++].value;
      }
    } else
    {
      return 0;
    }
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x1ae3d8
movq %rsi, %r15
movq %rdi, %rbx
cmpb $0x1, 0x40(%rsi)
jne 0x1ae29f
movq %rdx, %r14
movq (%r15), %r13
movl 0xd4(%r13), %eax
cmpl 0xd0(%r13), %eax
jb 0x1ae275
movq 0xd8(%r13), %rdi
movq 0xe0(%r13), %rcx
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %r12
movl %r12d, 0xd0(%r13)
movq 0xe0(%r13), %rdi
callq 0x17f00
testl %eax, %eax
jne 0x1ae3dd
movl $0x0, 0xd4(%r13)
testl %r12d, %r12d
je 0x1ae3b6
movq 0xd8(%r13), %rax
movl 0xd4(%r13), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0xd4(%r13)
movb (%rax,%rcx), %al
xorl %ecx, %ecx
testb %cl, %cl
jne 0x1ae2f6
cmpb $-0x1, %al
je 0x1ae307
movzbl %al, %ecx
jmp 0x1ae2ec
movq 0x20(%r15), %rax
cmpq 0x10(%r15), %rax
jae 0x1ae2f6
movq (%r15), %rdx
movq 0x60(%rdx), %rcx
leaq 0x1(%rax), %rsi
movq %rsi, 0x20(%r15)
movzbl (%rcx,%rax), %ecx
cmpq $0xff, %rcx
jne 0x1ae2ec
movq 0x68(%rdx), %rcx
movq 0x28(%r15), %rdx
movq %rdx, %rsi
shlq $0x4, %rsi
cmpq %rax, (%rcx,%rsi)
jne 0x1ae3e2
addq %rsi, %rcx
incq %rdx
movq %rdx, 0x28(%r15)
movq 0x8(%rcx), %rcx
movq %rcx, (%rbx)
movl $0x1, %eax
jmp 0x1ae2f8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %r12
movl 0xec(%r12), %eax
cmpl 0xe8(%r12), %eax
jb 0x1ae36c
movq 0xf0(%r12), %rdi
movq 0xf8(%r12), %rcx
movl $0x10, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %r15
movl %r15d, 0xe8(%r12)
movq 0xf8(%r12), %rdi
callq 0x17f00
testl %eax, %eax
jne 0x1ae3e7
movl $0x0, 0xec(%r12)
testl %r15d, %r15d
je 0x1ae3d3
movq 0xf0(%r12), %rax
movl 0xec(%r12), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0xec(%r12)
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rax
xorl %ebp, %ebp
testb %bpl, %bpl
je 0x1ae3bd
leaq 0x1b4804(%rip), %rsi    # 0x362ba2
leaq 0x20007f(%rip), %rdx    # 0x3ae424
movq %r14, %rdi
movl $0x62, %ecx
xorl %eax, %eax
callq 0x1019cf
jmp 0x1ae3c0
movb $0x1, %cl
jmp 0x1ae292
movq %rax, (%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %bpl, %bpl
je 0x1ae2ef
jmp 0x1ae2f8
movb $0x1, %bpl
jmp 0x1ae392
callq 0x63de0
callq 0x63d90
callq 0x63d59
callq 0x63db8