// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movaps %xmm0, (%rsp)
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x4eaaf
movq 0x36566(%rip), %r14     # 0x84ff0
movq (%r14), %rdi
leaq 0x1b278(%rip), %rsi     # 0x69d0c
leaq 0x1b28f(%rip), %rdx     # 0x69d2a
movl $0x7521, %ecx           # imm = 0x7521
xorl %eax, %eax
callq 0x12ea0
movq (%r14), %rdi
callq 0x13960
movq 0x4780(%rbx), %r14
testq %r14, %r14
jne 0x4eaee
movq 0x3652e(%rip), %r14     # 0x84ff0
movq (%r14), %rdi
leaq 0x1b240(%rip), %rsi     # 0x69d0c
leaq 0x1b257(%rip), %rdx     # 0x69d2a
movl $0x7522, %ecx           # imm = 0x7522
xorl %eax, %eax
callq 0x12ea0
movq (%r14), %rdi
callq 0x13960
movq 0x4780(%rbx), %r14
cmpq $0x0, 0xa8(%r14)
jne 0x4eb36
movq 0x364f1(%rip), %r14     # 0x84ff0
movq (%r14), %rdi
leaq 0x1b203(%rip), %rsi     # 0x69d0c
leaq 0x1b21a(%rip), %rdx     # 0x69d2a
xorl %ebp, %ebp
movl $0x7523, %ecx           # imm = 0x7523
xorl %eax, %eax
callq 0x12ea0
movq (%r14), %rdi
callq 0x13960
movq 0x4780(%rbx), %r14
testq %r14, %r14
je 0x4ebfe
movq 0xa8(%r14), %rax
xorl %ebp, %ebp
testq %rax, %rax
je 0x4ebfe
cmpq $0x0, 0x120(%r14)
je 0x4eb60
testb $-0x10, 0x128(%r14)
jne 0x4ebfe
movaps (%rsp), %xmm1
cvttss2si %xmm1, %ecx
cvttps2dq %xmm1, %xmm0
cvtdq2ps %xmm0, %xmm0
xorl %edx, %edx
ucomiss %xmm0, %xmm1
seta %dl
addl %ecx, %edx
movsd 0x144(%rbx), %xmm0
addps 0x17a48(%rip), %xmm0    # 0x665d0
cvttps2dq %xmm0, %xmm1
xorps %xmm2, %xmm2
cmpltps %xmm2, %xmm0
paddd %xmm1, %xmm0
cvtdq2ps %xmm0, %xmm0
cvttps2dq %xmm0, %xmm0
movsd 0x44(%rax), %xmm1
cvttps2dq %xmm1, %xmm1
psubd %xmm1, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps 0x17c4b(%rip), %xmm1    # 0x66800
cvtsi2ss %edx, %xmm1
leaq 0x1b3a6(%rip), %rdx     # 0x69f66
pushq $0x1
popq %rsi
pushq $0x21
popq %rcx
movq %rbx, %rdi
callq 0x12220
movl %eax, %ebp
testl %eax, %eax
je 0x4ebe2
movq 0xa8(%r14), %rax
andl $0xffffefff, 0x4(%rax)  # imm = 0xFFFFEFFF
movl $0x80, %eax
movl %eax, 0x128(%r14)
movq 0x4780(%rbx), %rcx
movq 0xa8(%rcx), %rcx
movl %eax, (%rcx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq