// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/SDLEvent.cpp
// Function: Engine::SDLEvent::OnEvent(SDL_Event*)
void SDLEvent::OnEvent(SDL_Event* event)
	{
		switch (event->type)
		{
		case SDL_WINDOWEVENT:
			HandleWindowEvents(event);
			break;
		case SDL_KEYDOWN:
			OnKeyDown(event->key);
			break;
		case SDL_KEYUP:
			OnKeyUp(event->key);
			break;
		case SDL_MOUSEMOTION:
			OnMouseMove(event->motion.x,
				event->motion.y,
				event->motion.xrel,
				event->motion.yrel,
				(event->motion.state & SDL_BUTTON(SDL_BUTTON_LEFT)) != 0,
				(event->motion.state & SDL_BUTTON(SDL_BUTTON_RIGHT)) != 0,
				(event->motion.state & SDL_BUTTON(SDL_BUTTON_MIDDLE)) != 0);
			break;
		case SDL_MOUSEBUTTONDOWN:
			HandleMouseButtonDownEvents(event);
			break;
		case SDL_MOUSEBUTTONUP:
			HandleMouseButtonUpEvents(event);
			break;
		case SDL_QUIT:
			OnExit();
			break;
		case SDL_SYSWMEVENT:
			//Ignore
			break;
		default:
			OnUser(event->user.type, event->user.code, event->user.data1, event->user.data2);
			break;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
subl $0x100, %eax            # imm = 0x100
je 0x98dd
jmp 0x9712
movl -0x5c(%rbp), %eax
subl $0x200, %eax            # imm = 0x200
je 0x977d
jmp 0x971e
movl -0x5c(%rbp), %eax
subl $0x201, %eax            # imm = 0x201
je 0x98ec
jmp 0x972e
movl -0x5c(%rbp), %eax
subl $0x300, %eax            # imm = 0x300
je 0x978f
jmp 0x973a
movl -0x5c(%rbp), %eax
subl $0x301, %eax            # imm = 0x301
je 0x97e7
jmp 0x974a
movl -0x5c(%rbp), %eax
subl $0x400, %eax            # imm = 0x400
je 0x983f
jmp 0x975a
movl -0x5c(%rbp), %eax
subl $0x401, %eax            # imm = 0x401
je 0x98bf
jmp 0x976a
movl -0x5c(%rbp), %eax
subl $0x402, %eax            # imm = 0x402
je 0x98ce
jmp 0x98ee
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9930
jmp 0x991f
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq (%rdi), %rax
leaq -0x38(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rsp)
callq *0x28(%rax)
jmp 0x991f
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x50(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq (%rdi), %rax
leaq -0x58(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rsp)
callq *0x30(%rax)
jmp 0x991f
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x18(%rax), %edx
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x20(%rax), %r8d
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %r9b
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %r11b
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %r10b
movq (%rdi), %rax
movq 0x48(%rax), %rax
movzbl %r10b, %ebx
andl $0x1, %ebx
movq %rsp, %r10
movl %ebx, 0x8(%r10)
movzbl %r11b, %r11d
andl $0x1, %r11d
movl %r11d, (%r10)
movzbl %r9b, %r9d
andl $0x1, %r9d
callq *%rax
jmp 0x991f
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9a10
jmp 0x991f
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9aa0
jmp 0x991f
movq -0x68(%rbp), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
jmp 0x991f
jmp 0x991f
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
movb %al, %sil
movq -0x18(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %r8
movq (%rdi), %rax
movzbl %sil, %esi
callq *0xb0(%rax)
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)