// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x5d504
movq 0x67b18(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x53ebe(%rip), %rsi     # 0xb13a0
leaq 0x53ed5(%rip), %rdx     # 0xb13be
movl $0x536c, %ecx           # imm = 0x536C
movb $0x0, %al
callq 0x13ec0
movq 0x67af4(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5d506
jmp 0x5d508
movq 0x30(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x5d54a
movq 0x67ad2(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x53e78(%rip), %rsi     # 0xb13a0
leaq 0x53e8f(%rip), %rdx     # 0xb13be
movl $0x536d, %ecx           # imm = 0x536D
movb $0x0, %al
callq 0x13ec0
movq 0x67aae(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5d54c
cmpq $0x0, 0x30(%rsp)
je 0x5d563
movq 0x30(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x5d568
jmp 0x5d75d
movq 0x30(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x1d8(%rax)
jne 0x5d5cc
movq 0x67a50(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x53df6(%rip), %rsi     # 0xb13a0
leaq 0x53e0d(%rip), %rdx     # 0xb13be
movl $0x5372, %ecx           # imm = 0x5372
movb $0x0, %al
callq 0x13ec0
movq 0x67a2c(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5d5ce
jmp 0x5d5d0
movq 0x20(%rsp), %rax
movl (%rax), %eax
andl $0xf4, %eax
cmpl $0x0, %eax
jne 0x5d614
movq 0x67a08(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x53dae(%rip), %rsi     # 0xb13a0
leaq 0x53dc5(%rip), %rdx     # 0xb13be
movl $0x5373, %ecx           # imm = 0x5373
movb $0x0, %al
callq 0x13ec0
movq 0x679e4(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5d616
movq 0x20(%rsp), %rax
movl 0x4(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x5d736
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x13c40
movq 0x20(%rsp), %rax
movss 0x2c(%rax), %xmm1
movq 0x20(%rsp), %rax
movss 0xc(%rax), %xmm0
movq 0x20(%rsp), %rax
addss 0x14(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x5d6ed
movq 0x30(%rsp), %rdi
addq $0x168, %rdi            # imm = 0x168
movq 0x20(%rsp), %rax
movl (%rax), %esi
callq 0x5d770
movlpd %xmm0, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movss 0x2c(%rax), %xmm0
movq 0x20(%rsp), %rax
addss 0x34(%rax), %xmm0
movq 0x20(%rsp), %rax
addss 0x3c(%rax), %xmm0
addss 0xc(%rsp), %xmm0
movq 0x20(%rsp), %rax
addss 0x78(%rax), %xmm0
movss %xmm0, 0x14(%rsp)
movq 0x20(%rsp), %rax
movss 0xc(%rax), %xmm0
movq 0x20(%rsp), %rax
addss 0x14(%rax), %xmm0
subss 0x14(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
movq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x15040
movl %eax, 0x4(%rsp)
movq 0x30(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x15440
movl %eax, (%rsp)
cmpl $0x0, 0x4(%rsp)
je 0x5d734
cmpl $0x0, (%rsp)
je 0x5d734
movq 0x28(%rsp), %rax
movl 0x48(%rax), %ecx
orl $0x2000, %ecx           # imm = 0x2000
movl %ecx, 0x48(%rax)
jmp 0x5d736
movq 0x28(%rsp), %rax
movl 0x48(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x5d753
movq 0x28(%rsp), %rax
movl $0x0, (%rax)
movq 0x30(%rsp), %rdi
callq 0x143f0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)