// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x5b8e6(%rip), %r12     # 0xfbcd0
movq (%r12), %r13
xorl %edi, %edi
movl $0x1, %esi
callq 0x56a80
testq %r15, %r15
je 0xa0443
movq %r15, %rdi
xorl %esi, %esi
callq 0x4443d
cmpq %r15, %rax
jbe 0xa0443
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x8fe70
movq (%r12), %rax
movq 0x1ae0(%rax), %rax
cmpb $0x0, 0x93(%rax)
jne 0xa0443
cmpl $0x1, 0x1bc(%rax)
movl $0x0, %edi
adcl $0x5, %edi
callq 0x935bd
movss 0x1980(%r13), %xmm0
movss 0x159c(%r13), %xmm1
mulss 0x14b93(%rip), %xmm0    # 0xb4ff0
addss %xmm1, %xmm1
addss %xmm1, %xmm0
movss (%rbx), %xmm3
movss 0x4(%rbx), %xmm4
movss 0x8(%rbx), %xmm2
movss 0x14b69(%rip), %xmm1    # 0xb4fe4
testb $0x2, %r14b
jne 0xa0486
movss 0xc(%rbx), %xmm1
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movaps %xmm3, -0x60(%rbp)
movss %xmm3, -0x38(%rbp)
movaps %xmm4, -0x50(%rbp)
movss %xmm4, -0x34(%rbp)
movaps %xmm2, -0x70(%rbp)
movss %xmm2, -0x30(%rbp)
movss %xmm1, -0x2c(%rbp)
xorps %xmm3, %xmm3
movl $0xff, %r15d
testb $0x2, %r14b
jne 0xa04e7
movss 0xc(%rbx), %xmm1
movss 0x14b1e(%rip), %xmm2    # 0xb4fe4
minss %xmm1, %xmm2
cmpltss %xmm3, %xmm1
andnps %xmm2, %xmm1
mulss 0x1536e(%rip), %xmm1    # 0xb5848
addss 0x14b22(%rip), %xmm1    # 0xb5004
cvttss2si %xmm1, %r15d
movl %r14d, %edx
andl $0x18060002, %edx       # imm = 0x18060002
orl $0x40, %edx
leaq 0x3214d(%rip), %rdi     # 0xd2647
leaq -0x38(%rbp), %rsi
callq 0x9dd70
movss 0x14ac5(%rip), %xmm1    # 0xb4fd0
xorps %xmm0, %xmm0
callq 0x5591d
movl %r14d, %eax
xorps %xmm0, %xmm0
cvtss2sd (%rbx), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x4(%rbx), %xmm1
andl $0x18000000, %eax       # imm = 0x18000000
xorps %xmm2, %xmm2
cvtss2sd 0x8(%rbx), %xmm2
cmpl $0x10000000, %eax       # imm = 0x10000000
jne 0xa055e
testb $0x2, %r14b
jne 0xa0607
xorps %xmm3, %xmm3
cvtss2sd 0xc(%rbx), %xmm3
leaq 0x32190(%rip), %rdi     # 0xd26e2
movb $0x4, %al
callq 0x90323
jmp 0xa0634
movss 0x14a7e(%rip), %xmm4    # 0xb4fe4
movaps %xmm4, %xmm3
movaps -0x60(%rbp), %xmm6
minss %xmm6, %xmm3
xorps %xmm8, %xmm8
cmpltss %xmm8, %xmm6
andnps %xmm3, %xmm6
movaps %xmm4, %xmm3
movaps -0x50(%rbp), %xmm7
minss %xmm7, %xmm3
cmpltss %xmm8, %xmm7
andnps %xmm3, %xmm7
movaps -0x70(%rbp), %xmm5
minss %xmm5, %xmm4
cmpltss %xmm8, %xmm5
andnps %xmm4, %xmm5
movss 0x1529d(%rip), %xmm3    # 0xb5848
mulss %xmm3, %xmm6
movss 0x14a4d(%rip), %xmm4    # 0xb5004
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 0xa0617
xorps %xmm3, %xmm3
cvtss2sd 0xc(%rbx), %xmm3
subq $0x8, %rsp
leaq 0x32096(%rip), %rdi     # 0xd2686
movl %r15d, %r8d
movl %esi, %r9d
movb $0x4, %al
pushq %r15
pushq %rcx
pushq %rdx
callq 0x90323
addq $0x20, %rsp
jmp 0xa0634
leaq 0x320ba(%rip), %rdi     # 0xd26c8
movb $0x3, %al
callq 0x90323
jmp 0xa0634
subq $0x8, %rsp
leaq 0x3202f(%rip), %rdi     # 0xd2651
movl %esi, %r8d
movl %edx, %r9d
movb $0x3, %al
pushq %rcx
callq 0x90323
addq $0x10, %rsp
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x56bca