// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_do_slider
NK_LIB float
nk_do_slider(nk_flags *state,
    struct nk_command_buffer *out, struct nk_rect bounds,
    float min, float val, float max, float step,
    const struct nk_style_slider *style, struct nk_input *in,
    const struct nk_user_font *font)
{
    float slider_range;
    float slider_min;
    float slider_max;
    float slider_value;
    float slider_steps;
    float cursor_offset;

    struct nk_rect visual_cursor;
    struct nk_rect logical_cursor;

    NK_ASSERT(style);
    NK_ASSERT(out);
    if (!out || !style)
        return 0;

    /* remove padding from slider bounds */
    bounds.x = bounds.x + style->padding.x;
    bounds.y = bounds.y + style->padding.y;
    bounds.h = NK_MAX(bounds.h, 2*style->padding.y);
    bounds.w = NK_MAX(bounds.w, 2*style->padding.x + style->cursor_size.x);
    bounds.w -= 2 * style->padding.x;
    bounds.h -= 2 * style->padding.y;

    /* optional buttons */
    if (style->show_buttons) {
        nk_flags ws;
        struct nk_rect button;
        button.y = bounds.y;
        button.w = bounds.h;
        button.h = bounds.h;

        /* decrement button */
        button.x = bounds.x;
        if (nk_do_button_symbol(&ws, out, button, style->dec_symbol, NK_BUTTON_DEFAULT,
            &style->dec_button, in, font))
            val -= step;

        /* increment button */
        button.x = (bounds.x + bounds.w) - button.w;
        if (nk_do_button_symbol(&ws, out, button, style->inc_symbol, NK_BUTTON_DEFAULT,
            &style->inc_button, in, font))
            val += step;

        bounds.x = bounds.x + button.w + style->spacing.x;
        bounds.w = bounds.w - (2*button.w + 2*style->spacing.x);
    }

    /* remove one cursor size to support visual cursor */
    bounds.x += style->cursor_size.x*0.5f;
    bounds.w -= style->cursor_size.x;

    /* make sure the provided values are correct */
    slider_max = NK_MAX(min, max);
    slider_min = NK_MIN(min, max);
    slider_value = NK_CLAMP(slider_min, val, slider_max);
    slider_range = slider_max - slider_min;
    slider_steps = slider_range / step;
    cursor_offset = (slider_value - slider_min) / step;

    /* calculate cursor
    Basically you have two cursors. One for visual representation and interaction
    and one for updating the actual cursor value. */
    logical_cursor.h = bounds.h;
    logical_cursor.w = bounds.w / slider_steps;
    logical_cursor.x = bounds.x + (logical_cursor.w * cursor_offset);
    logical_cursor.y = bounds.y;

    visual_cursor.h = style->cursor_size.y;
    visual_cursor.w = style->cursor_size.x;
    visual_cursor.y = (bounds.y + bounds.h*0.5f) - visual_cursor.h*0.5f;
    visual_cursor.x = logical_cursor.x - visual_cursor.w*0.5f;

    slider_value = nk_slider_behavior(state, &logical_cursor, &visual_cursor,
        in, bounds, slider_min, slider_max, slider_value, step, slider_steps);
    visual_cursor.x = logical_cursor.x - visual_cursor.w*0.5f;

    /* draw slider */
    if (style->draw_begin) style->draw_begin(out, style->userdata);
    nk_draw_slider(out, *state, style, &bounds, &visual_cursor, slider_min, slider_value, slider_max);
    if (style->draw_end) style->draw_end(out, style->userdata);
    return slider_value;
}

// Assembly:
subq $0xc8, %rsp
movlpd %xmm0, 0xb4(%rsp)
movlpd %xmm1, 0xbc(%rsp)
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movss %xmm2, 0x9c(%rsp)
movss %xmm3, 0x98(%rsp)
movss %xmm4, 0x94(%rsp)
movss %xmm5, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movq %rcx, 0x80(%rsp)
movq %r8, 0x78(%rsp)
cmpq $0x0, 0x88(%rsp)
jne 0x6e510
movq 0x56b0c(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x42eb2(%rip), %rsi     # 0xb13a0
leaq 0x42ec9(%rip), %rdx     # 0xb13be
movl $0x640e, %ecx           # imm = 0x640E
movb $0x0, %al
callq 0x13ec0
movq 0x56ae8(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6e512
jmp 0x6e514
cmpq $0x0, 0xa0(%rsp)
jne 0x6e552
movq 0x56aca(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x42e70(%rip), %rsi     # 0xb13a0
leaq 0x42e87(%rip), %rdx     # 0xb13be
movl $0x640f, %ecx           # imm = 0x640F
movb $0x0, %al
callq 0x13ec0
movq 0x56aa6(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6e554
cmpq $0x0, 0xa0(%rsp)
je 0x6e56a
cmpq $0x0, 0x88(%rsp)
jne 0x6e57b
xorps %xmm0, %xmm0
movss %xmm0, 0xc4(%rsp)
jmp 0x6ec93
movss 0xb4(%rsp), %xmm0
movq 0x88(%rsp), %rax
addss 0x114(%rax), %xmm0
movss %xmm0, 0xb4(%rsp)
movss 0xb8(%rsp), %xmm0
movq 0x88(%rsp), %rax
addss 0x118(%rax), %xmm0
movss %xmm0, 0xb8(%rsp)
movss 0xc0(%rsp), %xmm1
movq 0x88(%rsp), %rax
movss 0x3ef0c(%rip), %xmm0    # 0xad4e4
mulss 0x118(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x6e605
movq 0x88(%rsp), %rax
movss 0x3eeef(%rip), %xmm0    # 0xad4e4
mulss 0x118(%rax), %xmm0
movss %xmm0, 0x28(%rsp)
jmp 0x6e614
movss 0xc0(%rsp), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x28(%rsp), %xmm0
movss %xmm0, 0xc0(%rsp)
movss 0xbc(%rsp), %xmm1
movq 0x88(%rsp), %rax
movss 0x114(%rax), %xmm0
movq 0x88(%rsp), %rax
movss 0x124(%rax), %xmm2
addss %xmm0, %xmm0
addss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x6e689
movq 0x88(%rsp), %rax
movss 0x114(%rax), %xmm0
movq 0x88(%rsp), %rax
movss 0x124(%rax), %xmm1
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x24(%rsp)
jmp 0x6e698
movss 0xbc(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x24(%rsp), %xmm0
movss %xmm0, 0xbc(%rsp)
movq 0x88(%rsp), %rax
movss 0x114(%rax), %xmm1
movss 0xbc(%rsp), %xmm0
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xbc(%rsp)
movq 0x88(%rsp), %rax
movss 0x118(%rax), %xmm1
movss 0xc0(%rsp), %xmm0
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xc0(%rsp)
movq 0x88(%rsp), %rax
cmpl $0x0, 0x134(%rax)
je 0x6e8ac
movss 0xb8(%rsp), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0xc0(%rsp), %xmm0
movss %xmm0, 0x34(%rsp)
movss 0xc0(%rsp), %xmm0
movss %xmm0, 0x38(%rsp)
movss 0xb4(%rsp), %xmm0
movss %xmm0, 0x2c(%rsp)
movq 0xa0(%rsp), %rsi
movq 0x88(%rsp), %r8
movl 0x2ec(%r8), %edx
addq $0x210, %r8             # imm = 0x210
movq 0x80(%rsp), %r9
movq 0x78(%rsp), %rcx
movsd 0x2c(%rsp), %xmm0
movsd 0x34(%rsp), %xmm1
movq %rsp, %rax
movq %rcx, (%rax)
leaq 0x3c(%rsp), %rdi
xorl %ecx, %ecx
callq 0x5e910
cmpl $0x0, %eax
je 0x6e7b9
movss 0x90(%rsp), %xmm1
movss 0x98(%rsp), %xmm0
subss %xmm1, %xmm0
movss %xmm0, 0x98(%rsp)
movss 0xb4(%rsp), %xmm0
movss 0xbc(%rsp), %xmm1
addss %xmm1, %xmm0
movss 0x34(%rsp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x2c(%rsp)
movq 0xa0(%rsp), %rsi
movq 0x88(%rsp), %r8
movl 0x2e8(%r8), %edx
addq $0x138, %r8             # imm = 0x138
movq 0x80(%rsp), %r9
movq 0x78(%rsp), %rcx
movsd 0x2c(%rsp), %xmm0
movsd 0x34(%rsp), %xmm1
movq %rsp, %rax
movq %rcx, (%rax)
leaq 0x3c(%rsp), %rdi
xorl %ecx, %ecx
callq 0x5e910
cmpl $0x0, %eax
je 0x6e848
movss 0x90(%rsp), %xmm0
addss 0x98(%rsp), %xmm0
movss %xmm0, 0x98(%rsp)
movss 0xb4(%rsp), %xmm0
addss 0x34(%rsp), %xmm0
movq 0x88(%rsp), %rax
addss 0x11c(%rax), %xmm0
movss %xmm0, 0xb4(%rsp)
movss 0xbc(%rsp), %xmm0
movss 0x34(%rsp), %xmm1
movq 0x88(%rsp), %rax
movss 0x3ec55(%rip), %xmm2    # 0xad4e4
mulss 0x11c(%rax), %xmm2
addss %xmm1, %xmm1
addss %xmm2, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0xbc(%rsp)
movq 0x88(%rsp), %rax
movss 0x124(%rax), %xmm0
movss 0xb4(%rsp), %xmm1
movss 0x3ec47(%rip), %xmm2    # 0xad514
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0xb4(%rsp)
movq 0x88(%rsp), %rax
movss 0x124(%rax), %xmm1
movss 0xbc(%rsp), %xmm0
subss %xmm1, %xmm0
movss %xmm0, 0xbc(%rsp)
movss 0x9c(%rsp), %xmm1
movss 0x94(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x6e92c
movss 0x94(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
jmp 0x6e93b
movss 0x9c(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
movss 0x20(%rsp), %xmm0
movss %xmm0, 0x6c(%rsp)
movss 0x9c(%rsp), %xmm1
movss 0x94(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x6e96f
movss 0x9c(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
jmp 0x6e97e
movss 0x94(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x70(%rsp)
movss 0x98(%rsp), %xmm1
movss 0x6c(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x6e9af
movss 0x98(%rsp), %xmm0
movss %xmm0, 0x18(%rsp)
jmp 0x6e9bb
movss 0x6c(%rsp), %xmm0
movss %xmm0, 0x18(%rsp)
movss 0x18(%rsp), %xmm1
movss 0x70(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x6e9da
movss 0x70(%rsp), %xmm0
movss %xmm0, 0x14(%rsp)
jmp 0x6ea17
movss 0x98(%rsp), %xmm1
movss 0x6c(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x6e9ff
movss 0x98(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
jmp 0x6ea0b
movss 0x6c(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0x68(%rsp)
movss 0x6c(%rsp), %xmm0
movss 0x70(%rsp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x74(%rsp)
movss 0x74(%rsp), %xmm0
movss 0x90(%rsp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x64(%rsp)
movss 0x68(%rsp), %xmm0
movss 0x70(%rsp), %xmm1
subss %xmm1, %xmm0
movss 0x90(%rsp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x60(%rsp)
movss 0xc0(%rsp), %xmm0
movss %xmm0, 0x4c(%rsp)
movss 0xbc(%rsp), %xmm0
movss 0x64(%rsp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x48(%rsp)
movss 0xb4(%rsp), %xmm1
movss 0x48(%rsp), %xmm0
movss 0x60(%rsp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x40(%rsp)
movss 0xb8(%rsp), %xmm0
movss %xmm0, 0x44(%rsp)
movq 0x88(%rsp), %rax
movss 0x128(%rax), %xmm0
movss %xmm0, 0x5c(%rsp)
movq 0x88(%rsp), %rax
movss 0x124(%rax), %xmm0
movss %xmm0, 0x58(%rsp)
movss 0xb8(%rsp), %xmm1
movss 0xc0(%rsp), %xmm0
movss 0x3e9ff(%rip), %xmm2    # 0xad514
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0x5c(%rsp), %xmm1
mulss %xmm2, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x54(%rsp)
movss 0x40(%rsp), %xmm0
movss 0x58(%rsp), %xmm1
mulss %xmm2, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x50(%rsp)
movq 0xa8(%rsp), %rdi
movq 0x80(%rsp), %rcx
movss 0x70(%rsp), %xmm2
movss 0x6c(%rsp), %xmm3
movss 0x68(%rsp), %xmm4
movss 0x90(%rsp), %xmm5
movss 0x64(%rsp), %xmm6
movsd 0xb4(%rsp), %xmm0
movsd 0xbc(%rsp), %xmm1
leaq 0x40(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x8a630
movss %xmm0, 0x68(%rsp)
movss 0x40(%rsp), %xmm1
movss 0x58(%rsp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss 0x3e950(%rip), %xmm2    # 0xad514
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x50(%rsp)
movq 0x88(%rsp), %rax
cmpq $0x0, 0x2f8(%rax)
je 0x6ec0c
movq 0x88(%rsp), %rax
movq 0x2f8(%rax), %rax
movq 0xa0(%rsp), %rdi
movq 0x88(%rsp), %rcx
movq 0x2f0(%rcx), %rsi
callq *%rax
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rax
movl (%rax), %esi
movq 0x88(%rsp), %rdx
movss 0x70(%rsp), %xmm0
movss 0x68(%rsp), %xmm1
movss 0x6c(%rsp), %xmm2
leaq 0xb4(%rsp), %rcx
leaq 0x50(%rsp), %r8
callq 0x8a9e0
movq 0x88(%rsp), %rax
cmpq $0x0, 0x300(%rax)
je 0x6ec84
movq 0x88(%rsp), %rax
movq 0x300(%rax), %rax
movq 0xa0(%rsp), %rdi
movq 0x88(%rsp), %rcx
movq 0x2f0(%rcx), %rsi
callq *%rax
movss 0x68(%rsp), %xmm0
movss %xmm0, 0xc4(%rsp)
movss 0xc4(%rsp), %xmm0
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)