// File: /workspace/github_cpp_makefile_star2_O2/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 $0x58, %rsp
movq 0x3dc86(%rip), %r13     # 0x50480
movq 0x1758(%r13), %r14
movb $0x1, 0x72(%r14)
cmpb $0x0, 0x74(%r14)
jne 0x1299d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x9858
movl %eax, -0x34(%rbp)
pushq $0x1
popq %rdx
movss 0x23b67(%rip), %xmm0    # 0x3639c
movq %rbx, -0x40(%rbp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xc6e3
movlps %xmm0, -0x48(%rbp)
movl 0xa8(%r14), %ebx
movss 0xac(%r14), %xmm3
movd %ebx, %xmm1
movdqa %xmm1, -0x70(%rbp)
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4     # xmm4 = xmm4[1,1],xmm0[1,1]
movss 0x140c(%r13), %xmm2
testb $0x40, %r15b
je 0x1288c
movss 0xcc(%r14), %xmm1
ucomiss %xmm2, %xmm1
jbe 0x1288c
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 0x9ecf
movaps -0x70(%rbp), %xmm1
addss %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss -0x2c(%rbp), %xmm2
addss %xmm2, %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq -0x58(%rbp), %r12
movl %ebx, (%r12)
movss %xmm2, 0x4(%r12)
movlps %xmm1, 0x8(%r12)
movss 0x140c(%r13), %xmm0
movq %r12, %rdi
callq 0x9af8
leaq -0x34(%rbp), %rsi
movq %r12, %rdi
callq 0x9b28
testb %al, %al
je 0x1299d
movzbl 0x125(%r14), %r9d
orl %r15d, %r9d
movl -0x34(%rbp), %esi
leaq -0x58(%rbp), %rbx
leaq -0x2e(%rbp), %r15
leaq -0x2d(%rbp), %r12
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1077a
movzbl (%r12), %ecx
andl $0x1, %ecx
orl $0x16, %ecx
cmpb $0x0, (%r15)
movl %eax, %r15d
pushq $0x15
popq %rsi
cmovnel %ecx, %esi
movss 0x23a3a(%rip), %xmm0    # 0x36390
movq %r14, %rdi
callq 0x1eae4
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movss 0x1410(%r13), %xmm2
movl %eax, %edi
pushq $0x1
popq %rsi
callq 0xc76b
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq -0x48(%rbp), %r8
pushq $0x12
popq %r9
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
xorl %ecx, %ecx
callq 0xc49f
jmp 0x129a0
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq