// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
leaq 0x1c1b87(%rip), %r15    # 0x355b80
movq 0x10(%rbx), %rax
movq 0x38(%rax), %rdi
callq 0xaf370
movq 0x10(%rbx), %r12
movq 0x18(%r12), %rdx
movq 0x28(%r12), %rcx
cmpq %rcx, %rdx
ja 0x194184
movq (%r12), %r8
movq 0x10(%r12), %rsi
movl 0x30(%r12), %r9d
movq %r14, %rdi
callq 0x1353c2
movl %eax, 0x30(%r12)
incq 0x18(%r12)
movq 0x10(%rbx), %rax
movq 0x8(%rax), %r12
movq 0x38(%rax), %rdi
leaq 0x1(%r12), %rcx
movq %rcx, 0x8(%rax)
callq 0xaf3e7
movq 0x10(%rsp), %rdx
cmpq $0x2, %rdx
jb 0x194072
movq (%rbx), %rdi
movq 0x8(%rsp), %rsi
movl 0x8(%rbx), %ecx
callq 0x192411
movq 0x18(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0xaf370
movq 0x18(%rbx), %r13
testq %r13, %r13
je 0x1941d6
cmpq %r12, 0x8(%r13)
jne 0x1940e3
movq (%r13), %rdi
incq %r12
movq %r12, 0x8(%r13)
callq 0x193b86
testb %al, %al
jne 0x194172
movq (%r13), %rdi
callq 0x193b35
cmpq 0x8(%r13), %rax
jne 0x194172
movq (%r13), %rdi
testq %rdi, %rdi
je 0x19419e
movq %rax, %r12
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x19419e
decq %rax
movq %rax, 0x8(%rdi)
jmp 0x194096
jae 0x194263
movq (%r13), %r13
testq %r13, %r13
je 0x194232
movq (%r13), %rsi
movq 0x8(%r13), %rcx
cmpq %rsi, %rcx
jae 0x194109
movq 0x10(%r13), %rax
jmp 0x19412e
leaq (%rsi,%rsi), %rax
movq %rax, (%r13)
movq 0x10(%r13), %rdi
shlq $0x4, %rsi
movq %r15, %rdx
movl $0x741, %ecx            # imm = 0x741
callq 0x93472
movq %rax, 0x10(%r13)
movq 0x8(%r13), %rcx
leaq (%rax,%rcx,8), %rcx
cmpq %rax, %rcx
jbe 0x194149
movq -0x8(%rcx), %rdx
cmpq %r12, %rdx
jae 0x194149
movq %rdx, (%rcx)
addq $-0x8, %rcx
jmp 0x194132
movq 0x8(%r13), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x8(%r13)
cmpq %rax, %rcx
jb 0x194204
leaq (%rax,%rdx,8), %rax
addq $0x8, %rax
cmpq %rax, %rcx
jae 0x194204
movq %r12, (%rcx)
movq 0x18(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0xaf3e7
jmp 0x193ff9
movq 0x38(%r12), %rdi
callq 0xaf3e7
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x2a3dc3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x150e64(%rip), %rsi    # 0x2e5013
leaq 0x1c1973(%rip), %rdx    # 0x355b29
leaq 0x1c1ea7(%rip), %rcx    # 0x356064
leaq 0x1c19bc(%rip), %r8     # 0x355b80
movl $0x753, %r9d            # imm = 0x753
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2a3d8b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x150e2c(%rip), %rsi    # 0x2e5013
leaq 0x1c1e22(%rip), %rdx    # 0x356010
leaq 0x1c1e2b(%rip), %rcx    # 0x356020
leaq 0x1c1984(%rip), %r8     # 0x355b80
movl $0x77b, %r9d            # imm = 0x77B
jmp 0x1941ca
movq 0x2a3d5d(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x150dfe(%rip), %rsi    # 0x2e5013
leaq 0x1c1e81(%rip), %rdx    # 0x35609d
leaq 0x1c1e61(%rip), %rcx    # 0x356084
leaq 0x1c1956(%rip), %r8     # 0x355b80
movl $0x74d, %r9d            # imm = 0x74D
jmp 0x1941ca
movq 0x2a3d2f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x150dd0(%rip), %rsi    # 0x2e5013
leaq 0x19a2f8(%rip), %rdx    # 0x32e542
leaq 0x1c1e33(%rip), %rcx    # 0x356084
leaq 0x1c1928(%rip), %r8     # 0x355b80
movl $0x73d, %r9d            # imm = 0x73D
jmp 0x1941ca
movq 0x2a3cfe(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x150d9f(%rip), %rsi    # 0x2e5013
leaq 0x1c1dc5(%rip), %rdx    # 0x356040
leaq 0x1c1d9e(%rip), %rcx    # 0x356020
leaq 0x1c18f7(%rip), %r8     # 0x355b80
movl $0x789, %r9d            # imm = 0x789
jmp 0x1941ca