// File: /workspace/github_cpp_makefile_star2_O1/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 0x175e4(%rip), %rdi     # 0x1afc0
movl $0x1, %edx
callq 0x3370
leaq 0x17313(%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 0x7bf8
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe9ad(%rip), %rsi      # 0x123d1
leaq 0xe9a7(%rip), %rdx      # 0x123d2
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x7f22
leaq 0x88(%rsp), %rbx
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe691(%rip), %rsi      # 0x120e4
leaq 0xe68b(%rip), %rdx      # 0x120e5
movq %rbx, %rdi
callq 0x7f22
leaq 0xa8(%rsp), %rbx
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe6ec(%rip), %rsi      # 0x12169
leaq 0xe6e6(%rip), %rdx      # 0x1216a
movq %rbx, %rdi
callq 0x7f22
leaq 0xc8(%rsp), %rbx
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe71a(%rip), %rsi      # 0x121c1
leaq 0xe714(%rip), %rdx      # 0x121c2
movq %rbx, %rdi
callq 0x7f22
leaq 0xe8(%rsp), %rbx
leaq 0xf8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xfa0b(%rip), %rsi      # 0x134dc
leaq 0xfa05(%rip), %rdx      # 0x134dd
movq %rbx, %rdi
callq 0x7f22
leaq 0x108(%rsp), %rbx
leaq 0x118(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe68f(%rip), %rsi      # 0x1218a
leaq 0xe689(%rip), %rdx      # 0x1218b
movq %rbx, %rdi
callq 0x7f22
leaq 0x128(%rsp), %rbx
leaq 0x138(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xf9c1(%rip), %rsi      # 0x134e6
leaq 0xf9bb(%rip), %rdx      # 0x134e7
movq %rbx, %rdi
callq 0x7f22
leaq 0x10(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x7, %edx
callq 0x7c3e
movq $-0xe0, %rbx
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x3b68
movq (%r15), %rsi
incq %rsi
callq 0x3310
addq $-0x20, %r15
addq $0x20, %rbx
jne 0x3b54
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x3d11
xorl %r15d, %r15d
movq 0x17434(%rip), %r14     # 0x1afc0
xorl %ebx, %ebx
movq $0x0, 0x40(%rsp)
movl $0x0, 0x8(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
je 0x3ce5
movl $0x1, %r13d
shlq $0x5, %rbx
xorl %ebp, %ebp
movl $0x9, %edx
movq %r14, %rdi
leaq 0xe43a(%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 0xe417(%rip), %rsi      # 0x1200e
callq 0x3370
leal (%r15,%r13), %esi
movq %r12, %rdi
callq 0x31f0
movl $0x2, %edx
movq %rax, %rdi
leaq 0xe432(%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 0x7dec
leaq 0x48(%rsp), %rdi
callq *%r12
movl %eax, %r12d
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3c71
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3310
testb %r12b, %r12b
je 0x3c8c
movl $0x2, %edx
movq %r14, %rdi
leaq 0xe392(%rip), %rsi      # 0x12017
callq 0x3370
jmp 0x3ca4
movl $0x4, %edx
movq %r14, %rdi
leaq 0xe37f(%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 0x1730e(%rip), %rax     # 0x1afd0
movl $0x1, (%rax)
movq 0x30(%rsp), %rax
subq 0x28(%rsp), %rax
movl %r13d, %ebp
sarq $0x3, %rax
incl %r13d
cmpq %rbp, %rax
ja 0x3bbb
movq 0x40(%rsp), %rcx
incl %ecx
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x5, %rax
addl $0xc, %r15d
movq %rcx, %rbx
movq %rcx, 0x40(%rsp)
cmpq %rcx, %rax
ja 0x3b9f
jmp 0x3d19
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %ebp
testl %ebp, %ebp
leaq 0xe301(%rip), %rax      # 0x12027
leaq 0xe2f2(%rip), %rsi      # 0x1201f
cmoveq %rax, %rsi
leaq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, (%rdi)
leaq 0xe2e9(%rip), %rax      # 0x1202e
leaq 0xe2da(%rip), %rdx      # 0x12026
cmoveq %rax, %rdx
callq 0x7f22
movq 0x17264(%rip), %rdi     # 0x1afc0
leaq 0xe2cc(%rip), %rsi      # 0x1202f
movl $0x1c, %edx
callq 0x3370
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x17242(%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 0xe291(%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 0xf675(%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 0x3e45
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3310
leaq 0x10(%rsp), %rdi
callq 0x7c86
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3e66
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 0x3f1f
movq %rax, %r15
leaq 0x148(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x35e0
movb $0x1, %al
jmp 0x3ea7
jmp 0x3ea2
jmp 0x3ea2
jmp 0x3ea2
jmp 0x3ea2
jmp 0x3ea2
movq %rax, %r15
xorl %eax, %eax
cmpq %rbx, %r14
sete %cl
orb %al, %cl
jne 0x3f2c
addq $-0x10, %rbx
leaq 0x68(%rsp), %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x3ece
movq (%rbx), %rsi
incq %rsi
callq 0x3310
leaq -0x20(%rbx), %rax
addq $-0x10, %rbx
cmpq %r14, %rbx
movq %rax, %rbx
jne 0x3eba
jmp 0x3f2c
movq %rax, %r15
xorl %eax, %eax
movq %r14, %rbx
jmp 0x3ea7
movq %rax, %r15
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3f22
movq 0x78(%rsp), %rsi
jmp 0x3f15
movq %rax, %r15
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3f22
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3310
jmp 0x3f22
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x7c86
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3f43
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x3310
movq %r15, %rdi
callq 0x3550