// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-copysort.c
// Function: gt_copysort_forwardderive
static void gt_copysort_forwardderive(const GtBucketspec2 *bucketspec2,
                                      GtSuffixsortspace *suffixsortspace,
                                      GtUword *targetoffset,
                                      unsigned int source,
                                      GtUword idx)
{
  GtSuffixsortspace_exportptr *exportptr;

  gt_assert (idx < targetoffset[source]);
  exportptr = gt_suffixsortspace_exportptr(suffixsortspace,0);
  for (; idx < targetoffset[source]; idx++)
  {
    GtUword startpos = GT_SUFFIXSORTSPACE_EXPORT_GET(exportptr,idx);
    if (startpos > 0)
    {
      GtUchar cc = gt_encseq_get_encoded_char(bucketspec2->encseq,
                                              startpos-1,
                                              bucketspec2->readmode);
      if (GT_ISNOTSPECIAL(cc) && !bucketspec2->superbuckettab[cc].sorted)
      {
        GT_SUFFIXSORTSPACE_EXPORT_SET(suffixsortspace,exportptr,
                                      targetoffset[cc],startpos - 1);
        targetoffset[cc]++;
      }
    }
  }
  gt_suffixsortspace_export_done(suffixsortspace);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movq %r8, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
movl 0x2c(%rsp), %edx
cmpq (%rcx,%rdx,8), %rax
jb 0x2bc818
movq 0x37f7b9(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x259822(%rip), %rsi    # 0x516013
leaq 0x2ccf24(%rip), %rdx    # 0x58971c
leaq 0x2ccf38(%rip), %rcx    # 0x589737
leaq 0x2ccc00(%rip), %r8     # 0x589406
movl $0x194, %r9d            # imm = 0x194
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bc81a
movq 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2e9cf0
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
movl 0x2c(%rsp), %edx
cmpq (%rcx,%rdx,8), %rax
jae 0x2bc9e7
movq 0x18(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2bc869
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
jmp 0x2bc87d
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jbe 0x2bc9d2
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rsp), %rsi
subq $0x1, %rsi
movq 0x40(%rsp), %rax
movl 0x10(%rax), %edx
callq 0xa9da0
movb %al, 0xf(%rsp)
movzbl 0xf(%rsp), %eax
cmpl $0xfe, %eax
jge 0x2bc9d0
movq 0x40(%rsp), %rax
movq 0x38(%rax), %rax
movzbl 0xf(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
testb $0x1, 0x1(%rax)
jne 0x2bc9d0
movq 0x18(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2bc916
movq 0x10(%rsp), %rdx
subq $0x1, %rdx
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rsp), %rcx
movzbl 0xf(%rsp), %esi
movq (%rcx,%rsi,8), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x2bc993
jmp 0x2bc918
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2bc936
movq 0x10(%rsp), %rax
subq $0x1, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jbe 0x2bc96e
movq 0x37f663(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2596cc(%rip), %rsi    # 0x516013
leaq 0x2cce03(%rip), %rdx    # 0x589751
leaq 0x2ccde2(%rip), %rcx    # 0x589737
leaq 0x2ccaaa(%rip), %r8     # 0x589406
movl $0x1a1, %r9d            # imm = 0x1A1
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bc970
movq 0x10(%rsp), %rax
movl %eax, %edx
subl $0x1, %edx
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %rcx
movzbl 0xf(%rsp), %esi
movq (%rcx,%rsi,8), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x10(%rsp), %rax
subq $0x1, %rax
cmpq $0x0, %rax
jne 0x2bc9ba
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rax
movzbl 0xf(%rsp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x2e9b50
movq 0x30(%rsp), %rax
movzbl 0xf(%rsp), %ecx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x2bc9d2
jmp 0x2bc9d4
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x2bc82d
movq 0x38(%rsp), %rdi
callq 0x2e9e50
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)