// File: kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::operator=(SteerablePyramid const&)
const SteerablePyramid& SteerablePyramid::operator=(const SteerablePyramid& sp)
{
	if (&sp == this)
		return *this;
	
	Init(sp.width_, sp.height_);
	
	useFTconvolution_ = sp.useFTconvolution_;
	
	int totalPixels = width_ * height_;
	memcpy(h0Coeffs_, sp.h0Coeffs_, totalPixels * sizeof(Float_t));
	
	for (int i = 0; i < numLevels_; i++)
	{
		int totalPixels = (width_ * height_) / (int)(pow(4, i));
		memcpy(b1Coeffs_[i], sp.b1Coeffs_[i], totalPixels * sizeof(Float_t));
		memcpy(b2Coeffs_[i], sp.b2Coeffs_[i], totalPixels * sizeof(Float_t));
		memcpy(b3Coeffs_[i], sp.b3Coeffs_[i], totalPixels * sizeof(Float_t));
		memcpy(b4Coeffs_[i], sp.b4Coeffs_[i], totalPixels * sizeof(Float_t));
		memcpy(l1Coeffs_[i], sp.l1Coeffs_[i], (totalPixels / 4) * sizeof(Float_t));
	}
	
	return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq %rax, -0x18(%rbp)
jne 0x2984b
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x299d6
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %edx
callq 0x29ce0
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movb 0x48(%rcx), %cl
andb $0x1, %cl
movb %cl, 0x48(%rax)
movl 0x30(%rax), %ecx
imull 0x34(%rax), %ecx
movl %ecx, -0x1c(%rbp)
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movslq -0x1c(%rbp), %rdx
shlq $0x3, %rdx
callq 0x4300
movl $0x0, -0x20(%rbp)
movq -0x30(%rbp), %rcx
movl -0x20(%rbp), %eax
cmpl 0x38(%rcx), %eax
jge 0x299ce
movq -0x30(%rbp), %rcx
movl 0x30(%rcx), %eax
imull 0x34(%rcx), %eax
movl %eax, -0x34(%rbp)
movl -0x20(%rbp), %esi
movl $0x4, %edi
callq 0x1d7f0
movl -0x34(%rbp), %eax
cvttsd2si %xmm0, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0x24(%rbp)
movq 0x8(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x24(%rbp), %rdx
shlq $0x3, %rdx
callq 0x4300
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x24(%rbp), %rdx
shlq $0x3, %rdx
callq 0x4300
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x24(%rbp), %rdx
shlq $0x3, %rdx
callq 0x4300
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x24(%rbp), %rdx
shlq $0x3, %rdx
callq 0x4300
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x24(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x4300
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2989b
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq