// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/sfx-bentsedg.c
// Function: gt_bentsedg_stream_thread_caller
static void *gt_bentsedg_stream_thread_caller(void *data)
{
  GtBentsedg_stream_thread_info *thinfo
    = (GtBentsedg_stream_thread_info *) data;

  while (true)
  {
    GtBucketspecification bucketspec;
    GtUword bucketnumber;

    gt_mutex_lock(thinfo->bs_it->mutex);
    if (!gt_BentsedgIterator_next(&bucketspec,thinfo->bs_it))
    {
      gt_mutex_unlock(thinfo->bs_it->mutex);
      break;
    }
    bucketnumber = thinfo->bs_it->bucketnumber++;
    gt_mutex_unlock(thinfo->bs_it->mutex);
    if (bucketspec.nonspecialsinbucket > 1UL)
    {
      gt_sort_bentleysedgewick(thinfo->bsr,bucketspec.left,
                               bucketspec.nonspecialsinbucket,
                               (GtUword) thinfo->prefixlength);
    }
    gt_mutex_lock(thinfo->bs_sync->mutex);
    gt_bendsedgSynchronizer_process(thinfo->bs_sync,bucketnumber);
    gt_mutex_unlock(thinfo->bs_sync->mutex);
  }
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq 0x10(%rbx), %rax
movq 0x38(%rax), %rdi
callq 0x122657
movq 0x10(%rbx), %r15
movq 0x18(%r15), %r12
movq 0x28(%r15), %r13
cmpq %r13, %r12
ja 0x1eea89
movq (%r15), %r8
movq 0x10(%r15), %rsi
movl 0x30(%r15), %r9d
movq %r14, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x19449f
movl %eax, 0x30(%r15)
incq 0x18(%r15)
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rbp
movq 0x38(%rax), %rdi
leaq 0x1(%rbp), %rcx
movq %rcx, 0x8(%rax)
callq 0x122672
movq 0x8(%rsp), %rdx
cmpq $0x2, %rdx
jb 0x1ee973
movq (%rbx), %rdi
movq (%rsp), %rsi
movl 0x8(%rbx), %ecx
callq 0x1eccae
movq 0x18(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x122657
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x1eeaac
movq 0x8(%r15), %rax
cmpq %rbp, %rax
jne 0x1ee9eb
incq %rax
movq %rax, 0x8(%r15)
movq (%r15), %rdi
callq 0x1ee546
testb %al, %al
jne 0x1eea71
movq (%r15), %rdi
callq 0x1ee528
movq 0x8(%r15), %rcx
cmpq %rcx, %rax
jne 0x1eea71
movq (%r15), %rdi
testq %rdi, %rdi
je 0x1eeaa7
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x1eeaa7
decq %rax
movq %rax, 0x8(%rdi)
incq %rcx
movq %rcx, 0x8(%r15)
jmp 0x1ee9a0
jae 0x1eeab1
movq (%r15), %r15
testq %r15, %r15
je 0x1eeabb
movq (%r15), %rsi
cmpq %rsi, 0x8(%r15)
jb 0x1eea2a
leaq (%rsi,%rsi), %rax
movq %rax, (%r15)
movq 0x10(%r15), %rdi
shlq $0x4, %rsi
leaq 0x1d0324(%rip), %rdx    # 0x3bed40
movl $0x741, %ecx            # imm = 0x741
callq 0x1094e6
movq %rax, 0x10(%r15)
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rcx
leaq (%rcx,%rdx,8), %rax
testq %rdx, %rdx
jle 0x1eea50
movq -0x8(%rax), %rdx
cmpq %rbp, %rdx
jae 0x1eea50
movq %rdx, (%rax)
addq $-0x8, %rax
cmpq %rcx, %rax
ja 0x1eea3b
movq 0x8(%r15), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x8(%r15)
cmpq %rcx, %rax
jb 0x1eeab6
leaq (%rcx,%rdx,8), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jae 0x1eeab6
movq %rbp, (%rax)
movq 0x18(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x122672
cmpq %r13, %r12
jbe 0x1ee8fd
jmp 0x1eea96
movq 0x10(%rbx), %rax
movq 0x38(%rax), %rdi
callq 0x122672
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x77893
callq 0x778cc
callq 0x777e8
callq 0x77821
callq 0x7785a