// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::VSliderScalar(char const*, ImVec2 const&, int, void*, void const*, void const*, char const*, int)
bool ImGui::VSliderScalar(const char* label, const ImVec2& size, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    const ImGuiStyle& style = g.Style;
    const ImGuiID id = window->GetID(label);

    const ImVec2 label_size = CalcTextSize(label, NULL, true);
    const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + size);
    const ImRect bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f));

    ItemSize(bb, style.FramePadding.y);
    if (!ItemAdd(frame_bb, id))
        return false;

    // Default format string when passing NULL
    if (format == NULL)
        format = DataTypeGetInfo(data_type)->PrintFmt;
    else if (data_type == ImGuiDataType_S32 && strcmp(format, "%d") != 0) // (FIXME-LEGACY: Patch old "%.0f" format string to use "%d", read function more details.)
        format = PatchFormatStringFloatToInt(format);

    const bool hovered = ItemHoverable(frame_bb, id);
    if ((hovered && g.IO.MouseClicked[0]) || g.NavActivateId == id || g.NavInputId == id)
    {
        SetActiveID(id, window);
        SetFocusID(id, window);
        FocusWindow(window);
        g.ActiveIdUsingNavDirMask |= (1 << ImGuiDir_Up) | (1 << ImGuiDir_Down);
    }

    // Draw frame
    const ImU32 frame_col = GetColorU32(g.ActiveId == id ? ImGuiCol_FrameBgActive : g.HoveredId == id ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg);
    RenderNavHighlight(frame_bb, id);
    RenderFrame(frame_bb.Min, frame_bb.Max, frame_col, true, g.Style.FrameRounding);

    // Slider behavior
    ImRect grab_bb;
    const bool value_changed = SliderBehavior(frame_bb, id, data_type, p_data, p_min, p_max, format, flags | ImGuiSliderFlags_Vertical, &grab_bb);
    if (value_changed)
        MarkItemEdited(id);

    // Render grab
    if (grab_bb.Max.y > grab_bb.Min.y)
        window->DrawList->AddRectFilled(grab_bb.Min, grab_bb.Max, GetColorU32(g.ActiveId == id ? ImGuiCol_SliderGrabActive : ImGuiCol_SliderGrab), style.GrabRounding);

    // Display value using user-provided display format so user can add prefix/suffix/decorations to the value.
    // For the vertical slider we allow centered text to overlap the frame padding
    char value_buf[64];
    const char* value_buf_end = value_buf + DataTypeFormatString(value_buf, IM_ARRAYSIZE(value_buf), data_type, p_data, format);
    RenderTextClipped(ImVec2(frame_bb.Min.x, frame_bb.Min.y + style.FramePadding.y), frame_bb.Max, value_buf, value_buf_end, NULL, ImVec2(0.5f, 0.0f));
    if (label_size.x > 0.0f)
        RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);

    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
leaq 0x64958(%rip), %rax     # 0xfdcd0
movq (%rax), %r13
movq 0x1ae0(%r13), %r12
movb $0x1, 0x90(%r12)
cmpb $0x0, 0x93(%r12)
je 0x9939e
xorl %r15d, %r15d
jmp 0x996d1
movq %rsi, %r14
movq %rdi, %r15
movq %r8, -0x70(%rbp)
movq %r9, -0x78(%rbp)
movl %edx, -0x2c(%rbp)
movq %rcx, -0x50(%rbp)
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x46258
movl %eax, %ebx
movss 0x1dc06(%rip), %xmm0    # 0xb6fd0
movq %r15, -0x68(%rbp)
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x4548d
movss 0xd8(%r12), %xmm2
movss 0xdc(%r12), %xmm1
addss (%r14), %xmm2
addss 0x4(%r14), %xmm1
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movq 0xd8(%r12), %rax
movq %rax, -0x40(%rbp)
movlps %xmm2, -0x38(%rbp)
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
xorps %xmm1, %xmm1
jbe 0x99427
movss 0x15b0(%r13), %xmm1
addss %xmm0, %xmm1
movaps %xmm0, -0x90(%rbp)
leaq -0x40(%rbp), %r14
addss 0x8(%r14), %xmm1
addss 0xc(%r14), %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0xb0(%rbp), %rdi
movq %rax, (%rdi)
movlps %xmm1, 0x8(%rdi)
movss 0x159c(%r13), %xmm0
callq 0x56a82
xorl %r15d, %r15d
movq %r14, %rdi
movl %ebx, %r14d
movl %ebx, %esi
xorl %edx, %edx
callq 0x5346f
testb %al, %al
je 0x996d1
movq 0x10(%rbp), %rbx
testq %rbx, %rbx
je 0x994a6
cmpl $0x4, -0x2c(%rbp)
jne 0x994c4
leaq 0x24ff5(%rip), %rsi     # 0xbe482
movq %rbx, %rdi
callq 0xc720
testl %eax, %eax
je 0x994c4
movq %rbx, %rdi
callq 0x97ded
movq %rax, %rbx
jmp 0x994c4
movl -0x2c(%rbp), %eax
cmpl $0xa, %eax
jae 0x996e6
movl %eax, %eax
shlq $0x5, %rax
leaq 0x5f551(%rip), %rcx     # 0xf8a10
movq 0x10(%rax,%rcx), %rbx
leaq -0x40(%rbp), %rdi
movl %r14d, %esi
callq 0x46e45
testb %al, %al
je 0x994de
cmpb $0x0, 0x420(%r13)
jne 0x994f0
cmpl %r14d, 0x1ca0(%r13)
je 0x994f0
cmpl %r14d, 0x1cac(%r13)
jne 0x99516
movl %r14d, %edi
movq %r12, %rsi
callq 0x46b95
movl %r14d, %edi
movq %r12, %rsi
callq 0x58de3
movq %r12, %rdi
callq 0x47d9b
orb $0xc, 0x1b44(%r13)
movq %rbx, -0x48(%rbp)
movl $0x9, %edi
cmpl %r14d, 0x1b30(%r13)
je 0x99538
xorl %edi, %edi
cmpl %r14d, 0x1b1c(%r13)
sete %dil
addl $0x7, %edi
movss 0x1daa4(%rip), %xmm0    # 0xb6fe4
callq 0x445bd
movl %eax, %r15d
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x45ca4
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movss 0x15a0(%r13), %xmm2
movl %r15d, %edi
movl $0x1, %esi
callq 0x459e5
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rax
movaps %xmm0, (%rax)
movl 0x18(%rbp), %ecx
movq %rcx, %r10
orl $0x100000, %r10d        # imm = 0x100000
subq $0x8, %rsp
movq %rbx, %rdi
movl %r14d, %esi
movl -0x2c(%rbp), %edx
movq -0x50(%rbp), %rcx
movq -0x70(%rbp), %r8
movq -0x78(%rbp), %r9
pushq %rax
pushq %r10
pushq -0x48(%rbp)
callq 0x987b4
addq $0x20, %rsp
movl %eax, %r15d
testb %al, %al
je 0x995c9
movl %r14d, %edi
callq 0x46ca4
movss -0x54(%rbp), %xmm0
ucomiss -0x5c(%rbp), %xmm0
jbe 0x9961d
leaq -0x58(%rbp), %rbx
movq 0x2b8(%r12), %r12
xorl %edi, %edi
cmpl %r14d, 0x1b30(%r13)
sete %dil
addl $0x13, %edi
movss 0x1d9ec(%rip), %xmm0    # 0xb6fe4
callq 0x445bd
movss 0x15dc(%r13), %xmm0
leaq -0x60(%rbp), %rsi
movq %r12, %rdi
movq %rbx, %rdx
movl %eax, %ecx
movl $0xf, %r8d
callq 0x79d4a
leaq -0xf0(%rbp), %rbx
movq %rbx, %rdi
movl $0x40, %esi
movl -0x2c(%rbp), %edx
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %r8
callq 0x968ed
cltq
leaq (%rax,%rbp), %rcx
addq $-0xf0, %rcx
movss -0x40(%rbp), %xmm0
movss -0x3c(%rbp), %xmm1
addss 0x159c(%r13), %xmm1
leaq -0xa0(%rbp), %rdi
movss %xmm0, (%rdi)
movss %xmm1, 0x4(%rdi)
leaq -0x98(%rbp), %r9
movq $0x3f000000, (%r9)      # imm = 0x3F000000
subq $0x8, %rsp
leaq -0x38(%rbp), %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
pushq $0x0
callq 0x45527
addq $0x10, %rsp
xorps %xmm0, %xmm0
movaps -0x90(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x996d1
movss -0x38(%rbp), %xmm0
addss 0x15b0(%r13), %xmm0
movss -0x3c(%rbp), %xmm1
addss 0x159c(%r13), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movq -0x68(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x44ec4
movl %r15d, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1dd07(%rip), %rdi     # 0xb73f4
leaq 0x39a54(%rip), %rsi     # 0xd3148
leaq 0x39f42(%rip), %rcx     # 0xd363d
movl $0x70d, %edx            # imm = 0x70D
callq 0xc140