// File: /workspace/github_c_makefile_star2_O0/space222[P]silo/./nuklear.h
// Function: nk_draw_selectable(nk_command_buffer*, unsigned int, nk_style_selectable const*, int, nk_rect const*, nk_rect const*, nk_image const*, nk_symbol_type, char const*, int, unsigned int, nk_user_font const*)
NK_LIB void
nk_draw_selectable(struct nk_command_buffer *out,
    nk_flags state, const struct nk_style_selectable *style, int active,
    const struct nk_rect *bounds,
    const struct nk_rect *icon, const struct nk_image *img, enum nk_symbol_type sym,
    const char *string, int len, nk_flags align, const struct nk_user_font *font)
{
    const struct nk_style_item *background;
    struct nk_text text;
    text.padding = style->padding;

    /* select correct colors/images */
    if (!active) {
        if (state & NK_WIDGET_STATE_ACTIVED) {
            background = &style->pressed;
            text.text = style->text_pressed;
        } else if (state & NK_WIDGET_STATE_HOVER) {
            background = &style->hover;
            text.text = style->text_hover;
        } else {
            background = &style->normal;
            text.text = style->text_normal;
        }
    } else {
        if (state & NK_WIDGET_STATE_ACTIVED) {
            background = &style->pressed_active;
            text.text = style->text_pressed_active;
        } else if (state & NK_WIDGET_STATE_HOVER) {
            background = &style->hover_active;
            text.text = style->text_hover_active;
        } else {
            background = &style->normal_active;
            text.text = style->text_normal_active;
        }
    }
    /* draw selectable background and text */
    if (background->type == NK_STYLE_ITEM_IMAGE) {
        nk_draw_image(out, *bounds, &background->data.image, nk_white);
        text.background = nk_rgba(0,0,0,0);
    } else {
        nk_fill_rect(out, *bounds, style->rounding, background->data.color);
        text.background = background->data.color;
    }
    if (icon) {
        if (img) nk_draw_image(out, *icon, img, nk_white);
        else nk_draw_symbol(out, sym, *icon, text.background, text.text, 1, font);
    }
    nk_widget_text(out, *bounds, string, len, &text, align, font);
}

// Assembly:
subq $0xd8, %rsp
movq 0x108(%rsp), %rax
movl 0x100(%rsp), %eax
movl 0xf8(%rsp), %eax
movq 0xf0(%rsp), %rax
movl 0xe8(%rsp), %eax
movq 0xe0(%rsp), %rax
movq %rdi, 0xd0(%rsp)
movl %esi, 0xcc(%rsp)
movq %rdx, 0xc0(%rsp)
movl %ecx, 0xbc(%rsp)
movq %r8, 0xb0(%rsp)
movq %r9, 0xa8(%rsp)
movq 0xc0(%rsp), %rax
movq 0xe4(%rax), %rax
movq %rax, 0x90(%rsp)
cmpl $0x0, 0xbc(%rsp)
jne 0x3cb67
movl 0xcc(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x3cb01
movq 0xc0(%rsp), %rax
addq $0x40, %rax
movq %rax, 0xa0(%rsp)
movq 0xc0(%rsp), %rax
movl 0xc8(%rax), %eax
movl %eax, 0x9c(%rsp)
jmp 0x3cb62
movl 0xcc(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x3cb3b
movq 0xc0(%rsp), %rax
addq $0x20, %rax
movq %rax, 0xa0(%rsp)
movq 0xc0(%rsp), %rax
movl 0xc4(%rax), %eax
movl %eax, 0x9c(%rsp)
jmp 0x3cb60
movq 0xc0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xc0(%rsp), %rax
movl 0xc0(%rax), %eax
movl %eax, 0x9c(%rsp)
jmp 0x3cb62
jmp 0x3cc0c
movl 0xcc(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x3cba3
movq 0xc0(%rsp), %rax
addq $0xa0, %rax
movq %rax, 0xa0(%rsp)
movq 0xc0(%rsp), %rax
movl 0xd4(%rax), %eax
movl %eax, 0x9c(%rsp)
jmp 0x3cc0a
movl 0xcc(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x3cbdf
movq 0xc0(%rsp), %rax
addq $0x80, %rax
movq %rax, 0xa0(%rsp)
movq 0xc0(%rsp), %rax
movl 0xd0(%rax), %eax
movl %eax, 0x9c(%rsp)
jmp 0x3cc08
movq 0xc0(%rsp), %rax
addq $0x60, %rax
movq %rax, 0xa0(%rsp)
movq 0xc0(%rsp), %rax
movl 0xcc(%rax), %eax
movl %eax, 0x9c(%rsp)
jmp 0x3cc0a
jmp 0x3cc0c
movq 0xa0(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3cc81
movq 0xd0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x80(%rsp)
movq 0xa0(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0x7c(%rsp) # imm = 0xFFFFFFFF
movsd 0x80(%rsp), %xmm0
movsd 0x88(%rsp), %xmm1
movl 0x7c(%rsp), %edx
callq 0xc3c0
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x57b0
movl %eax, 0x78(%rsp)
movl 0x78(%rsp), %eax
movl %eax, 0x98(%rsp)
jmp 0x3ccdf
movq 0xd0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x60(%rsp)
movq 0xc0(%rsp), %rax
movss 0xe0(%rax), %xmm2
movq 0xa0(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x5c(%rsp)
movsd 0x60(%rsp), %xmm0
movsd 0x68(%rsp), %xmm1
movl 0x5c(%rsp), %esi
callq 0xb130
movq 0xa0(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x98(%rsp)
cmpq $0x0, 0xa8(%rsp)
je 0x3cd98
cmpq $0x0, 0xe0(%rsp)
je 0x3cd38
movq 0xd0(%rsp), %rdi
movq 0xa8(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0xe0(%rsp), %rsi
movl $0xffffffff, 0x3c(%rsp) # imm = 0xFFFFFFFF
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movl 0x3c(%rsp), %edx
callq 0xc3c0
jmp 0x3cd96
movq 0xd0(%rsp), %rdi
movl 0xe8(%rsp), %esi
movq 0xa8(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
movl 0x98(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x9c(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x108(%rsp), %r8
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movl 0x1c(%rsp), %edx
movl 0x18(%rsp), %ecx
movss 0x8293(%rip), %xmm2     # 0x45024
callq 0x34ca0
jmp 0x3cd98
movq 0xd0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movq 0xf0(%rsp), %rsi
movl 0xf8(%rsp), %edx
movl 0x100(%rsp), %r8d
movq 0x108(%rsp), %r9
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0x90(%rsp), %rcx
callq 0x24820
addq $0xd8, %rsp
retq
nop