// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::ColorButton(ImVec4 const&, bool, bool)
bool ImGui::ColorButton(const ImVec4& col, bool small_height, bool outline_border)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiState& g = *GImGui;
    const ImGuiStyle& style = g.Style;
    const ImGuiID id = window->GetID("#colorbutton");
    const float square_size = g.FontSize;
    const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(square_size + style.FramePadding.y*2, square_size + (small_height ? 0 : style.FramePadding.y*2)));
    ItemSize(bb, small_height ? 0.0f : style.FramePadding.y);
    if (!ItemAdd(bb, &id))
        return false;

    bool hovered, held;
    bool pressed = ButtonBehavior(bb, id, &hovered, &held, true);
    RenderFrame(bb.Min, bb.Max, window->Color(col), outline_border, style.FrameRounding);

    if (hovered)
    {
        int ix = (int)(col.x * 255.0f + 0.5f);
        int iy = (int)(col.y * 255.0f + 0.5f);
        int iz = (int)(col.z * 255.0f + 0.5f);
        int iw = (int)(col.w * 255.0f + 0.5f);
        ImGui::SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col.x, col.y, col.z, col.w, ix, iy, iz, iw);
    }

    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x33c24(%rip), %r15     # 0x55480
movq 0x1758(%r15), %r12
movb $0x1, 0x72(%r12)
cmpb $0x0, 0x74(%r12)
je 0x21878
xorl %ebx, %ebx
jmp 0x21a2d
movl %esi, %r13d
movq %rdi, %r14
movl %edx, -0x34(%rbp)
leaq 0x1ce9a(%rip), %rsi     # 0x3e722
xorl %ebx, %ebx
movq %r12, %rdi
xorl %edx, %edx
callq 0xa766
movl %eax, -0x30(%rbp)
movss 0x1718(%r15), %xmm1
movss 0x140c(%r15), %xmm3
movaps %xmm3, %xmm4
addss %xmm3, %xmm4
movaps %xmm4, %xmm2
addss %xmm1, %xmm2
xorps %xmm0, %xmm0
xorps %xmm5, %xmm5
testb %r13b, %r13b
jne 0x218c5
movaps %xmm4, %xmm5
addss 0xa8(%r12), %xmm2
addss %xmm5, %xmm1
addss 0xac(%r12), %xmm1
movaps %xmm2, %xmm4
unpcklps %xmm1, %xmm4            # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
movq 0xa8(%r12), %r13
movq %r13, -0x48(%rbp)
movaps %xmm4, -0x60(%rbp)
movlps %xmm4, -0x40(%rbp)
jne 0x218fc
movaps %xmm3, %xmm0
movd %r13d, %xmm3
subss %xmm3, %xmm2
movq %r13, %rax
shrq $0x20, %rax
movd %eax, %xmm3
subss %xmm3, %xmm1
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
leaq -0x70(%rbp), %rdi
movlps %xmm2, (%rdi)
callq 0xa99d
leaq -0x48(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xaaef
testb %al, %al
je 0x21a2d
movl -0x30(%rbp), %esi
leaq -0x48(%rbp), %rdi
leaq -0x2a(%rbp), %r12
leaq -0x29(%rbp), %rcx
movq %r12, %rdx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x13a49
movl %eax, %ebx
movups (%r14), %xmm0
leaq -0x70(%rbp), %rdi
movaps %xmm0, (%rdi)
movq 0x33b14(%rip), %rax     # 0x55480
movss 0x13e8(%rax), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
callq 0x8c82
movss 0x1410(%r15), %xmm2
movq %r13, %xmm0
movzbl -0x34(%rbp), %esi
movaps -0x60(%rbp), %xmm1
movl %eax, %edi
callq 0xe58d
cmpb $0x1, (%r12)
jne 0x21a2d
movss (%r14), %xmm1
movss 0x1b9e0(%rip), %xmm3    # 0x3d398
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
mulss %xmm3, %xmm1
movss 0x1ba01(%rip), %xmm4    # 0x3d3cc
addss %xmm4, %xmm1
cvttss2si %xmm1, %esi
movss 0x4(%r14), %xmm2
xorps %xmm1, %xmm1
cvtss2sd %xmm2, %xmm1
mulss %xmm3, %xmm2
addss %xmm4, %xmm2
cvttss2si %xmm2, %edx
movss 0x8(%r14), %xmm5
xorps %xmm2, %xmm2
cvtss2sd %xmm5, %xmm2
mulss %xmm3, %xmm5
addss %xmm4, %xmm5
cvttss2si %xmm5, %ecx
movss 0xc(%r14), %xmm5
mulss %xmm5, %xmm3
addss %xmm4, %xmm3
cvttss2si %xmm3, %r8d
xorps %xmm3, %xmm3
cvtss2sd %xmm5, %xmm3
leaq 0x1cd09(%rip), %rdi     # 0x3e72f
movb $0x4, %al
callq 0xf4b7
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq