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

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

	vector<string> threads = { "2", "3", "4", "5", "6", "7", "8" };

	for (uint32_t t = 0; t < threads.size(); ++t)
	{
		for (uint32_t i = 0; i < tests.size(); ++i)
		{
			cout << "Threads (" << threads[t] << ") Test #" <<  (i + 1) + (t * 12) << ":\t";
			//if (tests[i](threads))
			//if (tests[i]("1"))
			if (tests[i](threads[t]))
			{
				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;34mThread Tests Passed:\t" << pass_or_fail_color << tests.size() * threads.size() - ret_val << " / " << tests.size() * threads.size() << "\033[0m" << endl;
	
	return ret_val;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq 0x1573c(%rip), %rdi     # 0x18fc0
pushq $0xa
popq %rsi
callq 0x3360
leaq 0x1547d(%rip), %rsi     # 0x18d10
pushq $0xc
popq %rdx
leaq 0x48(%rsp), %rax
movq %rdx, %rcx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %rax, %rsi
callq 0x6544
leaq 0xbb14(%rip), %rsi      # 0xf3d1
leaq 0x48(%rsp), %rbx
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x657a
leaq 0x68(%rsp), %r14
leaq 0xb809(%rip), %rsi      # 0xf0e4
leaq 0xb(%rsp), %rdx
movq %r14, %rdi
callq 0x657a
leaq 0x88(%rsp), %r14
leaq 0xb872(%rip), %rsi      # 0xf169
leaq 0xa(%rsp), %rdx
movq %r14, %rdi
callq 0x657a
leaq 0xa8(%rsp), %r14
leaq 0xb8ae(%rip), %rsi      # 0xf1c1
leaq 0x9(%rsp), %rdx
movq %r14, %rdi
callq 0x657a
leaq 0xc8(%rsp), %r14
leaq 0xcbad(%rip), %rsi      # 0x104dc
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x657a
leaq 0xe8(%rsp), %r14
leaq 0xb83f(%rip), %rsi      # 0xf18a
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x657a
leaq 0x108(%rsp), %r14
leaq 0xcb7f(%rip), %rsi      # 0x104e6
leaq 0x6(%rsp), %rdx
movq %r14, %rdi
callq 0x657a
leaq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %rsi
pushq $0x7
popq %rdx
leaq 0x5(%rsp), %rcx
callq 0x65b6
movl $0xc0, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x48, %rdi
callq 0x35e8
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x3990
movl $0x0, 0xc(%rsp)
pushq $0x1
popq %r13
movq 0x15606(%rip), %r14     # 0x18fc0
leaq 0x128(%rsp), %rbp
xorl %ebx, %ebx
movl %ebx, %ebx
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x5, %rax
cmpq %rbx, %rax
jbe 0x3acf
xorl %r15d, %r15d
movq %rbx, 0x40(%rsp)
shlq $0x5, %rbx
movl %r15d, %r15d
movq 0x30(%rsp), %rax
subq 0x28(%rsp), %rax
sarq $0x3, %rax
cmpq %r15, %rax
jbe 0x3abf
movq %r14, %rdi
leaq 0xb5f7(%rip), %rsi      # 0xf004
callq 0x32e0
movq 0x10(%rsp), %rsi
addq %rbx, %rsi
movq %rax, %rdi
callq 0x32c0
movq %rax, %rdi
leaq 0xb5e2(%rip), %rsi      # 0xf00e
callq 0x32e0
leal (%r15,%r13), %esi
movq %rax, %rdi
callq 0x31f0
movq %rax, %rdi
leaq 0xb602(%rip), %rsi      # 0xf049
callq 0x32e0
movq 0x28(%rsp), %rax
movq (%rax,%r15,8), %r12
movq 0x10(%rsp), %rsi
addq %rbx, %rsi
movq %rbp, %rdi
callq 0x3400
movq %rbp, %rdi
callq *%r12
movl %eax, %r12d
movq %rbp, %rdi
callq 0x35e8
testb %r12b, %r12b
je 0x3a8c
movq %r14, %rdi
leaq 0xb592(%rip), %rsi      # 0xf017
callq 0x32e0
jmp 0x3a9f
movq %r14, %rdi
leaq 0xb584(%rip), %rsi      # 0xf01a
callq 0x32e0
incl 0xc(%rsp)
movq %r14, %rdi
pushq $0xa
popq %rsi
callq 0x3360
movq 0x1551f(%rip), %rax     # 0x18fd0
movl $0x1, (%rax)
incl %r15d
jmp 0x39e9
movq 0x40(%rsp), %rbx
incl %ebx
addl $0xc, %r13d
jmp 0x39c4
movl 0xc(%rsp), %ebx
testl %ebx, %ebx
leaq 0xb54b(%rip), %rax      # 0xf027
leaq 0xb53c(%rip), %rsi      # 0xf01f
cmoveq %rax, %rsi
leaq 0x48(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x657a
movq 0x154c3(%rip), %rdi     # 0x18fc0
leaq 0xb52b(%rip), %rsi      # 0xf02f
callq 0x32e0
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0x32c0
movq 0x30(%rsp), %rcx
subq 0x28(%rsp), %rcx
sarq $0x3, %rcx
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x5, %rsi
imulq %rcx, %rsi
movslq %ebx, %rcx
subq %rcx, %rsi
movq %rax, %rdi
callq 0x31f0
leaq 0xb501(%rip), %rsi      # 0xf04c
movq %rax, %rdi
callq 0x32e0
movq 0x30(%rsp), %rcx
subq 0x28(%rsp), %rcx
sarq $0x3, %rcx
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x5, %rsi
imulq %rcx, %rsi
movq %rax, %rdi
callq 0x31f0
leaq 0xc8ed(%rip), %rsi      # 0x1046f
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x3160
leaq 0x48(%rsp), %rdi
callq 0x35e8
leaq 0x10(%rsp), %rdi
callq 0x65f0
leaq 0x28(%rsp), %rdi
callq 0x677c
movl %ebx, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c3b
movq %rax, %r15
movl $0xc0, %r12d
leaq (%rsp,%r12), %rdi
addq $0x48, %rdi
callq 0x35e8
addq $-0x20, %r12
cmpq $-0x20, %r12
jne 0x3bcf
movb $0x1, %al
jmp 0x3bf9
jmp 0x3bf4
jmp 0x3bf4
jmp 0x3bf4
jmp 0x3bf4
jmp 0x3bf4
movq %rax, %r15
xorl %eax, %eax
cmpq %r14, %rbx
sete %cl
testb %al, %al
jne 0x3c48
testb %cl, %cl
jne 0x3c48
addq $-0x20, %r14
movq %r14, %rdi
callq 0x35e8
cmpq %rbx, %r14
jne 0x3c07
jmp 0x3c48
movq %rax, %r15
jmp 0x3c48
movq %rax, %r15
leaq 0x48(%rsp), %rdi
jmp 0x3c34
movq %rax, %r15
leaq 0x128(%rsp), %rdi
callq 0x35e8
jmp 0x3c3e
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x65f0
leaq 0x28(%rsp), %rdi
callq 0x677c
movq %r15, %rdi
callq 0x3560