// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_menu_begin
NK_INTERN int
nk_menu_begin(struct nk_context *ctx, struct nk_window *win,
    const char *id, int is_clicked, struct nk_rect header, struct nk_vec2 size)
{
    int is_open = 0;
    int is_active = 0;
    struct nk_rect body;
    struct nk_window *popup;
    nk_hash hash = nk_murmur_hash(id, (int)nk_strlen(id), NK_PANEL_MENU);

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

    body.x = header.x;
    body.w = size.x;
    body.y = header.y + header.h;
    body.h = size.y;

    popup = win->popup.win;
    is_open = popup ? nk_true : nk_false;
    is_active = (popup && (win->popup.name == hash) && win->popup.type == NK_PANEL_MENU);
    if ((is_clicked && is_open && !is_active) || (is_open && !is_active) ||
        (!is_open && !is_active && !is_clicked)) return 0;
    if (!nk_nonblock_begin(ctx, NK_WINDOW_NO_SCROLLBAR, body, header, NK_PANEL_MENU))
        return 0;

    win->popup.type = NK_PANEL_MENU;
    win->popup.name = hash;
    return 1;
}

// Assembly:
subq $0x78, %rsp
movlpd %xmm0, 0x64(%rsp)
movlpd %xmm1, 0x6c(%rsp)
movlpd %xmm2, 0x5c(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
movl $0x0, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0x14050
movq 0x8(%rsp), %rdi
movl %eax, %esi
movl $0x40, %edx
callq 0x135e0
movl %eax, 0x14(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x5dfbd
movq 0x6705f(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x53405(%rip), %rsi     # 0xb13a0
leaq 0x5341c(%rip), %rdx     # 0xb13be
movl $0x53e6, %ecx           # imm = 0x53E6
movb $0x0, %al
callq 0x13ec0
movq 0x6703b(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5dfbf
jmp 0x5dfc1
movq 0x50(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x5e003
movq 0x67019(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x533bf(%rip), %rsi     # 0xb13a0
leaq 0x533d6(%rip), %rdx     # 0xb13be
movl $0x53e7, %ecx           # imm = 0x53E7
movb $0x0, %al
callq 0x13ec0
movq 0x66ff5(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5e005
jmp 0x5e007
movq 0x50(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5e050
movq 0x66fcc(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x53372(%rip), %rsi     # 0xb13a0
leaq 0x53389(%rip), %rdx     # 0xb13be
movl $0x53e8, %ecx           # imm = 0x53E8
movb $0x0, %al
callq 0x13ec0
movq 0x66fa8(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5e052
cmpq $0x0, 0x50(%rsp)
je 0x5e07f
movq 0x50(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x5e07f
movq 0x50(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5e08c
movl $0x0, 0x74(%rsp)
jmp 0x5e1d2
movss 0x64(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x5c(%rsp), %xmm0
movss %xmm0, 0x2c(%rsp)
movss 0x68(%rsp), %xmm0
addss 0x70(%rsp), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x60(%rsp), %xmm0
movss %xmm0, 0x30(%rsp)
movq 0x48(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, 0x38(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x18(%rsp)
movb %al, 0x7(%rsp)
je 0x5e122
movq 0x48(%rsp), %rax
movl 0x158(%rax), %ecx
xorl %eax, %eax
cmpl 0x14(%rsp), %ecx
movb %al, 0x7(%rsp)
jne 0x5e122
movq 0x48(%rsp), %rax
cmpl $0x40, 0x128(%rax)
sete %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x3c(%rsp)
je 0x5e144
cmpl $0x0, 0x38(%rsp)
je 0x5e144
cmpl $0x0, 0x34(%rsp)
je 0x5e167
cmpl $0x0, 0x38(%rsp)
je 0x5e152
cmpl $0x0, 0x34(%rsp)
je 0x5e167
cmpl $0x0, 0x38(%rsp)
jne 0x5e171
cmpl $0x0, 0x34(%rsp)
jne 0x5e171
cmpl $0x0, 0x3c(%rsp)
jne 0x5e171
movl $0x0, 0x74(%rsp)
jmp 0x5e1d2
movq 0x50(%rsp), %rdi
movsd 0x24(%rsp), %xmm0
movsd 0x2c(%rsp), %xmm1
movsd 0x64(%rsp), %xmm2
movsd 0x6c(%rsp), %xmm3
movl $0x20, %esi
movl $0x40, %edx
callq 0x5bad0
cmpl $0x0, %eax
jne 0x5e1ac
movl $0x0, 0x74(%rsp)
jmp 0x5e1d2
movq 0x48(%rsp), %rax
movl $0x40, 0x128(%rax)
movl 0x14(%rsp), %ecx
movq 0x48(%rsp), %rax
movl %ecx, 0x158(%rax)
movl $0x1, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopl (%rax,%rax)