// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/firstcodes.c
// Function: gt_firstcodes_thread_sortremaining
static int gt_firstcodes_thread_sortremaining(
                                       GtShortreadsortworkinfo **srswtab,
                                       const GtEncseq *encseq,
                                       GtReadmode readmode,
                                       const GtSpmsuftab *spmsuftab,
                                       const GtSeqnumrelpos *snrp,
                                       const GtFirstcodestab *fct,
                                       GtUword partminindex,
                                       GtUword partmaxindex,
                                       GtUword widthofpart,
                                       GtUword sumofwidth,
                                       GtUword spaceforbucketprocessing,
                                       GtUword depth,
                                       GtFirstcodesintervalprocess itvprocess,
                                       GtFirstcodesintervalprocess_end
                                         itvprocess_end,
                                       void *itvprocessdatatab,
                                       bool withsuftabcheck,
                                       unsigned int threads,
                                       GtLogger *logger,
                                       GtError *err)
{
  unsigned int t;
  GtUword GT_UNUSED sum = 0, *endindexes;
  GtSortRemainingThreadinfo *threadinfo;
  bool haserr = false;

  gt_assert(threads >= 2U);
  endindexes = gt_evenly_divide_part(fct,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].fct = fct;
    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].spaceforbucketprocessing = spaceforbucketprocessing;
    threadinfo[t].depth = depth;
    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_firstcodes_get_leftborder(fct,threadinfo[t].minindex);
    if (t < threads - 1)
    {
      threadinfo[t].sumofwidth
        = gt_firstcodes_get_leftborder(fct,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_firstcodes_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 0xe0(%rsp), %rax
movq 0xd8(%rsp), %rax
movl 0xd0(%rsp), %eax
movb 0xc8(%rsp), %al
movq 0xc0(%rsp), %r10
movq 0xb8(%rsp), %r10
movq 0xb0(%rsp), %r10
movq 0xa8(%rsp), %r10
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, 0xd0(%rsp)
jae 0x24a14d
movq 0x3f1e84(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2cbeed(%rip), %rsi    # 0x516013
leaq 0x32e988(%rip), %rdx    # 0x578ab5
leaq 0x32e98f(%rip), %rcx    # 0x578ac3
leaq 0x32e0c1(%rip), %r8     # 0x5781fc
movl $0x215, %r9d            # imm = 0x215
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x24a14f
movq 0x48(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0x90(%rsp), %rcx
movl 0xd0(%rsp), %r8d
callq 0x24ab30
movq %rax, 0x30(%rsp)
movl 0xd0(%rsp), %eax
imulq $0x88, %rax, %rdi
leaq 0x32e069(%rip), %rsi    # 0x5781fc
movl $0x218, %edx            # imm = 0x218
callq 0xe80f0
movq %rax, 0x28(%rsp)
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
cmpl 0xd0(%rsp), %eax
jae 0x24a5f9
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)
cmpl $0x0, 0x40(%rsp)
jne 0x24a264
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x24a27f
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)
movq 0xa0(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x50(%rax)
movq 0xa8(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x30(%rax)
movq 0xb0(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x60(%rax)
movq 0xb8(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x68(%rax)
cmpq $0x0, 0xc0(%rsp)
jne 0x24a39a
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x70(%rax)
jmp 0x24a3c1
movq 0xc0(%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 0xe0(%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 0x4c0d80
movq %rax, 0x18(%rsp)
movl 0x40(%rsp), %eax
movl 0xd0(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x24a459
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 0x4c0d80
movq %rax, %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x48(%rax)
jmp 0x24a478
movq 0x98(%rsp), %rcx
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x48(%rax)
jmp 0x24a47a
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
movl 0x40(%rsp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x48(%rcx), %rax
jb 0x24a4d0
movq 0x3f1b01(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2cbb6a(%rip), %rsi    # 0x516013
leaq 0x32e636(%rip), %rdx    # 0x578ae6
leaq 0x32e60c(%rip), %rcx    # 0x578ac3
leaq 0x32dd3e(%rip), %r8     # 0x5781fc
movl $0x23b, %r9d            # imm = 0x23B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x24a4d2
movq 0xd8(%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 0x32e5b9(%rip), %rsi    # 0x578b04
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 0xe0(%rsp), %rdx
leaq 0x79d(%rip), %rdi       # 0x24ad40
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 0x24a5e7
movb $0x1, 0x27(%rsp)
jmp 0x24a5e9
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x24a1aa
jmp 0x24a5fb
testb $0x1, 0x27(%rsp)
jne 0x24a649
movq 0x38(%rsp), %rax
cmpq 0x90(%rsp), %rax
je 0x24a649
movq 0x3f1988(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2cb9f1(%rip), %rsi    # 0x516013
leaq 0x32e50f(%rip), %rdx    # 0x578b38
leaq 0x32e493(%rip), %rcx    # 0x578ac3
leaq 0x32dbc5(%rip), %r8     # 0x5781fc
movl $0x24c, %r9d            # imm = 0x24C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x24a64b
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
cmpl 0xd0(%rsp), %eax
jae 0x24a6b2
testb $0x1, 0x27(%rsp)
jne 0x24a686
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 0x24a653
movq 0x28(%rsp), %rdi
leaq 0x32db3e(%rip), %rsi    # 0x5781fc
movl $0x255, %edx            # imm = 0x255
callq 0xe88c0
movq 0x30(%rsp), %rdi
leaq 0x32db28(%rip), %rsi    # 0x5781fc
movl $0x256, %edx            # imm = 0x256
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 %cs:(%rax,%rax)