// File: /workspace/github_cpp_makefile_star2_O1/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 0xd474
movl %ebp, %eax
leaq (%rax,%rax,4), %r14
leaq 0x2e347(%rip), %r15     # 0x3b770
cmpl $-0x1, (%r15,%r14,8)
je 0xd575
leaq 0x14(%rsp), %rsi
movl $0x0, (%rsi)
movq %rbx, %rdi
callq 0x17516
leaq (%r15,%r14,8), %r14
xorl %r15d, %r15d
cmpl $0x0, (%r14,%r15)
je 0xd5bf
leaq (%r14,%r15), %rsi
movq %rbx, %rdi
callq 0x17516
addq $0x4, %r15
cmpq $0x28, %r15
jne 0xd44e
jmp 0xd5bf
cmpb $0x0, 0x30941(%rip)     # 0x3ddbc
jne 0xd488
movzbl %dl, %edi
movzbl %cl, %esi
callq 0x1759a
xorl %eax, %eax
leaq 0x3092f(%rip), %r13     # 0x3ddc0
movq %rax, %rcx
shlq $0x9, %rcx
leaq (%rcx,%rax,8), %rcx
cmpl %ebp, (%r13,%rcx)
jae 0xd4fb
incq %rax
cmpq $0x10, %rax
jne 0xd491
movq 0x2db3d(%rip), %rdi     # 0x3aff0
leaq 0x230ad(%rip), %rsi     # 0x30567
movl $0x36, %edx
callq 0x5400
movl %ebp, %esi
movq 0x2db23(%rip), %rdi     # 0x3aff0
callq 0x51e0
movq %rax, %rdi
callq 0x5170
movl $0x4, %edi
callq 0x5180
movl $0x1, (%rax)
movq 0x2da57(%rip), %rsi     # 0x3af48
movq %rax, %rdi
xorl %edx, %edx
callq 0x5650
addq %rcx, %r13
cmpl $0x0, 0x4(%r13)
je 0xd5bf
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
movl 0x8(%r13,%r15,4), %eax
movl %eax, 0xc(%rsp)
cmpl %ebp, %eax
jae 0xd52f
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17516
jmp 0xd567
xorl %edx, %edx
divl %ebp
movl %edx, 0xc(%rsp)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0xd567
movq (%r12), %rsi
xorl %eax, %eax
cmpl (%rsi,%rax,4), %edx
je 0xd567
jb 0xd557
incq %rax
cmpq %rax, %rcx
jne 0xd546
jmp 0xd567
movq %rbx, %rdi
leaq 0xc(%rsp), %rsi
movq %rax, %rdx
callq 0x1793e
incq %r15
movl 0x4(%r13), %eax
cmpq %rax, %r15
jb 0xd511
jmp 0xd5bf
testb %dl, %dl
je 0xd5bf
movq 0x2da20(%rip), %r14     # 0x3afa0
leaq 0x22fac(%rip), %rsi     # 0x30533
movl $0x33, %edx
movq %r14, %rdi
callq 0x5400
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x5340
movsbl %al, %esi
movq 0x2d9ee(%rip), %rdi     # 0x3afa0
callq 0x5040
movq %rax, %rdi
callq 0x51f0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd5d9
jmp 0xd5d9
jmp 0xd5d9
jmp 0xd5d9
movq %rax, %rbx
movq (%r12), %rdi
testq %rdi, %rdi
je 0xd5fb
callq 0x5450
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movq %rbx, %rdi
callq 0x56a0