// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::ColorPickerOptionsPopup(float const*, int)
void ImGui::ColorPickerOptionsPopup(const float* ref_col, ImGuiColorEditFlags flags)
{
    bool allow_opt_picker = !(flags & ImGuiColorEditFlags__PickerMask);
    bool allow_opt_alpha_bar = !(flags & ImGuiColorEditFlags_NoAlpha) && !(flags & ImGuiColorEditFlags_AlphaBar);
    if ((!allow_opt_picker && !allow_opt_alpha_bar) || !BeginPopup("context"))
        return;
    ImGuiContext& g = *GImGui;
    if (allow_opt_picker)
    {
        ImVec2 picker_size(g.FontSize * 8, ImMax(g.FontSize * 8 - (GetFrameHeight() + g.Style.ItemInnerSpacing.x), 1.0f)); // FIXME: Picker size copied from main picker function
        PushItemWidth(picker_size.x);
        for (int picker_type = 0; picker_type < 2; picker_type++)
        {
            // Draw small/thumbnail version of each picker type (over an invisible button for selection)
            if (picker_type > 0) Separator();
            PushID(picker_type);
            ImGuiColorEditFlags picker_flags = ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoLabel | ImGuiColorEditFlags_NoSidePreview | (flags & ImGuiColorEditFlags_NoAlpha);
            if (picker_type == 0) picker_flags |= ImGuiColorEditFlags_PickerHueBar;
            if (picker_type == 1) picker_flags |= ImGuiColorEditFlags_PickerHueWheel;
            ImVec2 backup_pos = GetCursorScreenPos();
            if (Selectable("##selectable", false, 0, picker_size)) // By default, Selectable() is closing popup
                g.ColorEditOptions = (g.ColorEditOptions & ~ImGuiColorEditFlags__PickerMask) | (picker_flags & ImGuiColorEditFlags__PickerMask);
            SetCursorScreenPos(backup_pos);
            ImVec4 previewing_ref_col;
            memcpy(&previewing_ref_col, ref_col, sizeof(float) * ((picker_flags & ImGuiColorEditFlags_NoAlpha) ? 3 : 4));
            ColorPicker4("##previewing_picker", &previewing_ref_col.x, picker_flags);
            PopID();
        }
        PopItemWidth();
    }
    if (allow_opt_alpha_bar)
    {
        if (allow_opt_picker) Separator();
        CheckboxFlags("Alpha Bar", &g.ColorEditOptions, ImGuiColorEditFlags_AlphaBar);
    }
    EndPopup();
}

// Assembly:
testl $0x6000000, %esi        # imm = 0x6000000
setne %al
testl $0x10002, %esi          # imm = 0x10002
setne %cl
testb %cl, %al
jne 0x883a4
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x170cb(%rip), %rdi     # 0x9f2b9
xorl %esi, %esi
callq 0x44c84
testb %al, %al
je 0x88396
leaq 0x5badc(%rip), %rax     # 0xe3ce0
movq (%rax), %r15
testl $0x6000000, %ebx        # imm = 0x6000000
je 0x88220
testl $0x10002, %ebx          # imm = 0x10002
jne 0x88391
jmp 0x88376
movl %ebx, -0x30(%rbp)
andl $0x2, %ebx
movl %ebx, -0x34(%rbp)
movss 0x1980(%r15), %xmm0
mulss 0x146ce(%rip), %xmm0    # 0x9c908
movss %xmm0, -0x2c(%rbp)
callq 0x43ec9
movq %r15, -0x40(%rbp)
addss 0x15b0(%r15), %xmm0
movss -0x2c(%rbp), %xmm2
movaps %xmm2, %xmm1
subss %xmm0, %xmm1
maxss 0x13d93(%rip), %xmm1    # 0x9bff8
leaq -0x50(%rbp), %rax
movss %xmm2, (%rax)
movaps %xmm2, %xmm0
movss %xmm1, 0x4(%rax)
callq 0x43b8c
xorl %r13d, %r13d
leaq -0x60(%rbp), %r12
cmpl $0x2, %r13d
je 0x8835f
cmpl $0x1, %r13d
jne 0x88296
callq 0x7cad7
xorl %ebx, %ebx
cmpl $0x1, %r13d
sete %bl
movl %r13d, %edi
callq 0x42f5a
xorl %eax, %eax
testl %r13d, %r13d
sete %al
shll $0x19, %eax
addl -0x34(%rbp), %eax
shll $0x1a, %ebx
addl %eax, %ebx
addl $0x1a8, %ebx            # imm = 0x1A8
callq 0x438bd
movlps %xmm0, -0x48(%rbp)
leaq 0x317f4(%rip), %rdi     # 0xb9ac4
xorl %esi, %esi
xorl %edx, %edx
leaq -0x50(%rbp), %rcx
callq 0x7d81c
testb %al, %al
je 0x88302
movq -0x40(%rbp), %rdx
movl 0x306c(%rdx), %eax
movl $0xf9ffffff, %ecx       # imm = 0xF9FFFFFF
andl %ecx, %eax
movl %ebx, %ecx
andl $0x6000000, %ecx        # imm = 0x6000000
orl %eax, %ecx
movl %ecx, 0x306c(%rdx)
leaq -0x48(%rbp), %rdi
callq 0x438d9
xorl %eax, %eax
movl %ebx, %edx
andl $0x2, %edx
sete %al
leaq 0xc(,%rax,4), %r15
addl %edx, %edx
leaq -0x54(,%rax,4), %rdi
addq %rbp, %rdi
xorl %esi, %esi
callq 0xc270
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc080
leaq 0x3178b(%rip), %rdi     # 0xb9ad1
movq %r12, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x865a3
callq 0x42fea
incl %r13d
jmp 0x88281
callq 0x43cbe
testl $0x10002, -0x30(%rbp)   # imm = 0x10002
movq -0x40(%rbp), %r15
jne 0x88391
callq 0x7cad7
addq $0x306c, %r15           # imm = 0x306C
leaq 0x1ddbf(%rip), %rdi     # 0xa6143
movq %r15, %rsi
movl $0x10000, %edx          # imm = 0x10000
callq 0x8e846
callq 0x44bbe
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq