// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_popup_end
NK_API void
nk_popup_end(struct nk_context *ctx)
{
    struct nk_window *win;
    struct nk_window *popup;

    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);
    if (!ctx || !ctx->current || !ctx->current->layout)
        return;

    popup = ctx->current;
    if (!popup->parent) return;
    win = popup->parent;
    if (popup->flags & NK_WINDOW_HIDDEN) {
        struct nk_panel *root;
        root = win->layout;
        while (root) {
            root->flags |= NK_WINDOW_REMOVE_ROM;
            root = root->parent;
        }
        win->popup.active = 0;
    }
    nk_push_scissor(&popup->buffer, nk_null_rect);
    nk_end(ctx);

    win->buffer = popup->buffer;
    nk_finish_popup(ctx, win);
    ctx->current = win;
    nk_push_scissor(&win->buffer, win->layout->clip);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x5b184
movq 0x69e98(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x5623e(%rip), %rsi     # 0xb13a0
leaq 0x56255(%rip), %rdx     # 0xb13be
movl $0x5270, %ecx           # imm = 0x5270
movb $0x0, %al
callq 0x13ec0
movq 0x69e74(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5b186
jmp 0x5b188
movq 0x20(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x5b1ca
movq 0x69e52(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x561f8(%rip), %rsi     # 0xb13a0
leaq 0x5620f(%rip), %rdx     # 0xb13be
movl $0x5271, %ecx           # imm = 0x5271
movb $0x0, %al
callq 0x13ec0
movq 0x69e2e(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5b1cc
jmp 0x5b1ce
movq 0x20(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5b217
movq 0x69e05(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x561ab(%rip), %rsi     # 0xb13a0
leaq 0x561c2(%rip), %rdx     # 0xb13be
movl $0x5272, %ecx           # imm = 0x5272
movb $0x0, %al
callq 0x13ec0
movq 0x69de1(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5b219
cmpq $0x0, 0x20(%rsp)
je 0x5b246
movq 0x20(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x5b246
movq 0x20(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5b24b
jmp 0x5b37f
movq 0x20(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x1d8(%rax)
jne 0x5b270
jmp 0x5b37f
movq 0x10(%rsp), %rax
movq 0x1d8(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movl 0x48(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x5b2df
movq 0x18(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x5b2d0
movq 0x8(%rsp), %rax
movl 0x4(%rax), %ecx
orl $0x10000, %ecx          # imm = 0x10000
movl %ecx, 0x4(%rax)
movq 0x8(%rsp), %rax
movq 0x1c8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x5b2a4
movq 0x18(%rsp), %rax
movl $0x0, 0x15c(%rax)
movq 0x10(%rsp), %rdi
addq $0x68, %rdi
movsd 0x52574(%rip), %xmm0    # 0xad864
movsd 0x52574(%rip), %xmm1    # 0xad86c
callq 0x14c90
movq 0x20(%rsp), %rdi
callq 0x14120
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movups 0x68(%rcx), %xmm0
movups 0x78(%rcx), %xmm1
movups 0x88(%rcx), %xmm2
movups 0x98(%rcx), %xmm3
movups %xmm3, 0x98(%rax)
movups %xmm2, 0x88(%rax)
movups %xmm1, 0x78(%rax)
movups %xmm0, 0x68(%rax)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x5b390
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x4780(%rax)
movq 0x18(%rsp), %rax
movq %rax, %rdi
addq $0x68, %rdi
movq 0xa8(%rax), %rax
movsd 0x44(%rax), %xmm0
movsd 0x4c(%rax), %xmm1
callq 0x14c90
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)