// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::ColorTooltip(char const*, float const*, int)
void ImGui::ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags)
{
    ImGuiContext& g = *GImGui;

    BeginTooltipEx(0, ImGuiTooltipFlags_OverridePreviousTooltip);
    const char* text_end = text ? FindRenderedTextEnd(text, NULL) : text;
    if (text_end > text)
    {
        TextEx(text, text_end);
        Separator();
    }

    ImVec2 sz(g.FontSize * 3 + g.Style.FramePadding.y * 2, g.FontSize * 3 + g.Style.FramePadding.y * 2);
    ImVec4 cf(col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]);
    int cr = IM_F32_TO_INT8_SAT(col[0]), cg = IM_F32_TO_INT8_SAT(col[1]), cb = IM_F32_TO_INT8_SAT(col[2]), ca = (flags & ImGuiColorEditFlags_NoAlpha) ? 255 : IM_F32_TO_INT8_SAT(col[3]);
    ColorButton("##preview", cf, (flags & (ImGuiColorEditFlags__InputMask | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf)) | ImGuiColorEditFlags_NoTooltip, sz);
    SameLine();
    if ((flags & ImGuiColorEditFlags_InputRGB) || !(flags & ImGuiColorEditFlags__InputMask))
    {
        if (flags & ImGuiColorEditFlags_NoAlpha)
            Text("#%02X%02X%02X\nR: %d, G: %d, B: %d\n(%.3f, %.3f, %.3f)", cr, cg, cb, cr, cg, cb, col[0], col[1], col[2]);
        else
            Text("#%02X%02X%02X%02X\nR:%d, G:%d, B:%d, A:%d\n(%.3f, %.3f, %.3f, %.3f)", cr, cg, cb, ca, cr, cg, cb, ca, col[0], col[1], col[2], col[3]);
    }
    else if (flags & ImGuiColorEditFlags_InputHSV)
    {
        if (flags & ImGuiColorEditFlags_NoAlpha)
            Text("H: %.3f, S: %.3f, V: %.3f", col[0], col[1], col[2]);
        else
            Text("H: %.3f, S: %.3f, V: %.3f, A: %.3f", col[0], col[1], col[2], col[3]);
    }
    EndTooltip();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x5b7f8(%rip), %rax     # 0xe3ce0
movq (%rax), %r12
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x44511
testq %r15, %r15
je 0x8851b
movq %r15, %rdi
xorl %esi, %esi
callq 0x36123
cmpq %r15, %rax
jbe 0x8851b
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x7911c
callq 0x7cad7
movss 0x1980(%r12), %xmm0
movss 0x159c(%r12), %xmm1
mulss 0x13acd(%rip), %xmm0    # 0x9c004
addss %xmm1, %xmm1
addss %xmm1, %xmm0
movss (%rbx), %xmm3
movss 0x4(%rbx), %xmm4
movss 0x8(%rbx), %xmm2
movss 0x13aa3(%rip), %xmm1    # 0x9bff8
testb $0x2, %r14b
jne 0x88560
movss 0xc(%rbx), %xmm1
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movaps %xmm3, -0x50(%rbp)
movss %xmm3, -0x30(%rbp)
movaps %xmm4, -0x40(%rbp)
movss %xmm4, -0x2c(%rbp)
movaps %xmm2, -0x60(%rbp)
movss %xmm2, -0x28(%rbp)
movss %xmm1, -0x24(%rbp)
xorps %xmm3, %xmm3
movl $0xff, %r15d
testb $0x2, %r14b
jne 0x885c1
movss 0xc(%rbx), %xmm1
movss 0x13a58(%rip), %xmm2    # 0x9bff8
minss %xmm1, %xmm2
cmpltss %xmm3, %xmm1
andnps %xmm2, %xmm1
mulss 0x142c0(%rip), %xmm1    # 0x9c874
addss 0x13a5c(%rip), %xmm1    # 0x9c018
cvttss2si %xmm1, %r15d
movl %r14d, %edx
andl $0x18060002, %edx       # imm = 0x18060002
orl $0x40, %edx
leaq 0x313e3(%rip), %rdi     # 0xb99b7
leaq -0x30(%rbp), %rsi
callq 0x86066
movss 0x13a0b(%rip), %xmm1    # 0x9bff0
xorps %xmm0, %xmm0
callq 0x437ec
movl %r14d, %eax
cvtss2sd (%rbx), %xmm0
cvtss2sd 0x4(%rbx), %xmm1
andl $0x18000000, %eax       # imm = 0x18000000
cvtss2sd 0x8(%rbx), %xmm2
cmpl $0x10000000, %eax       # imm = 0x10000000
jne 0x8862c
testb $0x2, %r14b
jne 0x886d2
cvtss2sd 0xc(%rbx), %xmm3
leaq 0x31432(%rip), %rdi     # 0xb9a52
movb $0x4, %al
callq 0x795ac
jmp 0x886fd
movss 0x139c4(%rip), %xmm4    # 0x9bff8
movaps %xmm4, %xmm3
movaps -0x50(%rbp), %xmm6
minss %xmm6, %xmm3
xorps %xmm8, %xmm8
cmpltss %xmm8, %xmm6
andnps %xmm3, %xmm6
movaps %xmm4, %xmm3
movaps -0x40(%rbp), %xmm7
minss %xmm7, %xmm3
cmpltss %xmm8, %xmm7
andnps %xmm3, %xmm7
movaps -0x60(%rbp), %xmm5
minss %xmm5, %xmm4
cmpltss %xmm8, %xmm5
andnps %xmm4, %xmm5
movss 0x141fb(%rip), %xmm3    # 0x9c874
mulss %xmm3, %xmm6
movss 0x13993(%rip), %xmm4    # 0x9c018
mulss %xmm3, %xmm7
mulss %xmm3, %xmm5
addss %xmm4, %xmm6
addss %xmm4, %xmm7
cvttss2si %xmm6, %esi
cvttss2si %xmm7, %edx
addss %xmm4, %xmm5
cvttss2si %xmm5, %ecx
testb $0x2, %r14b
jne 0x886e2
cvtss2sd 0xc(%rbx), %xmm3
subq $0x8, %rsp
leaq 0x3133b(%rip), %rdi     # 0xb99f6
movl %r15d, %r8d
movl %esi, %r9d
movb $0x4, %al
pushq %r15
pushq %rcx
pushq %rdx
callq 0x795ac
addq $0x20, %rsp
jmp 0x886fd
leaq 0x3135f(%rip), %rdi     # 0xb9a38
movb $0x3, %al
callq 0x795ac
jmp 0x886fd
subq $0x8, %rsp
leaq 0x312d4(%rip), %rdi     # 0xb99c1
movl %esi, %r8d
movl %edx, %r9d
movb $0x3, %al
pushq %rcx
callq 0x795ac
popq %rax
popq %rcx
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4463b