// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x1519d4
movq %rsi, %r15
movq %rdi, %rbx
cmpb $0x1, 0x40(%rsi)
jne 0x151951
movq %rdx, %r14
movq (%r15), %r13
movl 0xd4(%r13), %eax
cmpl 0xd0(%r13), %eax
jb 0x1518a8
movq 0xd8(%r13), %rdi
movq 0xe0(%r13), %rcx
pushq $0x1
popq %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17ad0
movq %rax, %r12
movl %r12d, 0xd0(%r13)
movq 0xe0(%r13), %rdi
callq 0x17e70
testl %eax, %eax
jne 0x151a0a
andl $0x0, 0xd4(%r13)
xorl %eax, %eax
testl %r12d, %r12d
je 0x1519ab
movq 0xd8(%r13), %rcx
leal 0x1(%rax), %edx
movl %edx, 0xd4(%r13)
movl %eax, %eax
movzbl (%rcx,%rax), %eax
cmpq $0xff, %rax
jne 0x1519a5
movq (%r15), %r12
movl 0xec(%r12), %eax
cmpl 0xe8(%r12), %eax
jb 0x151931
movq 0xf0(%r12), %rdi
movq 0xf8(%r12), %rcx
pushq $0x10
popq %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17ad0
movq %rax, %r15
movl %r15d, 0xe8(%r12)
movq 0xf8(%r12), %rdi
callq 0x17e70
testl %eax, %eax
jne 0x151a4e
andl $0x0, 0xec(%r12)
xorl %eax, %eax
testl %r15d, %r15d
je 0x1519b5
movq 0xf0(%r12), %rcx
leal 0x1(%rax), %edx
movl %edx, 0xec(%r12)
movl %eax, %eax
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %rax
jmp 0x1519a5
movq 0x20(%r15), %rcx
xorl %eax, %eax
cmpq 0x10(%r15), %rcx
jae 0x1519ab
movq (%r15), %rax
movq 0x60(%rax), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x20(%r15)
movzbl (%rdx,%rcx), %edx
cmpq $0xff, %rdx
je 0x15197e
movq %rdx, (%rbx)
jmp 0x1519a8
movq 0x68(%rax), %rax
movq 0x28(%r15), %rdx
movq %rdx, %rsi
shlq $0x4, %rsi
cmpq %rcx, (%rax,%rsi)
jne 0x151a24
addq %rsi, %rax
incq %rdx
movq %rdx, 0x28(%r15)
movq 0x8(%rax), %rax
movq %rax, (%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1a8161(%rip), %rsi    # 0x2f9b1d
leaq 0x1f383f(%rip), %rdx    # 0x345202
pushq $0x62
popq %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
jmp 0x1519aa
movq 0x2e658d(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x19362e(%rip), %rsi    # 0x2e5013
leaq 0x1f2f4c(%rip), %rdx    # 0x344938
leaq 0x1f3851(%rip), %rcx    # 0x345244
leaq 0x1f3808(%rip), %r8     # 0x345202
pushq $0x4f
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2e6557(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a81ae(%rip), %rsi    # 0x2f9bc9
leaq 0x1a81c9(%rip), %rdx    # 0x2f9beb
jmp 0x151a66
movq 0x2e653d(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1935de(%rip), %rsi    # 0x2e5013
leaq 0x1f3822(%rip), %rdx    # 0x34525e
leaq 0x1f3801(%rip), %rcx    # 0x345244
leaq 0x1f37b8(%rip), %r8     # 0x345202
pushq $0x76
jmp 0x1519fc
movq 0x2e6513(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a816a(%rip), %rsi    # 0x2f9bc9
leaq 0x206593(%rip), %rdx    # 0x357ff9
xorl %eax, %eax
callq 0x17a50
pushq $0x2
popq %rdi
callq 0x178f0