// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-copysort.c
// Function: gt_copysort_backwardderive
static void gt_copysort_backwardderive(const GtBucketspec2 *bucketspec2,
                                       GtSuffixsortspace *suffixsortspace,
                                       GtUword *targetoffset,
                                       unsigned int source,
                                       GtUword idx)
{
  GtSuffixsortspace_exportptr *exportptr
    = gt_suffixsortspace_exportptr(suffixsortspace,0);
  for (; idx + 1 > targetoffset[source] + 1; 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 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2e9cf0
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq 0x30(%rsp), %rcx
movl 0x2c(%rsp), %edx
movq (%rcx,%rdx,8), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x2bcbf4
movq 0x18(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2bca76
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
jmp 0x2bca8a
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 0x2bcbdf
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 0x2bcbdd
movq 0x40(%rsp), %rax
movq 0x38(%rax), %rax
movzbl 0xf(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
testb $0x1, 0x1(%rax)
jne 0x2bcbdd
movq 0x18(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2bcb23
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 0x2bcba0
jmp 0x2bcb25
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2bcb43
movq 0x10(%rsp), %rax
subq $0x1, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jbe 0x2bcb7b
movq 0x37f456(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2594bf(%rip), %rsi    # 0x516013
leaq 0x2ccbf6(%rip), %rdx    # 0x589751
leaq 0x2ccc3e(%rip), %rcx    # 0x5897a0
leaq 0x2cc89d(%rip), %r8     # 0x589406
movl $0x1bc, %r9d            # imm = 0x1BC
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bcb7d
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 0x2bcbc7
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 0x2bcbdf
jmp 0x2bcbe1
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x2bca2f
movq 0x38(%rsp), %rdi
callq 0x2e9e50
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)