// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_tooltip_begin
NK_API nk_bool
nk_tooltip_begin(struct nk_context *ctx, float width)
{
    int x,y,w,h;
    struct nk_window *win;
    const struct nk_input *in;
    struct nk_rect bounds;
    int ret;

    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current || !ctx->current->layout)
        return 0;

    /* make sure that no nonblocking popup is currently active */
    win = ctx->current;
    in = &ctx->input;
    if (win->popup.win && ((int)win->popup.type & (int)NK_PANEL_SET_NONBLOCK))
        return 0;

    w = nk_iceilf(width);
    h = nk_iceilf(nk_null_rect.h);
    x = nk_ifloorf(in->mouse.pos.x + 1) - (int)win->layout->clip.x;
    y = nk_ifloorf(in->mouse.pos.y + 1) - (int)win->layout->clip.y;

    bounds.x = (float)x;
    bounds.y = (float)y;
    bounds.w = (float)w;
    bounds.h = (float)h;

    ret = nk_popup_begin(ctx, NK_POPUP_DYNAMIC,
        "__##Tooltip##__", NK_WINDOW_NO_SCROLLBAR|NK_WINDOW_BORDER, bounds);
    if (ret) win->layout->flags &= ~(nk_flags)NK_WINDOW_ROM;
    win->popup.type = NK_PANEL_TOOLTIP;
    ctx->current->layout->type = NK_PANEL_TOOLTIP;
    return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movaps %xmm0, (%rsp)
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x54572
movq 0x33aa3(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x1d835(%rip), %rsi     # 0x71d8c
leaq 0x1d84c(%rip), %rdx     # 0x71daa
movl $0x7521, %ecx           # imm = 0x7521
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
cmpq $0x0, 0x4780(%rbx)
jne 0x545a8
movq 0x33a6d(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x1d7ff(%rip), %rsi     # 0x71d8c
leaq 0x1d816(%rip), %rdx     # 0x71daa
movl $0x7522, %ecx           # imm = 0x7522
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
movq 0x4780(%rbx), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x545e5
movq 0x33a30(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x1d7c2(%rip), %rsi     # 0x71d8c
leaq 0x1d7d9(%rip), %rdx     # 0x71daa
movl $0x7523, %ecx           # imm = 0x7523
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
xorl %eax, %eax
testq %rbx, %rbx
je 0x546c8
movq 0x4780(%rbx), %r14
testq %r14, %r14
je 0x546c8
movq 0xa8(%r14), %rcx
testq %rcx, %rcx
je 0x546c8
cmpq $0x0, 0x120(%r14)
je 0x54628
testb $-0x10, 0x128(%r14)
jne 0x546c8
movaps (%rsp), %xmm1
cvttss2si %xmm1, %eax
cvttps2dq %xmm1, %xmm0
cvtdq2ps %xmm0, %xmm0
xorl %edx, %edx
ucomiss %xmm0, %xmm1
seta %dl
addl %eax, %edx
movsd 0x144(%rbx), %xmm0
addps 0x19f90(%rip), %xmm0    # 0x6e5e0
cvttps2dq %xmm0, %xmm1
xorps %xmm2, %xmm2
cmpltps %xmm2, %xmm0
paddd %xmm1, %xmm0
cvtdq2ps %xmm0, %xmm0
cvttps2dq %xmm0, %xmm0
movsd 0x44(%rcx), %xmm1
cvttps2dq %xmm1, %xmm1
psubd %xmm1, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps 0x1a203(%rip), %xmm1    # 0x6e880
cvtsi2ss %edx, %xmm1
leaq 0x1d95e(%rip), %rdx     # 0x71fe6
movq %rbx, %rdi
movl $0x1, %esi
movl $0x21, %ecx
callq 0x121f0
testl %eax, %eax
je 0x546ac
movq 0xa8(%r14), %rcx
andl $0xffffefff, 0x4(%rcx)  # imm = 0xFFFFEFFF
movl $0x80, %ecx
movl %ecx, 0x128(%r14)
movq 0x4780(%rbx), %rdx
movq 0xa8(%rdx), %rdx
movl %ecx, (%rdx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq