// File: donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::RadioButton(char const*, bool)
bool ImGui::RadioButton(const char* label, bool active)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

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

    const ImRect check_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(label_size.y + style.FramePadding.y*2-1, label_size.y + style.FramePadding.y*2-1));
    ItemSize(check_bb, style.FramePadding.y);

    ImRect total_bb = check_bb;
    if (label_size.x > 0)
        SameLine(0, style.ItemInnerSpacing.x);
    const ImRect text_bb(window->DC.CursorPos + ImVec2(0, style.FramePadding.y), window->DC.CursorPos + ImVec2(0, style.FramePadding.y) + label_size);
    if (label_size.x > 0)
    {
        ItemSize(ImVec2(text_bb.GetWidth(), check_bb.GetHeight()), style.FramePadding.y);
        total_bb.Add(text_bb);
    }

    if (!ItemAdd(total_bb, &id))
        return false;

    ImVec2 center = check_bb.GetCenter();
    center.x = (float)(int)center.x + 0.5f;
    center.y = (float)(int)center.y + 0.5f;
    const float radius = check_bb.GetHeight() * 0.5f;

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

    window->DrawList->AddCircleFilled(center, radius, window->Color((held && hovered) ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg), 16);
    if (active)
    {
        const float check_sz = ImMin(check_bb.GetWidth(), check_bb.GetHeight());
        const float pad = ImMax(1.0f, (float)(int)(check_sz / 6.0f));
        window->DrawList->AddCircleFilled(center, radius-pad, window->Color(ImGuiCol_CheckMark), 16);
    }

    if (window->Flags & ImGuiWindowFlags_ShowBorders)
    {
        window->DrawList->AddCircle(center+ImVec2(1,1), radius, window->Color(ImGuiCol_BorderShadow), 16);
        window->DrawList->AddCircle(center, radius, window->Color(ImGuiCol_Border), 16);
    }

    if (g.LogEnabled)
        LogRenderedText(text_bb.GetTL(), active ? "(x)" : "( )");
    RenderText(text_bb.GetTL(), label);

    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
callq 0x2e220
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x74(%rax)
je 0x240c3
movb $0x0, -0x1(%rbp)
jmp 0x246c4
movq 0x553f6(%rip), %rax     # 0x794c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x13e8, %rax           # imm = 0x13E8
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x108(%rbp)
callq 0xbc60
movq -0x108(%rbp), %rsi
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %edx
movss 0x36f6d(%rip), %xmm0    # 0x5b07c
movss %xmm0, -0xfc(%rbp)
callq 0x10930
movaps %xmm0, %xmm1
movss -0xfc(%rbp), %xmm0
movlpd %xmm1, -0x3c(%rbp)
movq -0x20(%rbp), %rax
addq $0xa8, %rax
movq %rax, -0xf0(%rbp)
movss -0x38(%rbp), %xmm2
movq -0x30(%rbp), %rax
movss 0x24(%rax), %xmm1
addss %xmm1, %xmm1
addss %xmm2, %xmm1
addss %xmm0, %xmm1
leaq -0x5c(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
movaps %xmm1, %xmm0
callq 0x2d280
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdi
callq 0xc7e0
movq -0xf0(%rbp), %rsi
movlpd %xmm0, -0x54(%rbp)
leaq -0x4c(%rbp), %rdi
leaq -0x54(%rbp), %rdx
callq 0x2eb40
movq -0x30(%rbp), %rax
movss 0x24(%rax), %xmm0
leaq -0x4c(%rbp), %rdi
callq 0xc060
movq -0x4c(%rbp), %rax
movq %rax, -0x6c(%rbp)
movq -0x44(%rbp), %rax
movq %rax, -0x64(%rbp)
movss -0x3c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x241d6
movq -0x30(%rbp), %rax
movss 0x34(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x1a5e0
movq -0x20(%rbp), %rax
addq $0xa8, %rax
movq %rax, -0x130(%rbp)
movq -0x30(%rbp), %rax
movss 0x24(%rax), %xmm1
leaq -0x8c(%rbp), %rdi
movq %rdi, -0x128(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x11c(%rbp)
callq 0x2d280
movq -0x130(%rbp), %rdi
movq -0x128(%rbp), %rsi
callq 0xc7e0
movaps %xmm0, %xmm1
movss -0x11c(%rbp), %xmm0
movlpd %xmm1, -0x84(%rbp)
movq -0x20(%rbp), %rax
addq $0xa8, %rax
movq %rax, -0x118(%rbp)
movq -0x30(%rbp), %rax
movss 0x24(%rax), %xmm1
leaq -0xa4(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x2d280
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0xc7e0
movlpd %xmm0, -0x9c(%rbp)
leaq -0x9c(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0xc7e0
movlpd %xmm0, -0x94(%rbp)
leaq -0x7c(%rbp), %rdi
leaq -0x84(%rbp), %rsi
leaq -0x94(%rbp), %rdx
callq 0x2eb40
movss -0x3c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x2430b
leaq -0x7c(%rbp), %rdi
callq 0x2fe50
movss %xmm0, -0x134(%rbp)
leaq -0x4c(%rbp), %rdi
callq 0x2f520
movaps %xmm0, %xmm1
movss -0x134(%rbp), %xmm0
leaq -0xac(%rbp), %rdi
callq 0x2d280
movq -0x30(%rbp), %rax
movss 0x24(%rax), %xmm0
leaq -0xac(%rbp), %rdi
callq 0xbeb0
leaq -0x6c(%rbp), %rdi
leaq -0x7c(%rbp), %rsi
callq 0x2fea0
leaq -0x6c(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0xc0a0
testb $0x1, %al
jne 0x24325
movb $0x0, -0x1(%rbp)
jmp 0x246c4
leaq -0x4c(%rbp), %rdi
callq 0x2f120
movlpd %xmm0, -0xb4(%rbp)
cvttss2si -0xb4(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss 0x36cda(%rip), %xmm1    # 0x5b024
addss %xmm1, %xmm0
movss %xmm0, -0xb4(%rbp)
cvttss2si -0xb0(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss 0x36cba(%rip), %xmm1    # 0x5b024
addss %xmm1, %xmm0
movss %xmm0, -0xb0(%rbp)
leaq -0x4c(%rbp), %rdi
callq 0x2f520
movss 0x36c9d(%rip), %xmm1    # 0x5b024
mulss %xmm1, %xmm0
movss %xmm0, -0xb8(%rbp)
movl -0x34(%rbp), %esi
leaq -0x6c(%rbp), %rdi
leaq -0xb9(%rbp), %rdx
leaq -0xba(%rbp), %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x17010
andb $0x1, %al
movb %al, -0xbb(%rbp)
movq -0x20(%rbp), %rax
movq 0x270(%rax), %rax
movq %rax, -0x150(%rbp)
movss -0xb8(%rbp), %xmm0
movss %xmm0, -0x144(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x140(%rbp)
testb $0x1, -0xba(%rbp)
je 0x2440a
testb $0x1, -0xb9(%rbp)
je 0x2440a
movl $0x8, %eax
movl %eax, -0x154(%rbp)
jmp 0x24426
movb -0xb9(%rbp), %dl
movl $0x6, %eax
movl $0x7, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x154(%rbp)
movq -0x140(%rbp), %rdi
movl -0x154(%rbp), %esi
movss 0x36bdd(%rip), %xmm0    # 0x5b018
callq 0x2ea40
movq -0x150(%rbp), %rdi
movss -0x144(%rbp), %xmm0
movl %eax, %edx
leaq -0xb4(%rbp), %rsi
movl $0x10, %ecx
callq 0x40980
testb $0x1, -0x11(%rbp)
je 0x24531
leaq -0x4c(%rbp), %rdi
callq 0x2fe50
movss %xmm0, -0x164(%rbp)
leaq -0x4c(%rbp), %rdi
callq 0x2f520
movaps %xmm0, %xmm1
movss -0x164(%rbp), %xmm0
callq 0xe370
movss %xmm0, -0xc0(%rbp)
movss -0xc0(%rbp), %xmm0
movss 0x36bbe(%rip), %xmm1    # 0x5b06c
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm1
movss 0x36b56(%rip), %xmm0    # 0x5b018
callq 0xb7c0
movss %xmm0, -0xc4(%rbp)
movq -0x20(%rbp), %rax
movq 0x270(%rax), %rax
movq %rax, -0x160(%rbp)
movss -0xb8(%rbp), %xmm0
subss -0xc4(%rbp), %xmm0
movss %xmm0, -0x158(%rbp)
movq -0x20(%rbp), %rdi
movl $0x12, %esi
movss 0x36b0e(%rip), %xmm0    # 0x5b018
callq 0x2ea40
movq -0x160(%rbp), %rdi
movss -0x158(%rbp), %xmm0
movl %eax, %edx
leaq -0xb4(%rbp), %rsi
movl $0x10, %ecx
callq 0x40980
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x24633
movq -0x20(%rbp), %rax
movq 0x270(%rax), %rax
movq %rax, -0x180(%rbp)
leaq -0xd4(%rbp), %rdi
movq %rdi, -0x188(%rbp)
movss 0x36aaa(%rip), %xmm1    # 0x5b018
movaps %xmm1, %xmm0
callq 0x2d280
movq -0x188(%rbp), %rsi
leaq -0xb4(%rbp), %rdi
callq 0xc7e0
movlpd %xmm0, -0xcc(%rbp)
movss -0xb8(%rbp), %xmm0
movss %xmm0, -0x174(%rbp)
movq -0x20(%rbp), %rdi
movl $0x5, %esi
movss 0x36a66(%rip), %xmm0    # 0x5b018
callq 0x2ea40
movq -0x180(%rbp), %rdi
movss -0x174(%rbp), %xmm0
movl %eax, %edx
leaq -0xcc(%rbp), %rsi
movl $0x10, %ecx
callq 0x408e0
movq -0x20(%rbp), %rax
movq 0x270(%rax), %rax
movq %rax, -0x170(%rbp)
movss -0xb8(%rbp), %xmm0
movss %xmm0, -0x168(%rbp)
movq -0x20(%rbp), %rdi
movl $0x4, %esi
movss 0x36a0c(%rip), %xmm0    # 0x5b018
callq 0x2ea40
movq -0x170(%rbp), %rdi
movss -0x168(%rbp), %xmm0
movl %eax, %edx
leaq -0xb4(%rbp), %rsi
movl $0x10, %ecx
callq 0x408e0
movq -0x28(%rbp), %rax
testb $0x1, 0x2be8(%rax)
je 0x2468e
leaq -0x7c(%rbp), %rdi
callq 0x2f290
movlpd %xmm0, -0xdc(%rbp)
testb $0x1, -0x11(%rbp)
je 0x24667
leaq 0x379ad(%rip), %rax     # 0x5c00b
movq %rax, -0x190(%rbp)
jmp 0x24677
leaq 0x379a1(%rip), %rax     # 0x5c00f
movq %rax, -0x190(%rbp)
jmp 0x24677
movq -0x190(%rbp), %rsi
leaq -0xdc(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x10320
leaq -0x7c(%rbp), %rdi
callq 0x2f290
movlpd %xmm0, -0xe4(%rbp)
movq -0x10(%rbp), %rdi
movsd -0xe4(%rbp), %xmm0
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x10100
movb -0xbb(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
nopw %cs:(%rax,%rax)