// File: /workspace/github_c_makefile_star2_O0/space222[P]silo/./nuklear.h
// Function: nk_draw_scrollbar(nk_command_buffer*, unsigned int, nk_style_scrollbar const*, nk_rect const*, nk_rect const*)
NK_LIB void
nk_draw_scrollbar(struct nk_command_buffer *out, nk_flags state,
    const struct nk_style_scrollbar *style, const struct nk_rect *bounds,
    const struct nk_rect *scroll)
{
    const struct nk_style_item *background;
    const struct nk_style_item *cursor;

    /* select correct colors/images to draw */
    if (state & NK_WIDGET_STATE_ACTIVED) {
        background = &style->active;
        cursor = &style->cursor_active;
    } else if (state & NK_WIDGET_STATE_HOVER) {
        background = &style->hover;
        cursor = &style->cursor_hover;
    } else {
        background = &style->normal;
        cursor = &style->cursor_normal;
    }

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

    /* draw cursor */
    if (cursor->type == NK_STYLE_ITEM_COLOR) {
        nk_fill_rect(out, *scroll, style->rounding_cursor, cursor->data.color);
        nk_stroke_rect(out, *scroll, style->rounding_cursor, style->border_cursor, style->cursor_border_color);
    } else nk_draw_image(out, *scroll, &cursor->data.image, nk_white);
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xf0(%rsp)
movl %esi, 0xec(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rcx, 0xd8(%rsp)
movq %r8, 0xd0(%rsp)
movl 0xec(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x3a569
movq 0xe0(%rsp), %rax
addq $0x40, %rax
movq %rax, 0xc8(%rsp)
movq 0xe0(%rsp), %rax
addq $0xa8, %rax
movq %rax, 0xc0(%rsp)
jmp 0x3a5ca
movl 0xec(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x3a5a4
movq 0xe0(%rsp), %rax
addq $0x20, %rax
movq %rax, 0xc8(%rsp)
movq 0xe0(%rsp), %rax
addq $0x88, %rax
movq %rax, 0xc0(%rsp)
jmp 0x3a5c8
movq 0xe0(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xe0(%rsp), %rax
addq $0x68, %rax
movq %rax, 0xc0(%rsp)
jmp 0x3a5ca
movq 0xc8(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x3a693
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0xb0(%rsp)
movq 0xe0(%rsp), %rax
movss 0xd0(%rax), %xmm2
movq 0xc8(%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 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x90(%rsp)
movq 0xe0(%rsp), %rax
movss 0xcc(%rax), %xmm3
movss 0xd0(%rax), %xmm2
movl 0x60(%rax), %eax
movl %eax, 0x8c(%rsp)
movsd 0x90(%rsp), %xmm0
movsd 0x98(%rsp), %xmm1
movl 0x8c(%rsp), %esi
callq 0xaf00
jmp 0x3a6d4
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0xc8(%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
movq 0xc0(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x3a782
movq 0xf0(%rsp), %rdi
movq 0xd0(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0xe0(%rsp), %rax
movss 0xd8(%rax), %xmm2
movq 0xc0(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x4c(%rsp)
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movl 0x4c(%rsp), %esi
callq 0xb130
movq 0xf0(%rsp), %rdi
movq 0xd0(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0xe0(%rsp), %rax
movss 0xd4(%rax), %xmm3
movss 0xd8(%rax), %xmm2
movl 0xc8(%rax), %eax
movl %eax, 0x2c(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movl 0x2c(%rsp), %esi
callq 0xaf00
jmp 0x3a7c3
movq 0xf0(%rsp), %rdi
movq 0xd0(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0xc0(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movl 0xc(%rsp), %edx
callq 0xc3c0
addq $0xf8, %rsp
retq
nopl (%rax,%rax)