// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/./diff_sample.h
// Function: EList<unsigned int, 128> getDiffCover<unsigned int>(unsigned int, bool, bool)
static EList<T> getDiffCover(T v,
                              bool verbose = false,
                              bool sanityCheck = false)
{
	assert_gt(v, 2);
	EList<T> ret;

	// Can we look it up in our hardcoded array?
	if(v <= 64 && dc0to64[v][0] == 0xffffffff) {
		if(verbose) cout << "v in hardcoded area, but hardcoded entry was all-fs" << endl;
		return ret;
	} else if(v <= 64) {
		ret.push_back(0);
		for(size_t i = 0; i < 10; i++) {
			if(dc0to64[v][i] == 0) break;
			ret.push_back(dc0to64[v][i]);
		}
		if(sanityCheck) assert(dcRepOk(v, ret));
		return ret;
	}

	// Can we look it up in our calcColbournAndLingDCs array?
	if(!clDCs_calced) {
		calcColbournAndLingDCs<uint32_t>(verbose, sanityCheck);
		assert(clDCs_calced);
	}
	for(size_t i = 0; i < 16; i++) {
		if(v <= clDCs[i].maxV) {
			for(size_t j = 0; j < clDCs[i].numSamples; j++) {
				T s = clDCs[i].samples[j];
				if(s >= v) {
					s %= v;
					for(size_t k = 0; k < ret.size(); k++) {
						if(s == ret[k]) break;
						if(s < ret[k]) {
							ret.insert(s, k);
							break;
						}
					}
				} else {
					ret.push_back(s % v);
				}
			}
			if(sanityCheck) assert(dcRepOk(v, ret));
			return ret;
		}
	}
	cerr << "Error: Could not find a difference cover sample for v=" << v << endl;
	throw 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, (%rdi)
leaq 0x8(%rdi), %r12
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movq $0x80, 0x10(%rdi)
movq %rax, 0x18(%rdi)
cmpl $0x40, %esi
ja 0xd3c9
movl %ebp, %eax
leaq (%rax,%rax,4), %r14
leaq 0x2e3e2(%rip), %r15     # 0x3b760
cmpl $-0x1, (%r15,%r14,8)
je 0xd4ca
leaq 0x14(%rsp), %rsi
movl $0x0, (%rsi)
movq %rbx, %rdi
callq 0x172a6
leaq (%r15,%r14,8), %r14
xorl %r15d, %r15d
cmpl $0x0, (%r14,%r15)
je 0xd514
leaq (%r14,%r15), %rsi
movq %rbx, %rdi
callq 0x172a6
addq $0x4, %r15
cmpq $0x28, %r15
jne 0xd3a3
jmp 0xd514
cmpb $0x0, 0x309dc(%rip)     # 0x3ddac
jne 0xd3dd
movzbl %dl, %edi
movzbl %cl, %esi
callq 0x17335
xorl %eax, %eax
leaq 0x309ca(%rip), %r13     # 0x3ddb0
movq %rax, %rcx
shlq $0x9, %rcx
leaq (%rcx,%rax,8), %rcx
cmpl %ebp, (%r13,%rcx)
jae 0xd450
incq %rax
cmpq $0x10, %rax
jne 0xd3e6
movq 0x2dbe8(%rip), %rdi     # 0x3aff0
leaq 0x231a8(%rip), %rsi     # 0x305b7
movl $0x36, %edx
callq 0x53f0
movl %ebp, %esi
movq 0x2dbce(%rip), %rdi     # 0x3aff0
callq 0x51e0
movq %rax, %rdi
callq 0x5170
movl $0x4, %edi
callq 0x5180
movl $0x1, (%rax)
movq 0x2db02(%rip), %rsi     # 0x3af48
movq %rax, %rdi
xorl %edx, %edx
callq 0x5630
addq %rcx, %r13
cmpl $0x0, 0x4(%r13)
je 0xd514
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
movl 0x8(%r13,%r15,4), %eax
movl %eax, 0xc(%rsp)
cmpl %ebp, %eax
jae 0xd484
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x172a6
jmp 0xd4bc
xorl %edx, %edx
divl %ebp
movl %edx, 0xc(%rsp)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0xd4bc
movq (%r12), %rsi
xorl %eax, %eax
cmpl (%rsi,%rax,4), %edx
je 0xd4bc
jb 0xd4ac
incq %rax
cmpq %rax, %rcx
jne 0xd49b
jmp 0xd4bc
movq %rbx, %rdi
leaq 0xc(%rsp), %rsi
movq %rax, %rdx
callq 0x17826
incq %r15
movl 0x4(%r13), %eax
cmpq %rax, %r15
jb 0xd466
jmp 0xd514
testb %dl, %dl
je 0xd514
movq 0x2dacb(%rip), %rbx     # 0x3afa0
leaq 0x230a7(%rip), %rsi     # 0x30583
movl $0x33, %edx
movq %rbx, %rdi
callq 0x53f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x5330
movsbl %al, %esi
movq 0x2da99(%rip), %rdi     # 0x3afa0
callq 0x5040
movq %rax, %rdi
callq 0x51f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd52b
jmp 0xd52b
jmp 0xd52b
jmp 0xd52b
movq %rax, %rbx
movq (%r12), %rdi
testq %rdi, %rdi
je 0xd54d
callq 0x5440
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movq %rbx, %rdi
callq 0x5680