// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::ImageButtonEx(unsigned int, void*, ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec4 const&, ImVec4 const&)
bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec2& padding, const ImVec4& bg_col, const ImVec4& tint_col)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size + padding * 2);
    ItemSize(bb);
    if (!ItemAdd(bb, id))
        return false;

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

    // Render
    const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
    RenderNavHighlight(bb, id);
    RenderFrame(bb.Min, bb.Max, col, true, ImClamp((float)ImMin(padding.x, padding.y), 0.0f, g.Style.FrameRounding));
    if (bg_col.w > 0.0f)
        window->DrawList->AddRectFilled(bb.Min + padding, bb.Max - padding, GetColorU32(bg_col));
    window->DrawList->AddImage(texture_id, bb.Min + padding, bb.Max - padding, uv0, uv1, GetColorU32(tint_col));

    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
leaq 0x69abf(%rip), %rax     # 0xfdcd0
movq (%rax), %r15
movq 0x1ae0(%r15), %r13
movb $0x1, 0x90(%r13)
cmpb $0x0, 0x93(%r13)
je 0x94234
xorl %eax, %eax
jmp 0x94448
movq %r9, %r12
movl %edi, %ebx
movq %rsi, -0x58(%rbp)
movq %rcx, -0x60(%rbp)
movq %r8, -0x68(%rbp)
movss 0xd8(%r13), %xmm0
movss 0xdc(%r13), %xmm1
addss (%rdx), %xmm0
addss 0x4(%rdx), %xmm1
movss (%r9), %xmm2
movss 0x4(%r9), %xmm3
addss %xmm2, %xmm2
addss %xmm3, %xmm3
addss %xmm0, %xmm2
addss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movq 0xd8(%r13), %rax
leaq -0x40(%rbp), %r14
movq %rax, (%r14)
movlps %xmm2, 0x8(%r14)
movss 0x22d37(%rip), %xmm0    # 0xb6fd0
movq %r14, %rdi
callq 0x56a82
movq $0x0, -0x50(%rbp)
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x5346f
testb %al, %al
je 0x94444
leaq -0x40(%rbp), %rdi
leaq -0x29(%rbp), %rdx
leaq -0x2a(%rbp), %r14
movl %ebx, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x92870
movq %rax, -0x50(%rbp)
cmpb $0x1, (%r14)
jne 0x942eb
movl $0x17, %edi
cmpb $0x0, -0x29(%rbp)
jne 0x942f2
movzbl -0x29(%rbp), %edi
addl $0x15, %edi
movss 0x22cea(%rip), %xmm0    # 0xb6fe4
callq 0x445bd
movl %eax, -0x44(%rbp)
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
callq 0x45ca4
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
movss (%r12), %xmm2
minss 0x4(%r12), %xmm2
movss 0x15a0(%r15), %xmm3
minss %xmm2, %xmm3
xorps %xmm4, %xmm4
cmpltss %xmm4, %xmm2
andnps %xmm3, %xmm2
movl -0x44(%rbp), %edi
movl $0x1, %esi
callq 0x459e5
movq 0x10(%rbp), %rdi
movss 0xc(%rdi), %xmm0
ucomiss 0x234e2(%rip), %xmm0    # 0xb7844
jbe 0x943d0
movq 0x2b8(%r13), %rbx
movss (%r12), %xmm0
movss 0x4(%r12), %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 -0x78(%rbp), %r14
movlps %xmm2, (%r14)
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 -0x70(%rbp), %r15
movlps %xmm2, (%r15)
callq 0x445ff
xorps %xmm0, %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %eax, %ecx
movl $0xf, %r8d
callq 0x79d4a
movq 0x2b8(%r13), %rbx
movss (%r12), %xmm0
movss 0x4(%r12), %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 -0x78(%rbp), %r14
movlps %xmm2, (%r14)
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 -0x70(%rbp), %r15
movlps %xmm2, (%r15)
movq 0x18(%rbp), %rdi
callq 0x445ff
movl %eax, (%rsp)
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
movq %r14, %rdx
movq %r15, %rcx
movq -0x60(%rbp), %r8
movq -0x68(%rbp), %r9
callq 0x7b6fe
movq -0x50(%rbp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq