// File: /workspace/github_c_makefile_star2_O3/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 0x53f1e
movq 0x33105(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x1cea6(%rip), %rsi     # 0x70d9c
leaq 0x1cebd(%rip), %rdx     # 0x70dba
movl $0x2671, %ecx           # imm = 0x2671
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
leal -0x8(%rbx), %eax
cmpl $0xb, %eax
jb 0x54136
movb $0x1, %r13b
movl %ebx, %r12d
leaq 0x19bed(%rip), %rbp     # 0x6db18
xorl %eax, %eax
cmpl $0x7, %ebx
ja 0x540ee
movslq (%rbp,%r12,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
movss (%r14,%rax,4), %xmm0
xorl %eax, %eax
movss 0x19a18(%rip), %xmm1    # 0x6d968
ucomiss %xmm0, %xmm1
seta %al
movss 0x19a0e(%rip), %xmm2    # 0x6d96c
ucomiss %xmm0, %xmm2
leal 0x7f(%rax,%rax), %eax
movl $0x7f, %ecx
cmovbel %ecx, %eax
cvttss2si %xmm0, %ecx
cmovbel %eax, %ecx
ucomiss %xmm0, %xmm1
cmoval %eax, %ecx
movb %cl, (%rsp)
jmp 0x5400a
movss (%r14,%rax,4), %xmm0
movss 0x199c0(%rip), %xmm2    # 0x6d950
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 0x54076
movss (%r14,%rax,4), %xmm0
movss 0x1999c(%rip), %xmm1    # 0x6d958
ucomiss %xmm0, %xmm1
cvttss2si %xmm0, %eax
movl $0x80000000, %ecx       # imm = 0x80000000
cmovbel %ecx, %eax
movss 0x19989(%rip), %xmm1    # 0x6d95c
ucomiss %xmm0, %xmm1
cmoval %ecx, %eax
movl %eax, (%rsp)
jmp 0x540ca
movss (%r14,%rax,4), %xmm0
movss 0x19965(%rip), %xmm1    # 0x6d954
ucomiss %xmm0, %xmm1
cvttss2si %xmm0, %eax
movl $0x0, %ecx
cmovbel %ecx, %eax
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
cmoval %ecx, %eax
movb %al, (%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %rsp, %rsi
callq 0x25a38
incq %r15
jmp 0x54121
xorps %xmm0, %xmm0
cvtss2sd (%r14,%rax,4), %xmm0
movsd %xmm0, (%rsp)
movl $0x8, %edx
movq %r15, %rdi
movq %rsp, %rsi
callq 0x25a38
addq $0x8, %r15
jmp 0x54121
movss (%r14,%rax,4), %xmm0
xorl %eax, %eax
movss 0x19907(%rip), %xmm1    # 0x6d960
ucomiss %xmm0, %xmm1
seta %al
addl %eax, %eax
movl $0x7fff, %ecx           # imm = 0x7FFF
addl %ecx, %eax
movss 0x198f4(%rip), %xmm2    # 0x6d964
ucomiss %xmm0, %xmm2
cmovbel %ecx, %eax
cvttss2si %xmm0, %ecx
cmovbel %eax, %ecx
ucomiss %xmm0, %xmm1
cmoval %eax, %ecx
movw %cx, (%rsp)
movl $0x2, %edx
movq %r15, %rdi
movq %rsp, %rsi
callq 0x25a38
addq $0x2, %r15
jmp 0x54121
movss (%r14,%rax,4), %xmm0
movss 0x1989e(%rip), %xmm1    # 0x6d94c
ucomiss %xmm0, %xmm1
cvttss2si %xmm0, %rax
movl $0x0, %ecx
cmovbel %ecx, %eax
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
cmoval %ecx, %eax
movl %eax, (%rsp)
movl $0x4, %edx
movq %r15, %rdi
movq %rsp, %rsi
jmp 0x540e3
leaq (%r14,%rax,4), %rsi
movl $0x4, %edx
movq %r15, %rdi
callq 0x25a38
addq $0x4, %r15
jmp 0x54121
movq 0x32efb(%rip), %rax     # 0x86ff0
movq (%rax), %rdi
leaq 0x1cc9d(%rip), %rsi     # 0x70d9c
leaq 0x1ccb4(%rip), %rdx     # 0x70dba
movl $0x2675, %ecx           # imm = 0x2675
xorl %eax, %eax
callq 0x12d80
movq 0x32ed7(%rip), %rax     # 0x86ff0
movq (%rax), %rdi
callq 0x13780
movl $0x1, %eax
testb $0x1, %r13b
movl $0x0, %r13d
jne 0x53f2d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq