// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/randomcodes.c
// Function: gt_randomcodes_thread_sortremaining
static int gt_randomcodes_thread_sortremaining(
                                       GtShortreadsortworkinfo **srswtab,
                                       const GtEncseq *encseq,
                                       GtReadmode readmode,
                                       const GtSpmsuftab *spmsuftab,
                                       const GtSeqnumrelpos *snrp,
                                       const GtRandomcodestab *rct,
                                       GtUword *allrandomcodes,
                                       GtUword partminindex,
                                       GtUword partmaxindex,
                                       GtUword widthofpart,
                                       GtUword sumofwidth,
                                       unsigned int sortingdepth,
                                       unsigned int bucketkeysize,
                                       GtRandomcodesintervalprocess itvprocess,
                                       GtRandomcodesintervalprocess_end
                                         itvprocess_end,
                                       void *itvprocessdatatab,
                                       bool withsuftabcheck,
                                       unsigned int threads,
                                       GtLogger *logger,
                                       GtError *err)
{
  unsigned int t;
  GtUword GT_UNUSED sum = 0, *endindexes;
  GtRandomcodesSortRemainingThreadinfo *threadinfo;
  bool haserr = false;

  gt_assert(threads >= 2U);
  endindexes = gt_randomcodes_evenly_divide_part(rct, partminindex,
      partmaxindex, widthofpart, threads);
  threadinfo = gt_malloc(sizeof (*threadinfo) * threads);
  for (t=0; t<threads; t++)
  {
    GtUword lb;

    threadinfo[t].srsw = srswtab[t];
    threadinfo[t].encseq = encseq;
    threadinfo[t].spmsuftab = spmsuftab;
    threadinfo[t].snrp = snrp;
    threadinfo[t].rct = rct;
    threadinfo[t].allrandomcodes = allrandomcodes;
    threadinfo[t].minindex = t == 0 ? partminindex : endindexes[t-1] + 1,
    threadinfo[t].maxindex = endindexes[t];
    threadinfo[t].readmode = readmode;
    threadinfo[t].withsuftabcheck = withsuftabcheck;
    threadinfo[t].sortingdepth = sortingdepth;
    threadinfo[t].bucketkeysize = bucketkeysize;
    threadinfo[t].itvprocess = itvprocess;
    threadinfo[t].itvprocess_end = itvprocess_end;
    if (itvprocessdatatab == NULL)
    {
      threadinfo[t].itvprocessdata = NULL;
    } else
    {
      threadinfo[t].itvprocessdata = ((void **) itvprocessdatatab)[t];
    }
    threadinfo[t].err = err;
    lb = gt_randomcodes_get_leftborder(rct, threadinfo[t].minindex);
    if (t < threads - 1)
    {
      threadinfo[t].sumofwidth
        = gt_randomcodes_get_leftborder(rct, threadinfo[t].maxindex+1);
    } else
    {
      threadinfo[t].sumofwidth = sumofwidth;
    }
    gt_assert(lb < threadinfo[t].sumofwidth);
    gt_logger_log(logger, "thread %u: process [" GT_WU ", " GT_WU "]=[" GT_WU
                  ", " GT_WU "] of width " GT_WU,
                  t, threadinfo[t].minindex, threadinfo[t].maxindex, lb,
                  threadinfo[t].sumofwidth, threadinfo[t].sumofwidth - lb);
    sum += threadinfo[t].sumofwidth - lb;
    threadinfo[t].thread
      = gt_thread_new (gt_randomcodes_thread_caller_sortremaining,
                       threadinfo + t, err);
    if (threadinfo[t].thread == NULL)
    {
      haserr = true;
    }
  }
  gt_assert (haserr || sum == widthofpart);
  for (t=0; t<threads; t++)
  {
    if (!haserr)
    {
      gt_thread_join(threadinfo[t].thread);
    }
    gt_thread_delete(threadinfo[t].thread);
  }
  gt_free(threadinfo);
  gt_free(endindexes);
  return haserr ? -1 : 0;
}

// Assembly:
subq $0x78, %rsp
movq 0xe8(%rsp), %rax
movq 0xe0(%rsp), %rax
movl 0xd8(%rsp), %eax
movb 0xd0(%rsp), %al
movq 0xc8(%rsp), %r10
movq 0xc0(%rsp), %r10
movq 0xb8(%rsp), %r10
movl 0xb0(%rsp), %r10d
movl 0xa8(%rsp), %r10d
movq 0xa0(%rsp), %r10
movq 0x98(%rsp), %r10
movq 0x90(%rsp), %r10
movq 0x88(%rsp), %r10
movq 0x80(%rsp), %r10
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x48(%rsp)
andb $0x1, %al
movb %al, 0x47(%rsp)
movq $0x0, 0x38(%rsp)
movb $0x0, 0x27(%rsp)
cmpl $0x2, 0xd8(%rsp)
jae 0x273bc5
movq 0x3c840c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2a2475(%rip), %rsi    # 0x516013
leaq 0x304f10(%rip), %rdx    # 0x578ab5
leaq 0x30b79b(%rip), %rcx    # 0x57f347
leaq 0x30af22(%rip), %r8     # 0x57ead5
movl $0x2d7, %r9d            # imm = 0x2D7
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x273bc7
movq 0x48(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
movq 0x98(%rsp), %rcx
movl 0xd8(%rsp), %r8d
callq 0x274840
movq %rax, 0x30(%rsp)
movl 0xd8(%rsp), %eax
imulq $0x88, %rax, %rdi
leaq 0x30aeca(%rip), %rsi    # 0x57ead5
movl $0x2da, %edx            # imm = 0x2DA
callq 0xe80f0
movq %rax, 0x28(%rsp)
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
cmpl 0xd8(%rsp), %eax
jae 0x27408c
movq 0x70(%rsp), %rax
movl 0x40(%rsp), %ecx
movq (%rax,%rcx,8), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x68(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x58(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movq 0x50(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movq 0x48(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x28(%rax)
movq 0x80(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x30(%rax)
cmpl $0x0, 0x40(%rsp)
jne 0x273cfb
movq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x273d16
movq 0x30(%rsp), %rax
movl 0x40(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x38(%rax)
movq 0x30(%rsp), %rax
movl 0x40(%rsp), %ecx
movq (%rax,%rcx,8), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x40(%rax)
movl 0x64(%rsp), %ecx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movb 0x47(%rsp), %cl
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
andb $0x1, %cl
movb %cl, 0x58(%rax)
movl 0xa8(%rsp), %ecx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x50(%rax)
movl 0xb0(%rsp), %ecx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x54(%rax)
movq 0xb8(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x60(%rax)
movq 0xc0(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x68(%rax)
cmpq $0x0, 0xc8(%rsp)
jne 0x273e2d
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x70(%rax)
jmp 0x273e54
movq 0xc8(%rsp), %rax
movl 0x40(%rsp), %ecx
movq (%rax,%rcx,8), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x70(%rax)
movq 0xe8(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x78(%rax)
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rsi
callq 0x4dbbd0
movq %rax, 0x18(%rsp)
movl 0x40(%rsp), %eax
movl 0xd8(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x273eec
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq 0x40(%rax), %rsi
addq $0x1, %rsi
callq 0x4dbbd0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x48(%rax)
jmp 0x273f0b
movq 0xa0(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x48(%rax)
jmp 0x273f0d
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x48(%rcx), %rax
jb 0x273f63
movq 0x3c806e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2a20d7(%rip), %rsi    # 0x516013
leaq 0x304ba3(%rip), %rdx    # 0x578ae6
leaq 0x30b3fd(%rip), %rcx    # 0x57f347
leaq 0x30ab84(%rip), %r8     # 0x57ead5
movl $0x2fe, %r9d            # imm = 0x2FE
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x273f65
movq 0xe0(%rsp), %rdi
movl 0x40(%rsp), %edx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %esi
imulq $0x88, %rsi, %rsi
addq %rsi, %rax
movq 0x40(%rax), %r8
movq 0x18(%rsp), %r9
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %esi
imulq $0x88, %rsi, %rsi
addq %rsi, %rax
movq 0x48(%rax), %r10
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %esi
imulq $0x88, %rsi, %rsi
addq %rsi, %rax
movq 0x48(%rax), %rax
subq 0x18(%rsp), %rax
leaq 0x30b38d(%rip), %rsi    # 0x57f36b
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0xe7cd0
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rax
subq 0x18(%rsp), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x28(%rsp), %rsi
movl 0x40(%rsp), %eax
imulq $0x88, %rax, %rax
addq %rax, %rsi
movq 0xe8(%rsp), %rdx
leaq 0xa1a(%rip), %rdi       # 0x274a50
callq 0x120b50
movq %rax, %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x80(%rax)
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x80(%rax)
jne 0x27407a
movb $0x1, 0x27(%rsp)
jmp 0x27407c
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x273c22
jmp 0x27408e
testb $0x1, 0x27(%rsp)
jne 0x2740dc
movq 0x38(%rsp), %rax
cmpq 0x98(%rsp), %rax
je 0x2740dc
movq 0x3c7ef5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2a1f5e(%rip), %rsi    # 0x516013
leaq 0x304a7c(%rip), %rdx    # 0x578b38
leaq 0x30b284(%rip), %rcx    # 0x57f347
leaq 0x30aa0b(%rip), %r8     # 0x57ead5
movl $0x30c, %r9d            # imm = 0x30C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2740de
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
cmpl 0xd8(%rsp), %eax
jae 0x274145
testb $0x1, 0x27(%rsp)
jne 0x274119
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq 0x80(%rax), %rdi
callq 0x120ca0
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq 0x80(%rax), %rdi
callq 0x121310
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x2740e6
movq 0x28(%rsp), %rdi
leaq 0x30a984(%rip), %rsi    # 0x57ead5
movl $0x315, %edx            # imm = 0x315
callq 0xe88c0
movq 0x30(%rsp), %rdi
leaq 0x30a96e(%rip), %rsi    # 0x57ead5
movl $0x316, %edx            # imm = 0x316
callq 0xe88c0
movb 0x27(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x78, %rsp
retq
nopw (%rax,%rax)