// File: /workspace/github_cpp_makefile_star2_O1/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 $0x58, %rsp
movq 0x3399e(%rip), %r15     # 0x55490
movq 0x1758(%r15), %r12
movb $0x1, 0x72(%r12)
cmpb $0x0, 0x74(%r12)
je 0x21b0e
xorl %ebx, %ebx
jmp 0x21cd8
movl %esi, %r13d
movq %rdi, %r14
movl %edx, -0x34(%rbp)
leaq 0x1cbd4(%rip), %rsi     # 0x3e6f2
xorl %ebx, %ebx
movq %r12, %rdi
xorl %edx, %edx
callq 0xa872
movl %eax, -0x30(%rbp)
movss 0x1718(%r15), %xmm2
movss 0x140c(%r15), %xmm1
movaps %xmm1, %xmm4
addss %xmm1, %xmm4
movaps %xmm4, %xmm3
addss %xmm2, %xmm3
xorps %xmm0, %xmm0
xorps %xmm5, %xmm5
testb %r13b, %r13b
jne 0x21b5b
movaps %xmm4, %xmm5
addss %xmm5, %xmm2
addss 0xa8(%r12), %xmm3
addss 0xac(%r12), %xmm2
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
movq 0xa8(%r12), %rax
movq %rax, -0x48(%rbp)
movlps %xmm3, -0x40(%rbp)
jne 0x21b8b
movaps %xmm1, %xmm0
leaq -0x48(%rbp), %r12
movss 0x8(%r12), %xmm1
movss 0xc(%r12), %xmm2
subss (%r12), %xmm1
subss 0x4(%r12), %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0x80(%rbp), %rdi
movlps %xmm1, (%rdi)
callq 0xaab7
leaq -0x30(%rbp), %rsi
movq %r12, %rdi
callq 0xac09
testb %al, %al
je 0x21cd8
movl -0x30(%rbp), %esi
leaq -0x48(%rbp), %r13
leaq -0x2a(%rbp), %r12
leaq -0x29(%rbp), %rcx
movq %r13, %rdi
movq %r12, %rdx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x13d8d
movl %eax, %ebx
movsd (%r13), %xmm0
movaps %xmm0, -0x70(%rbp)
movsd 0x8(%r13), %xmm0
movaps %xmm0, -0x60(%rbp)
movups (%r14), %xmm0
leaq -0x80(%rbp), %rdi
movaps %xmm0, (%rdi)
movq 0x33878(%rip), %rax     # 0x55490
movss 0x13e8(%rax), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
callq 0x8cce
movss 0x1410(%r15), %xmm2
movzbl -0x34(%rbp), %esi
movaps -0x70(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
movl %eax, %edi
callq 0xe7a8
cmpb $0x1, (%r12)
jne 0x21cd8
movss (%r14), %xmm1
movss 0x1b725(%rip), %xmm3    # 0x3d388
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
mulss %xmm3, %xmm1
movss 0x1b746(%rip), %xmm4    # 0x3d3bc
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 0x1ca2e(%rip), %rdi     # 0x3e6ff
movb $0x4, %al
callq 0xf73a
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq