// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x68(%rsp), %rsi
movb $0xa, (%rsi)
movq 0x17604(%rip), %rdi     # 0x1afc0
movl $0x1, %edx
callq 0x3370
leaq 0x17333(%rip), %rsi     # 0x1ad00
leaq 0x68(%rsp), %rax
movl $0xc, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movl $0xc, %edx
movq %rax, %rsi
callq 0x7af2
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe9cd(%rip), %rsi      # 0x123d1
leaq 0xe9c7(%rip), %rdx      # 0x123d2
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x7e1a
leaq 0x88(%rsp), %r14
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe6b1(%rip), %rsi      # 0x120e4
leaq 0xe6ab(%rip), %rdx      # 0x120e5
movq %r14, %rdi
callq 0x7e1a
leaq 0xa8(%rsp), %r14
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe70c(%rip), %rsi      # 0x12169
leaq 0xe706(%rip), %rdx      # 0x1216a
movq %r14, %rdi
callq 0x7e1a
leaq 0xc8(%rsp), %r14
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe73a(%rip), %rsi      # 0x121c1
leaq 0xe734(%rip), %rdx      # 0x121c2
movq %r14, %rdi
callq 0x7e1a
leaq 0xe8(%rsp), %r14
leaq 0xf8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xfa2b(%rip), %rsi      # 0x134dc
leaq 0xfa25(%rip), %rdx      # 0x134dd
movq %r14, %rdi
callq 0x7e1a
leaq 0x108(%rsp), %r14
leaq 0x118(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe6af(%rip), %rsi      # 0x1218a
leaq 0xe6a9(%rip), %rdx      # 0x1218b
movq %r14, %rdi
callq 0x7e1a
leaq 0x128(%rsp), %r14
leaq 0x138(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xf9e1(%rip), %rsi      # 0x134e6
leaq 0xf9db(%rip), %rdx      # 0x134e7
movq %r14, %rdi
callq 0x7e1a
leaq 0x10(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x7, %edx
callq 0x7b38
movq $-0xe0, %rbx
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x3b48
movq (%r15), %rsi
incq %rsi
callq 0x3310
addq $-0x20, %r15
addq $0x20, %rbx
jne 0x3b34
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
cmpq %rdx, %rsi
je 0x3d03
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
xorl %r15d, %r15d
movq 0x17447(%rip), %r14     # 0x1afc0
xorl %ebx, %ebx
xorl %r8d, %r8d
movl $0x0, 0x8(%rsp)
movq %r8, 0x40(%rsp)
cmpq %rax, %rcx
je 0x3cdc
movl $0x1, %r13d
shlq $0x5, %rbx
xorl %ebp, %ebp
movl $0x9, %edx
movq %r14, %rdi
leaq 0xe455(%rip), %rsi      # 0x12004
callq 0x3370
movq 0x10(%rsp), %rax
movq (%rax,%rbx), %rsi
movq 0x8(%rax,%rbx), %rdx
movq %r14, %rdi
callq 0x3370
movq %rax, %r12
movl $0x8, %edx
movq %rax, %rdi
leaq 0xe432(%rip), %rsi      # 0x1200e
callq 0x3370
leal (%r15,%r13), %esi
movq %r12, %rdi
callq 0x31f0
movl $0x2, %edx
movq %rax, %rdi
leaq 0xe44d(%rip), %rsi      # 0x12049
callq 0x3370
movq 0x28(%rsp), %rax
movq (%rax,%rbp,8), %r12
movq 0x10(%rsp), %rax
leaq 0x58(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movq (%rax,%rbx), %rsi
movq 0x8(%rax,%rbx), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x7cea
leaq 0x48(%rsp), %rdi
callq *%r12
movl %eax, %r12d
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3c56
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3310
testb %r12b, %r12b
je 0x3c71
movl $0x2, %edx
movq %r14, %rdi
leaq 0xe3ad(%rip), %rsi      # 0x12017
callq 0x3370
jmp 0x3c89
movl $0x4, %edx
movq %r14, %rdi
leaq 0xe39a(%rip), %rsi      # 0x1201a
callq 0x3370
incl 0x8(%rsp)
movb $0xa, 0x68(%rsp)
movl $0x1, %edx
movq %r14, %rdi
leaq 0x68(%rsp), %rsi
callq 0x3370
movq 0x17329(%rip), %rax     # 0x1afd0
movl $0x1, (%rax)
movl %r13d, %ebp
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %r13d
cmpq %rbp, %rdx
ja 0x3ba0
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
jmp 0x3cdf
movq %rax, %rcx
movq 0x40(%rsp), %r8
incl %r8d
movq %rsi, %rdi
subq %rdx, %rdi
sarq $0x5, %rdi
addl $0xc, %r15d
movq %r8, %rbx
cmpq %r8, %rdi
ja 0x3b86
jmp 0x3d0b
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %ebp
testl %ebp, %ebp
leaq 0xe30f(%rip), %rax      # 0x12027
leaq 0xe300(%rip), %rsi      # 0x1201f
cmoveq %rax, %rsi
leaq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, (%rdi)
leaq 0xe2f7(%rip), %rax      # 0x1202e
leaq 0xe2e8(%rip), %rdx      # 0x12026
cmoveq %rax, %rdx
callq 0x7e1a
movq 0x17272(%rip), %rdi     # 0x1afc0
leaq 0xe2da(%rip), %rsi      # 0x1202f
movl $0x1c, %edx
callq 0x3370
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x17250(%rip), %rdi     # 0x1afc0
callq 0x3370
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 %ebp, %rcx
subq %rcx, %rsi
movq %rax, %rdi
callq 0x31f0
movq %rax, %r14
leaq 0xe29f(%rip), %rsi      # 0x1204c
movl $0x3, %edx
movq %rax, %rdi
callq 0x3370
movq 0x30(%rsp), %rax
subq 0x28(%rsp), %rax
sarq $0x3, %rax
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x5, %rsi
imulq %rax, %rsi
movq %r14, %rdi
callq 0x31f0
movq %rax, %r14
leaq 0xf683(%rip), %rsi      # 0x1346f
movl $0x4, %edx
movq %rax, %rdi
callq 0x3370
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x32e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3200
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3e37
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3310
leaq 0x10(%rsp), %rdi
callq 0x7b80
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3e58
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x3310
movl %ebp, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3ef9
movq %rax, %r15
leaq 0x148(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x35e0
jmp 0x3f06
jmp 0x3e92
jmp 0x3e92
jmp 0x3e92
jmp 0x3e92
jmp 0x3e92
movq %rax, %r15
addq $-0x10, %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x3ead
movq (%r14), %rsi
incq %rsi
callq 0x3310
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0x3e99
jmp 0x3f06
movq %rax, %r15
jmp 0x3f06
movq %rax, %r15
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3efc
movq 0x78(%rsp), %rsi
jmp 0x3eef
movq %rax, %r15
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3efc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3310
jmp 0x3efc
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x7b80
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3f1d
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x3310
movq %r15, %rdi
callq 0x3550