// File: donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::VSliderFloat(char const*, ImVec2 const&, float*, float, float, char const*, float)
bool ImGui::VSliderFloat(const char* label, const ImVec2& size, float* v, float v_min, float v_max, const char* display_format, float power)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiState& 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;

    const bool hovered = IsHovered(frame_bb, id);
    if (hovered)
        g.HoveredId = id;

    if (!display_format)
        display_format = "%.3f";
    int decimal_precision = ParseFormatPrecision(display_format, 3);

    if (hovered && g.IO.MouseClicked[0])
    {
        SetActiveID(id, window);
        FocusWindow(window);
    }

    // Actual slider behavior + render grab
    bool value_changed = SliderBehavior(frame_bb, id, v, v_min, v_max, power, decimal_precision, false);

    // 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];
    char* value_buf_end = value_buf + ImFormatString(value_buf, IM_ARRAYSIZE(value_buf), display_format, *v);
    RenderTextClipped(ImVec2(frame_bb.Min.x, frame_bb.Min.y + style.FramePadding.y), frame_bb.Max, value_buf, value_buf_end, NULL, ImGuiAlign_Center);

    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
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movss %xmm0, -0x24(%rbp)
movss %xmm1, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movss %xmm2, -0x34(%rbp)
callq 0x2e220
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
testb $0x1, 0x74(%rax)
je 0x20c46
movb $0x0, -0x1(%rbp)
jmp 0x20f4d
movq 0x58873(%rip), %rax     # 0x794c0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x13e8, %rax           # imm = 0x13E8
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x118(%rbp)
callq 0xbc60
movq -0x118(%rbp), %rsi
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %edx
movss 0x3a3ea(%rip), %xmm0    # 0x5b07c
callq 0x10930
movlpd %xmm0, -0x5c(%rbp)
movq -0x40(%rbp), %rdi
addq $0xa8, %rdi
movq %rdi, -0x110(%rbp)
movq -0x18(%rbp), %rsi
callq 0xc7e0
movq -0x110(%rbp), %rsi
movlpd %xmm0, -0x74(%rbp)
leaq -0x6c(%rbp), %rdi
leaq -0x74(%rbp), %rdx
callq 0x2eb40
leaq -0x6c(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x6c(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x100(%rbp)
movss -0x5c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x20d0f
movq -0x50(%rbp), %rax
movss 0x34(%rax), %xmm0
addss -0x5c(%rbp), %xmm0
movss %xmm0, -0x11c(%rbp)
jmp 0x20d1c
xorps %xmm0, %xmm0
movss %xmm0, -0x11c(%rbp)
jmp 0x20d1c
movss -0x11c(%rbp), %xmm0
leaq -0x94(%rbp), %rdi
movq %rdi, -0x128(%rbp)
xorps %xmm1, %xmm1
callq 0x2d280
movq -0x100(%rbp), %rdi
movq -0x128(%rbp), %rsi
callq 0xc7e0
movq -0x108(%rbp), %rsi
movlpd %xmm0, -0x8c(%rbp)
leaq -0x84(%rbp), %rdi
leaq -0x8c(%rbp), %rdx
callq 0x2eb40
movq -0x50(%rbp), %rax
movss 0x24(%rax), %xmm0
leaq -0x84(%rbp), %rdi
callq 0xc060
leaq -0x6c(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0xc0a0
testb $0x1, %al
jne 0x20d9e
movb $0x0, -0x1(%rbp)
jmp 0x20f4d
movl -0x54(%rbp), %esi
leaq -0x6c(%rbp), %rdi
xorl %edx, %edx
callq 0xc3f0
andb $0x1, %al
movb %al, -0x95(%rbp)
testb $0x1, -0x95(%rbp)
je 0x20dca
movl -0x54(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x1788(%rax)
cmpq $0x0, -0x30(%rbp)
jne 0x20ddc
leaq 0x3b702(%rip), %rax     # 0x5c4da
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl $0x3, %esi
callq 0x1fbf0
movl %eax, -0x9c(%rbp)
testb $0x1, -0x95(%rbp)
je 0x20e1b
movq -0x48(%rbp), %rax
testb $0x1, 0x354(%rax)
je 0x20e1b
movl -0x54(%rbp), %edi
movq -0x40(%rbp), %rsi
callq 0xbe60
movq -0x40(%rbp), %rdi
callq 0xef00
movl -0x54(%rbp), %esi
movq -0x20(%rbp), %rdx
movss -0x24(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movss -0x34(%rbp), %xmm2
movl -0x9c(%rbp), %ecx
leaq -0x6c(%rbp), %rdi
xorl %r8d, %r8d
callq 0x1fdd0
andb $0x1, %al
movb %al, -0x9d(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0xe0(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movl $0x40, %esi
movb $0x1, %al
callq 0x95a0
movl %eax, %ecx
movq -0x130(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0xe8(%rbp)
movss -0x6c(%rbp), %xmm0
movss -0x68(%rbp), %xmm1
movq -0x50(%rbp), %rax
addss 0x24(%rax), %xmm1
leaq -0xf0(%rbp), %rdi
callq 0x2d280
leaq -0x6c(%rbp), %rsi
addq $0x8, %rsi
leaq -0xe0(%rbp), %rdx
movq -0xe8(%rbp), %rcx
leaq -0xf0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %r8d
movl $0x2, %r9d
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x105f0
movss -0x5c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x20f42
movss -0x68(%rbp), %xmm1
movss -0x64(%rbp), %xmm0
movq -0x50(%rbp), %rax
movss 0x24(%rax), %xmm2
movss 0x34(%rax), %xmm3
addss %xmm3, %xmm0
addss %xmm2, %xmm1
leaq -0xf8(%rbp), %rdi
callq 0x2d280
movq -0x10(%rbp), %rdi
movsd -0xf8(%rbp), %xmm0
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x10100
movb -0x9d(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopl (%rax,%rax)