// File: /workspace/github_cpp_makefile_star2_O3/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 0x646c5(%rip), %rax     # 0xfbcd0
movq (%rax), %r13
movq 0x1ae0(%r13), %r12
movb $0x1, 0x90(%r12)
cmpb $0x0, 0x93(%r12)
je 0x97631
xorl %r15d, %r15d
jmp 0x9795e
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 0x4570a
movl %eax, %ebx
movss 0x1d973(%rip), %xmm0    # 0xb4fd0
movq %r15, -0x68(%rbp)
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x44a23
movss 0xd8(%r12), %xmm4
addss (%r14), %xmm4
movss 0xdc(%r12), %xmm1
addss 0x4(%r14), %xmm1
movaps %xmm4, %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movq 0xd8(%r12), %rax
movq %rax, -0x48(%rbp)
movlps %xmm2, -0x40(%rbp)
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm0
xorps %xmm2, %xmm2
jbe 0x976bd
movss 0x15b0(%r13), %xmm2
addss %xmm0, %xmm2
movaps %xmm0, -0x90(%rbp)
addss %xmm4, %xmm2
addss %xmm3, %xmm1
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
leaq -0xb0(%rbp), %rdi
movq %rax, (%rdi)
movlps %xmm2, 0x8(%rdi)
movss 0x159c(%r13), %xmm0
callq 0x559be
xorl %r15d, %r15d
leaq -0x48(%rbp), %rdi
movl %ebx, %r14d
movl %ebx, %esi
xorl %edx, %edx
callq 0x524a8
testb %al, %al
je 0x9795e
movq 0x10(%rbp), %rdi
testq %rdi, %rdi
je 0x9772d
cmpl $0x4, -0x2c(%rbp)
jne 0x97751
cmpb $0x25, (%rdi)
jne 0x97726
cmpb $0x64, 0x1(%rdi)
jne 0x97726
cmpb $0x0, 0x2(%rdi)
je 0x97751
callq 0x9611c
jmp 0x9774b
movl -0x2c(%rbp), %eax
cmpl $0xa, %eax
jae 0x97973
movl %eax, %eax
shlq $0x5, %rax
leaq 0x5f2ca(%rip), %rcx     # 0xf6a10
movq 0x10(%rax,%rcx), %rax
movq %rax, -0x38(%rbp)
jmp 0x97755
movq %rdi, -0x38(%rbp)
leaq -0x48(%rbp), %rdi
movl %r14d, %esi
callq 0x4632f
testb %al, %al
je 0x9776f
cmpb $0x0, 0x420(%r13)
jne 0x97781
cmpl %r14d, 0x1ca0(%r13)
je 0x97781
cmpl %r14d, 0x1cac(%r13)
jne 0x977a7
movl %r14d, %edi
movq %r12, %rsi
callq 0x4603f
movl %r14d, %edi
movq %r12, %rsi
callq 0x57c70
movq %r12, %rdi
callq 0x4726c
orb $0xc, 0x1b44(%r13)
movl $0x9, %edi
cmpl %r14d, 0x1b30(%r13)
je 0x977c5
xorl %edi, %edi
cmpl %r14d, 0x1b1c(%r13)
sete %dil
addl $0x7, %edi
movss 0x1d817(%rip), %xmm0    # 0xb4fe4
callq 0x43bca
movl %eax, %r15d
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x4521b
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movss 0x15a0(%r13), %xmm2
movl %r15d, %edi
movl $0x1, %esi
callq 0x44f69
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 -0x38(%rbp)
callq 0x96a69
addq $0x20, %rsp
movl %eax, %r15d
testb %al, %al
je 0x97856
movl %r14d, %edi
callq 0x4618e
movss -0x54(%rbp), %xmm0
ucomiss -0x5c(%rbp), %xmm0
jbe 0x978aa
leaq -0x58(%rbp), %rbx
movq 0x2b8(%r12), %r12
xorl %edi, %edi
cmpl %r14d, 0x1b30(%r13)
sete %dil
addl $0x13, %edi
movss 0x1d75f(%rip), %xmm0    # 0xb4fe4
callq 0x43bca
movss 0x15dc(%r13), %xmm0
leaq -0x60(%rbp), %rsi
movq %r12, %rdi
movq %rbx, %rdx
movl %eax, %ecx
movl $0xf, %r8d
callq 0x785e6
leaq -0xf0(%rbp), %rbx
movq %rbx, %rdi
movl $0x40, %esi
movl -0x2c(%rbp), %edx
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %r8
callq 0x94c8a
cltq
leaq (%rax,%rbp), %rcx
addq $-0xf0, %rcx
movss -0x48(%rbp), %xmm0
movss -0x44(%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 -0x40(%rbp), %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
pushq $0x0
callq 0x44ac2
addq $0x10, %rsp
xorps %xmm0, %xmm0
movaps -0x90(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x9795e
movss -0x40(%rbp), %xmm0
addss 0x15b0(%r13), %xmm0
movss -0x44(%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 0x44476
movl %r15d, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1da7a(%rip), %rdi     # 0xb53f4
leaq 0x39697(%rip), %rsi     # 0xd1018
leaq 0x39b85(%rip), %rcx     # 0xd150d
movl $0x70d, %edx            # imm = 0x70D
callq 0xc140