// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/special/droparea.cpp
// Function: smooth::GUI::DropArea::Process(int, int, int)
S::Int S::GUI::DropArea::Process(Int message, Int wParam, Int lParam)
{
	if (!IsRegistered())		 return Error();
	if (!IsActive() || !IsVisible()) return Success();

	switch (message)
	{
		case SM_DROPFILES:
			{
				Point	 mousePos = Point(wParam, lParam);

				Point	 realPos  = GetRealPosition();
				Size	 realSize = GetRealSize();

				if (mousePos.x > realPos.x && mousePos.x < (realPos.x + realSize.cx) && mousePos.y > realPos.y && mousePos.y < (realPos.y + realSize.cy))
				{
					const Array<String>	&fileNames = GetContainerWindow()->GetDroppedFiles();

					EnterProtectedRegion();

					foreach (const String &fileName, fileNames) onDropFile.Emit(fileName);

					onDropFiles.Emit(fileNames);

					LeaveProtectedRegion();

					return MessageProcessed;
				}
			}

			break;
	}

	return Widget::Process(message, wParam, lParam);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0xd271a
leaq -0x30(%rbp), %rdi
movq %rdi, -0x98(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x98(%rbp), %rdi
callq 0x59680
movl %eax, -0x8c(%rbp)
jmp 0xd26e9
movl -0x8c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5b5b0
jmp 0xd2925
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5b5b0
jmp 0xd2931
movq -0x88(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xd2730
jmp 0xd2744
movq -0x88(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0xd2799
leaq -0x50(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x5ca80
movq -0xa8(%rbp), %rdi
callq 0x59680
movl %eax, -0x9c(%rbp)
jmp 0xd2768
movl -0x9c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a410
jmp 0xd2925
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a410
jmp 0xd2931
movl -0x14(%rbp), %eax
subl $0x7814, %eax           # imm = 0x7814
jne 0xd290d
jmp 0xd27a9
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
leaq -0x58(%rbp), %rdi
callq 0x5c2c0
movq -0x88(%rbp), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movq -0x88(%rbp), %rdi
movq %rax, -0x60(%rbp)
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, -0x68(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x60(%rbp), %eax
jle 0xd290b
movl -0x58(%rbp), %eax
movl -0x60(%rbp), %ecx
addl -0x68(%rbp), %ecx
cmpl %ecx, %eax
jge 0xd290b
movl -0x54(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jle 0xd290b
movl -0x54(%rbp), %eax
movl -0x5c(%rbp), %ecx
addl -0x64(%rbp), %ecx
cmpl %ecx, %eax
jge 0xd290b
movq -0x88(%rbp), %rdi
callq 0x59bc0
movq %rax, %rdi
callq 0x5cdd0
movq -0x88(%rbp), %rdi
movq %rax, -0x70(%rbp)
callq 0x5b7c0
movl $0x0, -0x74(%rbp)
movl $0xffffffff, -0x78(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x0, -0x74(%rbp)
movb %al, -0xa9(%rbp)
jne 0xd287c
movl -0x78(%rbp), %eax
movl %eax, -0xb0(%rbp)
movq -0x70(%rbp), %rdi
callq 0x5c990
movl %eax, %ecx
movl -0xb0(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0xd2888
jmp 0xd28df
movq -0x70(%rbp), %rdi
movl -0x78(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x78(%rbp)
callq 0x74720
movq %rax, -0x80(%rbp)
cmpl $0x0, -0x74(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xd28ad
jmp 0xd28cf
movq -0x88(%rbp), %rdi
addq $0x5b8, %rdi            # imm = 0x5B8
movq -0x80(%rbp), %rsi
callq 0x97960
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0xd289e
jmp 0xd28d1
movl -0x74(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0xd2846
movq -0x88(%rbp), %rdi
addq $0x5d8, %rdi            # imm = 0x5D8
movq -0x70(%rbp), %rsi
callq 0xd29d0
movq -0x88(%rbp), %rdi
callq 0x594d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd2925
jmp 0xd290d
movq -0x88(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x5cbf0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)