// File: /workspace/github_c_makefile_star2_O3/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 0x53a26
movq 0x335ef(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x1d391(%rip), %rsi     # 0x70d9c
leaq 0x1d3a8(%rip), %rdx     # 0x70dba
movl $0x7521, %ecx           # imm = 0x7521
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
movq 0x4780(%rbx), %r14
testq %r14, %r14
jne 0x53a65
movq 0x335b7(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x1d359(%rip), %rsi     # 0x70d9c
leaq 0x1d370(%rip), %rdx     # 0x70dba
movl $0x7522, %ecx           # imm = 0x7522
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
movq 0x4780(%rbx), %r14
cmpq $0x0, 0xa8(%r14)
jne 0x53aad
movq 0x3357a(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x1d31c(%rip), %rsi     # 0x70d9c
leaq 0x1d333(%rip), %rdx     # 0x70dba
xorl %ebp, %ebp
movl $0x7523, %ecx           # imm = 0x7523
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
movq 0x4780(%rbx), %r14
testq %r14, %r14
je 0x53b79
movq 0xa8(%r14), %rax
xorl %ebp, %ebp
testq %rax, %rax
je 0x53b79
cmpq $0x0, 0x120(%r14)
je 0x53ad7
testb $-0x10, 0x128(%r14)
jne 0x53b79
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 0x19ae1(%rip), %xmm0    # 0x6d5e0
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 0x19d34(%rip), %xmm1    # 0x6d860
cvtsi2ss %edx, %xmm1
leaq 0x1d4bf(%rip), %rdx     # 0x70ff6
movq %rbx, %rdi
movl $0x1, %esi
movl $0x21, %ecx
callq 0x121f0
movl %eax, %ebp
testl %eax, %eax
je 0x53b5d
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