// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::SplitterBehavior(ImRect const&, unsigned int, ImGuiAxis, float*, float*, float, float, float, float)
bool ImGui::SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend, float hover_visibility_delay)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;

    const ImGuiItemFlags item_flags_backup = window->DC.ItemFlags;
    window->DC.ItemFlags |= ImGuiItemFlags_NoNav | ImGuiItemFlags_NoNavDefaultFocus;
    bool item_add = ItemAdd(bb, id);
    window->DC.ItemFlags = item_flags_backup;
    if (!item_add)
        return false;

    bool hovered, held;
    ImRect bb_interact = bb;
    bb_interact.Expand(axis == ImGuiAxis_Y ? ImVec2(0.0f, hover_extend) : ImVec2(hover_extend, 0.0f));
    ButtonBehavior(bb_interact, id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_AllowItemOverlap);
    if (g.ActiveId != id)
        SetItemAllowOverlap();

    if (held || (g.HoveredId == id && g.HoveredIdPreviousFrame == id && g.HoveredIdTimer >= hover_visibility_delay))
        SetMouseCursor(axis == ImGuiAxis_Y ? ImGuiMouseCursor_ResizeNS : ImGuiMouseCursor_ResizeEW);

    ImRect bb_render = bb;
    if (held)
    {
        ImVec2 mouse_delta_2d = g.IO.MousePos - g.ActiveIdClickOffset - bb_interact.Min;
        float mouse_delta = (axis == ImGuiAxis_Y) ? mouse_delta_2d.y : mouse_delta_2d.x;

        // Minimum pane size
        float size_1_maximum_delta = ImMax(0.0f, *size1 - min_size1);
        float size_2_maximum_delta = ImMax(0.0f, *size2 - min_size2);
        if (mouse_delta < -size_1_maximum_delta)
            mouse_delta = -size_1_maximum_delta;
        if (mouse_delta > size_2_maximum_delta)
            mouse_delta = size_2_maximum_delta;

        // Apply resize
        if (mouse_delta != 0.0f)
        {
            if (mouse_delta < 0.0f)
                IM_ASSERT(*size1 + mouse_delta >= min_size1);
            if (mouse_delta > 0.0f)
                IM_ASSERT(*size2 - mouse_delta >= min_size2);
            *size1 += mouse_delta;
            *size2 -= mouse_delta;
            bb_render.Translate((axis == ImGuiAxis_X) ? ImVec2(mouse_delta, 0.0f) : ImVec2(0.0f, mouse_delta));
            MarkItemEdited(id);
        }
    }

    // Render
    const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : (hovered && g.HoveredIdTimer >= hover_visibility_delay) ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator);
    window->DrawList->AddRectFilled(bb_render.Min, bb_render.Max, col, 0.0f);

    return held;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movss %xmm3, -0x30(%rbp)
movss %xmm2, -0x3c(%rbp)
movss %xmm1, -0x38(%rbp)
movss %xmm0, -0x34(%rbp)
movq %r8, -0x68(%rbp)
movq %rcx, -0x60(%rbp)
movl %edx, %r13d
movq %rdi, %rbx
leaq 0x683d4(%rip), %rax     # 0xfbcd0
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq 0x1ae0(%rax), %r14
movl 0x1cc(%r14), %r15d
movl %r15d, %eax
orl $0x18, %eax
movl %eax, 0x1cc(%r14)
xorl %r12d, %r12d
movl %esi, -0x54(%rbp)
xorl %edx, %edx
callq 0x524a8
movq %r14, -0x88(%rbp)
movl %r15d, 0x1cc(%r14)
testb %al, %al
je 0x93b8f
movups (%rbx), %xmm0
movaps %xmm0, -0x80(%rbp)
xorps %xmm0, %xmm0
cmpl $0x1, %r13d
movq %rbx, %r14
je 0x9395b
movss -0x3c(%rbp), %xmm1
jmp 0x93963
xorps %xmm1, %xmm1
movss -0x3c(%rbp), %xmm0
movq -0x70(%rbp), %r15
leaq -0x80(%rbp), %rdi
movss (%rdi), %xmm2
movss 0x4(%rdi), %xmm3
subss %xmm1, %xmm2
movss %xmm2, (%rdi)
subss %xmm0, %xmm3
movss %xmm3, 0x4(%rdi)
addss 0x8(%rdi), %xmm1
movss %xmm1, 0x8(%rdi)
addss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
leaq -0x2a(%rbp), %rdx
leaq -0x29(%rbp), %rcx
movl -0x54(%rbp), %ebx
movl %ebx, %esi
movl $0x1800, %r8d           # imm = 0x1800
callq 0x90b6f
cmpl %ebx, 0x1b30(%r15)
je 0x939bf
callq 0x51c22
movb -0x29(%rbp), %al
testb %al, %al
je 0x939dd
xorl %edi, %edi
cmpl $0x1, %r13d
setne %dil
addl $0x3, %edi
callq 0x519ab
movb -0x29(%rbp), %al
jmp 0x939fe
cmpl %ebx, 0x1b1c(%r15)
jne 0x939fe
cmpl %ebx, 0x1b20(%r15)
jne 0x939fe
movss 0x1b28(%r15), %xmm0
ucomiss -0x30(%rbp), %xmm0
jae 0x939c6
movups (%r14), %xmm0
movaps %xmm0, -0x50(%rbp)
testb $0x1, %al
je 0x93b34
cmpl $0x1, %r13d
je 0x93a2d
movss 0x128(%r15), %xmm3
subss 0x1b58(%r15), %xmm3
subss -0x80(%rbp), %xmm3
jmp 0x93a44
movss 0x12c(%r15), %xmm3
subss 0x1b5c(%r15), %xmm3
subss -0x7c(%rbp), %xmm3
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rdx
movss -0x38(%rbp), %xmm8
movss -0x34(%rbp), %xmm9
movss (%rdx), %xmm1
movaps %xmm1, %xmm5
subss %xmm9, %xmm5
movss (%rcx), %xmm2
movaps %xmm2, %xmm6
subss %xmm8, %xmm6
xorps %xmm4, %xmm4
movaps %xmm6, %xmm0
cmpless %xmm4, %xmm0
andnps %xmm6, %xmm0
movaps 0x2153b(%rip), %xmm6    # 0xb4fc0
xorps %xmm5, %xmm6
cmpless %xmm6, %xmm5
movss 0x3d2ef(%rip), %xmm7    # 0xd0d84
andps %xmm5, %xmm7
andnps %xmm6, %xmm5
orps %xmm7, %xmm5
maxss %xmm3, %xmm5
minss %xmm5, %xmm0
ucomiss %xmm4, %xmm0
jne 0x93ab1
jnp 0x93b34
ucomiss %xmm0, %xmm4
addss %xmm0, %xmm1
jbe 0x93ac4
ucomiss %xmm9, %xmm1
jb 0x93ba1
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm0
jbe 0x93ada
subss %xmm0, %xmm2
ucomiss %xmm8, %xmm2
jb 0x93bc0
movss %xmm1, (%rdx)
movss (%rcx), %xmm1
subss %xmm0, %xmm1
movss %xmm1, (%rcx)
testl %r13d, %r13d
je 0x93af4
movaps %xmm0, %xmm1
jmp 0x93afa
xorps %xmm1, %xmm1
movaps %xmm0, %xmm3
movss -0x50(%rbp), %xmm0
addss %xmm3, %xmm0
movss %xmm0, -0x50(%rbp)
movss -0x4c(%rbp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
addss -0x48(%rbp), %xmm3
movss %xmm3, -0x48(%rbp)
addss -0x44(%rbp), %xmm1
movss %xmm1, -0x44(%rbp)
movl %ebx, %edi
callq 0x4618e
movb -0x29(%rbp), %al
movl $0x1d, %edi
testb $0x1, %al
jne 0x93b58
movl $0x1b, %edi
cmpb $0x1, -0x2a(%rbp)
jne 0x93b58
movss 0x1b28(%r15), %xmm0
ucomiss -0x30(%rbp), %xmm0
sbbl $-0x1, %edi
movss 0x21484(%rip), %xmm0    # 0xb4fe4
callq 0x43bca
movq -0x88(%rbp), %rcx
movq 0x2b8(%rcx), %rdi
leaq -0x48(%rbp), %rdx
leaq -0x50(%rbp), %rsi
xorps %xmm0, %xmm0
movl %eax, %ecx
movl $0xf, %r8d
callq 0x785e6
movb -0x29(%rbp), %r12b
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3d799(%rip), %rdi     # 0xd1341
leaq 0x3d469(%rip), %rsi     # 0xd1018
leaq 0x3d7ad(%rip), %rcx     # 0xd1363
movl $0x5ac, %edx            # imm = 0x5AC
callq 0xc140
leaq 0x3d80b(%rip), %rdi     # 0xd13d2
leaq 0x3d44a(%rip), %rsi     # 0xd1018
leaq 0x3d78e(%rip), %rcx     # 0xd1363
movl $0x5ae, %edx            # imm = 0x5AE
callq 0xc140