// File: /workspace/github_cpp_makefile_star2_O2/kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::readFilterSet()
void SteerablePyramid::readFilterSet()
{
	ifstream ifs;
	ifs.open(skFilterSetFilename.c_str());
	
	if (!ifs)
	{
		string errMsg = "Could not find input file '" + skFilterSetFilename + "'.  Please make sure it is in the same directory as the executable.";
		die(errMsg.c_str());
	}
	
	for (int filter = 0; filter < 7; filter++)
	{
		string label;
		int filterDim;
		ifs >> label >> filterDim;
		
		assert(label == "H0" || label == "L0" || label == "L1" || label == "B1" || label == "B2" || label == "B3" || label == "B4");
		assert(filterDim > 0 && filterDim <= 25 && filterDim % 2 == 1);
		
		skFilterDims[filter] = filterDim;
		int numTaps = filterDim * filterDim;
		skFilters[filter] = new Float_t[numTaps];
		skFiltersInv[filter] = new Float_t[numTaps];
		
		for (int i = 0; i < numTaps; i++)
		{
			ifs >> skFilters[filter][i];
			assert(ifs);
		}
	}
	assert(ifs);
	ifs.get();
	assert(!ifs);
	
	ifs.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x3310
movq 0x1ceaf(%rip), %rsi     # 0x32a98
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x3190
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
je 0x15c4b
leaq 0xf5e3(%rip), %rsi      # 0x251ee
leaq 0x1ce86(%rip), %rdx     # 0x32a98
leaq 0x20(%rsp), %rdi
callq 0x8078
leaq 0xf5e7(%rip), %rdx      # 0x2520a
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x1390d
leaq 0x20(%rsp), %rdi
callq 0x3548
movq (%rsp), %rdi
callq 0x3b3c
movq %rsp, %rdi
callq 0x3548
xorl %r13d, %r13d
leaq 0x40(%rsp), %rbx
movq %rsp, %r14
leaq 0x1ceb3(%rip), %r15     # 0x32b10
cmpq $0x7, %r13
je 0x15db8
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
andq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3370
movq %rax, %rdi
leaq 0x20(%rsp), %rsi
callq 0x3180
movq %r14, %rdi
leaq 0xf801(%rip), %rsi      # 0x2549e
callq 0x80ee
testb %al, %al
jne 0x15d1c
movq %r14, %rdi
leaq 0xf7f2(%rip), %rsi      # 0x254a2
callq 0x80ee
testb %al, %al
jne 0x15d1c
movq %r14, %rdi
leaq 0xf7e3(%rip), %rsi      # 0x254a6
callq 0x80ee
testb %al, %al
jne 0x15d1c
movq %r14, %rdi
leaq 0xf7d4(%rip), %rsi      # 0x254aa
callq 0x80ee
testb %al, %al
jne 0x15d1c
movq %r14, %rdi
leaq 0xf7c5(%rip), %rsi      # 0x254ae
callq 0x80ee
testb %al, %al
jne 0x15d1c
movq %r14, %rdi
leaq 0xf7b6(%rip), %rsi      # 0x254b2
callq 0x80ee
testb %al, %al
jne 0x15d1c
movq %r14, %rdi
leaq 0xf7a7(%rip), %rsi      # 0x254b6
callq 0x80ee
testb %al, %al
je 0x15e8c
movl 0x20(%rsp), %r12d
leal -0x1a(%r12), %eax
cmpl $-0x19, %eax
jb 0x15e2f
movl %r12d, %eax
andl $0x1, %eax
je 0x15e2f
leaq 0x1cdae(%rip), %rax     # 0x32af0
movl %r12d, (%rax,%r13,4)
imull %r12d, %r12d
leal (,%r12,8), %ebp
movq %rbp, %rdi
callq 0x3030
movq %rax, (%r15,%r13,8)
movq %rbp, %rdi
callq 0x3030
leaq 0x1cde3(%rip), %rcx     # 0x32b50
movq %rax, (%rcx,%r13,8)
movl %r12d, %eax
leaq 0x8(,%rax,8), %r12
xorl %esi, %esi
leaq 0x8(%rsi), %rbp
cmpq %rbp, %r12
je 0x15da8
addq (%r15,%r13,8), %rsi
movq %rbx, %rdi
callq 0x31b0
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
movq %rbp, %rsi
je 0x15d7e
jmp 0x15e10
movq %r14, %rdi
callq 0x3548
incq %r13
jmp 0x15c5d
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
jne 0x15e4e
leaq 0x40(%rsp), %rdi
callq 0x3340
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
je 0x15e6d
leaq 0x40(%rsp), %rdi
callq 0x3080
leaq 0x40(%rsp), %rdi
callq 0x3090
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd335(%rip), %rdi      # 0x2314c
leaq 0xf4a4(%rip), %rsi      # 0x252c2
leaq 0xf4b2(%rip), %rcx      # 0x252d7
movl $0x104, %edx            # imm = 0x104
callq 0x31a0
leaq 0xf4cf(%rip), %rdi      # 0x25305
leaq 0xf485(%rip), %rsi      # 0x252c2
leaq 0xf493(%rip), %rcx      # 0x252d7
movl $0xfa, %edx
callq 0x31a0
leaq 0xd2f7(%rip), %rdi      # 0x2314c
leaq 0xf466(%rip), %rsi      # 0x252c2
leaq 0xf474(%rip), %rcx      # 0x252d7
movl $0x107, %edx            # imm = 0x107
callq 0x31a0
leaq 0xd2d7(%rip), %rdi      # 0x2314b
leaq 0xf447(%rip), %rsi      # 0x252c2
leaq 0xf455(%rip), %rcx      # 0x252d7
movl $0x109, %edx            # imm = 0x109
callq 0x31a0
leaq 0xf3bb(%rip), %rdi      # 0x2524e
leaq 0xf428(%rip), %rsi      # 0x252c2
leaq 0xf436(%rip), %rcx      # 0x252d7
movl $0xf9, %edx
callq 0x31a0
jmp 0x15ec2
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
jmp 0x15ec8
jmp 0x15eb9
movq %rax, %rbx
jmp 0x15ecd
jmp 0x15ec2
jmp 0x15ec2
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3548
leaq 0x40(%rsp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x34d0
nop