// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_nonblock_begin
NK_LIB nk_bool
nk_nonblock_begin(struct nk_context *ctx,
    nk_flags flags, struct nk_rect body, struct nk_rect header,
    enum nk_panel_type panel_type)
{
    struct nk_window *popup;
    struct nk_window *win;
    struct nk_panel *panel;
    int is_active = nk_true;

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

    /* popups cannot have popups */
    win = ctx->current;
    panel = win->layout;
    NK_ASSERT(!((int)panel->type & (int)NK_PANEL_SET_POPUP));
    (void)panel;
    popup = win->popup.win;
    if (!popup) {
        /* create window for nonblocking popup */
        popup = (struct nk_window*)nk_create_window(ctx);
        popup->parent = win;
        win->popup.win = popup;
        win->popup.type = panel_type;
        nk_command_buffer_init(&popup->buffer, &ctx->memory, NK_CLIPPING_ON);
    } else {
        /* close the popup if user pressed outside or in the header */
        int pressed, in_body, in_header;
#ifdef NK_BUTTON_TRIGGER_ON_RELEASE
        pressed = nk_input_is_mouse_released(&ctx->input, NK_BUTTON_LEFT);
#else
        pressed = nk_input_is_mouse_pressed(&ctx->input, NK_BUTTON_LEFT);
#endif
        in_body = nk_input_is_mouse_hovering_rect(&ctx->input, body);
        in_header = nk_input_is_mouse_hovering_rect(&ctx->input, header);
        if (pressed && (!in_body || in_header))
            is_active = nk_false;
    }
    win->popup.header = header;

    if (!is_active) {
        /* remove read only mode from all parent panels */
        struct nk_panel *root = win->layout;
        while (root) {
            root->flags |= NK_WINDOW_REMOVE_ROM;
            root = root->parent;
        }
        return is_active;
    }
    popup->bounds = body;
    popup->parent = win;
    popup->layout = (struct nk_panel*)nk_create_panel(ctx);
    popup->flags = flags;
    popup->flags |= NK_WINDOW_BORDER;
    popup->flags |= NK_WINDOW_DYNAMIC;
    popup->seq = ctx->seq;
    win->popup.active = 1;
    NK_ASSERT(popup->layout);

    nk_start_popup(ctx, win);
    popup->buffer = win->buffer;
    nk_push_scissor(&popup->buffer, nk_null_rect);
    ctx->current = popup;

    nk_panel_begin(ctx, 0, panel_type);
    win->buffer = popup->buffer;
    popup->layout->parent = win->layout;
    popup->layout->offset_x = &popup->scrollbar.x;
    popup->layout->offset_y = &popup->scrollbar.y;

    /* set read only mode to all parent panels */
    {struct nk_panel *root;
    root = win->layout;
    while (root) {
        root->flags |= NK_WINDOW_ROM;
        root = root->parent;
    }}
    return is_active;
}

// Assembly:
subq $0x78, %rsp
movlpd %xmm0, 0x64(%rsp)
movlpd %xmm1, 0x6c(%rsp)
movlpd %xmm2, 0x54(%rsp)
movlpd %xmm3, 0x5c(%rsp)
movq %rdi, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movl %edx, 0x40(%rsp)
movl $0x1, 0x24(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x5bb3c
movq 0x694e0(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x55886(%rip), %rsi     # 0xb13a0
leaq 0x5589d(%rip), %rdx     # 0xb13be
movl $0x5215, %ecx           # imm = 0x5215
movb $0x0, %al
callq 0x13ec0
movq 0x694bc(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5bb3e
jmp 0x5bb40
movq 0x48(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x5bb82
movq 0x6949a(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x55840(%rip), %rsi     # 0xb13a0
leaq 0x55857(%rip), %rdx     # 0xb13be
movl $0x5216, %ecx           # imm = 0x5216
movb $0x0, %al
callq 0x13ec0
movq 0x69476(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5bb84
jmp 0x5bb86
movq 0x48(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5bbcf
movq 0x6944d(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x557f3(%rip), %rsi     # 0xb13a0
leaq 0x5580a(%rip), %rdx     # 0xb13be
movl $0x5217, %ecx           # imm = 0x5217
movb $0x0, %al
callq 0x13ec0
movq 0x69429(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5bbd1
cmpq $0x0, 0x48(%rsp)
je 0x5bbfe
movq 0x48(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x5bbfe
movq 0x48(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5bc0b
movl $0x0, 0x74(%rsp)
jmp 0x5bfcb
movq 0x48(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movl (%rax), %eax
andl $0xf4, %eax
cmpl $0x0, %eax
je 0x5bc71
movq 0x693ab(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x55751(%rip), %rsi     # 0xb13a0
leaq 0x55768(%rip), %rdx     # 0xb13be
movl $0x521e, %ecx           # imm = 0x521E
movb $0x0, %al
callq 0x13ec0
movq 0x69387(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5bc73
movq 0x30(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x5bced
movq 0x48(%rsp), %rdi
callq 0x557f0
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x1d8(%rax)
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x120(%rax)
movl 0x40(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x128(%rax)
movq 0x38(%rsp), %rdi
addq $0x68, %rdi
movq 0x48(%rsp), %rsi
addq $0x2508, %rsi           # imm = 0x2508
movl $0x1, %edx
callq 0x55b50
jmp 0x5bd50
movq 0x48(%rsp), %rdi
xorl %esi, %esi
callq 0x15040
movl %eax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movsd 0x64(%rsp), %xmm0
movsd 0x6c(%rsp), %xmm1
callq 0x15440
movl %eax, 0x1c(%rsp)
movq 0x48(%rsp), %rdi
movsd 0x54(%rsp), %xmm0
movsd 0x5c(%rsp), %xmm1
callq 0x15440
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x20(%rsp)
je 0x5bd4e
cmpl $0x0, 0x1c(%rsp)
je 0x5bd46
cmpl $0x0, 0x18(%rsp)
je 0x5bd4e
movl $0x0, 0x24(%rsp)
jmp 0x5bd50
movq 0x30(%rsp), %rax
movq 0x54(%rsp), %rcx
movq %rcx, 0x170(%rax)
movq 0x5c(%rsp), %rcx
movq %rcx, 0x178(%rax)
cmpl $0x0, 0x24(%rsp)
jne 0x5bdbe
movq 0x30(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x5bdb1
movq 0x10(%rsp), %rax
movl 0x4(%rax), %ecx
orl $0x10000, %ecx          # imm = 0x10000
movl %ecx, 0x4(%rax)
movq 0x10(%rsp), %rax
movq 0x1c8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x5bd85
movl 0x24(%rsp), %eax
movl %eax, 0x74(%rsp)
jmp 0x5bfcb
movq 0x38(%rsp), %rax
movq 0x64(%rsp), %rcx
movq %rcx, 0x4c(%rax)
movq 0x6c(%rsp), %rcx
movq %rcx, 0x54(%rax)
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x1d8(%rax)
movq 0x48(%rsp), %rdi
callq 0x55d00
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0xa8(%rax)
movl 0x44(%rsp), %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x48(%rax)
movq 0x38(%rsp), %rax
movl 0x48(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x48(%rax)
movq 0x38(%rsp), %rax
movl 0x48(%rax), %ecx
orl $0x800, %ecx            # imm = 0x800
movl %ecx, 0x48(%rax)
movq 0x48(%rsp), %rax
movl 0x4794(%rax), %ecx
movq 0x38(%rsp), %rax
movl %ecx, (%rax)
movq 0x30(%rsp), %rax
movl $0x1, 0x15c(%rax)
movq 0x38(%rsp), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5be8d
movq 0x6918f(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x55535(%rip), %rsi     # 0xb13a0
leaq 0x5554c(%rip), %rdx     # 0xb13be
movl $0x5248, %ecx           # imm = 0x5248
movb $0x0, %al
callq 0x13ec0
movq 0x6916b(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5be8f
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x5af10
movq 0x38(%rsp), %rax
movq 0x30(%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 0x38(%rsp), %rdi
addq $0x68, %rdi
movsd 0x5197f(%rip), %xmm0    # 0xad864
movsd 0x5197f(%rip), %xmm1    # 0xad86c
callq 0x14c90
movq 0x38(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x4780(%rax)
movq 0x48(%rsp), %rdi
movl 0x40(%rsp), %edx
xorl %eax, %eax
movl %eax, %esi
callq 0x55d50
movq 0x30(%rsp), %rdi
addq $0x68, %rdi
movq 0x38(%rsp), %rsi
addq $0x68, %rsi
movl $0x40, %edx
callq 0x14160
movq 0x30(%rsp), %rax
movq 0xa8(%rax), %rcx
movq 0x38(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rcx, 0x1c8(%rax)
movq 0x38(%rsp), %rcx
addq $0x5c, %rcx
movq 0x38(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rcx, 0x18(%rax)
movq 0x38(%rsp), %rcx
addq $0x5c, %rcx
addq $0x4, %rcx
movq 0x38(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rcx, 0x20(%rax)
movq 0x30(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x5bfc3
movq 0x8(%rsp), %rax
movl 0x4(%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %ecx, 0x4(%rax)
movq 0x8(%rsp), %rax
movq 0x1c8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x5bf97
movl 0x24(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)