// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb $0x1, %bl
cmpq %rdi, %rsi
je 0x1b4e5
movq %rsi, %r14
movq %rdi, %r15
movl 0x30(%rdi), %eax
cmpl 0x30(%rsi), %eax
jne 0x1b4e3
movl 0x34(%r15), %eax
cmpl 0x34(%r14), %eax
jne 0x1b4e3
movl 0x38(%r15), %eax
cmpl 0x38(%r14), %eax
jne 0x1b4e3
testl %eax, %eax
jle 0x1b4e5
xorl %r12d, %r12d
movl 0x34(%r15), %ebp
imull 0x30(%r15), %ebp
leal (%r12,%r12), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x32a0
cvttsd2si %xmm0, %ecx
movl %ebp, %eax
cltd
idivl %ecx
testq %r12, %r12
jne 0x1b3f8
testl %eax, %eax
jle 0x1b3f8
movq (%r15), %rcx
movq (%r14), %rdx
movl %eax, %esi
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm0
ucomisd (%rdx,%rdi,8), %xmm0
jne 0x1b4e3
jp 0x1b4e3
incq %rdi
cmpq %rdi, %rsi
jne 0x1b3da
testl %eax, %eax
jle 0x1b4d1
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rcx
movq %rcx, 0x10(%rsp)
movq (%rdx,%r12,8), %rdx
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rsi
movq (%rdi,%r12,8), %rdi
movq 0x18(%r15), %r8
movq 0x18(%r14), %r9
movq 0x20(%r15), %r10
movq 0x20(%r14), %r11
movq %rax, 0x8(%rsp)
movl %eax, %r13d
xorl %ebp, %ebp
movsd (%rdx,%rbp,8), %xmm0
ucomisd (%rdi,%rbp,8), %xmm0
jne 0x1b4e3
jp 0x1b4e3
movq 0x10(%rsp), %rax
movq (%rax,%r12,8), %rcx
movsd (%rcx,%rbp,8), %xmm0
movq (%rsi,%r12,8), %rcx
ucomisd (%rcx,%rbp,8), %xmm0
jne 0x1b4e3
jp 0x1b4e3
movq (%r8,%r12,8), %rcx
movsd (%rcx,%rbp,8), %xmm0
movq (%r9,%r12,8), %rcx
ucomisd (%rcx,%rbp,8), %xmm0
jne 0x1b4e3
jp 0x1b4e3
movq (%r10,%r12,8), %rcx
movsd (%rcx,%rbp,8), %xmm0
movq (%r11,%r12,8), %rcx
ucomisd (%rcx,%rbp,8), %xmm0
jne 0x1b4e3
jp 0x1b4e3
incq %rbp
cmpq %rbp, %r13
jne 0x1b437
movq 0x8(%rsp), %rdi
cmpl $0x4, %edi
jl 0x1b4d1
shrl $0x2, %edi
movq 0x28(%r15), %rax
movq (%rax,%r12,8), %rcx
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
ucomisd (%rdx,%rsi,8), %xmm0
jne 0x1b4e3
jp 0x1b4e3
incq %rsi
cmpq %rsi, %rdi
jne 0x1b4bb
incq %r12
movslq 0x38(%r15), %rax
cmpq %rax, %r12
jl 0x1b3a4
jmp 0x1b4e5
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq