// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_contextual_end
NK_API void
nk_contextual_end(struct nk_context *ctx)
{
    struct nk_window *popup;
    struct nk_panel *panel;
    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    if (!ctx || !ctx->current) return;

    popup = ctx->current;
    panel = popup->layout;
    NK_ASSERT(popup->parent);
    NK_ASSERT((int)panel->type & (int)NK_PANEL_SET_POPUP);
    if (panel->flags & NK_WINDOW_DYNAMIC) {
        /* Close behavior
        This is a bit of a hack solution since we do not know before we end our popup
        how big it will be. We therefore do not directly know when a
        click outside the non-blocking popup must close it at that direct frame.
        Instead it will be closed in the next frame.*/
        struct nk_rect body = {0,0,0,0};
        if (panel->at_y < (panel->bounds.y + panel->bounds.h)) {
            struct nk_vec2 padding = nk_panel_get_padding(&ctx->style, panel->type);
            body = panel->bounds;
            body.y = (panel->at_y + panel->footer_height + panel->border + padding.y + panel->row.height);
            body.h = (panel->bounds.y + panel->bounds.h) - body.y;
        }
        {int pressed = nk_input_is_mouse_pressed(&ctx->input, NK_BUTTON_LEFT);
        int in_body = nk_input_is_mouse_hovering_rect(&ctx->input, body);
        if (pressed && in_body)
            popup->flags |= NK_WINDOW_HIDDEN;
        }
    }
    if (popup->flags & NK_WINDOW_HIDDEN)
        popup->seq = 0;
    nk_popup_end(ctx);
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x3fbc3
movq 0x48452(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x321e4(%rip), %rsi     # 0x71d8c
leaq 0x321fb(%rip), %rdx     # 0x71daa
movl $0x536c, %ecx           # imm = 0x536C
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
cmpq $0x0, 0x4780(%rbx)
jne 0x3fbf9
movq 0x4841c(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x321ae(%rip), %rsi     # 0x71d8c
leaq 0x321c5(%rip), %rdx     # 0x71daa
movl $0x536d, %ecx           # imm = 0x536D
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
testq %rbx, %rbx
je 0x3fd4b
movq 0x4780(%rbx), %r14
testq %r14, %r14
je 0x3fd4b
movq 0xa8(%r14), %r15
cmpq $0x0, 0x1d8(%r14)
jne 0x3fc51
movq 0x483c6(%rip), %r12     # 0x87ff0
movq (%r12), %rdi
leaq 0x32157(%rip), %rsi     # 0x71d8c
leaq 0x3216e(%rip), %rdx     # 0x71daa
movl $0x5372, %ecx           # imm = 0x5372
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
testb $-0xc, (%r15)
jne 0x3fc85
movq 0x48392(%rip), %r12     # 0x87ff0
movq (%r12), %rdi
leaq 0x32123(%rip), %rsi     # 0x71d8c
leaq 0x3213a(%rip), %rdx     # 0x71daa
movl $0x5373, %ecx           # imm = 0x5373
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
testb $0x8, 0x5(%r15)
je 0x3fd6f
movss 0xc(%r15), %xmm0
movss 0x2c(%r15), %xmm3
addss 0x14(%r15), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm3, %xmm0
xorps %xmm2, %xmm2
jbe 0x3fd02
leaq 0x168(%rbx), %rdi
movl (%r15), %esi
movaps %xmm0, 0x10(%rsp)
movss %xmm3, 0xc(%rsp)
callq 0x3fd90
movsd 0x8(%r15), %xmm1
movss 0xc(%rsp), %xmm2
addss 0x34(%r15), %xmm2
addss 0x3c(%r15), %xmm2
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
addss %xmm2, %xmm0
addss 0x78(%r15), %xmm0
movsd 0x10(%r15), %xmm2
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps 0x10(%rsp), %xmm3
subss %xmm0, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
cmpl $0x0, 0x104(%rbx)
je 0x3fd16
movb $0x1, %al
cmpl $0x0, 0x108(%rbx)
jne 0x3fd18
xorl %eax, %eax
movss 0x144(%rbx), %xmm0
xorl %ecx, %ecx
ucomiss %xmm1, %xmm0
jb 0x3fd64
movaps %xmm1, %xmm3
addss %xmm2, %xmm3
ucomiss %xmm0, %xmm3
jbe 0x3fd64
movaps %xmm1, %xmm3
shufps $0x55, %xmm1, %xmm3     # xmm3 = xmm3[1,1],xmm1[1,1]
movss 0x148(%rbx), %xmm0
ucomiss %xmm3, %xmm0
jae 0x3fd57
xorl %ecx, %ecx
jmp 0x3fd64
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addps %xmm2, %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
ucomiss %xmm0, %xmm1
seta %cl
andb %cl, %al
cmpb $0x1, %al
jne 0x3fd6f
orb $0x20, 0x49(%r14)
testb $0x20, 0x49(%r14)
je 0x3fd7d
movl $0x0, (%r14)
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x13280