// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x3bcab
movq 0x4936a(%rip), %r14     # 0x84ff0
movq (%r14), %rdi
leaq 0x2e07c(%rip), %rsi     # 0x69d0c
leaq 0x2e093(%rip), %rdx     # 0x69d2a
movl $0x536c, %ecx           # imm = 0x536C
xorl %eax, %eax
callq 0x12ea0
movq (%r14), %rdi
callq 0x13960
movq 0x4780(%rbx), %r14
testq %r14, %r14
jne 0x3bcf3
movq 0x49332(%rip), %r14     # 0x84ff0
movq (%r14), %rdi
leaq 0x2e044(%rip), %rsi     # 0x69d0c
leaq 0x2e05b(%rip), %rdx     # 0x69d2a
movl $0x536d, %ecx           # imm = 0x536D
xorl %eax, %eax
callq 0x12ea0
movq (%r14), %rdi
callq 0x13960
movq 0x4780(%rbx), %r14
testq %r14, %r14
je 0x3be32
movq 0xa8(%r14), %r15
cmpq $0x0, 0x1d8(%r14)
jne 0x3bd32
movq 0x492e5(%rip), %r12     # 0x84ff0
movq (%r12), %rdi
leaq 0x2dff6(%rip), %rsi     # 0x69d0c
leaq 0x2e00d(%rip), %rdx     # 0x69d2a
movl $0x5372, %ecx           # imm = 0x5372
xorl %eax, %eax
callq 0x12ea0
movq (%r12), %rdi
callq 0x13960
testb $-0xc, (%r15)
jne 0x3bd66
movq 0x492b1(%rip), %r12     # 0x84ff0
movq (%r12), %rdi
leaq 0x2dfc2(%rip), %rsi     # 0x69d0c
leaq 0x2dfd9(%rip), %rdx     # 0x69d2a
movl $0x5373, %ecx           # imm = 0x5373
xorl %eax, %eax
callq 0x12ea0
movq (%r12), %rdi
callq 0x13960
testb $0x8, 0x5(%r15)
je 0x3be13
movss 0xc(%r15), %xmm2
movss 0x2c(%r15), %xmm3
addss 0x14(%r15), %xmm2
xorps %xmm0, %xmm0
ucomiss %xmm3, %xmm2
xorps %xmm1, %xmm1
jbe 0x3bde6
leaq 0x168(%rbx), %rdi
movl (%r15), %esi
movaps %xmm2, 0x10(%rsp)
movss %xmm3, 0xc(%rsp)
callq 0x3be3f
movaps %xmm0, %xmm2
movsd 0x8(%r15), %xmm0
movss 0xc(%rsp), %xmm1
addss 0x34(%r15), %xmm1
addss 0x3c(%r15), %xmm1
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
addss %xmm1, %xmm2
addss 0x78(%r15), %xmm2
movsd 0x10(%r15), %xmm1
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movaps 0x10(%rsp), %xmm3
subss %xmm2, %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
cmpl $0x0, 0x104(%rbx)
je 0x3bdfb
movb $0x1, %bpl
cmpl $0x0, 0x108(%rbx)
jne 0x3bdfd
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x143d0
testb %bpl, %bpl
je 0x3be13
testl %eax, %eax
je 0x3be13
orb $0x20, 0x49(%r14)
testb $0x20, 0x49(%r14)
je 0x3be1e
andl $0x0, (%r14)
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x133e0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq