// File: /workspace/github_cpp_makefile_star2_O3/kebwi[P]Trifid/src/main.cpp
// Function: main
int main(int argc, char* argv[])
{
	//Sorta kinda verify the enum labels
	assert(skProgramBehaviorLabels[PB_NUM_PROGRAM_BEHAVIORS] == "PB_NUM_PROGRAM_BEHAVIORS");
	assert(skIdealShrinkageMethodLabels[NUM_IDEAL_SHRINKAGE_METHODS] == "NUM_IDEAL_SHRINKAGE_METHODS");
	
	//setiosflags(ios::showpoint | ios::fixed);
	cout.setf(ios::fixed);
	cout.precision(6);	//std out default I believe, therefore a pointless, but illustrative, command
	
	//Uncomment this line to get a random seed.
	//Pass a seed into SeedRandom to set the seed explicitly.
	//SeedRandom();
	
	if (!processArgsFromFile(argc, argv))
		processArgs(argc, argv);
	
	//Clearly mark a new run in the run log or console window
	writeSeparator('#', 100, 4);
	
	switch (sProgramBehavior)
	{
		case PB_TEST_FOURIER:
			fourierTest();  //FourierTransform.cpp
			break;
		case PB_TEST_FOURIER_CONVOLUTION:
			testFourierConvolution(0);
			break;
		case PB_TEST_RGB_XYZ_LAB:
			testRGBXYZLABRoutines();	//ImageProcs.cpp
			break;
		//========================================
		case PB_NOISIFY:
			programBehaviorNoisify();
			break;
		case PB_DENOISE:
			programBehaviorDenoise();
			break;
		case PB_GRAY_IMG_PAIR_STATS:
			programBehavior1ChnlImagePairStats();
			break;
		case PB_RGB_IMG_PAIR_STATS:
			programBehaviorRGBImagePairStats();
			break;
		//========================================
		case PB_NONE:
		default:
			die("Please specify a program behavior flag.");
	}
	
	cout << endl << "Program is complete" << endl;
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
leaq 0x2d6f0(%rip), %rdi     # 0x37450
leaq 0x20478(%rip), %rsi     # 0x2a1df
callq 0x30c0
testl %eax, %eax
jne 0x9e99
leaq 0x2d755(%rip), %rdi     # 0x374d0
leaq 0x20491(%rip), %rsi     # 0x2a213
callq 0x30c0
testl %eax, %eax
jne 0x9eb8
movq 0x2d23a(%rip), %rbx     # 0x36fd0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
orl $0x4, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movq $0x6, 0x8(%rbx,%rax)
movl %ebp, %edi
movq %r14, %rsi
callq 0x5c81
testb %al, %al
jne 0x9dc7
movl %ebp, %edi
movq %r14, %rsi
callq 0x4b11
movl $0x23, %edi
movl $0x64, %esi
movl $0x4, %edx
callq 0x5fd4
movl 0x2d897(%rip), %eax     # 0x37678
decl %eax
cmpl $0x6, %eax
ja 0x9ed7
leaq 0x20321(%rip), %rcx     # 0x2a114
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x1a15e
jmp 0x9e2d
callq 0x6bfd
jmp 0x9e2d
callq 0x12696
jmp 0x9e2d
callq 0x6502
jmp 0x9e2d
xorl %edi, %edi
callq 0x97c1
jmp 0x9e2d
callq 0x6f5d
jmp 0x9e2d
callq 0x72a6
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31f0
movq %rax, %rbx
leaq 0x20db0(%rip), %rsi     # 0x2ac0e
movl $0x13, %edx
movq %rax, %rdi
callq 0x3360
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31f0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x20c84(%rip), %rdi     # 0x2ab24
leaq 0x203ce(%rip), %rsi     # 0x2a275
leaq 0x20cc6(%rip), %rcx     # 0x2ab74
movl $0x546, %edx            # imm = 0x546
callq 0x31c0
leaq 0x20ccc(%rip), %rdi     # 0x2ab8b
leaq 0x203af(%rip), %rsi     # 0x2a275
leaq 0x20ca7(%rip), %rcx     # 0x2ab74
movl $0x547, %edx            # imm = 0x547
callq 0x31c0
leaq 0x20d08(%rip), %rdi     # 0x2abe6
callq 0x403c
nop