// File: /workspace/github_c_makefile_star2_O0/space222[P]silo/./nuklear.h
// Function: nk_draw_slider(nk_command_buffer*, unsigned int, nk_style_slider const*, nk_rect const*, nk_rect const*, float, float, float)
NK_LIB void
nk_draw_slider(struct nk_command_buffer *out, nk_flags state,
    const struct nk_style_slider *style, const struct nk_rect *bounds,
    const struct nk_rect *visual_cursor, float min, float value, float max)
{
    struct nk_rect fill;
    struct nk_rect bar;
    const struct nk_style_item *background;

    /* select correct slider images/colors */
    struct nk_color bar_color;
    const struct nk_style_item *cursor;

    NK_UNUSED(min);
    NK_UNUSED(max);
    NK_UNUSED(value);

    if (state & NK_WIDGET_STATE_ACTIVED) {
        background = &style->active;
        bar_color = style->bar_active;
        cursor = &style->cursor_active;
    } else if (state & NK_WIDGET_STATE_HOVER) {
        background = &style->hover;
        bar_color = style->bar_hover;
        cursor = &style->cursor_hover;
    } else {
        background = &style->normal;
        bar_color = style->bar_normal;
        cursor = &style->cursor_normal;
    }
    /* calculate slider background bar */
    bar.x = bounds->x;
    bar.y = (visual_cursor->y + visual_cursor->h/2) - bounds->h/12;
    bar.w = bounds->w;
    bar.h = bounds->h/6;

    /* filled background bar style */
    fill.w = (visual_cursor->x + (visual_cursor->w/2.0f)) - bar.x;
    fill.x = bar.x;
    fill.y = bar.y;
    fill.h = bar.h;

    /* draw background */
    if (background->type == NK_STYLE_ITEM_IMAGE) {
        nk_draw_image(out, *bounds, &background->data.image, nk_white);
    } else {
        nk_fill_rect(out, *bounds, style->rounding, background->data.color);
        nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);
    }

    /* draw slider bar */
    nk_fill_rect(out, bar, style->rounding, bar_color);
    nk_fill_rect(out, fill, style->rounding, style->bar_filled);

    /* draw cursor */
    if (cursor->type == NK_STYLE_ITEM_IMAGE)
        nk_draw_image(out, *visual_cursor, &cursor->data.image, nk_white);
    else nk_fill_circle(out, *visual_cursor, cursor->data.color);
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x150(%rsp)
movl %esi, 0x14c(%rsp)
movq %rdx, 0x140(%rsp)
movq %rcx, 0x138(%rsp)
movq %r8, 0x130(%rsp)
movss %xmm0, 0x12c(%rsp)
movss %xmm1, 0x128(%rsp)
movss %xmm2, 0x124(%rsp)
movl 0x14c(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x3d319
movq 0x140(%rsp), %rax
addq $0x40, %rax
movq %rax, 0xf8(%rsp)
movq 0x140(%rsp), %rax
movl 0x6c(%rax), %eax
movl %eax, 0xf4(%rsp)
movq 0x140(%rsp), %rax
addq $0xb8, %rax
movq %rax, 0xe8(%rsp)
jmp 0x3d39e
movl 0x14c(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x3d366
movq 0x140(%rsp), %rax
addq $0x20, %rax
movq %rax, 0xf8(%rsp)
movq 0x140(%rsp), %rax
movl 0x68(%rax), %eax
movl %eax, 0xf4(%rsp)
movq 0x140(%rsp), %rax
addq $0x98, %rax
movq %rax, 0xe8(%rsp)
jmp 0x3d39c
movq 0x140(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x140(%rsp), %rax
movl 0x64(%rax), %eax
movl %eax, 0xf4(%rsp)
movq 0x140(%rsp), %rax
addq $0x78, %rax
movq %rax, 0xe8(%rsp)
jmp 0x3d39e
movq 0x138(%rsp), %rax
movss (%rax), %xmm0
movss %xmm0, 0x104(%rsp)
movq 0x130(%rsp), %rax
movss 0x4(%rax), %xmm0
movq 0x130(%rsp), %rax
movss 0xc(%rax), %xmm1
movss 0x7d33(%rip), %xmm2     # 0x45108
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movq 0x138(%rsp), %rax
movss 0xc(%rax), %xmm1
movss 0x7d62(%rip), %xmm2     # 0x45154
divss %xmm2, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x108(%rsp)
movq 0x138(%rsp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x10c(%rsp)
movq 0x138(%rsp), %rax
movss 0xc(%rax), %xmm0
movss 0x7cee(%rip), %xmm1     # 0x4511c
divss %xmm1, %xmm0
movss %xmm0, 0x110(%rsp)
movq 0x130(%rsp), %rax
movss (%rax), %xmm0
movq 0x130(%rsp), %rax
movss 0x8(%rax), %xmm1
movss 0x7cac(%rip), %xmm2     # 0x45108
divss %xmm2, %xmm1
addss %xmm1, %xmm0
subss 0x104(%rsp), %xmm0
movss %xmm0, 0x11c(%rsp)
movss 0x104(%rsp), %xmm0
movss %xmm0, 0x114(%rsp)
movss 0x108(%rsp), %xmm0
movss %xmm0, 0x118(%rsp)
movss 0x110(%rsp), %xmm0
movss %xmm0, 0x120(%rsp)
movq 0xf8(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3d50e
movq 0x150(%rsp), %rdi
movq 0x138(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0xd0(%rsp)
movq 0xf8(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0xcc(%rsp) # imm = 0xFFFFFFFF
movsd 0xd0(%rsp), %xmm0
movsd 0xd8(%rsp), %xmm1
movl 0xcc(%rsp), %edx
callq 0xc3c0
jmp 0x3d5c4
movq 0x150(%rsp), %rdi
movq 0x138(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0xb0(%rsp)
movq 0x140(%rsp), %rax
movss 0xdc(%rax), %xmm2
movq 0xf8(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0xac(%rsp)
movsd 0xb0(%rsp), %xmm0
movsd 0xb8(%rsp), %xmm1
movl 0xac(%rsp), %esi
callq 0xb130
movq 0x150(%rsp), %rdi
movq 0x138(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x90(%rsp)
movq 0x140(%rsp), %rax
movss 0xd8(%rax), %xmm3
movss 0xdc(%rax), %xmm2
movl 0x60(%rax), %eax
movl %eax, 0x8c(%rsp)
movsd 0x90(%rsp), %xmm0
movsd 0x98(%rsp), %xmm1
movl 0x8c(%rsp), %esi
callq 0xaf00
movq 0x150(%rsp), %rdi
movups 0x104(%rsp), %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0x140(%rsp), %rax
movss 0xdc(%rax), %xmm2
movl 0xf4(%rsp), %eax
movl %eax, 0x6c(%rsp)
movsd 0x70(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
movl 0x6c(%rsp), %esi
callq 0xb130
movq 0x150(%rsp), %rdi
movups 0x114(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x140(%rsp), %rax
movss 0xdc(%rax), %xmm2
movl 0x70(%rax), %eax
movl %eax, 0x4c(%rsp)
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movl 0x4c(%rsp), %esi
callq 0xb130
movq 0xe8(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3d69a
movq 0x150(%rsp), %rdi
movq 0x130(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0xe8(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0x2c(%rsp) # imm = 0xFFFFFFFF
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movl 0x2c(%rsp), %edx
callq 0xc3c0
jmp 0x3d6d6
movq 0x150(%rsp), %rdi
movq 0x130(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0xc(%rsp)
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movl 0xc(%rsp), %esi
callq 0xb730
addq $0x158, %rsp            # imm = 0x158
retq
nop