// File: /workspace/github_cpp_makefile_star2_O1/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, -0x34(%rbp)
movss %xmm0, -0x38(%rbp)
movq %r8, -0x68(%rbp)
movq %rcx, -0x60(%rbp)
movl %edx, %r13d
movq %rdi, %rbx
leaq 0x6873a(%rip), %rax     # 0xfdcd0
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 0x5346f
movq %r14, -0x88(%rbp)
movl %r15d, 0x1cc(%r14)
testb %al, %al
je 0x95822
movups (%rbx), %xmm0
movaps %xmm0, -0x80(%rbp)
xorps %xmm0, %xmm0
cmpl $0x1, %r13d
movq %rbx, %r14
je 0x955f5
movss -0x3c(%rbp), %xmm1
jmp 0x955fd
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 0x92870
cmpl %ebx, 0x1b30(%r15)
je 0x95659
callq 0x52c1e
cmpb $0x0, -0x29(%rbp)
je 0x95673
xorl %edi, %edi
cmpl $0x1, %r13d
setne %dil
addl $0x3, %edi
callq 0x52999
jmp 0x95694
cmpl %ebx, 0x1b1c(%r15)
jne 0x95694
cmpl %ebx, 0x1b20(%r15)
jne 0x95694
movss 0x1b28(%r15), %xmm0
ucomiss -0x30(%rbp), %xmm0
jae 0x9565f
movups (%r14), %xmm0
movaps %xmm0, -0x50(%rbp)
cmpb $0x1, -0x29(%rbp)
jne 0x957c5
cmpl $0x1, %r13d
je 0x956c5
movss 0x128(%r15), %xmm3
subss 0x1b58(%r15), %xmm3
subss -0x80(%rbp), %xmm3
jmp 0x956dc
movss 0x12c(%r15), %xmm3
subss 0x1b5c(%r15), %xmm3
subss -0x7c(%rbp), %xmm3
movq -0x60(%rbp), %rax
movss (%rax), %xmm1
movaps %xmm1, %xmm5
subss -0x38(%rbp), %xmm5
movq -0x68(%rbp), %rax
movss (%rax), %xmm2
movaps %xmm2, %xmm6
subss -0x34(%rbp), %xmm6
xorps %xmm4, %xmm4
movaps %xmm6, %xmm0
cmpless %xmm4, %xmm0
andnps %xmm6, %xmm0
movaps 0x218af(%rip), %xmm6    # 0xb6fc0
xorps %xmm5, %xmm6
cmpless %xmm6, %xmm5
movss 0x3d78f(%rip), %xmm7    # 0xd2eb0
andps %xmm5, %xmm7
andnps %xmm6, %xmm5
orps %xmm7, %xmm5
maxss %xmm3, %xmm5
minss %xmm5, %xmm0
ucomiss %xmm4, %xmm0
jne 0x9573d
jnp 0x957c5
ucomiss %xmm0, %xmm4
addss %xmm0, %xmm1
jbe 0x95750
ucomiss -0x38(%rbp), %xmm1
jb 0x95834
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm0
jbe 0x95766
subss %xmm0, %xmm2
ucomiss -0x34(%rbp), %xmm2
jb 0x95853
movq -0x60(%rbp), %rax
movss %xmm1, (%rax)
movq -0x68(%rbp), %rax
movss (%rax), %xmm1
subss %xmm0, %xmm1
movss %xmm1, (%rax)
testl %r13d, %r13d
je 0x95788
movaps %xmm0, %xmm1
jmp 0x9578e
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 0x46ca4
movl $0x1d, %edi
cmpb $0x0, -0x29(%rbp)
jne 0x957eb
movl $0x1b, %edi
cmpb $0x1, -0x2a(%rbp)
jne 0x957eb
movss 0x1b28(%r15), %xmm0
ucomiss -0x30(%rbp), %xmm0
sbbl $-0x1, %edi
movss 0x217f1(%rip), %xmm0    # 0xb6fe4
callq 0x445bd
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 0x79d4a
movb -0x29(%rbp), %r12b
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3dc36(%rip), %rdi     # 0xd3471
leaq 0x3d906(%rip), %rsi     # 0xd3148
leaq 0x3dc4a(%rip), %rcx     # 0xd3493
movl $0x5ac, %edx            # imm = 0x5AC
callq 0xc140
leaq 0x3dca8(%rip), %rdi     # 0xd3502
leaq 0x3d8e7(%rip), %rsi     # 0xd3148
leaq 0x3dc2b(%rip), %rcx     # 0xd3493
movl $0x5ae, %edx            # imm = 0x5AE
callq 0xc140