// File: /workspace/github_cpp_makefile_star2_O2/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::SliderFloat(char const*, float*, float, float, char const*, float)
bool ImGui::SliderFloat(const char* label, 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 float w = CalcItemWidth();

    const ImVec2 label_size = CalcTextSize(label, NULL, true);
    const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y) + style.FramePadding*2.0f);
    const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f));

    // NB- we don't call ItemSize() yet because we may turn into a text edit box below
    if (!ItemAdd(total_bb, &id))
    {
        ItemSize(total_bb, style.FramePadding.y);
        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);

    // Tabbing or CTRL-clicking on Slider turns it into an input box
    bool start_text_input = false;
    const bool tab_focus_requested = FocusableItemRegister(window, g.ActiveId == id);
    if (tab_focus_requested || (hovered && g.IO.MouseClicked[0]))
    {
        SetActiveID(id, window);
        FocusWindow(window);

        if (tab_focus_requested || g.IO.KeyCtrl)
        {
            start_text_input = true;
            g.ScalarAsInputTextId = 0;
        }
    }
    if (start_text_input || (g.ActiveId == id && g.ScalarAsInputTextId == id))
        return InputScalarAsWidgetReplacement(frame_bb, label, ImGuiDataType_Float, v, id, decimal_precision);

    ItemSize(total_bb, style.FramePadding.y);

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

    // Display value using user-provided display format so user can add prefix/suffix/decorations to the value.
    char value_buf[64];
    const char* value_buf_end = value_buf + ImFormatString(value_buf, IM_ARRAYSIZE(value_buf), display_format, *v);
    RenderTextClipped(frame_bb.Min, frame_bb.Max, value_buf, value_buf_end, NULL, ImGuiAlign_Center|ImGuiAlign_VCenter);

    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
movq 0x39cc5(%rip), %rbx     # 0x50480
movq 0x1758(%rbx), %r15
movb $0x1, 0x72(%r15)
cmpb $0x0, 0x74(%r15)
jne 0x16983
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movss %xmm0, -0x30(%rbp)
movss %xmm1, -0x34(%rbp)
movss %xmm2, -0x38(%rbp)
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x9858
movl %eax, -0x2c(%rbp)
callq 0x1137a
movss %xmm0, -0x70(%rbp)
pushq $0x1
popq %rdx
movss 0x1fb8d(%rip), %xmm0    # 0x3639c
movq %r14, %rdi
xorl %esi, %esi
callq 0xc6e3
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
movss -0x70(%rbp), %xmm2
addss 0xa8(%r15), %xmm2
addss 0xac(%r15), %xmm1
movss 0x1408(%rbx), %xmm3
movss 0x140c(%rbx), %xmm4
addss %xmm3, %xmm3
addss %xmm4, %xmm4
addss %xmm2, %xmm3
addss %xmm1, %xmm4
movaps %xmm3, %xmm1
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movq 0xa8(%r15), %rax
movq %rax, -0x48(%rbp)
movlps %xmm1, -0x40(%rbp)
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
xorps %xmm1, %xmm1
jbe 0x16883
movss 0x141c(%rbx), %xmm1
addss %xmm0, %xmm1
movaps %xmm0, -0x70(%rbp)
movaps %xmm3, -0xa0(%rbp)
addss %xmm3, %xmm1
addss %xmm2, %xmm4
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
leaq -0x90(%rbp), %rdi
movq %rax, -0x80(%rbp)
movq %rax, (%rdi)
movlps %xmm1, 0x8(%rdi)
leaq -0x2c(%rbp), %rsi
callq 0x9b28
testb %al, %al
je 0x1696f
movq %r13, -0x50(%rbp)
movq %r14, -0x58(%rbp)
movl -0x2c(%rbp), %esi
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq 0x9d62
movl %eax, %r14d
movl -0x2c(%rbp), %r13d
testb %al, %al
je 0x168e4
movl %r13d, 0x1788(%rbx)
testq %r12, %r12
leaq 0x20f90(%rip), %rdi     # 0x3787e
cmovneq %r12, %rdi
pushq $0x3
popq %rsi
movq %rdi, -0x78(%rbp)
callq 0x16097
movl %eax, %r12d
xorl %esi, %esi
cmpl %r13d, 0x1790(%rbx)
sete %sil
pushq $0x1
popq %rdx
movq %r15, %rdi
callq 0x9df1
testb %al, %al
je 0x1699b
movl -0x2c(%rbp), %eax
movq 0x39b59(%rip), %rcx     # 0x50480
movl %eax, 0x1790(%rcx)
movw $0x1, 0x1799(%rcx)
movq %r15, 0x17a0(%rcx)
movq %r15, %rdi
callq 0xb5a3
movq -0x58(%rbp), %r13
andl $0x0, 0x27a0(%rbx)
movl -0x2c(%rbp), %r8d
leaq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
movq %r13, %rsi
movq -0x50(%rbp), %rcx
movl %r12d, %r9d
callq 0x13e17
movl %eax, %r15d
jmp 0x16986
movss 0x140c(%rbx), %xmm0
leaq -0x90(%rbp), %rdi
callq 0x9af8
xorl %r15d, %r15d
movl %r15d, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %r14b, %r14b
movq -0x58(%rbp), %r13
je 0x169e2
cmpb $0x1, 0x354(%rbx)
jne 0x169e2
movl -0x2c(%rbp), %eax
movq 0x39ac9(%rip), %rcx     # 0x50480
movl %eax, 0x1790(%rcx)
movw $0x1, 0x1799(%rcx)
movq %r15, 0x17a0(%rcx)
movq %r15, %rdi
callq 0xb5a3
cmpb $0x0, 0x105(%rbx)
jne 0x16949
movl 0x1790(%rbx), %r8d
cmpl -0x2c(%rbp), %r8d
jne 0x169fc
cmpl %r8d, 0x27a0(%rbx)
je 0x16954
movss 0x140c(%rbx), %xmm0
leaq -0x90(%rbp), %rdi
callq 0x9af8
movl -0x2c(%rbp), %esi
leaq -0x48(%rbp), %rdi
pushq $0x1
popq %r8
movq -0x50(%rbp), %r14
movq %r14, %rdx
movss -0x30(%rbp), %xmm0
movss -0x34(%rbp), %xmm1
movss -0x38(%rbp), %xmm2
movl %r12d, %ecx
callq 0x16193
movl %eax, %r15d
cvtss2sd (%r14), %xmm0
leaq -0xe0(%rbp), %r12
pushq $0x40
popq %rsi
movq %r12, %rdi
movq -0x78(%rbp), %rdx
movb $0x1, %al
callq 0x83b1
cltq
leaq (%rax,%rbp), %rcx
addq $-0xe0, %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
pushq $0x12
popq %r9
leaq -0x48(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xc49f
xorps %xmm0, %xmm0
movaps -0x70(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x16986
movq -0x80(%rbp), %rax
shrq $0x20, %rax
movaps -0xa0(%rbp), %xmm0
addss 0x141c(%rbx), %xmm0
movd %eax, %xmm1
addss 0x140c(%rbx), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
pushq $0x1
popq %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0xc16e
jmp 0x16986