// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_vertex
NK_INTERN void*
nk_draw_vertex(void *dst, const struct nk_convert_config *config,
    struct nk_vec2 pos, struct nk_vec2 uv, struct nk_colorf color)
{
    void *result = (void*)((char*)dst + config->vertex_size);
    const struct nk_draw_vertex_layout_element *elem_iter = config->vertex_layout;
    while (!nk_draw_vertex_layout_element_is_end_of_layout(elem_iter)) {
        void *address = (void*)((char*)dst + elem_iter->offset);
        switch (elem_iter->attribute) {
        case NK_VERTEX_ATTRIBUTE_COUNT:
        default: NK_ASSERT(0 && "wrong element attribute"); break;
        case NK_VERTEX_POSITION: nk_draw_vertex_element(address, &pos.x, 2, elem_iter->format); break;
        case NK_VERTEX_TEXCOORD: nk_draw_vertex_element(address, &uv.x, 2, elem_iter->format); break;
        case NK_VERTEX_COLOR: nk_draw_vertex_color(address, &color.r, elem_iter->format); break;
        }
        elem_iter++;
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq 0x58(%rsp), %rax
movlps %xmm0, (%rax)
leaq 0x50(%rsp), %rax
movlps %xmm1, (%rax)
movq 0x28(%rsi), %r14
movq 0x30(%rsi), %rax
movq %rax, 0x48(%rsp)
movaps 0x3e128(%rip), %xmm1    # 0x665d0
movaps %xmm1, %xmm0
cmpltps %xmm2, %xmm0
xorps %xmm6, %xmm6
cmpnltps %xmm2, %xmm6
xorps %xmm4, %xmm4
cmpltps %xmm2, %xmm4
orps %xmm0, %xmm4
orps %xmm0, %xmm6
andps %xmm1, %xmm4
andps %xmm6, %xmm4
andnps %xmm2, %xmm6
orps %xmm4, %xmm6
cvtps2pd %xmm6, %xmm0
movaps %xmm0, 0xa0(%rsp)
xorps %xmm4, %xmm4
movaps 0x3e0fc(%rip), %xmm0    # 0x665e0
movaps %xmm6, %xmm2
mulps %xmm0, %xmm2
cvttps2dq %xmm2, %xmm2
pshuflw $0xe8, %xmm2, %xmm2     # xmm2 = xmm2[0,2,2,3,4,5,6,7]
movdqa %xmm2, 0x60(%rsp)
movaps %xmm1, %xmm5
cmpltps %xmm3, %xmm5
pxor %xmm2, %xmm2
cmpnltps %xmm3, %xmm2
cmpltps %xmm3, %xmm4
orps %xmm5, %xmm4
orps %xmm5, %xmm2
andps %xmm1, %xmm4
andps %xmm2, %xmm4
andnps %xmm3, %xmm2
orps %xmm4, %xmm2
cvtps2pd %xmm2, %xmm1
movaps %xmm1, 0x90(%rsp)
movlhps %xmm2, %xmm6            # xmm6 = xmm6[0],xmm2[0]
movaps 0x3e0bd(%rip), %xmm1    # 0x665f0
movaps %xmm6, 0xb0(%rsp)
mulps %xmm6, %xmm1
cvttps2dq %xmm1, %xmm3
movdqa %xmm3, %xmm4
psrad $0x1f, %xmm4
subps 0x3e0ae(%rip), %xmm1    # 0x66600
cvttps2dq %xmm1, %xmm1
pand %xmm4, %xmm1
por %xmm3, %xmm1
mulps %xmm0, %xmm2
cvttps2dq %xmm2, %xmm0
pshuflw $0xe8, %xmm0, %xmm2     # xmm2 = xmm0[0,2,2,3,4,5,6,7]
movdqa %xmm2, 0x70(%rsp)
movd %xmm0, 0x2c(%rsp)
movd %xmm1, 0x28(%rsp)
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
movd %xmm0, 0x24(%rsp)
movdqa %xmm1, 0x80(%rsp)
pshufd $0xee, %xmm1, %xmm0     # xmm0 = xmm1[2,3,2,3]
movd %xmm0, 0x20(%rsp)
movq 0x5ca4e(%rip), %r15     # 0x84ff0
leaq 0x41763(%rip), %rbp     # 0x69d0c
leaq 0x4177a(%rip), %r12     # 0x69d2a
movl (%r14), %eax
cmpl $0x3, %eax
je 0x28765
movl 0x4(%r14), %edx
cmpl $0x13, %edx
je 0x28765
movq 0x8(%r14), %r13
addq %rbx, %r13
testl %eax, %eax
je 0x2862e
cmpl $0x1, %eax
je 0x285e8
cmpl $0x2, %eax
jne 0x2863d
movq %r13, %rdi
leaq 0x50(%rsp), %rsi
jmp 0x28636
cmpl $0x7, %edx
jbe 0x2864d
cmpl $0x13, %edx
jae 0x2865d
movdqa 0xb0(%rsp), %xmm0
movdqa %xmm0, 0x30(%rsp)
addl $-0x8, %edx
leaq 0x3e389(%rip), %rcx     # 0x66994
movslq (%rcx,%rdx,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x30(%rsp), %rdi
callq 0x14010
movl %eax, (%rsp)
movq %r13, %rdi
movq %rsp, %rsi
pushq $0x4
jmp 0x2875a
movq %r13, %rdi
leaq 0x58(%rsp), %rsi
callq 0x4ef7a
jmp 0x2867a
movq (%r15), %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl $0x26aa, %ecx           # imm = 0x26AA
jmp 0x2866b
movq (%r15), %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl $0x2625, %ecx           # imm = 0x2625
jmp 0x2866b
movq (%r15), %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl $0x2626, %ecx           # imm = 0x2626
xorl %eax, %eax
callq 0x12ea0
movq (%r15), %rdi
callq 0x13960
addq $0x10, %r14
jmp 0x285b0
movdqa 0x80(%rsp), %xmm0
movdqa %xmm0, (%rsp)
movq %r13, %rdi
movq %rsp, %rsi
jmp 0x28733
leaq 0x30(%rsp), %rdi
callq 0x14010
movl %eax, %esi
shrl $0x8, %esi
movl %eax, %edi
shrl $0x10, %edi
movl %eax, %ecx
shrl $0x18, %ecx
movl $0xff, %edx
andl %edx, %edi
andl %edx, %esi
andl %edx, %eax
movl %eax, %edx
callq 0x13650
jmp 0x2861e
movaps 0x60(%rsp), %xmm0
movss %xmm0, (%rsp)
movdqa 0x70(%rsp), %xmm0
movd %xmm0, 0x4(%rsp)
movq %r13, %rdi
movq %rsp, %rsi
pushq $0x8
jmp 0x2875a
movdqa 0x60(%rsp), %xmm0
movd %xmm0, (%rsp)
movl 0x2c(%rsp), %eax
movw %ax, 0x4(%rsp)
movq %r13, %rdi
movq %rsp, %rsi
pushq $0x6
jmp 0x2875a
movl 0x28(%rsp), %eax
movl %eax, (%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0x8(%rsp)
movq %r13, %rdi
movq %rsp, %rsi
pushq $0xc
jmp 0x2875a
movq %r13, %rdi
leaq 0x30(%rsp), %rsi
pushq $0x10
jmp 0x2875a
movaps 0xa0(%rsp), %xmm0
movaps %xmm0, (%rsp)
movdqa 0x90(%rsp), %xmm0
movdqa %xmm0, 0x10(%rsp)
movq %r13, %rdi
movq %rsp, %rsi
pushq $0x20
popq %rdx
callq 0x24323
jmp 0x2867a
addq 0x48(%rsp), %rbx
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq