// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::DragFloat(char const*, float*, float, float, float, char const*, float)
bool ImGui::DragFloat(const char* label, float* v, float v_speed, 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 inner_bb(frame_bb.Min + style.FramePadding, frame_bb.Max - style.FramePadding);
    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 Drag 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] | g.IO.MouseDoubleClicked[0])))
    {
        SetActiveID(id, window);
        FocusWindow(window);

        if (tab_focus_requested || g.IO.KeyCtrl || g.IO.MouseDoubleClicked[0])
        {
            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);

    // Actual drag behavior
    ItemSize(total_bb, style.FramePadding.y);
    const bool value_changed = DragBehavior(frame_bb, id, v, v_speed, v_min, v_max, decimal_precision, power);

    // 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, inner_bb.Min.y), label);

    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq 0x38fd1(%rip), %r13     # 0x55490
movq 0x1758(%r13), %r15
movb $0x1, 0x72(%r15)
cmpb $0x0, 0x74(%r15)
jne 0x1c6ce
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movss %xmm0, -0x54(%rbp)
movss %xmm1, -0x58(%rbp)
movss %xmm2, -0x5c(%rbp)
movss %xmm3, -0x60(%rbp)
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xa872
movl %eax, -0x2c(%rbp)
callq 0x14bda
movss %xmm0, -0x80(%rbp)
movss 0x20e77(%rip), %xmm0    # 0x3d38c
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xe720
movaps %xmm0, %xmm3
movss -0x80(%rbp), %xmm5
addss 0xa8(%r15), %xmm5
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
addss 0xac(%r15), %xmm3
movss 0x1408(%r13), %xmm1
movss 0x140c(%r13), %xmm4
addss %xmm1, %xmm1
movaps %xmm4, %xmm2
addss %xmm4, %xmm2
addss %xmm5, %xmm1
addss %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movq 0xa8(%r15), %rax
movq %rax, -0x40(%rbp)
movlps %xmm1, -0x38(%rbp)
movss -0x38(%rbp), %xmm5
movss -0x34(%rbp), %xmm3
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
xorps %xmm1, %xmm1
jbe 0x1c59b
movss 0x141c(%r13), %xmm1
addss %xmm0, %xmm1
movaps %xmm0, -0x80(%rbp)
addss -0x3c(%rbp), %xmm4
movaps %xmm4, -0xb0(%rbp)
movaps %xmm5, -0xa0(%rbp)
addss %xmm5, %xmm1
addss %xmm2, %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movq -0x40(%rbp), %rax
leaq -0x50(%rbp), %rdi
movq %rax, (%rdi)
movlps %xmm1, 0x8(%rdi)
leaq -0x2c(%rbp), %rsi
callq 0xac09
testb %al, %al
je 0x1c69f
movq %r14, -0x70(%rbp)
movq %rbx, -0x68(%rbp)
movl -0x2c(%rbp), %ebx
leaq -0x40(%rbp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0xae36
movl %eax, %r14d
testb %al, %al
je 0x1c603
movl %ebx, 0x1788(%r13)
testq %r12, %r12
leaq 0x22289(%rip), %rdi     # 0x3e896
cmovneq %r12, %rdi
movq %rdi, -0x88(%rbp)
movl $0x3, %esi
callq 0x1a98f
movl %eax, %r12d
xorl %esi, %esi
cmpl %ebx, 0x1790(%r13)
sete %sil
movq %r15, %rdi
movl $0x1, %edx
callq 0xaef0
testb %al, %al
je 0x1c6e6
movl -0x2c(%rbp), %eax
movq 0x38e3f(%rip), %rcx     # 0x55490
movl %eax, 0x1790(%rcx)
movw $0x1, 0x1799(%rcx)
movq %r15, 0x17a0(%rcx)
movq %r15, %rdi
callq 0xd00c
movq -0x70(%rbp), %r14
movl $0x0, 0x27a0(%r13)
movl -0x2c(%rbp), %r8d
leaq -0x40(%rbp), %rdi
movq -0x68(%rbp), %rsi
movl $0x1, %edx
movq %r14, %rcx
movl %r12d, %r9d
callq 0x184a3
movl %eax, %r15d
jmp 0x1c6d1
movss -0x48(%rbp), %xmm1
movss -0x44(%rbp), %xmm2
subss -0x50(%rbp), %xmm1
subss -0x4c(%rbp), %xmm2
movss 0x140c(%r13), %xmm0
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0xf0(%rbp), %rdi
movlps %xmm1, (%rdi)
callq 0xaab7
xorl %r15d, %r15d
movl %r15d, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %r14b, %r14b
movq -0x70(%rbp), %r14
je 0x1c74d
movl %eax, %ebx
movb 0x398(%r13), %al
orb 0x354(%r13), %al
je 0x1c74d
movl -0x2c(%rbp), %eax
movq 0x38d85(%rip), %rcx     # 0x55490
movl %eax, 0x1790(%rcx)
movw $0x1, 0x1799(%rcx)
movq %r15, 0x17a0(%rcx)
movq %r15, %rdi
callq 0xd00c
testb %bl, %bl
jne 0x1c673
cmpb $0x0, 0x105(%r13)
jne 0x1c673
cmpb $0x0, 0x398(%r13)
jne 0x1c673
movl -0x2c(%rbp), %eax
cmpl %eax, 0x1790(%r13)
jne 0x1c766
cmpl %eax, 0x27a0(%r13)
je 0x1c67e
movss -0x48(%rbp), %xmm1
movss -0x44(%rbp), %xmm2
subss -0x50(%rbp), %xmm1
subss -0x4c(%rbp), %xmm2
movss 0x140c(%r13), %xmm0
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0xf0(%rbp), %rdi
movlps %xmm1, (%rdi)
callq 0xaab7
movl -0x2c(%rbp), %esi
movq %r14, %rbx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rdx
movss -0x54(%rbp), %xmm0
movss -0x58(%rbp), %xmm1
movss -0x5c(%rbp), %xmm2
movl %r12d, %ecx
movss -0x60(%rbp), %xmm3
callq 0x1c177
movl %eax, %r15d
xorps %xmm0, %xmm0
cvtss2sd (%rbx), %xmm0
leaq -0xf0(%rbp), %rbx
movq %rbx, %rdi
movl $0x40, %esi
movq -0x88(%rbp), %rdx
movb $0x1, %al
callq 0x86d8
cltq
leaq (%rax,%rbp), %rcx
addq $-0xf0, %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
leaq -0x38(%rbp), %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
movl $0x12, %r9d
callq 0xe466
xorps %xmm0, %xmm0
movaps -0x80(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x1c6d1
movaps -0xa0(%rbp), %xmm0
addss 0x141c(%r13), %xmm0
unpcklps -0xb0(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movq -0x68(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xe0f3
jmp 0x1c6d1