// File: ridgelab[P]Kmer-SSR/test/src/arguments.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 };

	for (uint32_t i = 0; i < tests.size(); ++i)
	{
		cout << "Arguments 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;34mArguments 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 $0x100, %rsp            # imm = 0x100
movl $0x0, -0x4(%rbp)
movq 0x14957(%rip), %rdi     # 0x17fc0
movl $0xa, %esi
callq 0x32f0
movl $0x0, -0x8(%rbp)
movups 0x145ff(%rip), %xmm0    # 0x17c80
movaps %xmm0, -0x40(%rbp)
movups 0x145e4(%rip), %xmm0    # 0x17c70
movaps %xmm0, -0x50(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x4, -0x28(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x4640
movq -0x98(%rbp), %rcx
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x4660
jmp 0x36ca
leaq -0x51(%rbp), %rdi
callq 0x46e0
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
movq %rax, -0xa0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4700
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0x3801
movq 0x148b9(%rip), %rdi     # 0x17fc0
leaq 0xb8f6(%rip), %rsi      # 0xf004
callq 0x3240
movq %rax, -0xa8(%rbp)
jmp 0x371c
movq -0xa8(%rbp), %rdi
movl -0x68(%rbp), %esi
incl %esi
callq 0x3350
movq %rax, -0xb0(%rbp)
jmp 0x3736
movq -0xb0(%rbp), %rdi
leaq 0xb900(%rip), %rsi      # 0xf044
callq 0x3240
jmp 0x374b
movl -0x68(%rbp), %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0x4720
movq (%rax), %rax
callq *%rax
movb %al, -0xb1(%rbp)
jmp 0x3766
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x3772
jmp 0x37b4
movq 0x14847(%rip), %rdi     # 0x17fc0
leaq 0xb895(%rip), %rsi      # 0xf015
callq 0x3240
jmp 0x3787
jmp 0x37d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x46e0
jmp 0x39a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x3997
movl -0x8(%rbp), %eax
incl %eax
movl %eax, -0x8(%rbp)
movq 0x147fd(%rip), %rdi     # 0x17fc0
leaq 0xb84e(%rip), %rsi      # 0xf018
callq 0x3240
jmp 0x37d1
jmp 0x37d3
movq 0x147e6(%rip), %rdi     # 0x17fc0
movl $0xa, %esi
callq 0x32f0
jmp 0x37e6
movq 0x147e3(%rip), %rax     # 0x17fd0
movl $0x1, (%rax)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x36da
cmpl $0x0, -0x8(%rbp)
je 0x3817
leaq 0xb80f(%rip), %rax      # 0xf01d
movq %rax, -0xc0(%rbp)
jmp 0x3827
leaq 0xb807(%rip), %rax      # 0xf025
movq %rax, -0xc0(%rbp)
jmp 0x3827
movq -0xc0(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x3460
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x4740
jmp 0x3864
leaq -0x89(%rbp), %rdi
callq 0x32c0
movq 0x14749(%rip), %rdi     # 0x17fc0
leaq 0xb7af(%rip), %rsi      # 0xf02d
callq 0x3240
movq %rax, -0xd8(%rbp)
jmp 0x388c
movq -0xd8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x3220
movq %rax, -0xe0(%rbp)
jmp 0x38a8
leaq -0x20(%rbp), %rdi
callq 0x4700
movq -0xe0(%rbp), %rdi
movq %rax, %rsi
movslq -0x8(%rbp), %rax
subq %rax, %rsi
callq 0x3080
movq %rax, -0xe8(%rbp)
jmp 0x38d0
movq -0xe8(%rbp), %rdi
leaq 0xb769(%rip), %rsi      # 0xf047
callq 0x3240
movq %rax, -0xf0(%rbp)
jmp 0x38ec
leaq -0x20(%rbp), %rdi
callq 0x4700
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0x3080
movq %rax, -0xf8(%rbp)
jmp 0x390d
movq -0xf8(%rbp), %rdi
leaq 0xc71c(%rip), %rsi      # 0x10037
callq 0x3240
movq %rax, -0x100(%rbp)
jmp 0x3929
movq -0x100(%rbp), %rdi
movq 0x14659(%rip), %rsi     # 0x17f90
callq 0x3290
jmp 0x393e
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x34d8
leaq -0x20(%rbp), %rdi
callq 0x47f0
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x89(%rbp), %rdi
callq 0x32c0
jmp 0x3997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x34d8
leaq -0x20(%rbp), %rdi
callq 0x47f0
movq -0x60(%rbp), %rdi
callq 0x3440
nopl (%rax)