// File: /workspace/github_cpp_makefile_star2_O2/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 0x6719d(%rip), %rax     # 0xe3ce0
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 0x40ea5
movq %r14, -0x88(%rbp)
movl %r15d, 0x1cc(%r14)
testb %al, %al
je 0x7cdd6
movups (%rbx), %xmm0
movaps %xmm0, -0x80(%rbp)
xorps %xmm0, %xmm0
cmpl $0x1, %r13d
movq %rbx, %r14
je 0x7cba2
movss -0x3c(%rbp), %xmm1
jmp 0x7cbaa
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 0x79dde
cmpl %ebx, 0x1b30(%r15)
je 0x7cc06
callq 0x406fd
movb -0x29(%rbp), %al
testb %al, %al
je 0x7cc24
xorl %edi, %edi
cmpl $0x1, %r13d
setne %dil
addl $0x3, %edi
callq 0x404f0
movb -0x29(%rbp), %al
jmp 0x7cc45
cmpl %ebx, 0x1b1c(%r15)
jne 0x7cc45
cmpl %ebx, 0x1b20(%r15)
jne 0x7cc45
movss 0x1b28(%r15), %xmm0
ucomiss -0x30(%rbp), %xmm0
jae 0x7cc0d
movups (%r14), %xmm0
movaps %xmm0, -0x50(%rbp)
testb $0x1, %al
je 0x7cd7b
cmpl $0x1, %r13d
je 0x7cc74
movss 0x128(%r15), %xmm3
subss 0x1b58(%r15), %xmm3
subss -0x80(%rbp), %xmm3
jmp 0x7cc8b
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 0x1f314(%rip), %xmm6    # 0x9bfe0
xorps %xmm5, %xmm6
cmpless %xmm6, %xmm5
movss 0x3b410(%rip), %xmm7    # 0xb80ec
andps %xmm5, %xmm7
andnps %xmm6, %xmm5
orps %xmm7, %xmm5
maxss %xmm3, %xmm5
minss %xmm5, %xmm0
ucomiss %xmm4, %xmm0
jne 0x7ccf8
jnp 0x7cd7b
ucomiss %xmm0, %xmm4
addss %xmm0, %xmm1
jbe 0x7cd0b
ucomiss %xmm9, %xmm1
jb 0x7cde8
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm0
jbe 0x7cd21
subss %xmm0, %xmm2
ucomiss %xmm8, %xmm2
jb 0x7ce07
movss %xmm1, (%rdx)
movss (%rcx), %xmm1
subss %xmm0, %xmm1
movss %xmm1, (%rcx)
testl %r13d, %r13d
je 0x7cd3b
movaps %xmm0, %xmm1
jmp 0x7cd41
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 0x3749e
movb -0x29(%rbp), %al
testb $0x1, %al
je 0x7cd83
pushq $0x1d
jmp 0x7cda0
cmpb $0x1, -0x2a(%rbp)
jne 0x7cd9e
movss 0x1b28(%r15), %xmm0
ucomiss -0x30(%rbp), %xmm0
pushq $0x1b
popq %rdi
sbbl $-0x1, %edi
jmp 0x7cda1
pushq $0x1b
popq %rdi
movss 0x1f24f(%rip), %xmm0    # 0x9bff8
callq 0x35d33
movq -0x88(%rbp), %rcx
movq 0x2b8(%rcx), %rdi
leaq -0x48(%rbp), %rdx
leaq -0x50(%rbp), %rsi
pushq $0xf
popq %r8
xorps %xmm0, %xmm0
movl %eax, %ecx
callq 0x64020
movb -0x29(%rbp), %r12b
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3b8c2(%rip), %rdi     # 0xb86b1
leaq 0x3b592(%rip), %rsi     # 0xb8388
leaq 0x3b8d6(%rip), %rcx     # 0xb86d3
movl $0x5ac, %edx            # imm = 0x5AC
callq 0xc140
leaq 0x3b934(%rip), %rdi     # 0xb8742
leaq 0x3b573(%rip), %rsi     # 0xb8388
leaq 0x3b8b7(%rip), %rcx     # 0xb86d3
movl $0x5ae, %edx            # imm = 0x5AE
callq 0xc140