// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_selectable
NK_LIB void
nk_draw_selectable(struct nk_command_buffer *out,
    nk_flags state, const struct nk_style_selectable *style, nk_bool 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;
        }
    }

    text.text = nk_rgb_factor(text.text, style->color_factor);

    /* draw selectable background and text */
    switch (background->type) {
        case NK_STYLE_ITEM_IMAGE:
            text.background = nk_rgba(0, 0, 0, 0);
            nk_draw_image(out, *bounds, &background->data.image, nk_rgb_factor(nk_white, style->color_factor));
            break;
        case NK_STYLE_ITEM_NINE_SLICE:
            text.background = nk_rgba(0, 0, 0, 0);
            nk_draw_nine_slice(out, *bounds, &background->data.slice, nk_rgb_factor(nk_white, style->color_factor));
            break;
        case NK_STYLE_ITEM_COLOR:
            text.background = background->data.color;
            nk_fill_rect(out, *bounds, style->rounding, background->data.color);
            break;
    }
    if (icon) {
        if (img) nk_draw_image(out, *icon, img, nk_rgb_factor(nk_white, style->color_factor));
        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 $0xb8, %rsp
movq 0xe8(%rsp), %rax
movl 0xe0(%rsp), %eax
movl 0xd8(%rsp), %eax
movq 0xd0(%rsp), %rax
movl 0xc8(%rsp), %eax
movq 0xc0(%rsp), %rax
movq %rdi, 0xb0(%rsp)
movl %esi, 0xac(%rsp)
movq %rdx, 0xa0(%rsp)
movl %ecx, 0x9c(%rsp)
movq %r8, 0x90(%rsp)
movq %r9, 0x88(%rsp)
movq 0xa0(%rsp), %rax
movq 0x114(%rax), %rax
movq %rax, 0x70(%rsp)
cmpl $0x0, 0x9c(%rsp)
jne 0x8a2cb
movl 0xac(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x8a26b
movq 0xa0(%rsp), %rax
addq $0x50, %rax
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movl 0xf8(%rax), %eax
movl %eax, 0x7c(%rsp)
jmp 0x8a2c6
movl 0xac(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x8a2a2
movq 0xa0(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movl 0xf4(%rax), %eax
movl %eax, 0x7c(%rsp)
jmp 0x8a2c4
movq 0xa0(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movl 0xf0(%rax), %eax
movl %eax, 0x7c(%rsp)
jmp 0x8a2c6
jmp 0x8a367
movl 0xac(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x8a304
movq 0xa0(%rsp), %rax
addq $0xc8, %rax
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movl 0x104(%rax), %eax
movl %eax, 0x7c(%rsp)
jmp 0x8a365
movl 0xac(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x8a33d
movq 0xa0(%rsp), %rax
addq $0xa0, %rax
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movl 0x100(%rax), %eax
movl %eax, 0x7c(%rsp)
jmp 0x8a363
movq 0xa0(%rsp), %rax
addq $0x78, %rax
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movl 0xfc(%rax), %eax
movl %eax, 0x7c(%rsp)
jmp 0x8a365
jmp 0x8a367
movq 0xa0(%rsp), %rax
movss 0x12c(%rax), %xmm0
movl 0x7c(%rsp), %edi
callq 0x15100
movl %eax, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x7c(%rsp)
movq 0x80(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x54(%rsp)
testl %eax, %eax
je 0x8a4d4
jmp 0x8a3a4
movl 0x54(%rsp), %eax
subl $0x1, %eax
je 0x8a3c1
jmp 0x8a3af
movl 0x54(%rsp), %eax
subl $0x2, %eax
je 0x8a44c
jmp 0x8a51c
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x14680
movl %eax, 0x68(%rsp)
movl 0x68(%rsp), %eax
movl %eax, 0x78(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x80(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rax
movss 0x12c(%rax), %xmm0
movl 0x26e95(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movl %eax, %ecx
movq 0x48(%rsp), %rax
movl %ecx, 0x64(%rsp)
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x64(%rsp), %edx
callq 0x14690
jmp 0x8a51c
xorl %ecx, %ecx
movl %ecx, %edi
movl %ecx, %esi
movl %ecx, %edx
callq 0x14680
movl %eax, 0x60(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0x78(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x80(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x28(%rsp)
movq 0xa0(%rsp), %rax
movss 0x12c(%rax), %xmm0
movl 0x26e0a(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x5c(%rsp)
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x5c(%rsp), %edx
callq 0x152a0
jmp 0x8a51c
movq 0x80(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x78(%rsp)
movq 0xb0(%rsp), %rdi
movq 0x90(%rsp), %rcx
movq 0xa0(%rsp), %rax
movss 0x110(%rax), %xmm2
movq 0x80(%rsp), %rax
movsd (%rcx), %xmm0
movsd 0x8(%rcx), %xmm1
movl 0x8(%rax), %esi
callq 0x13f10
cmpq $0x0, 0x88(%rsp)
je 0x8a5e0
cmpq $0x0, 0xc0(%rsp)
je 0x8a5a1
movq 0xb0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xa0(%rsp), %rax
movss 0x12c(%rax), %xmm0
movl 0x26d3d(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x58(%rsp)
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x58(%rsp), %edx
callq 0x14690
jmp 0x8a5de
movq 0xb0(%rsp), %rdi
movl 0xc8(%rsp), %esi
movq 0x88(%rsp), %rax
movq 0xe8(%rsp), %r8
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x78(%rsp), %edx
movl 0x7c(%rsp), %ecx
movss 0x22f0f(%rip), %xmm2    # 0xad4e8
callq 0x79710
jmp 0x8a5e0
movq 0xb0(%rsp), %rdi
movq 0x90(%rsp), %rax
movq 0xd0(%rsp), %rsi
movl 0xd8(%rsp), %edx
movl 0xe0(%rsp), %r8d
movq 0xe8(%rsp), %r9
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
leaq 0x70(%rsp), %rcx
callq 0x66ac0
addq $0xb8, %rsp
retq
nopw (%rax,%rax)