// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rax, 0x10(%rsp)
testl %eax, %eax
jle 0x22912
movl 0x2c(%rdi), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
jle 0x22912
movq 0x10(%rsp), %rax
cmpl 0x28(%rsi), %eax
jne 0x22931
movl 0xc(%rsp), %eax
cmpl 0x2c(%rsi), %eax
jne 0x22931
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, 0x2c(%rsp)
movq 0x38(%r8), %rdi
movl 0x28(%r8), %esi
movl %esi, 0x28(%rsp)
movq 0x10(%rax), %rax
movq 0x38(%rax), %r9
movl 0x28(%rax), %eax
movl %eax, 0x24(%rsp)
movq (%rcx), %rax
movq 0x8(%rcx), %rsi
movq 0x38(%rax), %r11
movl 0x28(%rax), %eax
movl %eax, 0x20(%rsp)
movq 0x38(%rsi), %r14
movl 0x28(%rsi), %eax
movl %eax, 0x1c(%rsp)
movq 0x10(%rcx), %rax
movq 0x38(%rax), %r15
movl 0x28(%rax), %eax
movl %eax, 0x18(%rsp)
xorpd %xmm0, %xmm0
xorl %r13d, %r13d
xorl %ecx, %ecx
xorl %eax, %eax
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r12d, %r12d
xorl %r10d, %r10d
movl %r10d, 0x30(%rsp)
movq 0x10(%rsp), %rbp
movl %r13d, 0x44(%rsp)
movl %ecx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
movl %esi, 0x38(%rsp)
movl %r8d, 0x34(%rsp)
movl %r12d, %r10d
movl %r13d, %ebx
movsd (%rdx,%rbx,8), %xmm1
movl %ecx, %ebx
movsd (%rdi,%rbx,8), %xmm2
movl %eax, %ebx
movsd (%r9,%rbx,8), %xmm3
movl %esi, %ebx
subsd (%r11,%rbx,8), %xmm1
movl %r8d, %ebx
subsd (%r14,%rbx,8), %xmm2
movl %r10d, %ebx
subsd (%r15,%rbx,8), %xmm3
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm3, %xmm3
addsd %xmm1, %xmm3
xorps %xmm1, %xmm1
sqrtsd %xmm3, %xmm1
addsd %xmm1, %xmm0
incl %r10d
incl %r8d
incl %esi
incl %eax
incl %ecx
incl %r13d
decq %rbp
jne 0x22846
movl 0x30(%rsp), %r10d
incl %r10d
addl 0x18(%rsp), %r12d
movl 0x34(%rsp), %r8d
addl 0x1c(%rsp), %r8d
movl 0x38(%rsp), %esi
addl 0x20(%rsp), %esi
movl 0x3c(%rsp), %eax
addl 0x24(%rsp), %eax
movl 0x40(%rsp), %ecx
addl 0x28(%rsp), %ecx
movl 0x44(%rsp), %r13d
addl 0x2c(%rsp), %r13d
cmpl 0xc(%rsp), %r10d
jne 0x22823
movq 0x10(%rsp), %rax
imull 0xc(%rsp), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbba9(%rip), %rdi      # 0x2e4c2
leaq 0xbbc8(%rip), %rsi      # 0x2e4e8
leaq 0xbbd4(%rip), %rcx      # 0x2e4fb
movl $0x22, %edx
callq 0x31c0
leaq 0xa16f(%rip), %rdi      # 0x2caa7
leaq 0xbba9(%rip), %rsi      # 0x2e4e8
leaq 0xbbb5(%rip), %rcx      # 0x2e4fb
movl $0x23, %edx
callq 0x31c0