// File: /workspace/github_cpp_makefile_star2_O1/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 0xcfd0
movq 0x304f0(%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 0xa97e
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xd69c
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x708b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3310
movl 0x90(%rsp), %esi
movl 0x94(%rsp), %edx
leaq 0xa8(%rsp), %rdi
callq 0xd07e
movq 0x30493(%rip), %rsi     # 0x37540
subq 0x30484(%rip), %rsi     # 0x37538
sarq $0x5, %rsi
leaq 0x8(%rsp), %rdi
movq %rsp, %rdx
callq 0xa53c
movq 0x30474(%rip), %rax     # 0x37540
subq 0x30465(%rip), %rax     # 0x37538
cmpq $0x20, %rax
jbe 0x7207
movl $0x1, %r13d
movl $0x18, %ebp
movl $0x28, %r12d
leaq 0x20(%rsp), %rbx
leaq 0xa8(%rsp), %r14
movq 0x2fece(%rip), %r15     # 0x36fd0
movq 0x8(%rsp), %rdi
addq %rbp, %rdi
movl $0x3, %esi
callq 0xa084
movq 0x3041d(%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 0xa97e
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd69c
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x7160
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 0x22fdf
movsd (%rsp), %xmm0
movq 0x8(%rsp), %rax
movq (%rax,%rbp), %rax
movsd %xmm0, (%rax)
movsd (%rsp), %xmm0
ucomisd 0x23ebd(%rip), %xmm0    # 0x2b078
jb 0x71c3
sqrtsd %xmm0, %xmm0
jmp 0x71c8
callq 0x3240
movq 0x8(%rsp), %rax
movq (%rax,%rbp), %rax
movsd %xmm0, 0x8(%rax)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
incq %r13
movq 0x30355(%rip), %rax     # 0x37540
subq 0x30346(%rip), %rax     # 0x37538
sarq $0x5, %rax
addq $0x18, %rbp
addq $0x20, %r12
cmpq %r13, %rax
ja 0x7102
xorl %r14d, %r14d
leaq 0x23f1f(%rip), %r15     # 0x2b130
movq 0x2fdb8(%rip), %rbx     # 0x36fd0
cmpq $0x3, %r14
jae 0x7232
movslq (%r15,%r14,4), %rsi
addq %r15, %rsi
movl $0x12, %edx
movq %rbx, %rdi
callq 0x3360
movq 0x30307(%rip), %rax     # 0x37540
subq 0x302f8(%rip), %rax     # 0x37538
cmpq $0x21, %rax
jb 0x7297
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 0x302c0(%rip), %rax     # 0x37540
subq 0x302b1(%rip), %rax     # 0x37538
incq %r12
sarq $0x5, %rax
addq $0x18, %r13
cmpq %r12, %rax
ja 0x7252
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 0x7218
leaq 0x8(%rsp), %rdi
callq 0xa5c4
leaq 0xa8(%rsp), %rdi
callq 0xd0fc
leaq 0x68(%rsp), %rdi
callq 0xd0fc
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x7358
jmp 0x7321
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x7365
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3310
jmp 0x7365
movq %rax, %rbx
jmp 0x7365
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x734e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3310
jmp 0x734e
jmp 0x734b
jmp 0x734b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa5c4
leaq 0xa8(%rsp), %rdi
callq 0xd0fc
leaq 0x68(%rsp), %rdi
callq 0xd0fc
movq %rbx, %rdi
callq 0x3500