// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::ButtonEx(char const*, ImVec2 const&, int)
bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags flags)
{
    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 = ImGui::CalcTextSize(label, NULL, true);

    ImVec2 pos = window->DC.CursorPos;
    if ((flags & ImGuiButtonFlags_AlignTextBaseLine) && style.FramePadding.y < window->DC.CurrentLineTextBaseOffset)
        pos.y += window->DC.CurrentLineTextBaseOffset - style.FramePadding.y;
    ImVec2 size = CalcItemSize(size_arg, label_size.x + style.FramePadding.x * 2.0f, label_size.y + style.FramePadding.y * 2.0f);

    const ImRect bb(pos, pos + size);
    ItemSize(bb, style.FramePadding.y);
    if (!ItemAdd(bb, &id))
        return false;

    if (window->DC.ButtonRepeat) flags |= ImGuiButtonFlags_Repeat;
    bool hovered, held;
    bool pressed = ButtonBehavior(bb, id, &hovered, &held, true, flags);

    // Render
    const ImU32 col = window->Color((hovered && held) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
    RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding);
    RenderTextClipped(bb.Min, bb.Max, label, NULL, &label_size, ImGuiAlign_Center | ImGuiAlign_VCenter);

    // Automatically close popups
    //if (pressed && !(flags & ImGuiButtonFlags_DontClosePopups) && (window->Flags & ImGuiWindowFlags_Popup))
    //    ImGui::CloseCurrentPopup();

    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq 0x3f249(%rip), %r13     # 0x55480
movq 0x1758(%r13), %r15
movb $0x1, 0x72(%r15)
cmpb $0x0, 0x74(%r15)
jne 0x1641a
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %rbx
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xa766
movl %eax, -0x34(%rbp)
movss 0x2712d(%rip), %xmm0    # 0x3d39c
movq %rbx, -0x40(%rbp)
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xe505
movlps %xmm0, -0x48(%rbp)
movl 0xa8(%r15), %ebx
movss 0xac(%r15), %xmm3
movl %ebx, -0x38(%rbp)
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4     # xmm4 = xmm4[1,1],xmm0[1,1]
movss 0x140c(%r13), %xmm2
testb $0x40, %r14b
je 0x162c5
movss 0xcc(%r15), %xmm1
ucomiss %xmm2, %xmm1
jbe 0x162c5
subss %xmm2, %xmm1
addss %xmm1, %xmm3
movss %xmm3, -0x2c(%rbp)
movsd (%r12), %xmm3
movss 0x1408(%r13), %xmm1
addss %xmm1, %xmm1
addss %xmm0, %xmm1
addss %xmm2, %xmm2
addss %xmm4, %xmm2
movaps %xmm3, %xmm0
callq 0xaea4
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
movss -0x38(%rbp), %xmm4
addss %xmm4, %xmm0
movss -0x2c(%rbp), %xmm3
addss %xmm3, %xmm2
movaps %xmm0, %xmm1
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0x58(%rbp), %r12
movl %ebx, (%r12)
movss %xmm3, 0x4(%r12)
movaps %xmm1, -0x70(%rbp)
movlps %xmm1, 0x8(%r12)
movss 0x140c(%r13), %xmm1
subss %xmm4, %xmm0
subss %xmm3, %xmm2
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
leaq -0x80(%rbp), %rdi
movlps %xmm0, (%rdi)
movaps %xmm1, %xmm0
callq 0xa99d
leaq -0x34(%rbp), %rsi
movq %r12, %rdi
callq 0xaaef
testb %al, %al
je 0x1641a
movzbl 0x125(%r15), %r9d
orl %r14d, %r9d
movl -0x34(%rbp), %esi
leaq -0x58(%rbp), %rbx
leaq -0x2e(%rbp), %r15
leaq -0x2d(%rbp), %r12
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
movl $0x1, %r8d
callq 0x13a49
movl %eax, %r14d
movzbl (%r12), %eax
andl $0x1, %eax
orl $0x16, %eax
cmpb $0x0, (%r15)
movq 0x3f0d9(%rip), %rcx     # 0x55480
movl $0x15, %edx
cmovnel %eax, %edx
shll $0x4, %edx
movups 0x1460(%rcx,%rdx), %xmm0
leaq -0x80(%rbp), %rdi
movaps %xmm0, (%rdi)
movss 0x13e8(%rcx), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
callq 0x8c82
movsd (%rbx), %xmm0
movss 0x1410(%r13), %xmm2
movaps -0x70(%rbp), %xmm1
movl %eax, %edi
movl $0x1, %esi
callq 0xe58d
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq -0x48(%rbp), %r8
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
xorl %ecx, %ecx
movl $0x12, %r9d
callq 0xe23a
jmp 0x1641d
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq