// File: /workspace/github_c_makefile_star2_O2/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 0x19d611
movq %r9, %r14
movq %r8, %r15
movq %rdi, %rbx
cmpq $0x0, 0x10(%r8)
je 0x19d4b1
movq %rcx, %rbp
movq %rdx, %rax
movq 0x8(%r15), %rdx
addq (%r15), %rdx
movq %rax, 0x28(%rsp)
movq %rax, %rdi
xorl %esi, %esi
callq 0x1af8b2
leaq 0x40(%rbx), %rax
leaq 0x20(%rbx), %rsi
movl 0x10(%rbx), %edx
movq 0x8(%r15), %rcx
movq 0x10(%r15), %r12
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
cmpq $0x2, %r12
movq %rax, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
jb 0x19d4cc
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x68(%rbx), %rax
testq %rax, %rax
je 0x19d4f0
movq 0x50(%rax), %rsi
leaq 0x8(%rsp), %rdi
movq %r12, %rdx
movq %rbp, %rcx
movq %r14, %r8
callq 0x13576e
movq 0x68(%rbx), %rcx
movl %eax, %edx
cmpq %rdx, 0x28(%rcx)
jae 0x19d4a8
movq %rdx, 0x28(%rcx)
movl 0xc(%rsp), %edx
jmp 0x19d549
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x19d4e7
movb $0x1, 0x20(%rbx)
movq %r14, 0x28(%rbx)
movl %esi, 0x30(%rbx)
xorl %ecx, %ecx
jmp 0x19d5f5
movq %rsi, %r12
movq %rbp, %rdi
movq %r14, %rsi
movl %edx, %ebp
callq 0x1356a5
movq %r12, %rdi
movl %ebp, %edx
movl %eax, 0x8(%rsp)
jmp 0x19d54e
xorl %ecx, %ecx
xorl %eax, %eax
jmp 0x19d5f5
movq %r14, %r8
movq 0x60(%rbx), %r14
addq %rcx, %r14
leaq (,%r14,4), %rsi
addq 0x48(%rbx), %rsi
leaq 0x8(%rsp), %rdi
movq %r12, %rdx
movq %rbp, %rcx
movq %r8, %rbp
callq 0x1358a8
addq %r14, %r12
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %edx
cmpq %r12, %r14
jae 0x19d546
movq %r13, %r8
movl %r14d, %ecx
shrq %cl, %r8
movq (%rdi), %rcx
movq %r14, %rsi
shrq $0x6, %rsi
orq %r8, (%rcx,%rsi,8)
incq %r14
jmp 0x19d525
movq %rbp, %r14
movq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq %r14, 0x8(%rsi)
movl %eax, 0x10(%rsi)
callq 0x19d398
movq 0x68(%rbx), %rcx
testq %rcx, %rcx
je 0x19d590
cmpq %rax, 0x28(%rcx)
jae 0x19d572
movq %rax, 0x28(%rcx)
movq 0x50(%rcx), %rcx
movb %al, (%rcx)
movq 0x68(%rbx), %rdi
movl 0x8(%rsp), %ebp
testq %rdi, %rdi
je 0x19d5be
movq 0x10(%r15), %rsi
callq 0x19d65f
jmp 0x19d5e2
movq 0x60(%rbx), %rcx
leaq (,%rcx,4), %rdx
addq 0x48(%rbx), %rdx
movq 0x20(%rsp), %rsi
addq %rsi, %rcx
shrq %cl, %r13
movl %eax, (%rdx,%rsi,4)
movq 0x40(%rbx), %rax
shrq $0x6, %rcx
orq %r13, (%rax,%rcx,8)
movl 0x8(%rsp), %ebp
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x19d5e2
movq 0x8(%rax), %rdi
movq (%r15), %r9
movq 0x8(%r15), %rcx
movq 0x10(%r15), %r8
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq *(%rax)
movb $0x1, 0x20(%rbx)
movq %r14, 0x28(%rbx)
movl %ebp, 0x30(%rbx)
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
addq %rax, %rcx
sete 0x38(%rbx)
cmpq $0x0, 0x68(%rbx)
jne 0x19d60a
cmpq $0x0, 0x70(%rbx)
je 0x19d620
cmpq $0x0, 0x60(%rbx)
jne 0x19d627
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andq $0x0, 0x60(%rbx)
jmp 0x19d611
movq 0x29a93a(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1479db(%rip), %rsi    # 0x2e5013
leaq 0x1ba893(%rip), %rdx    # 0x357ed2
leaq 0x1ba8c5(%rip), %rcx    # 0x357f0b
leaq 0x1ba6f5(%rip), %r8     # 0x357d42
movl $0x315, %r9d            # imm = 0x315
xorl %eax, %eax
callq 0x17a50
callq 0x17390