// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_vertex_element
NK_INTERN void
nk_draw_vertex_element(void *dst, const float *values, int value_count,
    enum nk_draw_vertex_layout_format format)
{
    int value_index;
    void *attribute = dst;
    /* if this triggers you tried to provide a color format for a value */
    NK_ASSERT(format < NK_FORMAT_COLOR_BEGIN);
    if (format >= NK_FORMAT_COLOR_BEGIN && format <= NK_FORMAT_COLOR_END) return;
    for (value_index = 0; value_index < value_count; ++value_index) {
        switch (format) {
        default: NK_ASSERT(0 && "invalid vertex layout format"); break;
        case NK_FORMAT_SCHAR: {
            char value = (char)NK_CLAMP((float)NK_SCHAR_MIN, values[value_index], (float)NK_SCHAR_MAX);
            NK_MEMCPY(attribute, &value, sizeof(value));
            attribute = (void*)((char*)attribute + sizeof(char));
        } break;
        case NK_FORMAT_SSHORT: {
            nk_short value = (nk_short)NK_CLAMP((float)NK_SSHORT_MIN, values[value_index], (float)NK_SSHORT_MAX);
            NK_MEMCPY(attribute, &value, sizeof(value));
            attribute = (void*)((char*)attribute + sizeof(value));
        } break;
        case NK_FORMAT_SINT: {
            nk_int value = (nk_int)NK_CLAMP((float)NK_SINT_MIN, values[value_index], (float)NK_SINT_MAX);
            NK_MEMCPY(attribute, &value, sizeof(value));
            attribute = (void*)((char*)attribute + sizeof(nk_int));
        } break;
        case NK_FORMAT_UCHAR: {
            unsigned char value = (unsigned char)NK_CLAMP((float)NK_UCHAR_MIN, values[value_index], (float)NK_UCHAR_MAX);
            NK_MEMCPY(attribute, &value, sizeof(value));
            attribute = (void*)((char*)attribute + sizeof(unsigned char));
        } break;
        case NK_FORMAT_USHORT: {
            nk_ushort value = (nk_ushort)NK_CLAMP((float)NK_USHORT_MIN, values[value_index], (float)NK_USHORT_MAX);
            NK_MEMCPY(attribute, &value, sizeof(value));
            attribute = (void*)((char*)attribute + sizeof(value));
            } break;
        case NK_FORMAT_UINT: {
            nk_uint value = (nk_uint)NK_CLAMP((float)NK_UINT_MIN, values[value_index], (float)NK_UINT_MAX);
            NK_MEMCPY(attribute, &value, sizeof(value));
            attribute = (void*)((char*)attribute + sizeof(nk_uint));
        } break;
        case NK_FORMAT_FLOAT:
            NK_MEMCPY(attribute, &values[value_index], sizeof(values[value_index]));
            attribute = (void*)((char*)attribute + sizeof(float));
            break;
        case NK_FORMAT_DOUBLE: {
            double value = (double)values[value_index];
            NK_MEMCPY(attribute, &value, sizeof(value));
            attribute = (void*)((char*)attribute + sizeof(double));
            } break;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x8, %edx
jb 0x4efd7
movq 0x36057(%rip), %r12     # 0x84ff0
movq (%r12), %rdi
leaq 0x1ad68(%rip), %rsi     # 0x69d0c
leaq 0x1ad7f(%rip), %rdx     # 0x69d2a
movl $0x2671, %ecx           # imm = 0x2671
xorl %eax, %eax
callq 0x12ea0
movq (%r12), %rdi
callq 0x13960
leal -0x8(%rbx), %eax
cmpl $0xb, %eax
jae 0x4efd7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebx, %r12d
leaq 0x17aa3(%rip), %r13     # 0x66a84
xorl %ebp, %ebp
cmpq $0x8, %rbp
je 0x4efc8
cmpl $0x7, %ebx
ja 0x4f195
movslq (%r13,%r12,4), %rax
addq %r13, %rax
jmpq *%rax
movss (%r14,%rbp), %xmm0
xorl %eax, %eax
movss 0x178e8(%rip), %xmm1    # 0x668f4
ucomiss %xmm0, %xmm1
seta %al
movss 0x178de(%rip), %xmm2    # 0x668f8
ucomiss %xmm0, %xmm2
leal 0x7f(%rax,%rax), %eax
pushq $0x7f
popq %rcx
cmovbel %ecx, %eax
cvttss2si %xmm0, %ecx
cmovbel %eax, %ecx
ucomiss %xmm0, %xmm1
cmoval %eax, %ecx
movb %cl, (%rsp)
jmp 0x4f0c4
movss (%r14,%rbp), %xmm0
movss 0x17892(%rip), %xmm2    # 0x668dc
ucomiss %xmm0, %xmm2
seta %al
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
seta %cl
andb %al, %cl
movzbl %cl, %eax
decl %eax
ucomiss %xmm0, %xmm2
jmp 0x4f129
movss (%r14,%rbp), %xmm0
movss 0x1786e(%rip), %xmm1    # 0x668e4
ucomiss %xmm0, %xmm1
cvttss2si %xmm0, %eax
movl $0x80000000, %ecx       # imm = 0x80000000
cmovbel %ecx, %eax
movss 0x1785b(%rip), %xmm1    # 0x668e8
ucomiss %xmm0, %xmm1
cmoval %ecx, %eax
movl %eax, (%rsp)
jmp 0x4f178
movss (%r14,%rbp), %xmm0
movss 0x17837(%rip), %xmm1    # 0x668e0
ucomiss %xmm0, %xmm1
cvttss2si %xmm0, %eax
movl $0x0, %ecx
cmovbel %ecx, %eax
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
cmoval %ecx, %eax
movb %al, (%rsp)
movq %r15, %rdi
movq %rsp, %rsi
pushq $0x1
popq %rdx
callq 0x24323
incq %r15
jmp 0x4f1c8
cvtss2sd (%r14,%rbp), %xmm0
movsd %xmm0, (%rsp)
movq %r15, %rdi
movq %rsp, %rsi
pushq $0x8
popq %rdx
callq 0x24323
addq $0x8, %r15
jmp 0x4f1c8
movss (%r14,%rbp), %xmm0
xorl %eax, %eax
movss 0x177e0(%rip), %xmm1    # 0x668ec
ucomiss %xmm0, %xmm1
seta %al
addl %eax, %eax
movl $0x7fff, %ecx           # imm = 0x7FFF
addl %ecx, %eax
movss 0x177cd(%rip), %xmm2    # 0x668f0
ucomiss %xmm0, %xmm2
cmovbel %ecx, %eax
cvttss2si %xmm0, %ecx
cmovbel %eax, %ecx
ucomiss %xmm0, %xmm1
cmoval %eax, %ecx
movw %cx, (%rsp)
movq %r15, %rdi
movq %rsp, %rsi
pushq $0x2
popq %rdx
callq 0x24323
addq $0x2, %r15
jmp 0x4f1c8
movss (%r14,%rbp), %xmm0
movss 0x1777c(%rip), %xmm1    # 0x668d8
ucomiss %xmm0, %xmm1
cvttss2si %xmm0, %rax
movl $0x0, %ecx
cmovbel %ecx, %eax
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
cmoval %ecx, %eax
movl %eax, (%rsp)
movq %r15, %rdi
movq %rsp, %rsi
jmp 0x4f187
leaq (%r14,%rbp), %rsi
movq %r15, %rdi
pushq $0x4
popq %rdx
callq 0x24323
addq $0x4, %r15
jmp 0x4f1c8
movq 0x35e54(%rip), %rax     # 0x84ff0
movq (%rax), %rdi
leaq 0x1ab66(%rip), %rsi     # 0x69d0c
leaq 0x1ab7d(%rip), %rdx     # 0x69d2a
movl $0x2675, %ecx           # imm = 0x2675
xorl %eax, %eax
callq 0x12ea0
movq 0x35e30(%rip), %rax     # 0x84ff0
movq (%rax), %rdi
callq 0x13960
addq $0x4, %rbp
jmp 0x4efe3