// File: /workspace/github_cpp_makefile_star2_O2/kebwi[P]Trifid/src/main.cpp
// Function: testFourierConvolution(int)
void testFourierConvolution(int method)
{
	if (method == 0)
	{
		if (sInputFilenames.size() < 2)
			die("Please enter two PGM files to convolve");
		
		ImageReal img1, img2;
		img1.readFile(sInputFilenames[0]);
		img2.readFile(sInputFilenames[1]);
		
		ImageReal convolvedImgReal;
		convolveImages(img1, img2, convolvedImgReal);
		
		convolvedImgReal.normalize(1, false);
		
		convolvedImgReal.setFilename(img1.filename());
		convolvedImgReal.appendFilename("_conv");
		convolvedImgReal.writeFile(1);
	}
	else if (method == 1)
	{
		if (sInputFilenames.size() < 1)
			die("Please enter one PGM file to convolve with the steerable pyramid filters");
		
		ImageReal img1;
		img1.readFile(sInputFilenames[0]);
		
		SteerablePyramid steerPyr;
		steerPyr.DoFullWaveletAnalysis(img1.img(), img1.width(), img1.height(), false);
		
		ImageReal img1SynthReal(img1.width(), img1.height());
		steerPyr.DoFullWaveletSynthesis(img1SynthReal.img());
		
		Float_t mse, psnr;
		calc1ChnlMSE_PSNR(img1, img1SynthReal, mse, psnr);
		cout << "MSE/PSNR: " << mse << setw(14) << psnr << endl;
		
		//---------------------
		
		steerPyr.DoFullWaveletAnalysis(img1.img(), img1.width(), img1.height(), true);
		
		steerPyr.DoFullWaveletSynthesis(img1SynthReal.img());
		
		calc1ChnlMSE_PSNR(img1, img1SynthReal, mse, psnr);
		cout << "MSE/PSNR: " << mse << setw(14) << psnr << endl;
	}
}

// Assembly:
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
cmpl $0x1, %edi
je 0x7c03
testl %edi, %edi
jne 0x7db3
movq 0x28a7f(%rip), %rax     # 0x30530
subq 0x28a70(%rip), %rax     # 0x30528
cmpq $0x20, %rax
jbe 0x7dbc
leaq 0x90(%rsp), %rdi
callq 0xa588
leaq 0x10(%rsp), %rdi
callq 0xa588
movq 0x28a48(%rip), %rsi     # 0x30528
leaq 0x140(%rsp), %rdi
callq 0x33b0
leaq 0x90(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0xac74
leaq 0x140(%rsp), %rdi
callq 0x3548
movq 0x28a12(%rip), %rsi     # 0x30528
addq $0x20, %rsi
leaq 0x120(%rsp), %rdi
callq 0x33b0
leaq 0x10(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xac74
leaq 0x120(%rsp), %rdi
callq 0x3548
leaq 0x50(%rsp), %rdi
callq 0xa588
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x149b8
leaq 0x50(%rsp), %rdi
movsd 0x1a4e4(%rip), %xmm0    # 0x22058
xorl %esi, %esi
callq 0xa7c2
leaq 0x98(%rsp), %rsi
leaq 0x100(%rsp), %rdi
callq 0x33b0
leaq 0x50(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0xa4ee
leaq 0x100(%rsp), %rdi
callq 0x3548
leaq 0x1af0b(%rip), %rsi     # 0x22ac1
leaq 0x50(%rsp), %rdi
callq 0x8686
leaq 0x160(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0xb028
leaq 0x160(%rsp), %rdi
callq 0x3548
leaq 0x50(%rsp), %rdi
callq 0xa6a6
leaq 0x10(%rsp), %rdi
callq 0xa6a6
leaq 0x90(%rsp), %rdi
jmp 0x7dae
movq 0x28926(%rip), %rax     # 0x30530
cmpq 0x28917(%rip), %rax     # 0x30528
je 0x7dc8
leaq 0x10(%rsp), %rdi
callq 0xa588
movq 0x28900(%rip), %rsi     # 0x30528
leaq 0xe0(%rsp), %rdi
callq 0x33b0
leaq 0x10(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0xac74
leaq 0xe0(%rsp), %rdi
callq 0x3548
leaq 0x90(%rsp), %rdi
callq 0x15294
movq 0x48(%rsp), %rsi
movl 0x38(%rsp), %edx
movl 0x3c(%rsp), %ecx
leaq 0x90(%rsp), %rdi
xorl %r8d, %r8d
callq 0x17960
movl 0x38(%rsp), %esi
movl 0x3c(%rsp), %edx
leaq 0x50(%rsp), %rdi
callq 0xa62e
movq 0x88(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0x183d8
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rsp, %rcx
callq 0x1be7a
movq 0x2830d(%rip), %rdi     # 0x2ffd0
leaq 0x1adc1(%rip), %rsi     # 0x22a8b
callq 0x32c0
movsd 0x8(%rsp), %xmm0
movq %rax, %rdi
callq 0x3460
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xe, 0x10(%rax,%rcx)
movsd (%rsp), %xmm0
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3120
movq 0x48(%rsp), %rsi
movl 0x38(%rsp), %edx
movl 0x3c(%rsp), %ecx
leaq 0x90(%rsp), %rdi
pushq $0x1
popq %r8
callq 0x17960
movq 0x88(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0x183d8
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rsp, %rcx
callq 0x1be7a
movq 0x2827d(%rip), %rdi     # 0x2ffd0
leaq 0x1ad31(%rip), %rsi     # 0x22a8b
callq 0x32c0
movsd 0x8(%rsp), %xmm0
movq %rax, %rdi
callq 0x3460
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xe, 0x10(%rax,%rcx)
movsd (%rsp), %xmm0
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3120
leaq 0x50(%rsp), %rdi
callq 0xa6a6
leaq 0x90(%rsp), %rdi
callq 0x155fc
leaq 0x10(%rsp), %rdi
callq 0xa6a6
addq $0x180, %rsp            # imm = 0x180
popq %rbx
retq
leaq 0x1acd7(%rip), %rdi     # 0x22a9a
callq 0x3b3c
leaq 0x1acf8(%rip), %rdi     # 0x22ac7
callq 0x3b3c
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x3548
jmp 0x7e36
jmp 0x7e54
jmp 0x7e2e
jmp 0x7df9
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
jmp 0x7e0b
movq %rax, %rbx
jmp 0x7e61
jmp 0x7e24
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x3548
jmp 0x7e40
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x3548
jmp 0x7e6e
movq %rax, %rbx
jmp 0x7e6e
movq %rax, %rbx
jmp 0x7e4a
movq %rax, %rbx
jmp 0x7e40
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xa6a6
leaq 0x10(%rsp), %rdi
callq 0xa6a6
leaq 0x90(%rsp), %rdi
jmp 0x7e73
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xa6a6
leaq 0x90(%rsp), %rdi
callq 0x155fc
leaq 0x10(%rsp), %rdi
callq 0xa6a6
movq %rbx, %rdi
callq 0x34d0