// File: /workspace/github_c_makefile_star2_O3/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
je 0x2998
testb $0x1, %r14b
sete %al
testl $0xfffffffb, %r15d      # imm = 0xFFFFFFFB
setne %cl
orb %al, %cl
jne 0x29b0
cmpl %ebp, 0x3912(%rip)      # 0x617c
movl %ebp, 0x3914(%rip)      # 0x6184
setne %al
cmpl %ebx, 0x3907(%rip)      # 0x6180
movl %ebx, 0x3909(%rip)      # 0x6188
setne %cl
andb %al, %cl
movb %cl, 0x3902(%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
leaq 0x88(%rsp), %rdi
movq $0x0, 0x10(%rdi)
movl $0x3010000, (%rdi)      # imm = 0x3010000
movq %rbx, 0x8(%rdi)
movl 0x389e(%rip), %eax      # 0x617c
leaq 0x80(%rsp), %rsi
movl %eax, (%rsi)
movl 0x3892(%rip), %eax      # 0x6180
movl %eax, 0x4(%rsi)
movl 0x388d(%rip), %eax      # 0x6184
leaq 0x78(%rsp), %rdx
movl %eax, (%rdx)
movl 0x3884(%rip), %eax      # 0x6188
movl %eax, 0x4(%rdx)
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movhps 0x16f4(%rip), %xmm1     # xmm1 = xmm1[0,1],mem[0,1]
movaps %xmm1, (%r14)
movaps %xmm0, 0x10(%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 0x16e6(%rip), %rsi      # 0x4030
leaq 0x16e4(%rip), %rdx      # 0x4035
leaq 0x10(%rsp), %rdi
callq 0x303c
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 0x29b0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x29b0
movl %ebp, 0x37de(%rip)      # 0x617c
movl %ebx, 0x37dc(%rip)      # 0x6180
movl %ebp, 0x37da(%rip)      # 0x6184
movl %ebx, 0x37d8(%rip)      # 0x6188
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 0x2a0c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x2a0c
jmp 0x2a09
jmp 0x2a09
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2080
jmp 0x2a0c
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2080
jmp 0x2a1e
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x21e0