// File: /workspace/github_c_makefile_star2_O0/space222[P]silo/./nuklear.h
// Function: nk_draw_option(nk_command_buffer*, unsigned int, nk_style_toggle const*, int, nk_rect const*, nk_rect const*, nk_rect const*, char const*, int, nk_user_font const*)
NK_LIB void
nk_draw_option(struct nk_command_buffer *out,
    nk_flags state, const struct nk_style_toggle *style, int 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)
{
    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;
    }

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

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

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq 0x148(%rsp), %rax
movl 0x140(%rsp), %eax
movq 0x138(%rsp), %rax
movq 0x130(%rsp), %rax
movq %rdi, 0x120(%rsp)
movl %esi, 0x11c(%rsp)
movq %rdx, 0x110(%rsp)
movl %ecx, 0x10c(%rsp)
movq %r8, 0x100(%rsp)
movq %r9, 0xf8(%rsp)
movl 0x11c(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x3c767
movq 0x110(%rsp), %rax
addq $0x20, %rax
movq %rax, 0xf0(%rsp)
movq 0x110(%rsp), %rax
addq $0x88, %rax
movq %rax, 0xe8(%rsp)
movq 0x110(%rsp), %rax
movl 0xac(%rax), %eax
movl %eax, 0xe4(%rsp)
jmp 0x3c7f2
movl 0x11c(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x3c7b7
movq 0x110(%rsp), %rax
addq $0x20, %rax
movq %rax, 0xf0(%rsp)
movq 0x110(%rsp), %rax
addq $0x88, %rax
movq %rax, 0xe8(%rsp)
movq 0x110(%rsp), %rax
movl 0xb0(%rax), %eax
movl %eax, 0xe4(%rsp)
jmp 0x3c7f0
movq 0x110(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0x110(%rsp), %rax
addq $0x68, %rax
movq %rax, 0xe8(%rsp)
movq 0x110(%rsp), %rax
movl 0xa8(%rax), %eax
movl %eax, 0xe4(%rsp)
jmp 0x3c7f2
movq 0xf0(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x3c8de
movq 0x120(%rsp), %rdi
movq 0xf8(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0xc0(%rsp)
movq 0x110(%rsp), %rax
movl 0x60(%rax), %eax
movl %eax, 0xbc(%rsp)
movsd 0xc0(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm1
movl 0xbc(%rsp), %esi
callq 0xb730
movq 0x120(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xf8(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x90(%rsp)
movq 0x110(%rsp), %rax
movss 0xd0(%rax), %xmm2
movsd 0x90(%rsp), %xmm0
movsd 0x98(%rsp), %xmm1
callq 0x31050
movq 0x8(%rsp), %rdi
movlpd %xmm0, 0xac(%rsp)
movlpd %xmm1, 0xb4(%rsp)
movq 0xf0(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x8c(%rsp)
movsd 0xac(%rsp), %xmm0
movsd 0xb4(%rsp), %xmm1
movl 0x8c(%rsp), %esi
callq 0xb730
jmp 0x3c91f
movq 0x120(%rsp), %rdi
movq 0xf8(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0xf0(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0x6c(%rsp) # imm = 0xFFFFFFFF
movsd 0x70(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
movl 0x6c(%rsp), %edx
callq 0xc3c0
cmpl $0x0, 0x10c(%rsp)
je 0x3c9bb
movq 0xe8(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3c97d
movq 0x120(%rsp), %rdi
movq 0x130(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0xe8(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0x4c(%rsp) # imm = 0xFFFFFFFF
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movl 0x4c(%rsp), %edx
callq 0xc3c0
jmp 0x3c9b9
movq 0x120(%rsp), %rdi
movq 0x130(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0xe8(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x2c(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movl 0x2c(%rsp), %esi
callq 0xb730
jmp 0x3c9bb
movl $0x0, 0xd8(%rsp)
movl $0x0, 0xdc(%rsp)
movq 0x110(%rsp), %rax
movl 0xb4(%rax), %eax
movl %eax, 0xe0(%rsp)
movq 0x120(%rsp), %rdi
movq 0x100(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x138(%rsp), %rsi
movl 0x140(%rsp), %edx
movq 0x148(%rsp), %r9
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
leaq 0xd8(%rsp), %rcx
movl $0x11, %r8d
callq 0x24820
addq $0x128, %rsp            # imm = 0x128
retq
nopl (%rax)