// File: /workspace/github_cpp_makefile_star2_O3/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 0x68(%rsp), %rdi
callq 0xcf0c
movq 0x305b9(%rip), %rax     # 0x37538
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0xa92c
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xd5da
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x6fc2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3310
movl 0x90(%rsp), %esi
movl 0x94(%rsp), %edx
leaq 0xa8(%rsp), %rdi
callq 0xcfba
movq 0x3055c(%rip), %rsi     # 0x37540
subq 0x3054d(%rip), %rsi     # 0x37538
sarq $0x5, %rsi
leaq 0x8(%rsp), %rdi
movq %rsp, %rdx
callq 0xa4ee
movq 0x3053d(%rip), %rax     # 0x37540
subq 0x3052e(%rip), %rax     # 0x37538
cmpq $0x20, %rax
jbe 0x7139
movl $0x1, %r13d
movl $0x18, %ebp
movl $0x28, %r12d
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rbx
leaq 0xa8(%rsp), %r14
movq 0x2ff92(%rip), %r15     # 0x36fd0
addq %rbp, %rdi
movl $0x3, %esi
callq 0xa036
movq 0x304e6(%rip), %rax     # 0x37538
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq -0x8(%rax,%r12), %rsi
movq (%rax,%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xa92c
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd5da
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x7097
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3310
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x32e0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31f0
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
movq %rsp, %rdx
leaq 0x40(%rsp), %rcx
callq 0x22d74
movsd (%rsp), %xmm0
movq 0x8(%rsp), %rax
movq (%rax,%rbp), %rax
movsd %xmm0, (%rax)
ucomisd 0x22f8b(%rip), %xmm0    # 0x2a078
jb 0x70f5
sqrtsd %xmm0, %xmm0
jmp 0x70fa
callq 0x3240
movq 0x8(%rsp), %rdi
movq (%rdi,%rbp), %rax
movsd %xmm0, 0x8(%rax)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
incq %r13
movq 0x30423(%rip), %rax     # 0x37540
subq 0x30414(%rip), %rax     # 0x37538
sarq $0x5, %rax
addq $0x18, %rbp
addq $0x20, %r12
cmpq %r13, %rax
ja 0x703e
xorl %r14d, %r14d
leaq 0x23005(%rip), %r15     # 0x2a148
movq 0x2fe86(%rip), %rbx     # 0x36fd0
movslq %r14d, %rax
movslq (%r15,%rax,4), %rsi
addq %r15, %rsi
movl $0x12, %edx
movq %rbx, %rdi
callq 0x3360
movq 0x303d8(%rip), %rax     # 0x37540
subq 0x303c9(%rip), %rax     # 0x37538
cmpq $0x21, %rax
jb 0x71c6
movl $0x1, %r12d
movl $0x18, %r13d
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%rbx,%rax)
movq 0x8(%rsp), %rax
movq (%rax,%r13), %rax
movsd (%rax,%r14,8), %xmm0
movq %rbx, %rdi
callq 0x3480
movq 0x30391(%rip), %rax     # 0x37540
subq 0x30382(%rip), %rax     # 0x37538
incq %r12
sarq $0x5, %rax
addq $0x18, %r13
cmpq %r12, %rax
ja 0x7181
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
incq %r14
cmpq $0x3, %r14
jne 0x714a
leaq 0x8(%rsp), %rdi
callq 0xa56c
leaq 0xa8(%rsp), %rdi
callq 0xd038
leaq 0x68(%rsp), %rdi
callq 0xd038
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x7287
jmp 0x7250
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x7294
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3310
jmp 0x7294
movq %rax, %rbx
jmp 0x7294
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x727d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3310
jmp 0x727d
jmp 0x727a
jmp 0x727a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa56c
leaq 0xa8(%rsp), %rdi
callq 0xd038
leaq 0x68(%rsp), %rdi
callq 0xd038
movq %rbx, %rdi
callq 0x3500