// File: /workspace/github_cpp_makefile_star2_O1/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
cmpq %rdi, %rsi
je 0x1b9cb
movq %rsi, %r14
movq %rdi, %r15
movl 0x30(%rdi), %eax
cmpl 0x30(%rsi), %eax
jne 0x1b9c7
movl 0x34(%r15), %eax
cmpl 0x34(%r14), %eax
jne 0x1b9c7
movl 0x38(%r15), %eax
cmpl 0x38(%r14), %eax
jne 0x1b9c7
cmpl $0x0, 0x38(%r15)
setle %bl
jle 0x1b9cd
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 0x1b885
testl %eax, %eax
setg %sil
jle 0x1b885
movq (%r15), %rcx
movq (%r14), %rdx
movsd (%rcx), %xmm0
ucomisd (%rdx), %xmm0
jne 0x1b87c
jp 0x1b87c
movl %eax, %esi
leaq -0x1(%rsi), %rdi
xorl %r8d, %r8d
cmpq %r8, %rdi
je 0x1b885
movsd 0x8(%rcx,%r8,8), %xmm0
leaq 0x1(%r8), %r9
ucomisd 0x8(%rdx,%r8,8), %xmm0
movq %r9, %r8
jne 0x1b875
jnp 0x1b857
cmpq %rsi, %r9
setb %sil
testb %sil, %sil
jne 0x1b9cd
testl %eax, %eax
setg %cl
jle 0x1b8b1
movq 0x8(%r15), %rdx
movq (%rdx,%r12,8), %rdx
movq 0x8(%r14), %rsi
movq (%rsi,%r12,8), %rsi
movsd (%rdx), %xmm0
ucomisd (%rsi), %xmm0
jne 0x1b8a8
jnp 0x1b901
testb $0x1, %cl
jne 0x1b9cd
cmpl $0x4, %eax
jl 0x1b8e9
shrl $0x2, %eax
movq 0x28(%r15), %rcx
movq (%rcx,%r12,8), %rcx
movq 0x28(%r14), %rdx
movq (%rdx,%r12,8), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
ucomisd (%rdx,%rsi,8), %xmm0
jne 0x1b9cd
jp 0x1b9cd
incq %rsi
cmpq %rsi, %rax
jne 0x1b8cb
incq %r12
movslq 0x38(%r15), %rax
cmpq %rax, %r12
setge %bl
jl 0x1b80c
jmp 0x1b9cd
movq 0x10(%r15), %r9
movq 0x10(%r14), %rbp
movq 0x18(%r15), %rdi
movq 0x18(%r14), %r8
movq 0x20(%r15), %r10
movq %r10, 0x10(%rsp)
movq 0x20(%r14), %r10
movl %eax, %r11d
movq %r11, 0x8(%rsp)
movq (%r9,%r12,8), %r13
movq (%rbp,%r12,8), %rbp
movl $0x1, %r9d
movsd -0x8(%r13,%r9,8), %xmm0
ucomisd -0x8(%rbp,%r9,8), %xmm0
jne 0x1b8a8
jp 0x1b8a8
movq (%rdi,%r12,8), %r11
movsd -0x8(%r11,%r9,8), %xmm0
movq (%r8,%r12,8), %r11
ucomisd -0x8(%r11,%r9,8), %xmm0
jne 0x1b8a8
jp 0x1b8a8
movq 0x10(%rsp), %r11
movq (%r11,%r12,8), %r11
movsd -0x8(%r11,%r9,8), %xmm0
movq (%r10,%r12,8), %r11
ucomisd -0x8(%r11,%r9,8), %xmm0
jne 0x1b8a8
jp 0x1b8a8
cmpq %r9, 0x8(%rsp)
je 0x1b8b1
seta %cl
movsd (%rdx,%r9,8), %xmm0
ucomisd (%rsi,%r9,8), %xmm0
leaq 0x1(%r9), %r9
jne 0x1b8a8
jnp 0x1b935
jmp 0x1b8a8
xorl %ebx, %ebx
jmp 0x1b9cd
movb $0x1, %bl
andb $0x1, %bl
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop