// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x78, %rsp
movlpd %xmm0, 0x6c(%rsp)
movlpd %xmm1, 0x5c(%rsp)
movlpd %xmm2, 0x64(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movl $0x0, 0x34(%rsp)
movl $0x0, 0x30(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x7834f
movq 0x4cccd(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x39073(%rip), %rsi     # 0xb13a0
leaq 0x3908a(%rip), %rdx     # 0xb13be
movl $0x71d1, %ecx           # imm = 0x71D1
movb $0x0, %al
callq 0x13ec0
movq 0x4cca9(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x78351
jmp 0x78353
movq 0x50(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x78395
movq 0x4cc87(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x3902d(%rip), %rsi     # 0xb13a0
leaq 0x39044(%rip), %rdx     # 0xb13be
movl $0x71d2, %ecx           # imm = 0x71D2
movb $0x0, %al
callq 0x13ec0
movq 0x4cc63(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x78397
jmp 0x78399
movq 0x50(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x783e2
movq 0x4cc3a(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x38fe0(%rip), %rsi     # 0xb13a0
leaq 0x38ff7(%rip), %rdx     # 0xb13be
movl $0x71d3, %ecx           # imm = 0x71D3
movb $0x0, %al
callq 0x13ec0
movq 0x4cc16(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x783e4
cmpq $0x0, 0x50(%rsp)
je 0x78411
movq 0x50(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x78411
movq 0x50(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x7841e
movl $0x0, 0x74(%rsp)
jmp 0x785d6
movq 0x48(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x38(%rsp)
movss 0x5c(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
movss 0x6c(%rsp), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x60(%rsp), %xmm0
addss 0x68(%rsp), %xmm0
movq 0x50(%rsp), %rax
subss 0x2494(%rax), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x70(%rsp), %xmm0
movss %xmm0, 0x2c(%rsp)
movq 0x48(%rsp), %rcx
movl 0x160(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x160(%rcx)
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, 0x34(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x38(%rsp)
movb %al, 0xb(%rsp)
je 0x784db
movq 0x48(%rsp), %rax
movl 0x158(%rax), %ecx
xorl %eax, %eax
cmpl 0x1c(%rsp), %ecx
movb %al, 0xb(%rsp)
jne 0x784db
movq 0x48(%rsp), %rax
cmpl $0x20, 0x128(%rax)
sete %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x44(%rsp)
je 0x784fd
cmpl $0x0, 0x34(%rsp)
je 0x784fd
cmpl $0x0, 0x30(%rsp)
je 0x78520
cmpl $0x0, 0x34(%rsp)
je 0x7850b
cmpl $0x0, 0x30(%rsp)
je 0x78520
cmpl $0x0, 0x34(%rsp)
jne 0x7852d
cmpl $0x0, 0x30(%rsp)
jne 0x7852d
cmpl $0x0, 0x44(%rsp)
jne 0x7852d
movl $0x0, 0x74(%rsp)
jmp 0x785d6
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0x44(%rsp)
je 0x78563
cmpl $0x0, 0x34(%rsp)
je 0x78563
xorps %xmm3, %xmm3
movaps %xmm3, %xmm0
movaps %xmm3, %xmm1
movaps %xmm3, %xmm2
callq 0x151a0
movlpd %xmm0, 0xc(%rsp)
movlpd %xmm1, 0x14(%rsp)
jmp 0x78577
movq 0x5c(%rsp), %rax
movq %rax, 0xc(%rsp)
movq 0x64(%rsp), %rax
movq %rax, 0x14(%rsp)
movq (%rsp), %rdi
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movsd 0xc(%rsp), %xmm2
movsd 0x14(%rsp), %xmm3
xorl %eax, %eax
xorl %esi, %esi
movl $0x20, %edx
callq 0x5bad0
cmpl $0x0, %eax
jne 0x785b0
movl $0x0, 0x74(%rsp)
jmp 0x785d6
movq 0x48(%rsp), %rax
movl $0x20, 0x128(%rax)
movl 0x1c(%rsp), %ecx
movq 0x48(%rsp), %rax
movl %ecx, 0x158(%rax)
movl $0x1, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nop