// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::CloseButton(unsigned int, ImVec2 const&)
bool ImGui::CloseButton(ImGuiID id, const ImVec2& pos)//, float size)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;

    // We intentionally allow interaction when clipped so that a mechanical Alt,Right,Validate sequence close a window.
    // (this isn't the regular behavior of buttons, but it doesn't affect the user much because navigation tends to keep items visible).
    const ImRect bb(pos, pos + ImVec2(g.FontSize, g.FontSize) + g.Style.FramePadding * 2.0f);
    bool is_clipped = !ItemAdd(bb, id);

    bool hovered, held;
    bool pressed = ButtonBehavior(bb, id, &hovered, &held);
    if (is_clipped)
        return pressed;

    // Render
    ImU32 col = GetColorU32(held ? ImGuiCol_ButtonActive : ImGuiCol_ButtonHovered);
    ImVec2 center = bb.GetCenter();
    if (hovered)
        window->DrawList->AddCircleFilled(center, ImMax(2.0f, g.FontSize * 0.5f + 1.0f), col, 12);

    float cross_extent = g.FontSize * 0.5f * 0.7071f - 1.0f;
    ImU32 cross_col = GetColorU32(ImGuiCol_Text);
    center -= ImVec2(0.5f, 0.5f);
    window->DrawList->AddLine(center + ImVec2(+cross_extent, +cross_extent), center + ImVec2(-cross_extent, -cross_extent), cross_col, 1.0f);
    window->DrawList->AddLine(center + ImVec2(+cross_extent, -cross_extent), center + ImVec2(-cross_extent, +cross_extent), cross_col, 1.0f);

    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edi, %ebx
leaq 0x6a7f6(%rip), %rax     # 0xfdcd0
movq (%rax), %r12
movss 0x1980(%r12), %xmm0
movss (%rsi), %xmm1
addss %xmm0, %xmm1
addss 0x4(%rsi), %xmm0
movq 0x1ae0(%r12), %r13
movss 0x1598(%r12), %xmm2
movss 0x159c(%r12), %xmm3
addss %xmm2, %xmm2
addss %xmm3, %xmm3
addss %xmm1, %xmm2
addss %xmm0, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movq (%rsi), %rax
leaq -0x48(%rbp), %r14
movq %rax, (%r14)
movlps %xmm2, 0x8(%r14)
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x5346f
movl %eax, %r15d
leaq -0x2a(%rbp), %rdx
leaq -0x29(%rbp), %rcx
movq %r14, %rdi
movl %ebx, %esi
xorl %r8d, %r8d
callq 0x92870
movl %eax, %ebx
testb %r15b, %r15b
je 0x936da
movzbl -0x29(%rbp), %edi
orl $0x16, %edi
movss 0x23a74(%rip), %xmm0    # 0xb6fe4
callq 0x445bd
movss -0x48(%rbp), %xmm0
movss -0x44(%rbp), %xmm1
addss -0x40(%rbp), %xmm0
movss 0x23a78(%rip), %xmm2    # 0xb7004
mulss %xmm2, %xmm0
addss -0x3c(%rbp), %xmm1
mulss %xmm2, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlps %xmm0, -0x38(%rbp)
cmpb $0x1, -0x2a(%rbp)
jne 0x935e3
movq 0x2b8(%r13), %rdi
movss 0x1980(%r12), %xmm1
mulss 0x23a45(%rip), %xmm1    # 0xb7004
addss 0x23a1d(%rip), %xmm1    # 0xb6fe4
movss 0x24299(%rip), %xmm0    # 0xb7868
maxss %xmm1, %xmm0
leaq -0x38(%rbp), %rsi
movl %eax, %edx
movl $0xc, %ecx
callq 0x7aa54
movss 0x1980(%r12), %xmm0
mulss 0x23a0f(%rip), %xmm0    # 0xb7004
mulss 0x3f8ab(%rip), %xmm0    # 0xd2ea8
addss 0x239cb(%rip), %xmm0    # 0xb6fd0
movaps %xmm0, -0x70(%rbp)
movss 0x239d3(%rip), %xmm0    # 0xb6fe4
xorl %edi, %edi
callq 0x445bd
movl %eax, %r14d
movss 0x242a1(%rip), %xmm0    # 0xb78c4
movss -0x38(%rbp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, -0x38(%rbp)
addss -0x34(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movq 0x2b8(%r13), %rdi
movaps -0x70(%rbp), %xmm4
movaps %xmm4, %xmm2
addss %xmm1, %xmm2
movaps %xmm4, %xmm3
addss %xmm0, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
leaq -0x58(%rbp), %r15
movlps %xmm2, (%r15)
subss %xmm4, %xmm1
subss %xmm4, %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq -0x50(%rbp), %r12
movlps %xmm1, (%r12)
movq %r15, %rsi
movq %r12, %rdx
movl %eax, %ecx
movss 0x23961(%rip), %xmm0    # 0xb6fe4
callq 0x79abc
movq 0x2b8(%r13), %rdi
movss -0x38(%rbp), %xmm0
movss -0x34(%rbp), %xmm1
movaps -0x70(%rbp), %xmm4
movaps %xmm4, %xmm2
addss %xmm0, %xmm2
movaps %xmm1, %xmm3
subss %xmm4, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movlps %xmm2, (%r15)
subss %xmm4, %xmm0
addss %xmm1, %xmm4
unpcklps %xmm4, %xmm0            # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
movlps %xmm0, (%r12)
leaq -0x58(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movl %r14d, %ecx
movss 0x2390f(%rip), %xmm0    # 0xb6fe4
callq 0x79abc
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq