// File: 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
subq $0x130, %rsp            # imm = 0x130
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
callq 0xeb270
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x93(%rax)
je 0x13ce26
movb $0x0, -0x1(%rbp)
jmp 0x13d34f
leaq 0xd6113(%rip), %rax     # 0x212f40
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x1560, %rax           # imm = 0x1560
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0xc8(%rbp)
callq 0xc9910
movq -0xc8(%rbp), %rsi
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %edx
movss 0x3510b(%rip), %xmm0    # 0x171f80
callq 0xc87e0
movlpd %xmm0, -0x3c(%rbp)
callq 0xdd050
movss %xmm0, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x48(%rbp)
movss -0x40(%rbp), %xmm1
leaq -0x68(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0xc0(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x139090
movlpd %xmm0, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0xe8660
movss -0x40(%rbp), %xmm0
movss %xmm0, -0xb8(%rbp)
movss -0x3c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x13cf08
movq -0x30(%rbp), %rax
movss 0x50(%rax), %xmm0
addss -0x3c(%rbp), %xmm0
movss %xmm0, -0xcc(%rbp)
jmp 0x13cf15
xorps %xmm0, %xmm0
movss %xmm0, -0xcc(%rbp)
jmp 0x13cf15
movss -0xb8(%rbp), %xmm0
movss -0xcc(%rbp), %xmm1
addss %xmm1, %xmm0
movss -0x38(%rbp), %xmm2
movq -0x30(%rbp), %rax
movss 0x3c(%rax), %xmm1
addss %xmm1, %xmm1
addss %xmm2, %xmm1
leaq -0x88(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0xbf4c0
movq -0xd8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x139090
movlpd %xmm0, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0xe8660
movq -0x30(%rbp), %rax
movss 0x3c(%rax), %xmm0
leaq -0x78(%rbp), %rdi
callq 0xdc300
movl -0x34(%rbp), %esi
leaq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0xd6250
testb $0x1, %al
jne 0x13cfa7
movb $0x0, -0x1(%rbp)
jmp 0x13d34f
leaq -0x58(%rbp), %rdi
callq 0x15bad0
movlpd %xmm0, -0x90(%rbp)
movss 0x35018(%rip), %xmm0    # 0x171fd8
addss -0x90(%rbp), %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x90(%rbp)
movss 0x34ff8(%rip), %xmm0    # 0x171fd8
addss -0x8c(%rbp), %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x8c(%rbp)
movss -0x40(%rbp), %xmm0
movss 0x33c37(%rip), %xmm1    # 0x170c3c
subss %xmm1, %xmm0
movss 0x34fc7(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x94(%rbp)
movl -0x34(%rbp), %esi
leaq -0x78(%rbp), %rdi
leaq -0x95(%rbp), %rdx
leaq -0x96(%rbp), %rcx
xorl %r8d, %r8d
callq 0x139df0
andb $0x1, %al
movb %al, -0x97(%rbp)
testb $0x1, -0x97(%rbp)
je 0x13d053
movl -0x34(%rbp), %edi
callq 0xca110
movl -0x34(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x1, %edx
callq 0xc91e0
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0xe8(%rbp)
movss -0x94(%rbp), %xmm0
movss %xmm0, -0xdc(%rbp)
testb $0x1, -0x96(%rbp)
je 0x13d0a5
testb $0x1, -0x95(%rbp)
je 0x13d0a5
movl $0x9, %eax
movl %eax, -0xec(%rbp)
jmp 0x13d0c1
movb -0x95(%rbp), %dl
movl $0x7, %eax
movl $0x8, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %edi
movss 0x33b6d(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movq -0xe8(%rbp), %rdi
movss -0xdc(%rbp), %xmm0
movl %eax, %edx
leaq -0x90(%rbp), %rsi
movl $0x10, %ecx
callq 0x113600
testb $0x1, -0x11(%rbp)
je 0x13d18c
movss -0x40(%rbp), %xmm0
movss 0x34ed3(%rip), %xmm1    # 0x171fe0
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm1
movss 0x33b1b(%rip), %xmm0    # 0x170c3c
callq 0x139050
movss %xmm0, -0x9c(%rbp)
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0xf8(%rbp)
movss -0x94(%rbp), %xmm0
subss -0x9c(%rbp), %xmm0
movss %xmm0, -0xf0(%rbp)
movl $0x12, %edi
movss 0x33ad7(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movq -0xf8(%rbp), %rdi
movss -0xf0(%rbp), %xmm0
movl %eax, %edx
leaq -0x90(%rbp), %rsi
movl $0x10, %ecx
callq 0x113600
movq -0x30(%rbp), %rax
movss 0x44(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x13d298
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0x118(%rbp)
leaq -0xac(%rbp), %rdi
movq %rdi, -0x120(%rbp)
movss 0x33a73(%rip), %xmm1    # 0x170c3c
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0x120(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x139090
movlpd %xmm0, -0xa4(%rbp)
movss -0x94(%rbp), %xmm0
movss %xmm0, -0x10c(%rbp)
movl $0x6, %edi
movss 0x33a33(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movq -0x118(%rbp), %rdi
movss -0x10c(%rbp), %xmm0
movl %eax, %edx
movq -0x30(%rbp), %rax
movss 0x44(%rax), %xmm1
leaq -0xa4(%rbp), %rsi
movl $0x10, %ecx
callq 0x113490
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0x108(%rbp)
movss -0x94(%rbp), %xmm0
movss %xmm0, -0xfc(%rbp)
movl $0x5, %edi
movss 0x339d4(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movq -0x108(%rbp), %rdi
movss -0xfc(%rbp), %xmm0
movl %eax, %edx
movq -0x30(%rbp), %rax
movss 0x44(%rax), %xmm1
leaq -0x90(%rbp), %rsi
movl $0x10, %ecx
callq 0x113490
movq -0x28(%rbp), %rax
testb $0x1, 0x3138(%rax)
je 0x13d2ed
leaq -0x78(%rbp), %rax
movq %rax, -0x128(%rbp)
testb $0x1, -0x11(%rbp)
je 0x13d2c6
leaq 0x51394(%rip), %rax     # 0x18e651
movq %rax, -0x130(%rbp)
jmp 0x13d2d6
leaq 0x51388(%rip), %rax     # 0x18e655
movq %rax, -0x130(%rbp)
jmp 0x13d2d6
movq -0x128(%rbp), %rdi
movq -0x130(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xc8240
movss -0x3c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x13d340
movss -0x54(%rbp), %xmm1
movss -0x50(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss 0x3c(%rax), %xmm2
movss 0x50(%rax), %xmm3
addss %xmm3, %xmm0
addss %xmm2, %xmm1
leaq -0xb4(%rbp), %rdi
callq 0xbf4c0
movq -0x10(%rbp), %rdi
movsd -0xb4(%rbp), %xmm0
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0xc8120
jmp 0x13d342
jmp 0x13d344
movb -0x97(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax)