// File: donfreiday[P]gb/./imgui/imgui_impl_sdl.cpp
// Function: ImGui_ImplSdl_ProcessEvent(SDL_Event*)
bool ImGui_ImplSdl_ProcessEvent(SDL_Event* event)
{
    ImGuiIO& io = ImGui::GetIO();
    switch (event->type)
    {
    case SDL_MOUSEWHEEL:
        {
            if (event->wheel.y > 0)
                g_MouseWheel = 1;
            if (event->wheel.y < 0)
                g_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:
        {
            ImGuiIO& io = ImGui::GetIO();
            io.AddInputCharactersUTF8(event->text.text);
            return true;
        }
    case SDL_KEYDOWN:
    case SDL_KEYUP:
        {
            int key = event->key.keysym.sym & ~SDLK_SCANCODE_MASK;
            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);
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
callq 0xca90
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
addl $0xfffffd00, %eax       # imm = 0xFFFFFD00
subl $0x2, %eax
jb 0x4db7f
jmp 0x4daae
movl -0x28(%rbp), %eax
subl $0x303, %eax            # imm = 0x303
je 0x4db5c
jmp 0x4dabe
movl -0x28(%rbp), %eax
subl $0x401, %eax            # imm = 0x401
je 0x4db17
jmp 0x4daca
movl -0x28(%rbp), %eax
subl $0x403, %eax            # imm = 0x403
jne 0x4dc08
jmp 0x4dada
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jle 0x4daf4
movss 0xd52c(%rip), %xmm0     # 0x5b018
movss %xmm0, 0x36314(%rip)    # 0x83e08
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jge 0x4db0e
movss 0xd576(%rip), %xmm0     # 0x5b07c
movss %xmm0, 0x362fa(%rip)    # 0x83e08
movb $0x1, -0x1(%rbp)
jmp 0x4dc0c
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0x4db2b
movb $0x1, 0x362e1(%rip)     # 0x83e0c
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x3, %eax
jne 0x4db3f
movb $0x1, 0x362ce(%rip)     # 0x83e0d
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x2, %eax
jne 0x4db53
movb $0x1, 0x362bb(%rip)     # 0x83e0e
movb $0x1, -0x1(%rbp)
jmp 0x4dc0c
callq 0xca90
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
callq 0x8f20
movb $0x1, -0x1(%rbp)
jmp 0x4dc0c
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xbfffffff, %eax       # imm = 0xBFFFFFFF
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x300, (%rax)          # imm = 0x300
sete %dl
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
andb $0x1, %dl
movb %dl, 0x100(%rax,%rcx)
callq 0x7720
andl $0x3, %eax
cmpl $0x0, %eax
setne %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, 0xfe(%rax)
callq 0x7720
andl $0xc0, %eax
cmpl $0x0, %eax
setne %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, 0xfd(%rax)
callq 0x7720
andl $0x300, %eax            # imm = 0x300
cmpl $0x0, %eax
setne %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, 0xff(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x4dc0c
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)