// File: /workspace/github_c_makefile_star2_O1/szanni[P]slideextract/slideextract.cpp
// Function: se_mouseHandler(int, int, int, int, void*)
static void
_se_mouseHandler(int event, int x, int y, int flags, void *param)
{
	Mat clone;
	Mat frame = *(Mat*)param;

	if (event == EVENT_LBUTTONDOWN && (flags & EVENT_FLAG_LBUTTON)) {
		point1 = Point (x, y);
		point2 = Point (x, y);
	}

	if (!(flags & EVENT_FLAG_LBUTTON))
		return;

	if (event != EVENT_MOUSEMOVE && event != EVENT_LBUTTONUP)
		return;

	point2 = Point(x, y);
	selected_roi = (point1.x != point2.x && point1.y != point2.y);

	clone = frame.clone();
	rectangle(clone, point1, point2, CV_RGB(0, 255, 0), 1, 8, 0);
	imshow("frame", clone);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x160, %rsp            # imm = 0x160
movq %r8, %r12
movl %ecx, %r14d
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r15d
leaq 0x100(%rsp), %rdi
callq 0x2060
leaq 0xa0(%rsp), %rdi
movq %r12, %rsi
callq 0x2160
cmpl $0x1, %r15d
setne %al
testb $0x1, %r14b
sete %cl
orb %al, %cl
jne 0x285a
movl %ebp, 0x3934(%rip)      # 0x617c
movl %ebx, 0x3932(%rip)      # 0x6180
movl %ebp, 0x3930(%rip)      # 0x6184
movl %ebx, 0x392e(%rip)      # 0x6188
testb $0x1, %r14b
sete %al
testl $0xfffffffb, %r15d      # imm = 0xFFFFFFFB
setne %cl
orb %al, %cl
jne 0x29a5
cmpl %ebp, 0x3903(%rip)      # 0x617c
movl %ebp, 0x3905(%rip)      # 0x6184
setne %al
cmpl %ebx, 0x38f8(%rip)      # 0x6180
movl %ebx, 0x38fa(%rip)      # 0x6188
setne %cl
andb %al, %cl
movb %cl, 0x38f3(%rip)       # 0x618c
leaq 0x10(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x20d0
leaq 0x100(%rsp), %rbx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2070
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x2080
xorps %xmm0, %xmm0
leaq 0x88(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movl $0x3010000, (%rdi)      # imm = 0x3010000
movq %rbx, 0x8(%rdi)
movl 0x3890(%rip), %eax      # 0x617c
leaq 0x80(%rsp), %rsi
movl %eax, (%rsi)
movl 0x3884(%rip), %eax      # 0x6180
movl %eax, 0x4(%rsi)
movl 0x387f(%rip), %eax      # 0x6184
leaq 0x78(%rsp), %rdx
movl %eax, (%rdx)
movl 0x3876(%rip), %eax      # 0x6188
movl %eax, 0x4(%rdx)
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
movabsq $0x406fe00000000000, %rax # imm = 0x406FE00000000000
movq %rax, 0x8(%r14)
movl $0x0, (%rsp)
leaq 0x10(%rsp), %rcx
movl $0x1, %r8d
movl $0x8, %r9d
callq 0x2050
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x16cf(%rip), %rsi      # 0x4028
leaq 0x16cd(%rip), %rdx      # 0x402d
leaq 0x10(%rsp), %rdi
callq 0x305c
leaq 0x88(%rsp), %rsi
movq $0x0, 0x10(%rsi)
movl $0x1010000, (%rsi)      # imm = 0x1010000
movq %rbx, 0x8(%rsi)
leaq 0x10(%rsp), %rdi
callq 0x2030
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x29a5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0xa0(%rsp), %rdi
callq 0x2080
leaq 0x100(%rsp), %rdi
callq 0x2080
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2a01
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x2a01
jmp 0x29fe
jmp 0x29fe
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2080
jmp 0x2a01
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2080
jmp 0x2a13
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x21e0