// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_widget
NK_API enum nk_widget_layout_states
nk_widget(struct nk_rect *bounds, const struct nk_context *ctx)
{
    struct nk_rect c, v;
    struct nk_window *win;
    struct nk_panel *layout;
    const struct nk_input *in;

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

    /* allocate space and check if the widget needs to be updated and drawn */
    nk_panel_alloc_space(bounds, ctx);
    win = ctx->current;
    layout = win->layout;
    in = &ctx->input;
    c = layout->clip;

    /*  if one of these triggers you forgot to add an `if` condition around either
        a window, group, popup, combobox or contextual menu `begin` and `end` block.
        Example:
            if (nk_begin(...) {...} nk_end(...); or
            if (nk_group_begin(...) { nk_group_end(...);} */
    NK_ASSERT(!(layout->flags & NK_WINDOW_MINIMIZED));
    NK_ASSERT(!(layout->flags & NK_WINDOW_HIDDEN));
    NK_ASSERT(!(layout->flags & NK_WINDOW_CLOSED));

    /* need to convert to int here to remove floating point errors */
    bounds->x = (float)((int)bounds->x);
    bounds->y = (float)((int)bounds->y);
    bounds->w = (float)((int)bounds->w);
    bounds->h = (float)((int)bounds->h);

    c.x = (float)((int)c.x);
    c.y = (float)((int)c.y);
    c.w = (float)((int)c.w);
    c.h = (float)((int)c.h);

    nk_unify(&v, &c, bounds->x, bounds->y, bounds->x + bounds->w, bounds->y + bounds->h);
    if (!NK_INTERSECT(c.x, c.y, c.w, c.h, bounds->x, bounds->y, bounds->w, bounds->h))
        return NK_WIDGET_INVALID;
    if (win->widgets_disabled)
        return NK_WIDGET_DISABLED;
    if (!NK_INBOX(in->mouse.pos.x, in->mouse.pos.y, v.x, v.y, v.w, v.h))
        return NK_WIDGET_ROM;
    return NK_WIDGET_VALID;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x5a559
movq 0x6aac3(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x56e69(%rip), %rsi     # 0xb13a0
leaq 0x56e80(%rip), %rdx     # 0xb13be
movl $0x5ae6, %ecx           # imm = 0x5AE6
movb $0x0, %al
callq 0x13ec0
movq 0x6aa9f(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5a55b
jmp 0x5a55d
movq 0x40(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x5a59f
movq 0x6aa7d(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x56e23(%rip), %rsi     # 0xb13a0
leaq 0x56e3a(%rip), %rdx     # 0xb13be
movl $0x5ae7, %ecx           # imm = 0x5AE7
movb $0x0, %al
callq 0x13ec0
movq 0x6aa59(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5a5a1
jmp 0x5a5a3
movq 0x40(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5a5ec
movq 0x6aa30(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x56dd6(%rip), %rsi     # 0xb13a0
leaq 0x56ded(%rip), %rdx     # 0xb13be
movl $0x5ae8, %ecx           # imm = 0x5AE8
movb $0x0, %al
callq 0x13ec0
movq 0x6aa0c(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5a5ee
cmpq $0x0, 0x40(%rsp)
je 0x5a61b
movq 0x40(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x5a61b
movq 0x40(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5a628
movl $0x0, 0x54(%rsp)
jmp 0x5a94f
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x62030
movq 0x40(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x44(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x4c(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x10(%rsp), %rax
movl 0x4(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x5a6bf
movq 0x6a95d(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x56d03(%rip), %rsi     # 0xb13a0
leaq 0x56d1a(%rip), %rdx     # 0xb13be
movl $0x5af8, %ecx           # imm = 0x5AF8
movb $0x0, %al
callq 0x13ec0
movq 0x6a939(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5a6c1
jmp 0x5a6c3
movq 0x10(%rsp), %rax
movl 0x4(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x5a708
movq 0x6a914(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x56cba(%rip), %rsi     # 0xb13a0
leaq 0x56cd1(%rip), %rdx     # 0xb13be
movl $0x5af9, %ecx           # imm = 0x5AF9
movb $0x0, %al
callq 0x13ec0
movq 0x6a8f0(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5a70a
jmp 0x5a70c
movq 0x10(%rsp), %rax
movl 0x4(%rax), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x5a751
movq 0x6a8cb(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x56c71(%rip), %rsi     # 0xb13a0
leaq 0x56c88(%rip), %rdx     # 0xb13be
movl $0x5afa, %ecx           # imm = 0x5AFA
movb $0x0, %al
callq 0x13ec0
movq 0x6a8a7(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5a753
movq 0x48(%rsp), %rax
cvttss2si (%rax), %eax
cvtsi2ss %eax, %xmm0
movq 0x48(%rsp), %rax
movss %xmm0, (%rax)
movq 0x48(%rsp), %rax
cvttss2si 0x4(%rax), %eax
cvtsi2ss %eax, %xmm0
movq 0x48(%rsp), %rax
movss %xmm0, 0x4(%rax)
movq 0x48(%rsp), %rax
cvttss2si 0x8(%rax), %eax
cvtsi2ss %eax, %xmm0
movq 0x48(%rsp), %rax
movss %xmm0, 0x8(%rax)
movq 0x48(%rsp), %rax
cvttss2si 0xc(%rax), %eax
cvtsi2ss %eax, %xmm0
movq 0x48(%rsp), %rax
movss %xmm0, 0xc(%rax)
cvttss2si 0x30(%rsp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x30(%rsp)
cvttss2si 0x34(%rsp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x34(%rsp)
cvttss2si 0x38(%rsp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x38(%rsp)
cvttss2si 0x3c(%rsp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x3c(%rsp)
movq 0x48(%rsp), %rax
movss (%rax), %xmm0
movq 0x48(%rsp), %rax
movss 0x4(%rax), %xmm1
movq 0x48(%rsp), %rax
movss (%rax), %xmm2
movq 0x48(%rsp), %rax
addss 0x8(%rax), %xmm2
movq 0x48(%rsp), %rax
movss 0x4(%rax), %xmm3
movq 0x48(%rsp), %rax
addss 0xc(%rax), %xmm3
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x63b70
movq 0x48(%rsp), %rax
movss (%rax), %xmm1
movss 0x30(%rsp), %xmm0
addss 0x38(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x5a8ac
movss 0x30(%rsp), %xmm1
movq 0x48(%rsp), %rax
movss (%rax), %xmm0
movq 0x48(%rsp), %rax
addss 0x8(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x5a8ac
movq 0x48(%rsp), %rax
movss 0x4(%rax), %xmm1
movss 0x34(%rsp), %xmm0
addss 0x3c(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x5a8ac
movss 0x34(%rsp), %xmm1
movq 0x48(%rsp), %rax
movss 0x4(%rax), %xmm0
movq 0x48(%rsp), %rax
addss 0xc(%rax), %xmm0
ucomiss %xmm1, %xmm0
ja 0x5a8b9
movl $0x0, 0x54(%rsp)
jmp 0x5a94f
movq 0x18(%rsp), %rax
cmpl $0x0, 0x1b0(%rax)
je 0x5a8d1
movl $0x3, 0x54(%rsp)
jmp 0x5a94f
movss 0x20(%rsp), %xmm1
movq 0x8(%rsp), %rax
movss 0x144(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x5a93d
movq 0x8(%rsp), %rax
movss 0x144(%rax), %xmm1
movss 0x20(%rsp), %xmm0
addss 0x28(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x5a93d
movss 0x24(%rsp), %xmm1
movq 0x8(%rsp), %rax
movss 0x148(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x5a93d
movq 0x8(%rsp), %rax
movss 0x148(%rax), %xmm1
movss 0x24(%rsp), %xmm0
addss 0x2c(%rsp), %xmm0
ucomiss %xmm1, %xmm0
ja 0x5a947
movl $0x2, 0x54(%rsp)
jmp 0x5a94f
movl $0x1, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax,%rax)