// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::RadioButton(char const*, bool)
bool ImGui::RadioButton(const char* label, bool active)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    const ImGuiStyle& style = g.Style;
    const ImGuiID id = window->GetID(label);
    const ImVec2 label_size = CalcTextSize(label, NULL, true);

    const float square_sz = GetFrameHeight();
    const ImVec2 pos = window->DC.CursorPos;
    const ImRect check_bb(pos, pos + ImVec2(square_sz, square_sz));
    const ImRect total_bb(pos, pos + ImVec2(square_sz + (label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f), label_size.y + style.FramePadding.y * 2.0f));
    ItemSize(total_bb, style.FramePadding.y);
    if (!ItemAdd(total_bb, id))
        return false;

    ImVec2 center = check_bb.GetCenter();
    center.x = IM_ROUND(center.x);
    center.y = IM_ROUND(center.y);
    const float radius = (square_sz - 1.0f) * 0.5f;

    bool hovered, held;
    bool pressed = ButtonBehavior(total_bb, id, &hovered, &held);
    if (pressed)
        MarkItemEdited(id);

    RenderNavHighlight(total_bb, id);
    window->DrawList->AddCircleFilled(center, radius, GetColorU32((held && hovered) ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg), 16);
    if (active)
    {
        const float pad = ImMax(1.0f, IM_FLOOR(square_sz / 6.0f));
        window->DrawList->AddCircleFilled(center, radius - pad, GetColorU32(ImGuiCol_CheckMark), 16);
    }

    if (style.FrameBorderSize > 0.0f)
    {
        window->DrawList->AddCircle(center + ImVec2(1, 1), radius, GetColorU32(ImGuiCol_BorderShadow), 16, style.FrameBorderSize);
        window->DrawList->AddCircle(center, radius, GetColorU32(ImGuiCol_Border), 16, style.FrameBorderSize);
    }

    if (g.LogEnabled)
        LogRenderedText(&total_bb.Min, active ? "(x)" : "( )");
    if (label_size.x > 0.0f)
        RenderText(ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y), label);

    IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);
    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
leaq 0x67e20(%rip), %rax     # 0xe3ce0
movq (%rax), %rbx
movq 0x1ae0(%rbx), %r15
movb $0x1, 0x90(%r15)
cmpb $0x0, 0x93(%r15)
je 0x7bee4
xorl %r12d, %r12d
jmp 0x7c213
movq %rdi, %r14
movl %esi, -0x30(%rbp)
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3700a
movl %eax, %r13d
pushq $0x1
popq %rdx
movss 0x200eb(%rip), %xmm0    # 0x9bff0
movq %r14, -0x68(%rbp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x365e8
movaps %xmm0, -0xa0(%rbp)
callq 0x43ec9
movaps %xmm0, %xmm3
movaps -0xa0(%rbp), %xmm2
movl 0xd8(%r15), %eax
movl 0xdc(%r15), %ecx
movd %eax, %xmm5
movd %ecx, %xmm4
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm2
jbe 0x7bf53
movss 0x15b0(%rbx), %xmm1
addss %xmm2, %xmm1
addss %xmm3, %xmm1
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
movss 0x159c(%rbx), %xmm0
movaps %xmm3, -0x60(%rbp)
movaps %xmm0, %xmm3
addss %xmm0, %xmm3
addss %xmm2, %xmm3
addss %xmm5, %xmm1
addss %xmm4, %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
leaq -0x78(%rbp), %r14
movl %eax, (%r14)
movl %ecx, 0x4(%r14)
movlps %xmm1, 0x8(%r14)
movq %r14, %rdi
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x50(%rbp)
callq 0x4388d
xorl %r12d, %r12d
movq %r14, %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x40ea5
testb %al, %al
je 0x7c213
movaps -0x60(%rbp), %xmm3
movaps %xmm3, %xmm1
movaps -0x50(%rbp), %xmm2
addss %xmm2, %xmm1
movaps %xmm3, %xmm0
movaps -0x90(%rbp), %xmm4
addss %xmm4, %xmm0
movaps %xmm1, -0xb0(%rbp)
addss %xmm1, %xmm2
movss 0x20030(%rip), %xmm1    # 0x9c018
mulss %xmm1, %xmm2
addss %xmm4, %xmm0
mulss %xmm1, %xmm0
addss %xmm1, %xmm2
cvttps2dq %xmm2, %xmm2
cvtdq2ps %xmm2, %xmm2
movss %xmm2, -0x38(%rbp)
addss %xmm1, %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
movss 0x1ffd4(%rip), %xmm0    # 0x9bff0
addss %xmm3, %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x50(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
leaq -0x29(%rbp), %rcx
movl %r13d, %esi
xorl %r8d, %r8d
callq 0x79dde
movl %eax, %r12d
testb %al, %al
je 0x7c04f
movl %r13d, %edi
callq 0x3749e
leaq -0x78(%rbp), %rdi
pushq $0x1
popq %rdx
movl %r13d, %esi
callq 0x36c91
movb -0x29(%rbp), %al
movb -0x2a(%rbp), %cl
movl %eax, %edx
xorb $0x1, %dl
andb %cl, %dl
movzbl %dl, %edx
addl $0x7, %edx
testb $0x1, %cl
pushq $0x9
popq %rdi
cmovel %edx, %edi
movq 0x2b8(%r15), %r14
testb %al, %al
cmovel %edx, %edi
movss 0x1ff6a(%rip), %xmm0    # 0x9bff8
callq 0x35d33
leaq -0x38(%rbp), %rsi
pushq $0x10
popq %rcx
movq %r14, %rdi
movss -0x50(%rbp), %xmm0
movl %eax, %edx
callq 0x64486
movl -0x30(%rbp), %r13d
testb %r13b, %r13b
je 0x7c107
movaps -0x60(%rbp), %xmm0
divss 0x1ff62(%rip), %xmm0    # 0x9c020
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm2
movss 0x1ff2b(%rip), %xmm0    # 0x9bff8
movaps %xmm0, %xmm1
maxss %xmm2, %xmm1
movq 0x2b8(%r15), %r14
movss -0x50(%rbp), %xmm2
subss %xmm1, %xmm2
movss %xmm2, -0x60(%rbp)
pushq $0x12
popq %rdi
callq 0x35d33
leaq -0x38(%rbp), %rsi
pushq $0x10
popq %rcx
movq %r14, %rdi
movss -0x60(%rbp), %xmm0
movl %eax, %edx
callq 0x64486
movss 0x15a4(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x7c1ac
movq 0x2b8(%r15), %r14
leaq -0x38(%rbp), %rax
movss (%rax), %xmm2
movss 0x1fec6(%rip), %xmm0    # 0x9bff8
addss %xmm0, %xmm2
movss 0x4(%rax), %xmm1
addss %xmm0, %xmm1
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
leaq -0xb8(%rbp), %r13
movlps %xmm2, (%r13)
pushq $0x6
popq %rdi
callq 0x35d33
movss 0x15a4(%rbx), %xmm1
pushq $0x10
popq %rcx
movq %r14, %rdi
movq %r13, %rsi
movl -0x30(%rbp), %r13d
movss -0x50(%rbp), %xmm0
movl %eax, %edx
callq 0x6436a
movq 0x2b8(%r15), %r14
pushq $0x5
popq %rdi
movss 0x1fe6f(%rip), %xmm0    # 0x9bff8
callq 0x35d33
movss 0x15a4(%rbx), %xmm1
movq %r14, %rdi
leaq -0x38(%rbp), %rsi
movss -0x50(%rbp), %xmm0
movl %eax, %edx
pushq $0x10
popq %rcx
callq 0x6436a
cmpb $0x1, 0x3138(%rbx)
jne 0x7c1d5
leaq 0x3c43d(%rip), %rax     # 0xb85f9
leaq 0x3c43a(%rip), %rsi     # 0xb85fd
testb %r13b, %r13b
cmovneq %rax, %rsi
leaq -0x78(%rbp), %rdi
xorl %edx, %edx
callq 0x36222
xorps %xmm0, %xmm0
movaps -0xa0(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x7c213
movaps -0xb0(%rbp), %xmm0
addss 0x15b0(%rbx), %xmm0
movaps -0x90(%rbp), %xmm1
addss 0x159c(%rbx), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
pushq $0x1
popq %rdx
movq -0x68(%rbp), %rdi
xorl %esi, %esi
callq 0x36156
movl %r12d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq