// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d69f(%rip), %rdi     # 0x37450
leaq 0x2140f(%rip), %rsi     # 0x2b1c7
callq 0x30c0
testl %eax, %eax
jne 0x9eea
leaq 0x2d704(%rip), %rdi     # 0x374d0
leaq 0x21428(%rip), %rsi     # 0x2b1fb
callq 0x30c0
testl %eax, %eax
jne 0x9f09
movq 0x2d1e9(%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 0x5d3a
testb %al, %al
jne 0x9e18
movl %ebp, %edi
movq %r14, %rsi
callq 0x4b11
movl $0x23, %edi
movl $0x64, %esi
movl $0x4, %edx
callq 0x608d
movl 0x2d846(%rip), %eax     # 0x37678
decl %eax
cmpl $0x6, %eax
ja 0x9f28
leaq 0x212d0(%rip), %rcx     # 0x2b114
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x1a605
jmp 0x9e7e
callq 0x6cc6
jmp 0x9e7e
callq 0x126f6
jmp 0x9e7e
callq 0x65b7
jmp 0x9e7e
xorl %edi, %edi
callq 0x9812
jmp 0x9e7e
callq 0x7026
jmp 0x9e7e
callq 0x7377
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 0x21d81(%rip), %rsi     # 0x2bc30
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 0x21c55(%rip), %rdi     # 0x2bb46
leaq 0x21365(%rip), %rsi     # 0x2b25d
leaq 0x21c97(%rip), %rcx     # 0x2bb96
movl $0x546, %edx            # imm = 0x546
callq 0x31c0
leaq 0x21c9d(%rip), %rdi     # 0x2bbad
leaq 0x21346(%rip), %rsi     # 0x2b25d
leaq 0x21c78(%rip), %rcx     # 0x2bb96
movl $0x547, %edx            # imm = 0x547
callq 0x31c0
leaq 0x21cd9(%rip), %rdi     # 0x2bc08
callq 0x403c