// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/esa-lcpintervals.c
// Function: gt_esa_scantables
static int gt_esa_scantables(Sequentialsuffixarrayreader *ssar,
                             unsigned int mode,GtError *err)
{
  GtUword lcpvalue,
                previoussuffix = 0,
                idx,
                nonspecials,
                sumsuftab = 0,
                sumlcptab = 0;
  bool haserr = false;

  nonspecials = gt_Sequentialsuffixarrayreader_nonspecials(ssar);
  if (mode == 1U)
  {
    for (idx = 0; idx < nonspecials; idx++)
    {
      int retval = gt_nextSequentiallcpvalue(&lcpvalue,ssar,err);

      if (retval < 0)
      {
        haserr = true;
        break;
      }
      if (retval == 0)
      {
        break;
      }
      sumlcptab += lcpvalue; /* silly but guarantees that loop is
                                not eliminated by compiler */
      retval = gt_nextSequentialsuftabvalue(&previoussuffix,ssar);
      gt_assert(retval >= 0);
      if (retval == 0)
      {
        break;
      }
      sumsuftab += previoussuffix; /* silly but guarantees that loop is
                                      not eliminated by compiler */
    }
  } else
  {
    if (mode == 2U)
    {
      for (idx = 0; !haserr && idx < nonspecials; idx++)
      {
        SSAR_NEXTSEQUENTIALLCPTABVALUE(lcpvalue,ssar);
        sumlcptab += lcpvalue; /* silly but guarantees that loop is
                                  not eliminated by compiler */
        SSAR_NEXTSEQUENTIALSUFTABVALUE(previoussuffix,ssar);
        sumsuftab += previoussuffix; /* silly but guarantees that loop is
                                        not eliminated by compiler */
      }
    } else
    {
      gt_error_set(err,"illegal mode %u: use 1 or 2",mode);
      haserr = true;
    }
  }
  if (!haserr)
  {
    printf("sumsuftab="GT_WU"\n",sumsuftab);
    printf("sumlcptab="GT_WU"\n",sumlcptab);
  }
  return haserr ? -1 : 0;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movl %esi, 0x7c(%rsp)
movq %rdx, 0x70(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movb $0x0, 0x3f(%rsp)
movq 0x80(%rsp), %rdi
callq 0x23bed0
movq %rax, 0x50(%rsp)
cmpl $0x1, 0x7c(%rsp)
jne 0x232c1c
movq $0x0, 0x58(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
jae 0x232c17
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x68(%rsp), %rdi
callq 0x23b640
movl %eax, 0x38(%rsp)
cmpl $0x0, 0x38(%rsp)
jge 0x232b7a
movb $0x1, 0x3f(%rsp)
jmp 0x232c17
cmpl $0x0, 0x38(%rsp)
jne 0x232b86
jmp 0x232c17
movq 0x68(%rsp), %rax
addq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x80(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x23ba50
movl %eax, 0x38(%rsp)
cmpl $0x0, 0x38(%rsp)
jge 0x232bea
movq 0x4093e7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2e3450(%rip), %rsi    # 0x516013
leaq 0x343d77(%rip), %rdx    # 0x576941
leaq 0x343d7c(%rip), %rcx    # 0x57694d
leaq 0x343cc4(%rip), %r8     # 0x57689c
movl $0x115, %r9d            # imm = 0x115
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x232bec
cmpl $0x0, 0x38(%rsp)
jne 0x232bf5
jmp 0x232c17
movq 0x60(%rsp), %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x232b3e
jmp 0x2330a3
cmpl $0x2, 0x7c(%rsp)
jne 0x233085
movq $0x0, 0x58(%rsp)
xorl %eax, %eax
testb $0x1, 0x3f(%rsp)
movb %al, 0xf(%rsp)
jne 0x232c4e
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
setb %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x232c5b
jmp 0x233083
movq 0x80(%rsp), %rax
testb $0x1, 0x40(%rax)
je 0x232d12
movq 0x80(%rsp), %rax
movq (%rax), %rsi
addq $0xd0, %rsi
leaq 0x37(%rsp), %rdi
callq 0x233150
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x30(%rsp)
jle 0x232d08
movzbl 0x37(%rsp), %eax
cmpl $0xff, %eax
jge 0x232cac
movzbl 0x37(%rsp), %eax
movq %rax, 0x68(%rsp)
jmp 0x232d06
movq 0x80(%rsp), %rax
movq (%rax), %rsi
addq $0xe8, %rsi
leaq 0x20(%rsp), %rdi
callq 0x233230
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x30(%rsp)
jne 0x232cfc
movq 0x70(%rsp), %rdi
leaq 0x2f7f89(%rip), %rsi    # 0x52ac68
leaq 0x343bb6(%rip), %rdx    # 0x57689c
movl $0x123, %ecx            # imm = 0x123
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x3f(%rsp)
jmp 0x233083
movq 0x28(%rsp), %rax
movq %rax, 0x68(%rsp)
jmp 0x232d0d
jmp 0x233083
jmp 0x232e2d
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x80(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x232e26
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq 0x60(%rax), %rax
movq 0x80(%rsp), %rdx
movq 0x20(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x20(%rdx)
movb (%rax,%rcx), %al
movb %al, 0x37(%rsp)
movzbl 0x37(%rsp), %eax
cmpl $0xff, %eax
jge 0x232d78
movzbl 0x37(%rsp), %eax
movq %rax, 0x68(%rsp)
jmp 0x232e24
jmp 0x232d7a
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq 0x68(%rax), %rax
movq 0x80(%rsp), %rcx
movq 0x28(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x80(%rsp), %rcx
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x232dec
movq 0x4091e5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2e324e(%rip), %rsi    # 0x516013
leaq 0x2f7ed9(%rip), %rdx    # 0x52aca5
leaq 0x343b7a(%rip), %rcx    # 0x57694d
leaq 0x343ac2(%rip), %r8     # 0x57689c
movl $0x123, %r9d            # imm = 0x123
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x232dee
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq 0x68(%rax), %rax
movq 0x80(%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), %rax
movq %rax, 0x68(%rsp)
jmp 0x232e2b
jmp 0x233083
jmp 0x232e2d
movq 0x68(%rsp), %rax
addq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x80(%rsp), %rax
testb $0x1, 0x40(%rax)
je 0x233032
movq 0x80(%rsp), %rax
movq (%rax), %rax
cmpq $0x0, 0xb0(%rax)
je 0x232f50
movq 0x80(%rsp), %rax
movq (%rax), %rax
addq $0xa0, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl 0x4(%rax), %eax
movq 0x18(%rsp), %rcx
cmpl (%rcx), %eax
jb 0x232f27
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
movl $0x8, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x19a70
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x19e10
cmpl $0x0, %eax
je 0x232ef0
movq 0x70(%rsp), %rdi
leaq 0x2f7e39(%rip), %rsi    # 0x52ad14
leaq 0x38512d(%rip), %rdx    # 0x5b800f
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x3f(%rsp)
jmp 0x232f25
movq 0x18(%rsp), %rax
movl $0x0, 0x4(%rax)
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x232f23
movq 0x70(%rsp), %rdi
leaq 0x2f8256(%rip), %rsi    # 0x52b168
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x3f(%rsp)
jmp 0x233083
jmp 0x232f25
jmp 0x232f27
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rsp), %rdx
movl 0x4(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x4(%rdx)
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x60(%rsp)
jmp 0x233030
movq 0x80(%rsp), %rax
movq (%rax), %rax
addq $0x88, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl 0x4(%rax), %eax
movq 0x10(%rsp), %rcx
cmpl (%rcx), %eax
jb 0x23300d
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
movl $0x4, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x19a70
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x19e10
cmpl $0x0, %eax
je 0x232fd9
movq 0x70(%rsp), %rdi
leaq 0x2f7d50(%rip), %rsi    # 0x52ad14
leaq 0x2f81b5(%rip), %rdx    # 0x52b180
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x3f(%rsp)
jmp 0x23300b
movq 0x10(%rsp), %rax
movl $0x0, 0x4(%rax)
movq 0x10(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x233009
movq 0x70(%rsp), %rdi
leaq 0x2f816d(%rip), %rsi    # 0x52b168
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x3f(%rsp)
jmp 0x233083
jmp 0x23300b
jmp 0x23300d
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rsp), %rdx
movl 0x4(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x4(%rdx)
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq %rax, 0x60(%rsp)
jmp 0x233061
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x80(%rsp), %rdx
movq 0x18(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x18(%rdx)
movq (%rax,%rcx,8), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x232c30
jmp 0x2330a1
movq 0x70(%rsp), %rdi
movl 0x7c(%rsp), %edx
leaq 0x3438ca(%rip), %rsi    # 0x57695f
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x3f(%rsp)
jmp 0x2330a3
testb $0x1, 0x3f(%rsp)
jne 0x2330d0
movq 0x48(%rsp), %rsi
leaq 0x3438c5(%rip), %rdi    # 0x57697b
movb $0x0, %al
callq 0x19070
movq 0x40(%rsp), %rsi
leaq 0x3438c1(%rip), %rdi    # 0x57698a
movb $0x0, %al
callq 0x19070
movb 0x3f(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x88, %rsp
retq
nopl (%rax)