// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_color_picker
NK_LIB void
nk_draw_color_picker(struct nk_command_buffer *o, const struct nk_rect *matrix,
    const struct nk_rect *hue_bar, const struct nk_rect *alpha_bar,
    struct nk_colorf col)
{
    NK_STORAGE const struct nk_color black = {0,0,0,255};
    NK_STORAGE const struct nk_color white = {255, 255, 255, 255};
    NK_STORAGE const struct nk_color black_trans = {0,0,0,0};

    const float crosshair_size = 7.0f;
    struct nk_color temp;
    float hsva[4];
    float line_y;
    int i;

    NK_ASSERT(o);
    NK_ASSERT(matrix);
    NK_ASSERT(hue_bar);

    /* draw hue bar */
    nk_colorf_hsva_fv(hsva, col);
    for (i = 0; i < 6; ++i) {
        NK_GLOBAL const struct nk_color hue_colors[] = {
            {255, 0, 0, 255}, {255,255,0,255}, {0,255,0,255}, {0, 255,255,255},
            {0,0,255,255}, {255, 0, 255, 255}, {255, 0, 0, 255}
        };
        nk_fill_rect_multi_color(o,
            nk_rect(hue_bar->x, hue_bar->y + (float)i * (hue_bar->h/6.0f) + 0.5f,
                hue_bar->w, (hue_bar->h/6.0f) + 0.5f), hue_colors[i], hue_colors[i],
                hue_colors[i+1], hue_colors[i+1]);
    }
    line_y = (float)(int)(hue_bar->y + hsva[0] * matrix->h + 0.5f);
    nk_stroke_line(o, hue_bar->x-1, line_y, hue_bar->x + hue_bar->w + 2,
        line_y, 1, nk_rgb(255,255,255));

    /* draw alpha bar */
    if (alpha_bar) {
        float alpha = NK_SATURATE(col.a);
        line_y = (float)(int)(alpha_bar->y +  (1.0f - alpha) * matrix->h + 0.5f);

        nk_fill_rect_multi_color(o, *alpha_bar, white, white, black, black);
        nk_stroke_line(o, alpha_bar->x-1, line_y, alpha_bar->x + alpha_bar->w + 2,
            line_y, 1, nk_rgb(255,255,255));
    }

    /* draw color matrix */
    temp = nk_hsv_f(hsva[0], 1.0f, 1.0f);
    nk_fill_rect_multi_color(o, *matrix, white, temp, temp, white);
    nk_fill_rect_multi_color(o, *matrix, black_trans, black_trans, black, black);

    /* draw cross-hair */
    {struct nk_vec2 p; float S = hsva[1]; float V = hsva[2];
    p.x = (float)(int)(matrix->x + S * matrix->w);
    p.y = (float)(int)(matrix->y + (1.0f - V) * matrix->h);
    nk_stroke_line(o, p.x - crosshair_size, p.y, p.x-2, p.y, 1.0f, white);
    nk_stroke_line(o, p.x + crosshair_size + 1, p.y, p.x+3, p.y, 1.0f, white);
    nk_stroke_line(o, p.x, p.y + crosshair_size + 1, p.x, p.y+3, 1.0f, white);
    nk_stroke_line(o, p.x, p.y - crosshair_size, p.x, p.y-2, 1.0f, white);}
}

// Assembly:
subq $0xc8, %rsp
movlpd %xmm0, 0xb8(%rsp)
movlpd %xmm1, 0xc0(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movss 0x1bf5f(%rip), %xmm0    # 0xad5b0
movss %xmm0, 0x94(%rsp)
cmpq $0x0, 0xb0(%rsp)
jne 0x91698
movq 0x33984(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x1fd2a(%rip), %rsi     # 0xb13a0
leaq 0x1fd41(%rip), %rdx     # 0xb13be
movl $0x7140, %ecx           # imm = 0x7140
movb $0x0, %al
callq 0x13ec0
movq 0x33960(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x9169a
jmp 0x9169c
cmpq $0x0, 0xa8(%rsp)
jne 0x916da
movq 0x33942(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x1fce8(%rip), %rsi     # 0xb13a0
leaq 0x1fcff(%rip), %rdx     # 0xb13be
movl $0x7141, %ecx           # imm = 0x7141
movb $0x0, %al
callq 0x13ec0
movq 0x3391e(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x916dc
jmp 0x916de
cmpq $0x0, 0xa0(%rsp)
jne 0x9171c
movq 0x33900(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x1fca6(%rip), %rsi     # 0xb13a0
leaq 0x1fcbd(%rip), %rdx     # 0xb13be
movl $0x7142, %ecx           # imm = 0x7142
movb $0x0, %al
callq 0x13ec0
movq 0x338dc(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x9171e
leaq 0x80(%rsp), %rdi
movsd 0xb8(%rsp), %xmm0
movsd 0xc0(%rsp), %xmm1
callq 0x14f80
movl $0x0, 0x78(%rsp)
cmpl $0x6, 0x78(%rsp)
jge 0x91814
movq 0xb0(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm2
cvtsi2ssl 0x78(%rsp), %xmm1
movss 0xc(%rax), %xmm3
movss 0x1bd7f(%rip), %xmm4    # 0xad500
divss %xmm4, %xmm3
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
movss 0x1bd7f(%rip), %xmm4    # 0xad514
addss %xmm4, %xmm1
movss 0x8(%rax), %xmm2
addss %xmm4, %xmm3
callq 0x151a0
movq 0x40(%rsp), %rdi
movlpd %xmm0, 0x68(%rsp)
movlpd %xmm1, 0x70(%rsp)
movslq 0x78(%rsp), %rdx
movl %edx, %eax
movq %rdx, %rsi
incl %eax
movslq %eax, %r8
movq %r8, %rcx
movsd 0x68(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
leaq 0x1fb93(%rip), %rax     # 0xb1370
movl (%rax,%rsi,4), %esi
leaq 0x1fb89(%rip), %rax     # 0xb1370
movl (%rax,%rdx,4), %edx
leaq 0x1fb7f(%rip), %rax     # 0xb1370
movl (%rax,%rcx,4), %ecx
leaq 0x1fb75(%rip), %rax     # 0xb1370
movl (%rax,%r8,4), %r8d
callq 0x14870
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x91745
movq 0xa0(%rsp), %rax
movss 0x4(%rax), %xmm1
movss 0x80(%rsp), %xmm0
movq 0xa8(%rsp), %rax
movss 0xc(%rax), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0x1bccd(%rip), %xmm1    # 0xad514
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x7c(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xa0(%rsp), %rax
movss (%rax), %xmm0
movss 0x1bc6e(%rip), %xmm1    # 0xad4e8
subss %xmm1, %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x7c(%rsp), %xmm0
movss %xmm0, 0x34(%rsp)
movq 0xa0(%rsp), %rax
movss (%rax), %xmm0
movq 0xa0(%rsp), %rax
addss 0x8(%rax), %xmm0
movss 0x1bc33(%rip), %xmm1    # 0xad4e4
addss %xmm1, %xmm0
movss %xmm0, 0x38(%rsp)
movss 0x7c(%rsp), %xmm0
movss %xmm0, 0x3c(%rsp)
movl $0xff, %edx
movl %edx, %edi
movl %edx, %esi
callq 0x136f0
movq 0x28(%rsp), %rdi
movss 0x30(%rsp), %xmm0
movss 0x34(%rsp), %xmm1
movss 0x38(%rsp), %xmm2
movss 0x3c(%rsp), %xmm3
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %esi
movss 0x1bbe6(%rip), %xmm4    # 0xad4e8
callq 0x13960
cmpq $0x0, 0x98(%rsp)
je 0x91ae3
movss 0xc4(%rsp), %xmm0
movss 0x1bbc1(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x9193c
movss 0x1bbb4(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0x24(%rsp)
jmp 0x9194b
movss 0xc4(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x24(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x9199c
movss 0xc4(%rsp), %xmm0
movss 0x1bb7e(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x9197f
movss 0x1bb71(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0x20(%rsp)
jmp 0x9198e
movss 0xc4(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
movss 0x20(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
jmp 0x919a7
xorps %xmm0, %xmm0
movss %xmm0, 0x1c(%rsp)
jmp 0x919a7
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x60(%rsp)
movq 0x98(%rsp), %rax
movss 0x4(%rax), %xmm1
movss 0x60(%rsp), %xmm2
movss 0x1bb1a(%rip), %xmm0    # 0xad4e8
subss %xmm2, %xmm0
movq 0xa8(%rsp), %rax
movss 0xc(%rax), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0x1bb25(%rip), %xmm1    # 0xad514
addss %xmm1, %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, 0x7c(%rsp)
movq 0xb0(%rsp), %rdi
movq 0x98(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x1f945(%rip), %esi     # 0xb1364
movl 0x1f93f(%rip), %edx     # 0xb1364
movl 0x1f935(%rip), %ecx     # 0xb1360
movl 0x1f92e(%rip), %r8d     # 0xb1360
callq 0x14870
movq 0xb0(%rsp), %rax
movq %rax, (%rsp)
movq 0x98(%rsp), %rax
movss (%rax), %xmm0
movss 0x1ba91(%rip), %xmm1    # 0xad4e8
subss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
movss 0x7c(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
movq 0x98(%rsp), %rax
movss (%rax), %xmm0
movq 0x98(%rsp), %rax
addss 0x8(%rax), %xmm0
movss 0x1ba56(%rip), %xmm1    # 0xad4e4
addss %xmm1, %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x7c(%rsp), %xmm0
movss %xmm0, 0x18(%rsp)
movl $0xff, %edx
movl %edx, %edi
movl %edx, %esi
callq 0x136f0
movq (%rsp), %rdi
movss 0xc(%rsp), %xmm0
movss 0x10(%rsp), %xmm1
movss 0x14(%rsp), %xmm2
movss 0x18(%rsp), %xmm3
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %esi
movss 0x1ba0a(%rip), %xmm4    # 0xad4e8
callq 0x13960
movss 0x80(%rsp), %xmm0
movss 0x1b9f4(%rip), %xmm2    # 0xad4e8
movaps %xmm2, %xmm1
callq 0x13560
movl %eax, 0x58(%rsp)
movl 0x58(%rsp), %eax
movl %eax, 0x90(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x1f839(%rip), %r8d     # 0xb1364
movl 0x90(%rsp), %ecx
movl %r8d, %esi
movl %ecx, %edx
callq 0x14870
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x1f80d(%rip), %esi     # 0xb1368
movl 0x1f807(%rip), %edx     # 0xb1368
movl 0x1f7f9(%rip), %ecx     # 0xb1360
movl 0x1f7f2(%rip), %r8d     # 0xb1360
callq 0x14870
movss 0x84(%rsp), %xmm0
movss %xmm0, 0x4c(%rsp)
movss 0x88(%rsp), %xmm0
movss %xmm0, 0x48(%rsp)
movq 0xa8(%rsp), %rax
movss (%rax), %xmm1
movss 0x4c(%rsp), %xmm0
movq 0xa8(%rsp), %rax
movss 0x8(%rax), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x50(%rsp)
movq 0xa8(%rsp), %rax
movss 0x4(%rax), %xmm1
movss 0x1b90d(%rip), %xmm0    # 0xad4e8
subss 0x48(%rsp), %xmm0
movq 0xa8(%rsp), %rax
movss 0xc(%rax), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x54(%rsp)
movq 0xb0(%rsp), %rdi
movss 0x50(%rsp), %xmm0
movss 0x1b996(%rip), %xmm1    # 0xad5b0
subss %xmm1, %xmm0
movss 0x54(%rsp), %xmm1
movss 0x50(%rsp), %xmm2
movss 0x1b8b2(%rip), %xmm3    # 0xad4e4
subss %xmm3, %xmm2
movss 0x54(%rsp), %xmm3
movl 0x1f722(%rip), %esi     # 0xb1364
movss 0x1b89e(%rip), %xmm4    # 0xad4e8
callq 0x13960
movq 0xb0(%rsp), %rdi
movss 0x1b951(%rip), %xmm0    # 0xad5b0
addss 0x50(%rsp), %xmm0
movss 0x1b87b(%rip), %xmm1    # 0xad4e8
addss %xmm1, %xmm0
movss 0x54(%rsp), %xmm1
movss 0x1b8a5(%rip), %xmm2    # 0xad524
addss 0x50(%rsp), %xmm2
movss 0x54(%rsp), %xmm3
movl 0x1f6d3(%rip), %esi     # 0xb1364
movss 0x1b84f(%rip), %xmm4    # 0xad4e8
callq 0x13960
movq 0xb0(%rsp), %rdi
movss 0x50(%rsp), %xmm0
movss 0x1b8fc(%rip), %xmm1    # 0xad5b0
addss 0x54(%rsp), %xmm1
movss 0x1b826(%rip), %xmm2    # 0xad4e8
addss %xmm2, %xmm1
movss 0x50(%rsp), %xmm2
movss 0x1b850(%rip), %xmm3    # 0xad524
addss 0x54(%rsp), %xmm3
movl 0x1f684(%rip), %esi     # 0xb1364
movss 0x1b800(%rip), %xmm4    # 0xad4e8
callq 0x13960
movq 0xb0(%rsp), %rdi
movss 0x50(%rsp), %xmm0
movss 0x54(%rsp), %xmm1
movss 0x1b8a7(%rip), %xmm2    # 0xad5b0
subss %xmm2, %xmm1
movss 0x50(%rsp), %xmm2
movss 0x54(%rsp), %xmm3
movss 0x1b7c3(%rip), %xmm4    # 0xad4e4
subss %xmm4, %xmm3
movl 0x1f639(%rip), %esi     # 0xb1364
movss 0x1b7b5(%rip), %xmm4    # 0xad4e8
callq 0x13960
addq $0xc8, %rsp
retq