// File: /workspace/github_cpp_makefile_star2_O2/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 0x34600(%rip), %r14     # 0x50480
movq 0x1758(%r14), %r12
movb $0x1, 0x72(%r12)
cmpb $0x0, 0x74(%r12)
je 0x1be9c
xorl %ebx, %ebx
jmp 0x1c018
movl %edx, %r15d
movl %esi, %r13d
movq %rdi, -0x38(%rbp)
leaq 0x1b82d(%rip), %rsi     # 0x376da
xorl %ebx, %ebx
movq %r12, %rdi
xorl %edx, %edx
callq 0x9858
movl %eax, -0x30(%rbp)
movss 0x1718(%r14), %xmm2
movss 0x140c(%r14), %xmm1
movaps %xmm1, %xmm4
addss %xmm1, %xmm4
movaps %xmm4, %xmm3
addss %xmm2, %xmm3
xorps %xmm0, %xmm0
xorps %xmm5, %xmm5
testb %r13b, %r13b
jne 0x1beea
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 0x1bf1a
movaps %xmm1, %xmm0
leaq -0x48(%rbp), %r13
movq %r13, %rdi
callq 0x9af8
leaq -0x30(%rbp), %rsi
movq %r13, %rdi
callq 0x9b28
testb %al, %al
je 0x1c018
movl -0x30(%rbp), %esi
leaq -0x29(%rbp), %rdx
leaq -0x2a(%rbp), %rcx
pushq $0x1
popq %r8
movq %r13, %rdi
xorl %r9d, %r9d
callq 0x1077a
movl %eax, %ebx
movsd (%r13), %xmm0
movaps %xmm0, -0x70(%rbp)
movsd 0x8(%r13), %xmm0
movaps %xmm0, -0x60(%rbp)
movq %r12, %rdi
movq -0x38(%rbp), %r12
movq %r12, %rsi
callq 0x1f43c
movss 0x1410(%r14), %xmm2
movzbl %r15b, %esi
movaps -0x70(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
movl %eax, %edi
callq 0xc76b
leaq -0x29(%rbp), %rax
cmpb $0x1, (%rax)
jne 0x1c018
movss (%r12), %xmm1
movss 0x1a3ec(%rip), %xmm3    # 0x36398
cvtss2sd %xmm1, %xmm0
mulss %xmm3, %xmm1
movss 0x1a414(%rip), %xmm4    # 0x363d0
addss %xmm4, %xmm1
cvttss2si %xmm1, %esi
movss 0x4(%r12), %xmm2
cvtss2sd %xmm2, %xmm1
mulss %xmm3, %xmm2
addss %xmm4, %xmm2
cvttss2si %xmm2, %edx
movss 0x8(%r12), %xmm5
cvtss2sd %xmm5, %xmm2
mulss %xmm3, %xmm5
addss %xmm4, %xmm5
cvttss2si %xmm5, %ecx
movss 0xc(%r12), %xmm5
mulss %xmm5, %xmm3
addss %xmm4, %xmm3
cvttss2si %xmm3, %r8d
cvtss2sd %xmm5, %xmm3
leaq 0x1b6d6(%rip), %rdi     # 0x376e7
movb $0x4, %al
callq 0xd30a
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq