// File: /workspace/github_cpp_makefile_star2_O2/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)
andq $0x0, 0x8(%rdi)
movq $0x80, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
cmpl $0x40, %esi
ja 0xaf34
movl %ebp, %eax
imulq $0x28, %rax, %r15
leaq 0x27874(%rip), %r14     # 0x32760
cmpl $-0x1, (%r15,%r14)
je 0xafd9
leaq 0x14(%rsp), %rsi
andl $0x0, (%rsi)
movq %rbx, %rdi
callq 0x12800
addq %r15, %r14
xorl %r15d, %r15d
cmpq $0x28, %r15
je 0xaff8
cmpl $0x0, (%r14,%r15)
je 0xaff8
leaq (%r14,%r15), %rsi
movq %rbx, %rdi
callq 0x12800
addq $0x4, %r15
jmp 0xaf0d
cmpb $0x0, 0x29e71(%rip)     # 0x34dac
jne 0xaf48
movzbl %dl, %edi
movzbl %cl, %esi
callq 0x1284c
xorl %eax, %eax
leaq 0x29e5f(%rip), %r12     # 0x34db0
cmpq $0x10, %rax
je 0xb00a
imulq $0x208, %rax, %rcx      # imm = 0x208
incq %rax
cmpl %ebp, (%rcx,%r12)
jb 0xaf51
addq %rcx, %r12
xorl %r13d, %r13d
leaq 0x10(%rsp), %r14
leaq 0xc(%rsp), %r15
movl 0x4(%r12), %eax
cmpq %rax, %r13
jae 0xaff8
movl 0x8(%r12,%r13,4), %eax
movl %eax, 0xc(%rsp)
cmpl %ebp, %eax
jae 0xafa3
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12800
jmp 0xafd4
xorl %edx, %edx
divl %ebp
movl %edx, 0xc(%rsp)
movq 0x8(%rbx), %rcx
movq 0x18(%rbx), %rsi
xorl %eax, %eax
cmpq %rax, %rsi
je 0xafd4
cmpl (%rcx,%rax,4), %edx
je 0xafd4
jb 0xafc6
incq %rax
jmp 0xafb5
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x12b34
incq %r13
jmp 0xaf7b
testb %dl, %dl
je 0xaff8
movq 0x26fbc(%rip), %rdi     # 0x31fa0
leaq 0x1b55b(%rip), %rsi     # 0x26546
callq 0x5350
movq %rax, %rdi
callq 0x5180
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x26fdf(%rip), %rdi     # 0x31ff0
leaq 0x1b562(%rip), %rsi     # 0x2657a
callq 0x5350
movl %ebp, %esi
movq %rax, %rdi
callq 0x51e0
movq %rax, %rdi
callq 0x5180
pushq $0x4
popq %rdi
callq 0x5190
movl $0x1, (%rax)
movq 0x26f1c(%rip), %rsi     # 0x31f60
movq %rax, %rdi
xorl %edx, %edx
callq 0x5630
jmp 0xb056
jmp 0xb056
jmp 0xb056
jmp 0xb056
movq %rax, %r14
movq %rbx, %rdi
callq 0x12c5c
movq %r14, %rdi
callq 0x5680