// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_sdl.cpp
// Function: ImGui_ImplSDL2_ProcessEvent(SDL_Event const*)
bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event)
{
    ImGuiIO& io = ImGui::GetIO();
    switch (event->type)
    {
    case SDL_MOUSEWHEEL:
        {
            if (event->wheel.x > 0) io.MouseWheelH += 1;
            if (event->wheel.x < 0) io.MouseWheelH -= 1;
            if (event->wheel.y > 0) io.MouseWheel += 1;
            if (event->wheel.y < 0) io.MouseWheel -= 1;
            return true;
        }
    case SDL_MOUSEBUTTONDOWN:
        {
            if (event->button.button == SDL_BUTTON_LEFT) g_MousePressed[0] = true;
            if (event->button.button == SDL_BUTTON_RIGHT) g_MousePressed[1] = true;
            if (event->button.button == SDL_BUTTON_MIDDLE) g_MousePressed[2] = true;
            return true;
        }
    case SDL_TEXTINPUT:
        {
            io.AddInputCharactersUTF8(event->text.text);
            return true;
        }
    case SDL_KEYDOWN:
    case SDL_KEYUP:
        {
            int key = event->key.keysym.scancode;
            IM_ASSERT(key >= 0 && key < IM_ARRAYSIZE(io.KeysDown));
            io.KeysDown[key] = (event->type == SDL_KEYDOWN);
            io.KeyShift = ((SDL_GetModState() & KMOD_SHIFT) != 0);
            io.KeyCtrl = ((SDL_GetModState() & KMOD_CTRL) != 0);
            io.KeyAlt = ((SDL_GetModState() & KMOD_ALT) != 0);
#ifdef _WIN32
            io.KeySuper = false;
#else
            io.KeySuper = ((SDL_GetModState() & KMOD_GUI) != 0);
#endif
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x47c7c
movq %rax, %rbx
movl (%r14), %ecx
xorl %eax, %eax
cmpl $0x400, %ecx            # imm = 0x400
jg 0xaf6db
leal -0x300(%rcx), %edx
cmpl $0x2, %edx
jae 0xaf773
movl 0x10(%r14), %eax
cmpq $0x200, %rax            # imm = 0x200
jae 0xaf7c2
cmpl $0x300, %ecx            # imm = 0x300
sete 0x13c(%rbx,%rax)
callq 0xc7c0
testb $0x3, %al
setne 0x139(%rbx)
callq 0xc7c0
testb $-0x40, %al
setne 0x138(%rbx)
callq 0xc7c0
testl $0x300, %eax            # imm = 0x300
setne 0x13a(%rbx)
callq 0xc7c0
testl $0xc00, %eax            # imm = 0xC00
setne 0x13b(%rbx)
jmp 0xaf78a
cmpl $0x401, %ecx            # imm = 0x401
je 0xaf791
cmpl $0x403, %ecx            # imm = 0x403
jne 0xaf78c
cmpl $0x0, 0x10(%r14)
jle 0xaf712
movss 0x134(%rbx), %xmm0
addss 0x78da(%rip), %xmm0     # 0xb6fe4
movss %xmm0, 0x134(%rbx)
cmpl $0x0, 0x10(%r14)
jns 0xaf731
movss 0x134(%rbx), %xmm0
addss 0x78a7(%rip), %xmm0     # 0xb6fd0
movss %xmm0, 0x134(%rbx)
cmpl $0x0, 0x14(%r14)
jle 0xaf750
movss 0x130(%rbx), %xmm0
addss 0x789c(%rip), %xmm0     # 0xb6fe4
movss %xmm0, 0x130(%rbx)
movb $0x1, %al
cmpl $0x0, 0x14(%r14)
jns 0xaf78c
movss 0x130(%rbx), %xmm0
addss 0x7867(%rip), %xmm0     # 0xb6fd0
movss %xmm0, 0x130(%rbx)
jmp 0xaf78c
cmpl $0x303, %ecx            # imm = 0x303
jne 0xaf78c
addq $0xc, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41714
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
movzbl 0x10(%r14), %ecx
movb $0x1, %al
cmpl $0x3, %ecx
je 0xaf7b9
cmpl $0x2, %ecx
je 0xaf7b0
cmpl $0x1, %ecx
jne 0xaf78c
movb $0x1, 0x55022(%rip)     # 0x1047d0
jmp 0xaf78c
movb $0x1, 0x5501b(%rip)     # 0x1047d2
jmp 0xaf78c
movb $0x1, 0x55011(%rip)     # 0x1047d1
jmp 0xaf78c
leaq 0x25d17(%rip), %rdi     # 0xd54e0
leaq 0x25d58(%rip), %rsi     # 0xd5528
leaq 0x25d7b(%rip), %rcx     # 0xd5552
movl $0x73, %edx
callq 0xc140