// File: /workspace/github_cpp_makefile_star2_O2/kebwi[P]Trifid/src/ImagePairStats.cpp
// Function: calcImgLabDeltaE(Image3ChnlReal const&, Image3ChnlReal const&)
Float_t calcImgLabDeltaE(const Image3ChnlReal &img1, const Image3ChnlReal &img2)
{
	assert(img1.width() > 0 && img1.height() > 0);
	assert(img1.width() == img2.width() && img1.height() == img2.height());
	
	Float_t deltaEmean = 0;
	int width = img1.width(), height = img1.height();
	int numNonborderPixels = 0;
	for (int y = skEdgeSkip; y < height - skEdgeSkip; y++)
		for (int x = skEdgeSkip; x < width - skEdgeSkip; x++)
		{
			deltaEmean += calcLabDeltaE((*img1[0])(x, y), (*img1[1])(x, y), (*img1[2])(x, y),
										(*img2[0])(x, y), (*img2[1])(x, y), (*img2[2])(x, y));
			numNonborderPixels++;
		}
	
	deltaEmean /= (Float_t)numNonborderPixels;
		
	return deltaEmean;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl 0x28(%rdi), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
jle 0x1ba4e
movl 0x2c(%rdi), %eax
movl %eax, 0x10(%rsp)
testl %eax, %eax
jle 0x1ba4e
movl 0xc(%rsp), %eax
cmpl 0x28(%rsi), %eax
jne 0x1ba67
movl 0x10(%rsp), %eax
cmpl 0x2c(%rsi), %eax
jne 0x1ba67
movq 0x38(%rdi), %rax
movq 0x38(%rsi), %rcx
movq (%rax), %rsi
movq 0x8(%rax), %r8
movq 0x38(%rsi), %rdx
movl 0x28(%rsi), %esi
movl %esi, 0x28(%rsp)
movq 0x38(%r8), %rdi
movl 0x28(%r8), %esi
movl %esi, 0x24(%rsp)
movq 0x10(%rax), %rax
movq 0x38(%rax), %r9
movl 0x28(%rax), %eax
movl %eax, 0x20(%rsp)
movq (%rcx), %rax
movq 0x8(%rcx), %rsi
movq 0x38(%rax), %r11
movl 0x28(%rax), %eax
movl %eax, 0x1c(%rsp)
movq 0x38(%rsi), %r14
movl 0x28(%rsi), %eax
movl %eax, 0x18(%rsp)
movq 0x10(%rcx), %rax
movq 0x38(%rax), %r15
movl 0x28(%rax), %eax
movl %eax, 0x14(%rsp)
xorpd %xmm0, %xmm0
xorl %r13d, %r13d
xorl %eax, %eax
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r10d, %r10d
xorl %ecx, %ecx
xorl %ebx, %ebx
cmpl 0x10(%rsp), %ebx
je 0x1ba2e
movl %ebx, 0x2c(%rsp)
movl %r13d, 0x44(%rsp)
movl %eax, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movl %r8d, 0x38(%rsp)
movl %r10d, 0x34(%rsp)
movl %ecx, 0x30(%rsp)
movl 0xc(%rsp), %ebp
subl $0x1, %ebp
jb 0x1b9ed
movl %r13d, %r12d
movsd (%rdx,%r12,8), %xmm1
movl %eax, %r12d
movsd (%rdi,%r12,8), %xmm2
movl %esi, %r12d
movsd (%r9,%r12,8), %xmm3
movl %r8d, %r12d
movl %r10d, %ebx
subsd (%r11,%r12,8), %xmm1
subsd (%r14,%rbx,8), %xmm2
movl %ecx, %ebx
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
subsd (%r15,%rbx,8), %xmm3
mulsd %xmm3, %xmm3
addsd %xmm1, %xmm3
sqrtsd %xmm3, %xmm1
addsd %xmm1, %xmm0
incl %ecx
incl %r10d
incl %r8d
incl %esi
incl %eax
incl %r13d
jmp 0x1b986
movl 0x2c(%rsp), %ebx
incl %ebx
movl 0x30(%rsp), %ecx
addl 0x14(%rsp), %ecx
movl 0x34(%rsp), %r10d
addl 0x18(%rsp), %r10d
movl 0x38(%rsp), %r8d
addl 0x1c(%rsp), %r8d
movl 0x3c(%rsp), %esi
addl 0x20(%rsp), %esi
movl 0x40(%rsp), %eax
addl 0x24(%rsp), %eax
movl 0x44(%rsp), %r13d
addl 0x28(%rsp), %r13d
jmp 0x1b959
movl 0x10(%rsp), %eax
imull 0xc(%rsp), %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaa0d(%rip), %rdi      # 0x26462
leaq 0xaa2c(%rip), %rsi      # 0x26488
leaq 0xaa38(%rip), %rcx      # 0x2649b
pushq $0x22
jmp 0x1ba7e
leaq 0x9039(%rip), %rdi      # 0x24aa7
leaq 0xaa13(%rip), %rsi      # 0x26488
leaq 0xaa1f(%rip), %rcx      # 0x2649b
pushq $0x23
popq %rdx
callq 0x31a0