// File: /workspace/github_cpp_makefile_star2_O2/kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::operator==(SteerablePyramid const&) const
bool SteerablePyramid::operator==(const SteerablePyramid& sp) const
{
	if (&sp == this)
		return true;
	
	if (width_ != sp.width_ || height_ != sp.height_ || numLevels_ != sp.numLevels_)
		return false;
	
	for (int lvl = 0; lvl < numLevels_; lvl++)
	{
		int totalPixels = (width_ * height_) / (int)(pow(4, lvl));
		if (lvl == 0)
		{
			for (int i = 0; i < totalPixels; i++)
				if (h0Coeffs_[i] != sp.h0Coeffs_[i])
					return false;
		}
		
		for (int i = 0; i < totalPixels; i++)
		{
			if (b1Coeffs_[lvl][i] != sp.b1Coeffs_[lvl][i])
				return false;
			if (b2Coeffs_[lvl][i] != sp.b2Coeffs_[lvl][i])
				return false;
			if (b3Coeffs_[lvl][i] != sp.b3Coeffs_[lvl][i])
				return false;
			if (b4Coeffs_[lvl][i] != sp.b4Coeffs_[lvl][i])
				return false;
		}
		
		totalPixels /= 4;
		for (int i = 0; i < totalPixels; i++)
			if (l1Coeffs_[lvl][i] != sp.l1Coeffs_[lvl][i])
				return false;
	}
	
	return true;
}

// Assembly:
cmpq %rdi, %rsi
je 0x15bba
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x30(%rdi), %eax
cmpl 0x30(%rsi), %eax
jne 0x15ba8
movl 0x34(%r14), %eax
cmpl 0x34(%rbx), %eax
jne 0x15ba8
movl 0x38(%r14), %eax
movl $0x0, %ecx
cmpl 0x38(%rbx), %eax
jne 0x15baa
xorl %r13d, %r13d
cltq
cmpq %rax, %r13
jge 0x15bbf
movl 0x34(%r14), %ebp
imull 0x30(%r14), %ebp
leal (,%r13,2), %eax
cvtsi2sd %rax, %xmm0
callq 0x3280
cvttsd2si %xmm0, %ecx
movl %ebp, %eax
cltd
idivl %ecx
testq %r13, %r13
movl %eax, 0x4(%rsp)
je 0x15b26
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rax
movq 0x8(%rbx), %r8
movq 0x10(%rbx), %r9
movq 0x18(%r14), %r10
movq 0x18(%rbx), %r11
movq 0x20(%r14), %rbp
movq 0x20(%rbx), %r12
xorl %r15d, %r15d
cmpq %r15, %rdx
je 0x15b5a
movq (%rsi,%r13,8), %rcx
movsd (%rcx,%r15,8), %xmm0
movq (%r8,%r13,8), %rcx
ucomisd (%rcx,%r15,8), %xmm0
jne 0x15ba8
jp 0x15ba8
movq (%rax,%r13,8), %rcx
movsd (%rcx,%r15,8), %xmm0
movq (%r9,%r13,8), %rcx
ucomisd (%rcx,%r15,8), %xmm0
jne 0x15ba8
jp 0x15ba8
movq (%r10,%r13,8), %rcx
movsd (%rcx,%r15,8), %xmm0
movq (%r11,%r13,8), %rcx
ucomisd (%rcx,%r15,8), %xmm0
jne 0x15ba8
jp 0x15ba8
movq (%rbp,%r13,8), %rcx
movsd (%rcx,%r15,8), %xmm0
movq (%r12,%r13,8), %rdi
xorl %ecx, %ecx
ucomisd (%rdi,%r15,8), %xmm0
leaq 0x1(%r15), %r15
jne 0x15baa
jnp 0x15a91
jmp 0x15baa
movq (%r14), %rsi
movq (%rbx), %rdi
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x15a6e
movsd (%rsi,%r8,8), %xmm0
xorl %ecx, %ecx
ucomisd (%rdi,%r8,8), %xmm0
leaq 0x1(%r8), %r8
jne 0x15baa
jnp 0x15b39
jmp 0x15baa
movl 0x4(%rsp), %eax
cltd
pushq $0x4
popq %rcx
idivl %ecx
movq 0x28(%r14), %rdx
movq 0x28(%rbx), %rsi
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
xorl %edi, %edi
cmpq %rdi, %rax
je 0x15b9c
movq (%rdx,%r13,8), %rcx
movsd (%rcx,%rdi,8), %xmm0
movq (%rsi,%r13,8), %r8
xorl %ecx, %ecx
ucomisd (%r8,%rdi,8), %xmm0
leaq 0x1(%rdi), %rdi
jne 0x15baa
jnp 0x15b78
jmp 0x15baa
incq %r13
movl 0x38(%r14), %eax
jmp 0x15a28
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x15bbc
movb $0x1, %cl
movl %ecx, %eax
retq
movb $0x1, %cl
jmp 0x15baa
nop