// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_menu_begin_image
NK_API nk_bool
nk_menu_begin_image(struct nk_context *ctx, const char *id, struct nk_image img,
    struct nk_vec2 size)
{
    struct nk_window *win;
    struct nk_rect header;
    const struct nk_input *in;
    int is_clicked = nk_false;
    nk_flags state;

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

    win = ctx->current;
    state = nk_widget(&header, ctx);
    if (!state) return 0;
    in = (state == NK_WIDGET_ROM || state == NK_WIDGET_DISABLED || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
    if (nk_do_button_image(&ctx->last_widget_state, &win->buffer, header,
        img, NK_BUTTON_DEFAULT, &ctx->style.menu_button, in))
        is_clicked = nk_true;
    return nk_menu_begin(ctx, win, id, is_clicked, header, size);
}

// Assembly:
subq $0x78, %rsp
leaq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
movlpd %xmm0, 0x6c(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl $0x0, 0x34(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x5e2a4
movq 0x66d78(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x5311e(%rip), %rsi     # 0xb13a0
leaq 0x53135(%rip), %rdx     # 0xb13be
movl $0x5425, %ecx           # imm = 0x5425
movb $0x0, %al
callq 0x13ec0
movq 0x66d54(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5e2a6
jmp 0x5e2a8
movq 0x60(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x5e2ea
movq 0x66d32(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x530d8(%rip), %rsi     # 0xb13a0
leaq 0x530ef(%rip), %rdx     # 0xb13be
movl $0x5426, %ecx           # imm = 0x5426
movb $0x0, %al
callq 0x13ec0
movq 0x66d0e(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5e2ec
jmp 0x5e2ee
movq 0x60(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5e337
movq 0x66ce5(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x5308b(%rip), %rsi     # 0xb13a0
leaq 0x530a2(%rip), %rdx     # 0xb13be
movl $0x5427, %ecx           # imm = 0x5427
movb $0x0, %al
callq 0x13ec0
movq 0x66cc1(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x5e339
cmpq $0x0, 0x60(%rsp)
je 0x5e366
movq 0x60(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x5e366
movq 0x60(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x5e373
movl $0x0, 0x74(%rsp)
jmp 0x5e477
movq 0x60(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x139c0
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x30(%rsp)
jne 0x5e3ab
movl $0x0, 0x74(%rsp)
jmp 0x5e477
cmpl $0x2, 0x30(%rsp)
je 0x5e3d2
cmpl $0x3, 0x30(%rsp)
je 0x5e3d2
movq 0x50(%rsp), %rax
movq 0xa8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x5e3db
xorl %eax, %eax
movq %rax, 0x20(%rsp)
jmp 0x5e3e5
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rcx
movq %rcx, %rdi
addq $0x2598, %rdi           # imm = 0x2598
movq 0x50(%rsp), %rsi
addq $0x68, %rsi
addq $0x380, %rcx            # imm = 0x380
movq 0x38(%rsp), %r8
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movq 0x10(%rdx), %r9
movq %rsp, %rax
movq %r9, 0x10(%rax)
movups (%rdx), %xmm2
movups %xmm2, (%rax)
xorl %edx, %edx
callq 0x5e480
cmpl $0x0, %eax
je 0x5e449
movl $0x1, 0x34(%rsp)
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movl 0x34(%rsp), %ecx
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movsd 0x6c(%rsp), %xmm2
callq 0x5df20
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq