// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/esa-shulen.c
// Function: gt_sfx_multiesa2shulengthdist
int gt_sfx_multiesa2shulengthdist(GtBUstate_shulen *bustate,
                                  const GtUword *bucketofsuffixes,
                                  const uint32_t *bucketofsuffixes_uint32,
                                  const GtLcpvaluetype *lcptab_bucket,
                                  GtUword numberofsuffixes,
                                  GtError *err)
{
  bool haserr = false;

  if (bustate->previousbucketlastsuffix != ULONG_MAX &&
      gt_esa_bottomup_RAM_previousfromlast_shulen(
                                 bustate->previousbucketlastsuffix,
                                 (GtUword) lcptab_bucket[0],
                                 bustate->stack,
                                 bustate,
                                 err) != 0)
  {
    haserr = true;
  }
  if (!haserr)
  {
    if (gt_esa_bottomup_RAM_shulen(bucketofsuffixes,
                                   bucketofsuffixes_uint32,
                                   lcptab_bucket,
                                   numberofsuffixes,
                                   bustate->stack,
                                   bustate,
                                   err) != 0)
    {
      haserr = true;
    }
  }
  bustate->idxoffset += numberofsuffixes;
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, 0x20(%rsp)
movq %rsi, %rbp
movq %rdi, %r14
movq 0x28(%rdi), %rdi
cmpq $-0x1, %rdi
je 0x1af5ad
movl (%r15), %esi
movq 0x40(%r14), %rdx
movq %r14, %rcx
callq 0x1af8f2
movq 0x40(%r14), %r13
cmpq $-0x1, 0x28(%r14)
je 0x1af5be
movb 0x30(%r14), %r12b
jmp 0x1af616
movq 0x8(%r13), %rsi
cmpq %rsi, 0x10(%r13)
jb 0x1af5e4
jne 0x1af8ed
movq (%r13), %rdi
leaq 0x20(%rsi), %rdx
callq 0x1afbc6
movq %rax, (%r13)
addq $0x20, 0x8(%r13)
movq (%r13), %rax
testq %rax, %rax
je 0x1af8e8
movq 0x10(%r13), %rcx
movq %rcx, %rdx
shlq $0x5, %rdx
incq %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%rdx)
movq %rcx, 0x10(%r13)
movq $-0x1, 0x10(%rax,%rdx)
movb $0x1, %r12b
testq %rbx, %rbx
je 0x1af8e3
movq %rbx, 0x18(%rsp)
decq %rbx
movq %rbx, 0x30(%rsp)
je 0x1af885
movq %r15, 0x28(%rsp)
xorl %ebx, %ebx
xorl %r15d, %r15d
movq %rbp, 0x8(%rsp)
testq %rbp, %rbp
je 0x1af64d
movq (%rbp,%rbx,8), %rax
jmp 0x1af655
movq 0x20(%rsp), %rax
movl (%rax,%rbx,4), %eax
movq %rax, 0x10(%rsp)
movq 0x10(%r13), %rax
testq %rax, %rax
je 0x1af8ca
movq 0x28(%rsp), %rcx
movl 0x4(%rcx,%rbx,4), %ebp
movq (%r13), %rdx
shlq $0x5, %rax
movq -0x20(%rdx,%rax), %rsi
cmpq %rbp, %rsi
jb 0x1af6af
addq %rax, %rdx
testq %rsi, %rsi
sete %al
andb %r12b, %al
movzbl %r12b, %r12d
movl $0x0, %ecx
cmovnel %ecx, %r12d
addq $-0x8, %rdx
movzbl %al, %edi
movq 0x10(%rsp), %rcx
movq %r14, %r8
callq 0x1afcaa
testq %r15, %r15
jne 0x1af8c5
movq (%r13), %rdi
movq 0x10(%r13), %rax
movq %rax, %rcx
shlq $0x5, %rcx
movq -0x20(%rdi,%rcx), %rcx
cmpq %rbp, %rcx
jbe 0x1af740
decq %rax
movq %rax, 0x10(%r13)
shlq $0x5, %rax
leaq (%rdi,%rax), %r15
movq 0x20(%r14), %rcx
addq %rbx, %rcx
movq %rcx, 0x10(%rdi,%rax)
movq -0x20(%rdi,%rax), %rsi
cmpq %rbp, %rsi
jb 0x1af725
testq %rsi, %rsi
sete %al
andb %r12b, %al
movzbl %r12b, %r12d
movl $0x0, %ecx
cmovnel %ecx, %r12d
leaq -0x8(%r15), %rdx
addq $0x18, %r15
movzbl %al, %edi
movq %r15, %rcx
movq %r14, %r8
callq 0x1afd84
xorl %r15d, %r15d
movq (%r13), %rdi
movq 0x10(%r13), %rax
movq %rax, %rcx
shlq $0x5, %rcx
movq -0x20(%rdi,%rcx), %rcx
cmpq %rbp, %rcx
ja 0x1af6d1
jmp 0x1af743
xorl %r15d, %r15d
cmpq %rbp, %rcx
jae 0x1af872
testq %r15, %r15
je 0x1af7fc
movq 0x8(%r15), %rdx
movq 0x8(%r13), %rsi
cmpq %rsi, %rax
jb 0x1af780
jne 0x1af8d9
movq %rdx, %r15
leaq 0x20(%rsi), %rdx
callq 0x1afbc6
movq %rax, (%r13)
addq $0x20, 0x8(%r13)
movq %r15, %rdx
movq (%r13), %r15
testq %r15, %r15
je 0x1af8cf
movq 0x10(%r13), %rcx
movq %rcx, %rax
shlq $0x5, %rax
movq %rbp, (%r15,%rax)
movq %rdx, 0x8(%r15,%rax)
incq %rcx
movq %rcx, 0x10(%r13)
movq $-0x1, 0x10(%r15,%rax)
cmpq $0x0, 0x18(%r15,%rax)
jne 0x1af86f
addq %rax, %r15
movq (%r14), %rdi
shlq $0x3, %rdi
leaq 0x1fef3b(%rip), %rsi    # 0x3ae709
movl $0x11f, %edx            # imm = 0x11F
callq 0x1092b2
movq %rax, 0x18(%r15)
movq (%r14), %rdx
testq %rdx, %rdx
movq 0x8(%rsp), %rbp
je 0x1af7f7
shlq $0x3, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x173a0
xorl %r15d, %r15d
jmp 0x1af877
movq 0x8(%r13), %rsi
cmpq %rsi, %rax
jb 0x1af81d
jne 0x1af8de
leaq 0x20(%rsi), %rdx
callq 0x1afbc6
movq %rax, (%r13)
addq $0x20, 0x8(%r13)
movq (%r13), %rax
testq %rax, %rax
je 0x1af8d4
movq 0x10(%r13), %rcx
movq %rcx, %rdx
shlq $0x5, %rdx
addq %rax, %rdx
addq $0x18, %rdx
movq %rbp, -0x18(%rdx)
movq 0x20(%r14), %rax
addq %rbx, %rax
movq %rax, -0x10(%rdx)
incq %rcx
movq %rcx, 0x10(%r13)
movq $-0x1, -0x8(%rdx)
movl $0x1, %edi
movq %rbp, %rsi
movq 0x10(%rsp), %rcx
movq %r14, %r8
callq 0x1afcaa
xorl %r15d, %r15d
movq 0x8(%rsp), %rbp
incq %rbx
cmpq 0x30(%rsp), %rbx
jne 0x1af641
testq %rbp, %rbp
je 0x1af896
movq 0x18(%rsp), %rcx
movq -0x8(%rbp,%rcx,8), %rax
jmp 0x1af8a4
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rax
movl -0x4(%rax,%rcx,4), %eax
movq %rax, 0x28(%r14)
andb $0x1, %r12b
movb %r12b, 0x30(%r14)
addq %rcx, 0x20(%r14)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x643d6
callq 0x644f3
callq 0x64448
callq 0x644ba
callq 0x6440f
callq 0x64481
callq 0x6452c
callq 0x64565
callq 0x6439d