// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/sfx-lcpvalues.c
// Function: gt_Outlcpinfo_postbucket
void gt_Outlcpinfo_postbucket(GtOutlcpinfo *outlcpinfo,
                              unsigned int prefixlength,
                              const GtSuffixsortspace *sssp,
                              const GtBcktab *bcktab,
                              const GtBucketspecification *bucketspec,
                              GtCodetype code)
{
  if (outlcpinfo != NULL)
  {
    if (bucketspec->specialsinbucket > 0)
    {
      unsigned int minprefixindex;
      GtUword suffixvalue
        = gt_suffixsortspace_get(sssp,
                                 0,
                                 bucketspec->left
                                   + bucketspec->nonspecialsinbucket);
      minprefixindex = lcp_bucketends(&outlcpinfo->lcpsubtab,
                                      &outlcpinfo->previoussuffix,
                                      /* first special element in bucket */
                                      suffixvalue,
                                      outlcpinfo->minchanged,
                                      bucketspec->nonspecialsinbucket,
                                      bucketspec->specialsinbucket,
                                      code,
                                      bcktab);
      if (outlcpinfo->lcpsubtab.lcp2file != NULL)
      {
        outsmalllcpvalues(outlcpinfo->lcpsubtab.lcp2file,
                          bucketspec->specialsinbucket);
      } else
      {
        if (outlcpinfo->lcpsubtab.lcpprocess != NULL)
        {
          outlcpinfo->lcpsubtab.lcpprocess->final_process_bucket(
              outlcpinfo->lcpsubtab.lcpprocess->final_process_bucket_info,
              sssp,
              &outlcpinfo->lcpsubtab.tableoflcpvalues,
              bucketspec->nonspecialsinbucket,
              bucketspec->specialsinbucket,
              bucketspec->left);
        }
      }
      /* there is at least one special element: this is the last element
         in the bucket, and thus the previoussuffix for the next round */
      outlcpinfo->previoussuffix.defined = true;
      outlcpinfo->previoussuffix.code = code;
      outlcpinfo->previoussuffix.prefixindex = minprefixindex;
#ifdef SKDEBUG
      outlcpinfo->previoussuffix.startpos
        = gt_suffixsortspace_get(sssp,
                                 0,
                                 bucketspec->left
                                   + bucketspec->nonspecialsinbucket +
                                     bucketspec->specialsinbucket - 1);
      /*
        gt_bcktab_consistencyofsuffix(__LINE__,
                                      encseq,readmode,bcktab,numofchars,
                                      &outlcpinfo->previoussuffix);
      */
#endif
    } else
    {
      if (bucketspec->nonspecialsinbucket > 0)
      {
        /* if there is at least one element in the bucket, then the last
           one becomes the next previous suffix */
        outlcpinfo->previoussuffix.defined = true;
        outlcpinfo->previoussuffix.code = code;
        outlcpinfo->previoussuffix.prefixindex = prefixlength;
#ifdef SKDEBUG
        outlcpinfo->previoussuffix.startpos
          = gt_suffixsortspace_get(sssp,
                                   0,
                                   bucketspec.left
                                     + bucketspec.nonspecialsinbucket-1);
        /*
        gt_bcktab_consistencyofsuffix(__LINE__,
                                      encseq,readmode,bcktab,numofchars,
                                      &outlcpinfo->previoussuffix);
        */
#endif
      }
    }
    if (bucketspec->nonspecialsinbucket + bucketspec->specialsinbucket == 0)
    {
      outlcpinfo->previousbucketwasempty = true;
    } else
    {
      outlcpinfo->previousbucketwasempty = false;
    }
    if (outlcpinfo->lcpsubtab.lcp2file != NULL ||
        outlcpinfo->lcpsubtab.lcpprocess != NULL)
    {
      gt_assert(outlcpinfo->lcpsubtab.tableoflcpvalues.lcptaboffset == 0);
    } else
    {
      outlcpinfo->lcpsubtab.tableoflcpvalues.lcptaboffset = 0;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rdi, %rdi
je 0x1f6736
movq %r9, %r15
movq %r8, %r14
movq %rdi, %rbx
cmpq $0x0, 0x10(%r8)
je 0x1f65be
movq %rcx, %r13
movq %rdx, %r12
movq 0x8(%r14), %rdx
addq (%r14), %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x206063
leaq 0x40(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rbx), %rdx
movl 0x10(%rbx), %eax
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rbp
cmpq $0x2, %rbp
movq %rcx, 0x28(%rsp)
jb 0x1f65d0
movq %rdx, 0x10(%rsp)
movl %eax, 0x8(%rsp)
movq 0x68(%rbx), %rax
testq %rax, %rax
je 0x1f65f5
movq 0x50(%rax), %rsi
leaq 0xc(%rsp), %rdi
movq %rbp, %rdx
movq %r13, %rcx
movq %r15, %r8
callq 0x1947ba
movq 0x68(%rbx), %rcx
movl %eax, %edx
cmpq %rdx, 0x28(%rcx)
jae 0x1f6667
movq %rdx, 0x28(%rcx)
jmp 0x1f6667
cmpq $0x0, 0x8(%r14)
je 0x1f6715
movl %esi, %ebp
jmp 0x1f670a
movq %r12, 0x18(%rsp)
movq %rdx, %r12
movq %r13, %rdi
movq %r15, %rsi
movl %eax, %ebp
callq 0x1946d3
movq %r12, %rdi
movq 0x18(%rsp), %r12
movl %ebp, %edx
movl %eax, 0xc(%rsp)
jmp 0x1f6670
movq %r12, 0x18(%rsp)
movq 0x60(%rbx), %r12
addq %rcx, %r12
leaq (,%r12,4), %rsi
addq 0x48(%rbx), %rsi
leaq 0xc(%rsp), %rdi
movq %rbp, %rdx
movq %r13, %rcx
movq %r15, %r8
callq 0x1948b3
leaq (%r12,%rbp), %rcx
cmpq %rcx, %r12
jae 0x1f6662
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
movq 0x20(%rsp), %rcx
movq (%rcx), %rsi
movl 0x8(%rsp), %edx
movq %r8, %rdi
movl %r12d, %ecx
shrq %cl, %rdi
movq %r12, %rcx
shrq $0x6, %rcx
orq %rdi, (%rsi,%rcx,8)
incq %r12
decq %rbp
jne 0x1f663f
movq 0x18(%rsp), %r12
jmp 0x1f666b
movq 0x18(%rsp), %r12
movl 0x8(%rsp), %edx
movq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq %r15, 0x8(%rsi)
movl %eax, 0x10(%rsi)
callq 0x1f64e9
movq 0x68(%rbx), %rcx
testq %rcx, %rcx
je 0x1f669c
cmpq %rax, 0x28(%rcx)
jae 0x1f6694
movq %rax, 0x28(%rcx)
movq 0x50(%rcx), %rcx
movb %al, (%rcx)
jmp 0x1f66d0
movq 0x60(%rbx), %rcx
leaq (,%rcx,4), %rdx
addq 0x48(%rbx), %rdx
movq 0x28(%rsp), %rsi
movl %eax, (%rdx,%rsi,4)
addq %rsi, %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
movq 0x40(%rbx), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
movl 0xc(%rsp), %ebp
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x1f66e8
movq 0x10(%r14), %rsi
callq 0x1f6754
jmp 0x1f670a
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x1f670a
movq 0x8(%rax), %rdi
movq (%r14), %r9
movq 0x8(%r14), %rcx
movq 0x10(%r14), %r8
movq %r12, %rsi
movq 0x20(%rsp), %rdx
callq *(%rax)
movb $0x1, 0x20(%rbx)
movq %r15, 0x28(%rbx)
movl %ebp, 0x30(%rbx)
movq 0x8(%r14), %rax
addq 0x10(%r14), %rax
sete 0x38(%rbx)
cmpq $0x0, 0x68(%rbx)
jne 0x1f672f
cmpq $0x0, 0x70(%rbx)
je 0x1f6745
cmpq $0x0, 0x60(%rbx)
jne 0x1f674f
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x60(%rbx)
jmp 0x1f6736
callq 0x7a82e