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

	if (ref != NIL && !ref->IsActive()) return Success();

	switch (message)
	{
		case SM_KEYDOWN:
			if (wParam == key)
			{
				if ((((flags & SC_ALT) 	 && Input::Keyboard::GetKeyState(Input::Keyboard::KeyAlt))     || (!(flags & SC_ALT)   && !Input::Keyboard::GetKeyState(Input::Keyboard::KeyAlt)))     &&
				    (((flags & SC_CTRL)  && Input::Keyboard::GetKeyState(Input::Keyboard::KeyControl)) || (!(flags & SC_CTRL)  && !Input::Keyboard::GetKeyState(Input::Keyboard::KeyControl))) &&
				    (((flags & SC_CMD)   && Input::Keyboard::GetKeyState(Input::Keyboard::KeyCommand)) || (!(flags & SC_CMD)   && !Input::Keyboard::GetKeyState(Input::Keyboard::KeyCommand))) &&
				    (((flags & SC_SHIFT) && Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift))   || (!(flags & SC_SHIFT) && !Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift))))
				{
					onKeyDown.Emit(param);

					return MessageProcessed;
				}
			}

			break;
	}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x68(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0xd2f0b
leaq -0x30(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x78(%rbp), %rdi
callq 0x59680
movl %eax, -0x6c(%rbp)
jmp 0xd2edd
movl -0x6c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5b5b0
jmp 0xd313c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5b5b0
jmp 0xd3148
movq -0x68(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xd2f6b
leaq -0x50(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x5ca80
movq -0x88(%rbp), %rdi
callq 0x59680
movl %eax, -0x7c(%rbp)
jmp 0xd2f3d
movl -0x7c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a410
jmp 0xd313c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a410
jmp 0xd3148
movq -0x68(%rbp), %rax
cmpq $0x0, 0x5c0(%rax)
je 0xd2fe6
movq -0x68(%rbp), %rax
movq 0x5c0(%rax), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xd2fe6
leaq -0x60(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x5ca80
movq -0x98(%rbp), %rdi
callq 0x59680
movl %eax, -0x8c(%rbp)
jmp 0xd2fb5
movl -0x8c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a410
jmp 0xd313c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a410
jmp 0xd3148
movl -0x14(%rbp), %eax
subl $0x780e, %eax           # imm = 0x780E
jne 0xd3127
jmp 0xd2ff6
movq -0x68(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x5b8(%rcx), %eax
jne 0xd3125
movq -0x68(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xd3026
movl $0x12, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xd304b
movq -0x68(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xd3123
movl $0x12, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xd3123
movq -0x68(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xd3068
movl $0x11, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xd308d
movq -0x68(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xd3123
movl $0x11, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xd3123
movq -0x68(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xd30aa
movl $0x5b, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xd30c7
movq -0x68(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0xd3123
movl $0x5b, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xd3123
movq -0x68(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xd30e4
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xd3101
movq -0x68(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0xd3123
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xd3123
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
movl 0x5bc(%rax), %esi
callq 0x907d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd313c
jmp 0xd3125
jmp 0xd3127
movq -0x68(%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 $0xa0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)