// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_combo_begin
NK_INTERN nk_bool
nk_combo_begin(struct nk_context *ctx, struct nk_window *win,
    struct nk_vec2 size, nk_bool is_clicked, struct nk_rect header)
{
    struct nk_window *popup;
    int is_open = 0;
    int is_active = 0;
    struct nk_rect body;
    nk_hash hash;

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

    popup = win->popup.win;
    body.x = header.x;
    body.w = size.x;
    body.y = header.y + header.h-ctx->style.window.combo_border;
    body.h = size.y;

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movaps %xmm2, %xmm4
movl %edx, %ebp
movaps %xmm0, 0x20(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movq 0x4780(%rdi), %rax
testq %rax, %rax
jne 0x4cba9
movq 0x38485(%rip), %r15     # 0x84ff0
movq (%r15), %rdi
leaq 0x1d197(%rip), %rsi     # 0x69d0c
leaq 0x1d1ae(%rip), %rdx     # 0x69d2a
movl $0x71d2, %ecx           # imm = 0x71D2
xorl %eax, %eax
movaps %xmm1, 0x10(%rsp)
movaps %xmm4, (%rsp)
callq 0x12ea0
movq (%r15), %rdi
callq 0x13960
movaps (%rsp), %xmm4
movaps 0x10(%rsp), %xmm1
movq 0x4780(%r14), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x4cc06
movq 0x38436(%rip), %r12     # 0x84ff0
movq (%r12), %rdi
leaq 0x1d147(%rip), %rsi     # 0x69d0c
leaq 0x1d15e(%rip), %rdx     # 0x69d2a
xorl %r15d, %r15d
movl $0x71d3, %ecx           # imm = 0x71D3
xorl %eax, %eax
movaps %xmm1, 0x10(%rsp)
movaps %xmm4, (%rsp)
callq 0x12ea0
movq (%r12), %rdi
callq 0x13960
movaps (%rsp), %xmm4
movaps 0x10(%rsp), %xmm1
movq 0x4780(%r14), %rax
testq %rax, %rax
je 0x4cccc
cmpq $0x0, 0xa8(%rax)
je 0x4ccc9
movq 0x120(%rbx), %rax
movaps %xmm1, %xmm0
addps %xmm4, %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
subss 0x2494(%r14), %xmm0
movl 0x160(%rbx), %r12d
leal 0x1(%r12), %ecx
movl %ecx, 0x160(%rbx)
xorl %r15d, %r15d
testq %rax, %rax
je 0x4cc5d
cmpl %r12d, 0x158(%rbx)
jne 0x4cc5d
cmpl $0x20, 0x128(%rbx)
sete %cl
jmp 0x4cc5f
xorl %ecx, %ecx
testq %rax, %rax
sete %dl
testl %ebp, %ebp
sete %sil
testb %dl, %sil
jne 0x4cccc
orb %cl, %dl
testb $0x1, %dl
je 0x4cccc
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm0     # xmm0 = xmm0[2,0],xmm1[2,3]
testl %ebp, %ebp
setne %cl
testq %rax, %rax
setne %al
xorps %xmm3, %xmm3
xorps %xmm2, %xmm2
testb %al, %cl
jne 0x4cc99
movaps %xmm4, %xmm3
movaps %xmm1, %xmm2
xorl %r15d, %r15d
pushq $0x20
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
movaps 0x20(%rsp), %xmm1
callq 0x3a99d
testl %eax, %eax
je 0x4cccc
movl $0x20, 0x128(%rbx)
movl %r12d, 0x158(%rbx)
pushq $0x1
popq %r15
jmp 0x4cccc
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq