// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_vertex_color
NK_INTERN void
nk_draw_vertex_color(void *attr, const float *vals,
    enum nk_draw_vertex_layout_format format)
{
    /* if this triggers you tried to provide a value format for a color */
    float val[4];
    NK_ASSERT(format >= NK_FORMAT_COLOR_BEGIN);
    NK_ASSERT(format <= NK_FORMAT_COLOR_END);
    if (format < NK_FORMAT_COLOR_BEGIN || format > NK_FORMAT_COLOR_END) return;

    val[0] = NK_SATURATE(vals[0]);
    val[1] = NK_SATURATE(vals[1]);
    val[2] = NK_SATURATE(vals[2]);
    val[3] = NK_SATURATE(vals[3]);

    switch (format) {
    default: NK_ASSERT(0 && "Invalid vertex layout color format"); break;
    case NK_FORMAT_R8G8B8A8:
    case NK_FORMAT_R8G8B8: {
        struct nk_color col = nk_rgba_fv(val);
        NK_MEMCPY(attr, &col.r, sizeof(col));
    } break;
    case NK_FORMAT_B8G8R8A8: {
        struct nk_color col = nk_rgba_fv(val);
        struct nk_color bgra = nk_rgba(col.b, col.g, col.r, col.a);
        NK_MEMCPY(attr, &bgra, sizeof(bgra));
    } break;
    case NK_FORMAT_R16G15B16: {
        nk_ushort col[3];
        col[0] = (nk_ushort)(val[0]*(float)NK_USHORT_MAX);
        col[1] = (nk_ushort)(val[1]*(float)NK_USHORT_MAX);
        col[2] = (nk_ushort)(val[2]*(float)NK_USHORT_MAX);
        NK_MEMCPY(attr, col, sizeof(col));
    } break;
    case NK_FORMAT_R16G15B16A16: {
        nk_ushort col[4];
        col[0] = (nk_ushort)(val[0]*(float)NK_USHORT_MAX);
        col[1] = (nk_ushort)(val[1]*(float)NK_USHORT_MAX);
        col[2] = (nk_ushort)(val[2]*(float)NK_USHORT_MAX);
        col[3] = (nk_ushort)(val[3]*(float)NK_USHORT_MAX);
        NK_MEMCPY(attr, col, sizeof(col));
    } break;
    case NK_FORMAT_R32G32B32: {
        nk_uint col[3];
        col[0] = (nk_uint)(val[0]*(float)NK_UINT_MAX);
        col[1] = (nk_uint)(val[1]*(float)NK_UINT_MAX);
        col[2] = (nk_uint)(val[2]*(float)NK_UINT_MAX);
        NK_MEMCPY(attr, col, sizeof(col));
    } break;
    case NK_FORMAT_R32G32B32A32: {
        nk_uint col[4];
        col[0] = (nk_uint)(val[0]*(float)NK_UINT_MAX);
        col[1] = (nk_uint)(val[1]*(float)NK_UINT_MAX);
        col[2] = (nk_uint)(val[2]*(float)NK_UINT_MAX);
        col[3] = (nk_uint)(val[3]*(float)NK_UINT_MAX);
        NK_MEMCPY(attr, col, sizeof(col));
    } break;
    case NK_FORMAT_R32G32B32A32_FLOAT:
        NK_MEMCPY(attr, val, sizeof(float)*4);
        break;
    case NK_FORMAT_R32G32B32A32_DOUBLE: {
        double col[4];
        col[0] = (double)val[0];
        col[1] = (double)val[1];
        col[2] = (double)val[2];
        col[3] = (double)val[3];
        NK_MEMCPY(attr, col, sizeof(col));
    } break;
    case NK_FORMAT_RGB32:
    case NK_FORMAT_RGBA32: {
        struct nk_color col = nk_rgba_fv(val);
        nk_uint color = nk_color_u32(col);
        NK_MEMCPY(attr, &color, sizeof(color));
    } break; }
}

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movl %edx, 0xb4(%rsp)
cmpl $0x8, 0xb4(%rsp)
jae 0x7d62b
movq 0x479f1(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x33d97(%rip), %rsi     # 0xb13a0
leaq 0x33dae(%rip), %rdx     # 0xb13be
movl $0x2625, %ecx           # imm = 0x2625
movb $0x0, %al
callq 0x13ec0
movq 0x479cd(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7d62d
jmp 0x7d62f
cmpl $0x12, 0xb4(%rsp)
jbe 0x7d66c
movq 0x479b0(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x33d56(%rip), %rsi     # 0xb13a0
leaq 0x33d6d(%rip), %rdx     # 0xb13be
movl $0x2626, %ecx           # imm = 0x2626
movb $0x0, %al
callq 0x13ec0
movq 0x4798c(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7d66e
cmpl $0x8, 0xb4(%rsp)
jb 0x7d682
cmpl $0x12, 0xb4(%rsp)
jbe 0x7d687
jmp 0x7dcd3
movq 0xb8(%rsp), %rax
movss (%rax), %xmm0
movss 0x2fe4d(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x7d6b0
movss 0x2fe40(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0x34(%rsp)
jmp 0x7d6c2
movq 0xb8(%rsp), %rax
movss (%rax), %xmm0
movss %xmm0, 0x34(%rsp)
movss 0x34(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x7d719
movq 0xb8(%rsp), %rax
movss (%rax), %xmm0
movss 0x2fe04(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x7d6f9
movss 0x2fdf7(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0x30(%rsp)
jmp 0x7d70b
movq 0xb8(%rsp), %rax
movss (%rax), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x2c(%rsp)
jmp 0x7d724
xorps %xmm0, %xmm0
movss %xmm0, 0x2c(%rsp)
jmp 0x7d724
movss 0x2c(%rsp), %xmm0
movss %xmm0, 0xa0(%rsp)
movq 0xb8(%rsp), %rax
movss 0x4(%rax), %xmm0
movss 0x2fda0(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x7d75d
movss 0x2fd93(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0x28(%rsp)
jmp 0x7d770
movq 0xb8(%rsp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x28(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x7d7c9
movq 0xb8(%rsp), %rax
movss 0x4(%rax), %xmm0
movss 0x2fd55(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x7d7a8
movss 0x2fd48(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0x24(%rsp)
jmp 0x7d7bb
movq 0xb8(%rsp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x24(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
jmp 0x7d7d4
xorps %xmm0, %xmm0
movss %xmm0, 0x20(%rsp)
jmp 0x7d7d4
movss 0x20(%rsp), %xmm0
movss %xmm0, 0xa4(%rsp)
movq 0xb8(%rsp), %rax
movss 0x8(%rax), %xmm0
movss 0x2fcf0(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x7d80d
movss 0x2fce3(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0x1c(%rsp)
jmp 0x7d820
movq 0xb8(%rsp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x1c(%rsp)
movss 0x1c(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x7d879
movq 0xb8(%rsp), %rax
movss 0x8(%rax), %xmm0
movss 0x2fca5(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x7d858
movss 0x2fc98(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0x18(%rsp)
jmp 0x7d86b
movq 0xb8(%rsp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x18(%rsp)
movss 0x18(%rsp), %xmm0
movss %xmm0, 0x14(%rsp)
jmp 0x7d884
xorps %xmm0, %xmm0
movss %xmm0, 0x14(%rsp)
jmp 0x7d884
movss 0x14(%rsp), %xmm0
movss %xmm0, 0xa8(%rsp)
movq 0xb8(%rsp), %rax
movss 0xc(%rax), %xmm0
movss 0x2fc40(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x7d8bd
movss 0x2fc33(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0x10(%rsp)
jmp 0x7d8d0
movq 0xb8(%rsp), %rax
movss 0xc(%rax), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x7d929
movq 0xb8(%rsp), %rax
movss 0xc(%rax), %xmm0
movss 0x2fbf5(%rip), %xmm1    # 0xad4e8
ucomiss %xmm1, %xmm0
jbe 0x7d908
movss 0x2fbe8(%rip), %xmm0    # 0xad4e8
movss %xmm0, 0xc(%rsp)
jmp 0x7d91b
movq 0xb8(%rsp), %rax
movss 0xc(%rax), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x8(%rsp)
jmp 0x7d934
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
jmp 0x7d934
movss 0x8(%rsp), %xmm0
movss %xmm0, 0xac(%rsp)
movl 0xb4(%rsp), %eax
addl $-0x8, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0xa, %eax
ja 0x7d96c
movq (%rsp), %rax
leaq 0x2fda9(%rip), %rcx     # 0xad70c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x7d96e
movq 0x4767b(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x33a21(%rip), %rsi     # 0xb13a0
leaq 0x33a38(%rip), %rdx     # 0xb13be
movl $0x262f, %ecx           # imm = 0x262F
movb $0x0, %al
callq 0x13ec0
movq 0x47657(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7dcd3
leaq 0xa0(%rsp), %rdi
callq 0x15050
movl %eax, 0x9c(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x9c(%rsp), %rsi
movl $0x4, %edx
callq 0x2f750
jmp 0x7dcd3
leaq 0xa0(%rsp), %rdi
callq 0x15050
movl %eax, 0x98(%rsp)
movzbl 0x9a(%rsp), %edi
movzbl 0x99(%rsp), %esi
movzbl 0x98(%rsp), %edx
movzbl 0x9b(%rsp), %ecx
callq 0x14680
movl %eax, 0x94(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x94(%rsp), %rsi
movl $0x4, %edx
callq 0x2f750
jmp 0x7dcd3
movss 0xa0(%rsp), %xmm0
movss 0x2fb3b(%rip), %xmm1    # 0xad584
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0x8e(%rsp)
movss 0xa4(%rsp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0x90(%rsp)
movss 0xa8(%rsp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0x92(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x8e(%rsp), %rsi
movl $0x6, %edx
callq 0x2f750
jmp 0x7dcd3
movss 0xa0(%rsp), %xmm0
movss 0x2fac9(%rip), %xmm1    # 0xad584
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0x86(%rsp)
movss 0xa4(%rsp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0x88(%rsp)
movss 0xa8(%rsp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0x8a(%rsp)
movss 0xac(%rsp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, 0x8c(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x86(%rsp), %rsi
movl $0x8, %edx
callq 0x2f750
jmp 0x7dcd3
movss 0xa0(%rsp), %xmm0
movss 0x2fa3a(%rip), %xmm1    # 0xad580
mulss %xmm1, %xmm0
cvttss2si %xmm0, %rax
movl %eax, 0x78(%rsp)
movss 0xa4(%rsp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %rax
movl %eax, 0x7c(%rsp)
movss 0xa8(%rsp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %rax
movl %eax, 0x80(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x78(%rsp), %rsi
movl $0xc, %edx
callq 0x2f750
jmp 0x7dcd3
movss 0xa0(%rsp), %xmm0
movss 0x2f9d1(%rip), %xmm1    # 0xad580
mulss %xmm1, %xmm0
cvttss2si %xmm0, %rax
movl %eax, 0x60(%rsp)
movss 0xa4(%rsp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %rax
movl %eax, 0x64(%rsp)
movss 0xa8(%rsp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %rax
movl %eax, 0x68(%rsp)
movss 0xac(%rsp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %rax
movl %eax, 0x6c(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movl $0x10, %edx
callq 0x2f750
jmp 0x7dcd3
movq 0xc0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
movl $0x10, %edx
callq 0x2f750
jmp 0x7dcd3
movss 0xa0(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
movss 0xa4(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
movss 0xa8(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
movss 0xac(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movl $0x20, %edx
callq 0x2f750
jmp 0x7dcd3
leaq 0xa0(%rsp), %rdi
callq 0x15050
movl %eax, 0x3c(%rsp)
movl 0x3c(%rsp), %edi
callq 0x15070
movl %eax, 0x38(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movl $0x4, %edx
callq 0x2f750
addq $0xc8, %rsp
retq
nopl (%rax,%rax)