// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/randomcodes-correct.c
// Function: gt_randomcodes_correct_process_bucket
int gt_randomcodes_correct_process_bucket(void *data,
    const GtUword *bucketofsuffixes, const GtSeqnumrelpos *snrp,
    const uint16_t *lcptab_bucket, GtUword numberofsuffixes,
    GT_UNUSED unsigned int sortingdepth, GT_UNUSED GtError *err)
{
  GtUword itvstart, next_itvstart;
  unsigned int lcpvalue;
  bool haserr = false;
  GtRandomcodesCorrectData *cdata = data;

  for (itvstart = 0, next_itvstart = 1UL; next_itvstart < numberofsuffixes;
      next_itvstart++)
  {
    lcpvalue = (unsigned int) lcptab_bucket[next_itvstart];
    if (lcpvalue < cdata->k)
    {
      gt_randomcodes_correct_process_kmer_itv(bucketofsuffixes + itvstart,
          next_itvstart - itvstart, data);
      itvstart = next_itvstart;
      if (lcpvalue < cdata->k - 1)
      {
        gt_randomcodes_correct_process_kmergroup_end(snrp, data);
      }
    }
  }
  gt_randomcodes_correct_process_kmer_itv(bucketofsuffixes + itvstart,
      numberofsuffixes - itvstart, data);
  gt_randomcodes_correct_process_kmergroup_end(snrp, data);
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
cmpq $0x2, %r8
jb 0x1bc7a4
movq %rcx, %r13
movl $0x1, %ebp
xorl %eax, %eax
movdqa 0x1baa99(%rip), %xmm3   # 0x377180
movzwl (%r13,%rbp,2), %ecx
cmpl %ecx, 0x20(%r15)
jbe 0x1bc796
movq %rbp, %rdx
subq %rax, %rdx
movl 0x24(%r15), %esi
movdqu 0x50(%r15), %xmm0
movq %rdx, %xmm1
movdqa %xmm3, %xmm2
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
paddq %xmm0, %xmm2
movdqu %xmm2, 0x50(%r15)
movl %esi, %r9d
cmpq %rsi, %rdx
jae 0x1bc72e
movb $0x0, 0x45(%r15)
movl %edx, %r9d
testl %r9d, %r9d
je 0x1bc762
leaq (%r12,%rax,8), %rdi
movl 0x40(%r15), %eax
movl %eax, %r8d
imull %esi, %r8d
shlq $0x3, %r8
addq 0x30(%r15), %r8
movl %r9d, %esi
xorl %r9d, %r9d
movq (%rdi,%r9,8), %r10
movq %r10, (%r8,%r9,8)
incq %r9
cmpq %r9, %rsi
jne 0x1bc750
jmp 0x1bc766
movl 0x40(%r15), %eax
movq 0x28(%r15), %rsi
movl %eax, %eax
movl %edx, (%rsi,%rax,4)
incl 0x40(%r15)
movl 0x20(%r15), %edx
decl %edx
movq %rbp, %rax
cmpl %ecx, %edx
jbe 0x1bc796
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1bc83a
movdqa 0x1ba9ed(%rip), %xmm3   # 0x377180
movq %rbp, %rax
incq %rbp
cmpq %r14, %rbp
jne 0x1bc6e7
jmp 0x1bc7a6
xorl %eax, %eax
subq %rax, %r14
movl 0x24(%r15), %ecx
movdqu 0x50(%r15), %xmm0
movq %r14, %xmm1
movdqa 0x1ba9c0(%rip), %xmm2   # 0x377180
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
paddq %xmm0, %xmm2
movdqu %xmm2, 0x50(%r15)
movl %ecx, %edi
cmpq %rcx, %r14
jae 0x1bc7dd
movb $0x0, 0x45(%r15)
movl %r14d, %edi
testl %edi, %edi
je 0x1bc80c
leaq (%r12,%rax,8), %rdx
movl 0x40(%r15), %eax
movl %eax, %esi
imull %ecx, %esi
shlq $0x3, %rsi
addq 0x30(%r15), %rsi
movl %edi, %ecx
xorl %edi, %edi
movq (%rdx,%rdi,8), %r8
movq %r8, (%rsi,%rdi,8)
incq %rdi
cmpq %rdi, %rcx
jne 0x1bc7fa
jmp 0x1bc810
movl 0x40(%r15), %eax
movq 0x28(%r15), %rcx
movl %eax, %eax
movl %r14d, (%rcx,%rax,4)
incl 0x40(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1bc83a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq