// File: /workspace/github_c_makefile_star2_O0/szanni[P]slideextract/slideextract.cpp
// Function: se_compare_image(cv::Mat&, cv::Mat&, roi*)
static double
_se_compare_image(Mat &img1, Mat &img2, struct roi *roi)
{
	double correlation;
	Mat result = Mat(1, 1, CV_32F);
	Mat i1, i2;

	if (roi != NULL) {
		Rect r = Rect(roi->x, roi->y, roi->width, roi->height);
		i1 = img1.clone()(r);
		i2 = img2.clone()(r);
	}
	else {
		i1 = img1;
		i2 = img2;
	}

	matchTemplate(i1, i2, result, TM_CCORR_NORMED);
	minMaxLoc(result, NULL, &correlation);

	return correlation;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x360, %rsp            # imm = 0x360
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x80(%rbp), %rdi
movl $0x1, %edx
movl $0x5, %ecx
movl %edx, %esi
callq 0x2300
leaq -0xe0(%rbp), %rdi
callq 0x2070
leaq -0x140(%rbp), %rdi
callq 0x2070
cmpq $0x0, -0x18(%rbp)
je 0x3625
movq -0x18(%rbp), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
movl 0x8(%rax), %ecx
movl 0xc(%rax), %r8d
leaq -0x150(%rbp), %rdi
callq 0x3d30
jmp 0x34cd
movq -0x8(%rbp), %rsi
leaq -0x220(%rbp), %rdi
callq 0x20f0
jmp 0x34df
leaq -0x1c0(%rbp), %rdi
leaq -0x220(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x3d70
jmp 0x34fb
leaq -0xe0(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x2080
jmp 0x3510
leaq -0x1c0(%rbp), %rdi
callq 0x2090
leaq -0x220(%rbp), %rdi
callq 0x2090
movq -0x10(%rbp), %rsi
leaq -0x2e0(%rbp), %rdi
callq 0x20f0
jmp 0x353a
leaq -0x280(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x3d70
jmp 0x3556
leaq -0x140(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x2080
jmp 0x356b
leaq -0x280(%rbp), %rdi
callq 0x2090
leaq -0x2e0(%rbp), %rdi
callq 0x2090
jmp 0x364b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x158(%rbp)
movl %eax, -0x15c(%rbp)
jmp 0x37ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x158(%rbp)
movl %eax, -0x15c(%rbp)
jmp 0x35d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x158(%rbp)
movl %eax, -0x15c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x2090
leaq -0x220(%rbp), %rdi
callq 0x2090
jmp 0x37ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x158(%rbp)
movl %eax, -0x15c(%rbp)
jmp 0x3614
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x158(%rbp)
movl %eax, -0x15c(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x2090
leaq -0x2e0(%rbp), %rdi
callq 0x2090
jmp 0x37ee
movq -0x8(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x2110
jmp 0x3637
movq -0x10(%rbp), %rsi
leaq -0x140(%rbp), %rdi
callq 0x2110
jmp 0x3649
jmp 0x364b
leaq -0x2f8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x3a60
jmp 0x3660
leaq -0x310(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x3a60
jmp 0x3675
leaq -0x328(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x38f0
jmp 0x3687
callq 0x22b0
movq %rax, -0x348(%rbp)
jmp 0x3695
movq -0x348(%rbp), %r8
leaq -0x2f8(%rbp), %rdi
leaq -0x310(%rbp), %rsi
leaq -0x328(%rbp), %rdx
movl $0x3, %ecx
callq 0x21f0
jmp 0x36bd
leaq -0x328(%rbp), %rdi
callq 0x3950
leaq -0x310(%rbp), %rdi
callq 0x3aa0
leaq -0x2f8(%rbp), %rdi
callq 0x3aa0
leaq -0x340(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x3a60
jmp 0x36f3
callq 0x22b0
movq %rax, -0x350(%rbp)
jmp 0x3701
movq -0x350(%rbp), %r9
xorl %eax, %eax
movl %eax, %r8d
leaq -0x340(%rbp), %rdi
leaq -0x20(%rbp), %rdx
movq %r8, %rsi
movq %r8, %rcx
callq 0x2260
jmp 0x3725
leaq -0x340(%rbp), %rdi
callq 0x3aa0
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x358(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x2090
leaq -0xe0(%rbp), %rdi
callq 0x2090
leaq -0x80(%rbp), %rdi
callq 0x2090
movsd -0x358(%rbp), %xmm0
addq $0x360, %rsp            # imm = 0x360
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x158(%rbp)
movl %eax, -0x15c(%rbp)
jmp 0x37c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x158(%rbp)
movl %eax, -0x15c(%rbp)
jmp 0x37b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x158(%rbp)
movl %eax, -0x15c(%rbp)
leaq -0x328(%rbp), %rdi
callq 0x3950
leaq -0x310(%rbp), %rdi
callq 0x3aa0
leaq -0x2f8(%rbp), %rdi
callq 0x3aa0
jmp 0x37ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x158(%rbp)
movl %eax, -0x15c(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x3aa0
leaq -0x140(%rbp), %rdi
callq 0x2090
leaq -0xe0(%rbp), %rdi
callq 0x2090
leaq -0x80(%rbp), %rdi
callq 0x2090
movq -0x158(%rbp), %rdi
callq 0x2270
nopl (%rax,%rax)