// File: BenLangmead[P]bowtie/./blockwise_sa.h
// Function: KarkkainenBlockwiseSA<S2bDnaString>::qsort(EList<unsigned long, 128>&)
void KarkkainenBlockwiseSA<S2bDnaString>::qsort(EList<TIndexOffU>& bucket) {
	const S2bDnaString& t = this->text();
	TIndexOffU *s = &bucket[0];
	TIndexOffU slen = (TIndexOffU)bucket.size();
	TIndexOffU len = (TIndexOffU)t.length();
	if(_dc != NULL) {
		// Use the difference cover as a tie-breaker if we have it
		VMSG_NL("  (Using difference cover)");
		// Can't use the text's 'host' array because the backing
		// store for the packed string is not one-char-per-elt.
		mkeyQSortSufDcU8(t, t, len, s, slen, *_dc, 4,
				 this->verbose(), this->sanityCheck());
	} else {
		VMSG_NL("  (Not using difference cover)");
		// We don't have a difference cover - just do a normal
		// suffix sort
		mkeyQSortSuf(t, s, slen, 4,
			     this->verbose(), this->sanityCheck());
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0x17b20
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x17b40
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x17c40
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x17c60
movq %rax, %rcx
movq -0x398(%rbp), %rax
movq %rcx, -0x30(%rbp)
cmpq $0x0, 0x98(%rax)
je 0x64a2
movq -0x398(%rbp), %rdi
callq 0x17c80
testb $0x1, %al
jne 0x631f
jmp 0x63e3
leaq -0x1b8(%rbp), %rdi
callq 0x5220
leaq -0x1a8(%rbp), %rdi
leaq 0x38cdb(%rip), %rsi     # 0x3f014
callq 0x5360
movq %rax, -0x3a0(%rbp)
jmp 0x6347
movq -0x3a0(%rbp), %rdi
movq 0x43c2b(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x635c
leaq -0x1e8(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x5350
jmp 0x6371
movq -0x398(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x17ca0
jmp 0x6386
leaq -0x1e8(%rbp), %rdi
callq 0x5888
leaq -0x1b8(%rbp), %rdi
callq 0x5260
jmp 0x63e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x63d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x5888
leaq -0x1b8(%rbp), %rdi
callq 0x5260
jmp 0x6602
movq -0x398(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x3d0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x3c0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x3b0(%rbp)
movq 0x98(%rdi), %rax
movq %rax, -0x3a8(%rbp)
callq 0x17c80
movq -0x398(%rbp), %rdi
movb %al, -0x3d1(%rbp)
callq 0x17df0
movb -0x3d1(%rbp), %r10b
movq -0x3d0(%rbp), %rdi
movq -0x3c8(%rbp), %rsi
movq -0x3c0(%rbp), %rdx
movq -0x3b8(%rbp), %rcx
movq -0x3b0(%rbp), %r8
movq -0x3a8(%rbp), %r9
movzbl %al, %r11d
andl $0x1, %r11d
movq %rsp, %rax
movl %r11d, 0x10(%rax)
movzbl %r10b, %r10d
andl $0x1, %r10d
movl %r10d, 0x8(%rax)
movl $0x4, (%rax)
callq 0x17d00
jmp 0x65f9
movq -0x398(%rbp), %rdi
callq 0x17c80
testb $0x1, %al
jne 0x64b7
jmp 0x657b
leaq -0x370(%rbp), %rdi
callq 0x5220
leaq -0x360(%rbp), %rdi
leaq 0x38b5e(%rip), %rsi     # 0x3f02f
callq 0x5360
movq %rax, -0x3e0(%rbp)
jmp 0x64df
movq -0x3e0(%rbp), %rdi
movq 0x43a93(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x64f4
leaq -0x390(%rbp), %rdi
leaq -0x370(%rbp), %rsi
callq 0x5350
jmp 0x6509
movq -0x398(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x17ca0
jmp 0x651e
leaq -0x390(%rbp), %rdi
callq 0x5888
leaq -0x370(%rbp), %rdi
callq 0x5260
jmp 0x657b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x656a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x5888
leaq -0x370(%rbp), %rdi
callq 0x5260
jmp 0x6602
movq -0x398(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x3f0(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x3e8(%rbp)
callq 0x17c80
movq -0x398(%rbp), %rdi
movb %al, -0x3f9(%rbp)
callq 0x17df0
movb -0x3f9(%rbp), %cl
movq -0x3f8(%rbp), %rdi
movq -0x3f0(%rbp), %rsi
movq -0x3e8(%rbp), %rdx
movq %rsp, %r8
movq $-0x1, (%r8)
movzbl %cl, %r8d
andl $0x1, %r8d
movzbl %al, %r9d
andl $0x1, %r9d
movl $0x4, %ecx
callq 0x17e10
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
movq -0x1c0(%rbp), %rdi
callq 0x5760
nop