// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x23b693
movq 0x40093e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2da9a7(%rip), %rsi    # 0x516013
leaq 0x2ef5e8(%rip), %rdx    # 0x52ac5b
leaq 0x33c012(%rip), %rcx    # 0x57768c
leaq 0x33bfc9(%rip), %r8     # 0x57764a
movl $0x4f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x23b695
movq 0x20(%rsp), %rax
testb $0x1, 0x40(%rax)
je 0x23b754
movq 0x20(%rsp), %rax
movq (%rax), %rsi
addq $0xd0, %rsi
leaq 0x17(%rsp), %rdi
callq 0x23b880
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x23b742
movzbl 0x17(%rsp), %eax
cmpl $0xff, %eax
jge 0x23b6e5
movzbl 0x17(%rsp), %eax
movl %eax, %ecx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
jmp 0x23b740
movq 0x20(%rsp), %rax
movq (%rax), %rsi
addq $0xe8, %rsi
movq %rsp, %rdi
callq 0x23b960
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jne 0x23b733
movq 0x18(%rsp), %rdi
leaq 0x2ef555(%rip), %rsi    # 0x52ac68
leaq 0x33bf30(%rip), %rdx    # 0x57764a
movl $0x62, %ecx
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x23b869
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
jmp 0x23b74f
movl $0x0, 0x34(%rsp)
jmp 0x23b869
jmp 0x23b861
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x23b855
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x60(%rax), %rax
movq 0x20(%rsp), %rdx
movq 0x20(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x20(%rdx)
movb (%rax,%rcx), %al
movb %al, 0x17(%rsp)
movzbl 0x17(%rsp), %eax
cmpl $0xff, %eax
jge 0x23b7b3
movzbl 0x17(%rsp), %eax
movl %eax, %ecx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
jmp 0x23b853
jmp 0x23b7b5
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x68(%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x28(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x23b81e
movq 0x4007b3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2da81c(%rip), %rsi    # 0x516013
leaq 0x33bea8(%rip), %rdx    # 0x5776a6
leaq 0x33be87(%rip), %rcx    # 0x57768c
leaq 0x33be3e(%rip), %r8     # 0x57764a
movl $0x76, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x23b820
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x68(%rax), %rax
movq 0x20(%rsp), %rdx
movq 0x28(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x28(%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
jmp 0x23b85f
movl $0x0, 0x34(%rsp)
jmp 0x23b869
jmp 0x23b861
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)