// File: ridgelab[P]Kmer-SSR/test/src/findSSRs.cpp
// Function: main
int main()
{
	cout << '\n';
	
	int ret_val = 0; // also used to count the number of failed tests

	vector<bool (*)()> tests = {
		test1, test2, test3, test4, test5,
		test6, test7, test8, test9, test10,
		test11, test12
	};

	for (uint32_t i = 0; i < tests.size(); ++i)
	{
		cout << "FindSSRs Test #" << i + 1 << ":\t";
		if (tests[i]())
		{
			cout << "OK";
		}
		else
		{
			++ret_val;
			cout << "FAIL";
		}
		cout << '\n';

		optind = 1; // reset optind for next use of global getopt
	}
	
	string pass_or_fail_color = ret_val ? "\033[0;31m" : "\033[0;32m";
	cout << "\033[0;34mFindSSRs Passed:\t" << pass_or_fail_color << tests.size() - ret_val << " / " << tests.size() << "\033[0m" << endl;
	
	return ret_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl $0x0, -0x4(%rbp)
movq 0x3547f(%rip), %rdi     # 0x3afb8
movl $0xa, %esi
callq 0x5490
movl $0x0, -0x8(%rbp)
movups 0x34d7f(%rip), %xmm0    # 0x3a8d0
movaps %xmm0, -0x40(%rbp)
movups 0x34d64(%rip), %xmm0    # 0x3a8c0
movaps %xmm0, -0x50(%rbp)
movups 0x34d49(%rip), %xmm0    # 0x3a8b0
movaps %xmm0, -0x60(%rbp)
movups 0x34d2e(%rip), %xmm0    # 0x3a8a0
movaps %xmm0, -0x70(%rbp)
movups 0x34d13(%rip), %xmm0    # 0x3a890
movaps %xmm0, -0x80(%rbp)
movups 0x34cf8(%rip), %xmm0    # 0x3a880
movaps %xmm0, -0x90(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0xc, -0x28(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x96a0
movq -0xd8(%rbp), %rcx
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x96c0
jmp 0x5bcf
leaq -0x91(%rbp), %rdi
callq 0x9740
movl $0x0, -0xa8(%rbp)
movl -0xa8(%rbp), %eax
movq %rax, -0xe0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x9760
movq %rax, %rcx
movq -0xe0(%rbp), %rax
cmpq %rcx, %rax
jae 0x5d2a
movq 0x353a3(%rip), %rdi     # 0x3afb8
leaq 0x213e8(%rip), %rsi     # 0x27004
callq 0x53b0
movq %rax, -0xe8(%rbp)
jmp 0x5c2a
movq -0xe8(%rbp), %rdi
movl -0xa8(%rbp), %esi
incl %esi
callq 0x5550
movq %rax, -0xf0(%rbp)
jmp 0x5c47
movq -0xf0(%rbp), %rdi
leaq 0x213ed(%rip), %rsi     # 0x27042
callq 0x53b0
jmp 0x5c5c
movl -0xa8(%rbp), %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0x9780
movq (%rax), %rax
callq *%rax
movb %al, -0xf1(%rbp)
jmp 0x5c7a
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x5c86
jmp 0x5cd7
movq 0x3532b(%rip), %rdi     # 0x3afb8
leaq 0x21380(%rip), %rsi     # 0x27014
callq 0x53b0
jmp 0x5c9b
jmp 0x5cf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x9740
jmp 0x5ed5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0x5ecc
movl -0x8(%rbp), %eax
incl %eax
movl %eax, -0x8(%rbp)
movq 0x352d2(%rip), %rdi     # 0x3afb8
leaq 0x2132a(%rip), %rsi     # 0x27017
callq 0x53b0
jmp 0x5cf4
jmp 0x5cf6
movq 0x352bb(%rip), %rdi     # 0x3afb8
movl $0xa, %esi
callq 0x5490
jmp 0x5d09
movq 0x352b8(%rip), %rax     # 0x3afc8
movl $0x1, (%rax)
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
jmp 0x5be5
cmpl $0x0, -0x8(%rbp)
je 0x5d40
leaq 0x212e5(%rip), %rax     # 0x2701c
movq %rax, -0x100(%rbp)
jmp 0x5d50
leaq 0x212dd(%rip), %rax     # 0x27024
movq %rax, -0x100(%rbp)
jmp 0x5d50
movq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x5720
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0x97a0
jmp 0x5d8d
leaq -0xc9(%rbp), %rdi
callq 0x5430
movq 0x35218(%rip), %rdi     # 0x3afb8
leaq 0x21285(%rip), %rsi     # 0x2702c
callq 0x53b0
movq %rax, -0x118(%rbp)
jmp 0x5db5
movq -0x118(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x5360
movq %rax, -0x120(%rbp)
jmp 0x5dd1
leaq -0x20(%rbp), %rdi
callq 0x9760
movq -0x120(%rbp), %rdi
movq %rax, %rsi
movslq -0x8(%rbp), %rax
subq %rax, %rsi
callq 0x50f0
movq %rax, -0x128(%rbp)
jmp 0x5df9
movq -0x128(%rbp), %rdi
leaq 0x2123e(%rip), %rsi     # 0x27045
callq 0x53b0
movq %rax, -0x130(%rbp)
jmp 0x5e15
leaq -0x20(%rbp), %rdi
callq 0x9760
movq -0x130(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0x138(%rbp)
jmp 0x5e36
movq -0x138(%rbp), %rdi
leaq 0x2263b(%rip), %rsi     # 0x2847f
callq 0x53b0
movq %rax, -0x140(%rbp)
jmp 0x5e52
movq -0x140(%rbp), %rdi
movq 0x35128(%rip), %rsi     # 0x3af88
callq 0x5400
jmp 0x5e67
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x57a8
leaq -0x20(%rbp), %rdi
callq 0x9850
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0xc9(%rbp), %rdi
callq 0x5430
jmp 0x5ecc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x57a8
leaq -0x20(%rbp), %rdi
callq 0x9850
movq -0xa0(%rbp), %rdi
callq 0x5700
nopw %cs:(%rax,%rax)