// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.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;

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

    ImVec2 pos = window->DC.CursorPos;
    if ((flags & ImGuiButtonFlags_AlignTextBaseLine) && style.FramePadding.y < window->DC.CurrLineTextBaseOffset) // Try to vertically align buttons that are smaller/have no padding so that text baseline matches (bit hacky, since it shouldn't be a flag)
        pos.y += window->DC.CurrLineTextBaseOffset - 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(size, style.FramePadding.y);
    if (!ItemAdd(bb, id))
        return false;

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

    // Render
    const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
    RenderNavHighlight(bb, id);
    RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding);
    RenderTextClipped(bb.Min + style.FramePadding, bb.Max - style.FramePadding, label, NULL, &label_size, style.ButtonTextAlign, &bb);

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

    IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
leaq 0x6aaec(%rip), %rax     # 0xfbcd0
movq (%rax), %rbx
movq 0x1ae0(%rbx), %r15
movb $0x1, 0x90(%r15)
cmpb $0x0, 0x93(%r15)
je 0x91208
xorl %r14d, %r14d
jmp 0x9140c
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %r13
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x4570a
movl %eax, -0x48(%rbp)
movss 0x23da7(%rip), %xmm0    # 0xb4fd0
movq %r13, -0x50(%rbp)
movq %r13, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x44a23
movlps %xmm0, -0x58(%rbp)
movl 0xd8(%r15), %r13d
movss 0xdc(%r15), %xmm3
movd %r13d, %xmm1
movdqa %xmm1, -0x70(%rbp)
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4     # xmm4 = xmm4[1,1],xmm0[1,1]
movss 0x159c(%rbx), %xmm2
testw %r12w, %r12w
movl %r12d, -0x44(%rbp)
jns 0x91289
movss 0x110(%r15), %xmm1
ucomiss %xmm2, %xmm1
jbe 0x91289
subss %xmm2, %xmm1
addss %xmm1, %xmm3
movss %xmm3, -0x2c(%rbp)
movsd (%r14), %xmm3
movss 0x1598(%rbx), %xmm1
addss %xmm1, %xmm1
addss %xmm0, %xmm1
addss %xmm2, %xmm2
addss %xmm4, %xmm2
movaps %xmm3, %xmm0
callq 0x5620c
leaq -0x88(%rbp), %rdi
movlps %xmm0, (%rdi)
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 -0x40(%rbp), %r12
movl %r13d, (%r12)
movss %xmm2, 0x4(%r12)
movlps %xmm1, 0x8(%r12)
movss 0x159c(%rbx), %xmm0
callq 0x52315
xorl %r14d, %r14d
movq %r12, %rdi
movl -0x48(%rbp), %r13d
movl %r13d, %esi
xorl %edx, %edx
callq 0x524a8
testb %al, %al
je 0x9140c
movl 0x1cc(%r15), %r8d
andl $0x2, %r8d
shll $0x9, %r8d
orl -0x44(%rbp), %r8d
leaq -0x2e(%rbp), %r14
leaq -0x2d(%rbp), %r15
movq %r12, %rdi
movl %r13d, %esi
movq %r14, %rdx
movq %r15, %rcx
callq 0x90b6f
movb (%r15), %cl
movb (%r14), %dl
movl %ecx, %esi
xorb $0x1, %sil
andb %dl, %sil
movzbl %sil, %esi
addl $0x15, %esi
testb $0x1, %dl
movl $0x17, %edi
cmovel %esi, %edi
movl %eax, %r14d
testb %cl, %cl
cmovel %esi, %edi
movss 0x23c74(%rip), %xmm0    # 0xb4fe4
callq 0x43bca
movl %eax, %r15d
movq %r12, %rdi
movl %r13d, %esi
movl $0x1, %edx
callq 0x4521b
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movss 0x15a0(%rbx), %xmm2
movl %r15d, %edi
movl $0x1, %esi
callq 0x44f69
movss 0x1598(%rbx), %xmm0
movss 0x159c(%rbx), %xmm1
movss -0x40(%rbp), %xmm2
addss %xmm0, %xmm2
movss -0x3c(%rbp), %xmm3
addss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
leaq -0x80(%rbp), %rdi
movlps %xmm2, (%rdi)
movss -0x38(%rbp), %xmm2
movss -0x34(%rbp), %xmm3
subss %xmm0, %xmm2
subss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
leaq -0x78(%rbp), %rsi
movlps %xmm2, (%rsi)
addq $0x15f4, %rbx           # imm = 0x15F4
movq %r12, (%rsp)
leaq -0x58(%rbp), %r8
movq -0x50(%rbp), %rdx
xorl %ecx, %ecx
movq %rbx, %r9
callq 0x44ac2
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq