// File: /workspace/github_cpp_makefile_star2_O2/kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::Init(int, int)
void SteerablePyramid::Init(int width, int height)
{
	if (width_ == width && height_ == height)
		return;
	width_ = width;
	height_ = height;
	
	CreateScratch();
	
	Destroy();
	
	DetermineNumLevels();
	
	yLookup_ = new int[height_];
	
	int totalPixels = width_ * height_;
	h0Coeffs_ = new Float_t[totalPixels];
	
	b1Coeffs_ = new Float_t*[numLevels_];
	for (int i = 0; i < numLevels_; i++)
		b1Coeffs_[i] = new Float_t[totalPixels / (int)(pow(4, i))];
	
	b2Coeffs_ = new Float_t*[numLevels_];
	for (int i = 0; i < numLevels_; i++)
		b2Coeffs_[i] = new Float_t[totalPixels / (int)(pow(4, i))];
	
	b3Coeffs_ = new Float_t*[numLevels_];
	for (int i = 0; i < numLevels_; i++)
		b3Coeffs_[i] = new Float_t[totalPixels / (int)(pow(4, i))];
	
	b4Coeffs_ = new Float_t*[numLevels_];
	for (int i = 0; i < numLevels_; i++)
		b4Coeffs_[i] = new Float_t[totalPixels / (int)(pow(4, i))];
	
	l1Coeffs_ = new Float_t*[numLevels_];
	for (int i = 0; i < numLevels_; i++)
		l1Coeffs_[i] = new Float_t[totalPixels / (int)(pow(4, i + 1))];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl %esi, 0x30(%rdi)
jne 0x15779
cmpl %edx, 0x34(%rbx)
jne 0x15779
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, 0x30(%rbx)
movl %edx, 0x34(%rbx)
movq %rbx, %rdi
callq 0x15412
movq %rbx, %rdi
callq 0x15602
movq %rbx, %rdi
callq 0x16736
movslq 0x34(%rbx), %r15
leaq (,%r15,4), %rdi
testq %r15, %r15
pushq $-0x1
popq %r12
cmovsq %r12, %rdi
callq 0x3030
movq %rax, 0x40(%rbx)
movslq 0x30(%rbx), %r14
imulq %r15, %r14
movq %r14, %rdi
shlq $0x3, %rdi
testl %r14d, %r14d
cmovsq %r12, %rdi
callq 0x3030
movq %rax, (%rbx)
movslq 0x38(%rbx), %r15
leaq (,%r15,8), %rdi
testq %r15, %r15
cmovsq %r12, %rdi
callq 0x3030
movq %rax, 0x8(%rbx)
xorl %r13d, %r13d
xorl %ebp, %ebp
movslq %r15d, %rax
cmpq %rax, %rbp
jge 0x1583d
movl %r13d, %eax
cvtsi2sd %rax, %xmm0
callq 0x3280
cvttsd2si %xmm0, %ecx
movl %r14d, %eax
cltd
idivl %ecx
movq %r12, %rdi
testl %eax, %eax
js 0x15823
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x3030
movq 0x8(%rbx), %rcx
movq %rax, (%rcx,%rbp,8)
incq %rbp
movl 0x38(%rbx), %r15d
addl $0x2, %r13d
jmp 0x157f6
leaq (,%rax,8), %rdi
testl %eax, %eax
pushq $-0x1
popq %r12
cmovsq %r12, %rdi
callq 0x3030
movq %rax, 0x10(%rbx)
xorl %r13d, %r13d
xorl %ebp, %ebp
movslq %r15d, %rax
cmpq %rax, %rbp
jge 0x158a4
movl %r13d, %eax
cvtsi2sd %rax, %xmm0
callq 0x3280
cvttsd2si %xmm0, %ecx
movl %r14d, %eax
cltd
idivl %ecx
movq %r12, %rdi
testl %eax, %eax
js 0x1588a
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x3030
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%rbp,8)
incq %rbp
movl 0x38(%rbx), %r15d
addl $0x2, %r13d
jmp 0x1585d
leaq (,%rax,8), %rdi
testl %eax, %eax
pushq $-0x1
popq %r12
cmovsq %r12, %rdi
callq 0x3030
movq %rax, 0x18(%rbx)
xorl %r13d, %r13d
xorl %ebp, %ebp
movslq %r15d, %rax
cmpq %rax, %rbp
jge 0x1590b
movl %r13d, %eax
cvtsi2sd %rax, %xmm0
callq 0x3280
cvttsd2si %xmm0, %ecx
movl %r14d, %eax
cltd
idivl %ecx
movq %r12, %rdi
testl %eax, %eax
js 0x158f1
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x3030
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%rbp,8)
incq %rbp
movl 0x38(%rbx), %r15d
addl $0x2, %r13d
jmp 0x158c4
leaq (,%rax,8), %rdi
testl %eax, %eax
pushq $-0x1
popq %r12
cmovsq %r12, %rdi
callq 0x3030
movq %rax, 0x20(%rbx)
xorl %r13d, %r13d
xorl %ebp, %ebp
movslq %r15d, %rax
cmpq %rax, %rbp
jge 0x15972
movl %r13d, %eax
cvtsi2sd %rax, %xmm0
callq 0x3280
cvttsd2si %xmm0, %ecx
movl %r14d, %eax
cltd
idivl %ecx
movq %r12, %rdi
testl %eax, %eax
js 0x15958
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x3030
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%rbp,8)
incq %rbp
movl 0x38(%rbx), %r15d
addl $0x2, %r13d
jmp 0x1592b
leaq (,%rax,8), %rdi
testl %eax, %eax
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x3030
movq %rax, 0x28(%rbx)
pushq $0x2
popq %rbp
xorl %r13d, %r13d
movslq %r15d, %rax
cmpq %rax, %r13
jge 0x1576a
movl %ebp, %eax
cvtsi2sd %rax, %xmm0
callq 0x3280
cvttsd2si %xmm0, %ecx
movl %r14d, %eax
cltd
idivl %ecx
pushq $-0x1
popq %rdi
testl %eax, %eax
js 0x159c2
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x1(%r13), %r12
callq 0x3030
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movl 0x38(%rbx), %r15d
addl $0x2, %ebp
movq %r12, %r13
jmp 0x15992
nop