// File: /workspace/github_cpp_makefile_star2_O1/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 0x3edbc(%rip), %r13     # 0x55490
movq 0x1758(%r13), %r15
movb $0x1, 0x72(%r15)
cmpb $0x0, 0x74(%r15)
jne 0x168c1
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %rbx
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xa872
movl %eax, -0x34(%rbp)
movss 0x26c80(%rip), %xmm0    # 0x3d38c
movq %rbx, -0x48(%rbp)
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xe720
movlps %xmm0, -0x40(%rbp)
movl 0xa8(%r15), %ebx
movss 0xac(%r15), %xmm2
movd %ebx, %xmm0
movdqa %xmm0, -0x70(%rbp)
testb $0x40, %r14b
je 0x16761
movss 0x140c(%r13), %xmm1
movss 0xcc(%r15), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x16761
subss %xmm1, %xmm0
addss %xmm0, %xmm2
movss %xmm2, -0x2c(%rbp)
movsd (%r12), %xmm0
movss 0x1408(%r13), %xmm1
addss %xmm1, %xmm1
addss -0x40(%rbp), %xmm1
movss 0x140c(%r13), %xmm2
addss %xmm2, %xmm2
addss -0x3c(%rbp), %xmm2
callq 0xafbc
movaps -0x70(%rbp), %xmm1
addss %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss -0x2c(%rbp), %xmm3
addss %xmm3, %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq -0x58(%rbp), %r12
movl %ebx, (%r12)
movss %xmm3, 0x4(%r12)
movlps %xmm1, 0x8(%r12)
movss 0x140c(%r13), %xmm0
movss 0x8(%r12), %xmm1
movss 0xc(%r12), %xmm2
subss (%r12), %xmm1
subss %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0x80(%rbp), %rdi
movlps %xmm1, (%rdi)
callq 0xaab7
leaq -0x34(%rbp), %rsi
movq %r12, %rdi
callq 0xac09
testb %al, %al
je 0x168c1
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 0x13d8d
movl %eax, %r14d
movzbl (%r12), %eax
andl $0x1, %eax
orl $0x16, %eax
cmpb $0x0, (%r15)
movq 0x3ec43(%rip), %rcx     # 0x55490
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 0x8cce
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movss 0x1410(%r13), %xmm2
movl %eax, %edi
movl $0x1, %esi
callq 0xe7a8
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq -0x40(%rbp), %r8
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
xorl %ecx, %ecx
movl $0x12, %r9d
callq 0xe466
jmp 0x168c4
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq