// File: /workspace/github_cpp_makefile_star2_O2/kebwi[P]Trifid/src/main.cpp
// Function: programBehavior1ChnlImagePairStats()
void programBehavior1ChnlImagePairStats()
{
	ImageReal grayImg1;
	grayImg1.readFile(sInputFilenames[0]);
	int width = grayImg1.width(), height = grayImg1.height();
	
	//The bit depth should be 12 for RAW files from cameras,
	//but 16 for images created (by scaling by 256) from 8 bit images.
	ImageReal grayImg2(width, height);
	vector<vector<Float_t> > stats(sInputFilenames.size());
	Float_t mse, psnr;
	for (int imageIdx = 1; imageIdx < sInputFilenames.size(); imageIdx++)
	{
		stats[imageIdx].resize(3);
		grayImg2.readFile(sInputFilenames[imageIdx]);
		
		cout << endl;
		
		calc1ChnlMSE_PSNR(grayImg1, grayImg2, mse, psnr);
		stats[imageIdx][0] = mse;
		stats[imageIdx][1] = sqrt(mse);
		stats[imageIdx][2] = psnr;
	}
	
	for (int i = 0; i < 3; i++)
	{
		switch (i)
		{
			case 0:  cout << "MSE:              "; break;
			case 1:  cout << "RMSE:             "; break;
			case 2:  cout << "PSNR (dB):        "; break;
		}
		
		for (int j = 1; j < sInputFilenames.size(); j++)
			cout << setw(12) << stats[j][i];
		cout << endl;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
leaq 0x48(%rsp), %rdi
callq 0xa588
movq 0x2a623(%rip), %rsi     # 0x30528
leaq 0x28(%rsp), %rdi
callq 0x33b0
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xac74
leaq 0x28(%rsp), %rdi
callq 0x3548
movl 0x70(%rsp), %esi
movl 0x74(%rsp), %edx
leaq 0xa8(%rsp), %rdi
callq 0xa62e
movq 0x2a5ec(%rip), %rsi     # 0x30530
subq 0x2a5dd(%rip), %rsi     # 0x30528
sarq $0x5, %rsi
leaq 0x8(%rsp), %rdi
movq %rsp, %rdx
callq 0x859e
pushq $0x1
popq %r13
pushq $0x18
popq %rbp
pushq $0x20
popq %r14
leaq 0x88(%rsp), %r15
leaq 0xa8(%rsp), %r12
movq 0x2a052(%rip), %rbx     # 0x2ffd0
movq 0x2a5ab(%rip), %rax     # 0x30530
subq 0x2a59c(%rip), %rax     # 0x30528
sarq $0x5, %rax
cmpq %r13, %rax
jbe 0x603b
movq 0x8(%rsp), %rdi
addq %rbp, %rdi
pushq $0x3
popq %rsi
callq 0x80fc
movq 0x2a578(%rip), %rsi     # 0x30528
addq %r14, %rsi
movq %r15, %rdi
callq 0x33b0
movq %r12, %rdi
movq %r15, %rsi
callq 0xac74
movq %r15, %rdi
callq 0x3548
movq %rbx, %rdi
callq 0x3120
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
movq %rsp, %rdx
leaq 0x20(%rsp), %rcx
callq 0x1be7a
movsd (%rsp), %xmm0
movq 0x8(%rsp), %rax
movq (%rax,%rbp), %rax
movsd %xmm0, (%rax)
ucomisd 0x1c073(%rip), %xmm0    # 0x22078
jb 0x600d
sqrtsd %xmm0, %xmm0
jmp 0x6012
callq 0x3220
movq 0x8(%rsp), %rax
movq (%rax,%rbp), %rax
movsd %xmm0, 0x8(%rax)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
incq %r13
addq $0x18, %rbp
addq $0x20, %r14
jmp 0x5f7e
xorl %r14d, %r14d
leaq 0x1c0ef(%rip), %r15     # 0x22134
pushq $0x18
popq %r13
cmpq $0x3, %r14
je 0x60bc
movslq %r14d, %rax
movslq (%r15,%rax,4), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x32c0
movq %r13, %rbp
pushq $0x1
popq %r12
movq 0x2a4c1(%rip), %rax     # 0x30530
subq 0x2a4b2(%rip), %rax     # 0x30528
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x60af
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%rbx,%rax)
movq 0x8(%rsp), %rax
movq (%rax,%rbp), %rax
movsd (%rax,%r14,8), %xmm0
movq %rbx, %rdi
callq 0x3460
incq %r12
addq $0x18, %rbp
jmp 0x6068
movq %rbx, %rdi
callq 0x3120
incq %r14
jmp 0x6049
leaq 0x8(%rsp), %rdi
callq 0x85f0
leaq 0xa8(%rsp), %rdi
callq 0xa6a6
leaq 0x48(%rsp), %rdi
callq 0xa6a6
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x612d
jmp 0x6105
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3548
jmp 0x613a
movq %rax, %rbx
jmp 0x613a
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x3548
jmp 0x6123
jmp 0x6120
jmp 0x6120
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x85f0
leaq 0xa8(%rsp), %rdi
callq 0xa6a6
leaq 0x48(%rsp), %rdi
callq 0xa6a6
movq %rbx, %rdi
callq 0x34d0