// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_option
NK_LIB void
nk_draw_option(struct nk_command_buffer *out,
    nk_flags state, const struct nk_style_toggle *style, nk_bool active,
    const struct nk_rect *label, const struct nk_rect *selector,
    const struct nk_rect *cursors, const char *string, int len,
    const struct nk_user_font *font, nk_flags text_alignment)
{
    const struct nk_style_item *background;
    const struct nk_style_item *cursor;
    struct nk_text text;

    /* select correct colors/images */
    if (state & NK_WIDGET_STATE_HOVER) {
        background = &style->hover;
        cursor = &style->cursor_hover;
        text.text = style->text_hover;
    } else if (state & NK_WIDGET_STATE_ACTIVED) {
        background = &style->hover;
        cursor = &style->cursor_hover;
        text.text = style->text_active;
    } else {
        background = &style->normal;
        cursor = &style->cursor_normal;
        text.text = style->text_normal;
    }

    text.text = nk_rgb_factor(text.text, style->color_factor);
    text.padding.x = 0;
    text.padding.y = 0;
    text.background = style->text_background;
    nk_widget_text(out, *label, string, len, &text, text_alignment, font);

    /* draw background and cursor */
    if (background->type == NK_STYLE_ITEM_COLOR) {
        nk_fill_circle(out, *selector, nk_rgb_factor(style->border_color, style->color_factor));
        nk_fill_circle(out, nk_shrink_rect(*selector, style->border), nk_rgb_factor(background->data.color, style->color_factor));
    } else nk_draw_image(out, *selector, &background->data.image, nk_rgb_factor(nk_white, style->color_factor));
    if (active) {
        if (cursor->type == NK_STYLE_ITEM_IMAGE)
            nk_draw_image(out, *cursors, &cursor->data.image, nk_rgb_factor(nk_white, style->color_factor));
        else nk_fill_circle(out, *cursors, cursor->data.color);
    }
}

// Assembly:
subq $0xc8, %rsp
movl 0xf0(%rsp), %eax
movq 0xe8(%rsp), %rax
movl 0xe0(%rsp), %eax
movq 0xd8(%rsp), %rax
movq 0xd0(%rsp), %rax
movq %rdi, 0xc0(%rsp)
movl %esi, 0xbc(%rsp)
movq %rdx, 0xb0(%rsp)
movl %ecx, 0xac(%rsp)
movq %r8, 0xa0(%rsp)
movq %r9, 0x98(%rsp)
movl 0xbc(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x89e7e
movq 0xb0(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x90(%rsp)
movq 0xb0(%rsp), %rax
addq $0xa8, %rax
movq %rax, 0x88(%rsp)
movq 0xb0(%rsp), %rax
movl 0xd4(%rax), %eax
movl %eax, 0x84(%rsp)
jmp 0x89f0b
movl 0xbc(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x89ece
movq 0xb0(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x90(%rsp)
movq 0xb0(%rsp), %rax
addq $0xa8, %rax
movq %rax, 0x88(%rsp)
movq 0xb0(%rsp), %rax
movl 0xd8(%rax), %eax
movl %eax, 0x84(%rsp)
jmp 0x89f09
movq 0xb0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0xb0(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x88(%rsp)
movq 0xb0(%rsp), %rax
movl 0xd0(%rax), %eax
movl %eax, 0x84(%rsp)
jmp 0x89f0b
movq 0xb0(%rsp), %rax
movss 0xfc(%rax), %xmm0
movl 0x84(%rsp), %edi
callq 0x15100
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
movl %eax, 0x84(%rsp)
movl $0x0, 0x78(%rsp)
movl $0x0, 0x7c(%rsp)
movq 0xb0(%rsp), %rax
movl 0xdc(%rax), %eax
movl %eax, 0x80(%rsp)
movq 0xc0(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0xd8(%rsp), %rsi
movl 0xe0(%rsp), %edx
movl 0xf0(%rsp), %r8d
movq 0xe8(%rsp), %r9
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
leaq 0x78(%rsp), %rcx
callq 0x66ac0
movq 0x90(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x8a081
movq 0xc0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xb0(%rsp), %rax
movss 0xfc(%rax), %xmm0
movl 0x78(%rax), %edi
callq 0x15100
movq 0x38(%rsp), %rdi
movl %eax, %ecx
movq 0x40(%rsp), %rax
movl %ecx, 0x70(%rsp)
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x70(%rsp), %esi
callq 0x15030
movq 0xc0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x98(%rsp), %rax
movq 0xb0(%rsp), %rcx
movss 0xf8(%rcx), %xmm2
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
callq 0x75600
movlpd %xmm0, 0x60(%rsp)
movlpd %xmm1, 0x68(%rsp)
movq 0x90(%rsp), %rax
movq 0xb0(%rsp), %rcx
movss 0xfc(%rcx), %xmm0
movl 0x8(%rax), %edi
callq 0x15100
movq 0x48(%rsp), %rdi
movl %eax, 0x5c(%rsp)
movsd 0x60(%rsp), %xmm0
movsd 0x68(%rsp), %xmm1
movl 0x5c(%rsp), %esi
callq 0x15030
jmp 0x8a0ee
movq 0xc0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x90(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x28(%rsp)
movq 0xb0(%rsp), %rax
movss 0xfc(%rax), %xmm0
movl 0x271ee(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x58(%rsp)
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x58(%rsp), %edx
callq 0x14690
cmpl $0x0, 0xac(%rsp)
je 0x8a1a3
movq 0x88(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x8a178
movq 0xc0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x88(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq 0xb0(%rsp), %rax
movss 0xfc(%rax), %xmm0
movl 0x27166(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x54(%rsp)
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x54(%rsp), %edx
callq 0x14690
jmp 0x8a1a1
movq 0xc0(%rsp), %rdi
movq 0xd0(%rsp), %rcx
movq 0x88(%rsp), %rax
movsd (%rcx), %xmm0
movsd 0x8(%rcx), %xmm1
movl 0x8(%rax), %esi
callq 0x15030
jmp 0x8a1a3
addq $0xc8, %rsp
retq
nopl (%rax,%rax)