// File: /workspace/github_c_makefile_star2_O3/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 $0x108, %rsp            # imm = 0x108
movq %rdx, 0x78(%rsp)
movq %rdi, %r14
movq %xmm0, 0x88(%rsp)
movq %xmm1, 0x80(%rsp)
movl (%rsi), %eax
cmpl $0x3, %eax
jne 0x29dbb
addq 0x78(%rsp), %r14
movq %r14, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r15
movaps 0x4381b(%rip), %xmm1    # 0x6d5e0
movaps %xmm1, %xmm0
cmpltps %xmm2, %xmm0
xorps %xmm5, %xmm5
cmpnltps %xmm2, %xmm5
xorps %xmm4, %xmm4
cmpltps %xmm2, %xmm4
orps %xmm0, %xmm4
orps %xmm0, %xmm5
andps %xmm1, %xmm4
andps %xmm5, %xmm4
andnps %xmm2, %xmm5
orps %xmm4, %xmm5
cvtps2pd %xmm5, %xmm0
movaps %xmm0, 0xd0(%rsp)
xorps %xmm2, %xmm2
movaps 0x437ef(%rip), %xmm0    # 0x6d5f0
movaps %xmm5, %xmm4
mulps %xmm0, %xmm4
cvttps2dq %xmm4, %xmm4
pshuflw $0xe8, %xmm4, %xmm4     # xmm4 = xmm4[0,2,2,3,4,5,6,7]
movdqa %xmm4, 0x90(%rsp)
movaps %xmm1, %xmm4
cmpltps %xmm3, %xmm4
xorps %xmm6, %xmm6
cmpnltps %xmm3, %xmm6
cmpltps %xmm3, %xmm2
orps %xmm4, %xmm2
orps %xmm4, %xmm6
andps %xmm1, %xmm2
andps %xmm6, %xmm2
andnps %xmm3, %xmm6
orps %xmm2, %xmm6
cvtps2pd %xmm6, %xmm1
movaps %xmm1, 0xc0(%rsp)
movaps %xmm5, %xmm2
movlhps %xmm6, %xmm2            # xmm2 = xmm2[0],xmm6[0]
pshufd $0x55, %xmm6, %xmm1     # xmm1 = xmm6[1,1,1,1]
movdqa %xmm1, 0x40(%rsp)
movaps 0x437a0(%rip), %xmm1    # 0x6d600
movaps %xmm2, 0xe0(%rsp)
mulps %xmm2, %xmm1
cvttps2dq %xmm1, %xmm2
movdqa %xmm2, %xmm3
subps 0x43796(%rip), %xmm1    # 0x6d610
psrad $0x1f, %xmm3
cvttps2dq %xmm1, %xmm4
pand %xmm3, %xmm4
por %xmm2, %xmm4
movaps %xmm6, 0x50(%rsp)
movaps %xmm6, %xmm1
mulps %xmm0, %xmm1
cvttps2dq %xmm1, %xmm0
pshuflw $0xe8, %xmm0, %xmm1     # xmm1 = xmm0[0,2,2,3,4,5,6,7]
movdqa %xmm1, 0xa0(%rsp)
movd %xmm0, 0x2c(%rsp)
movaps %xmm5, 0x60(%rsp)
pshufd $0x55, %xmm5, %xmm0     # xmm0 = xmm5[1,1,1,1]
movdqa %xmm0, 0x30(%rsp)
movd %xmm4, 0x28(%rsp)
pshufd $0x55, %xmm4, %xmm0     # xmm0 = xmm4[1,1,1,1]
movd %xmm0, 0x24(%rsp)
movdqa %xmm4, 0xb0(%rsp)
pshufd $0xee, %xmm4, %xmm0     # xmm0 = xmm4[2,3,2,3]
movd %xmm0, 0x20(%rsp)
addq $0x10, %r15
movq 0x5d102(%rip), %rbx     # 0x86ff0
leaq 0x46ea7(%rip), %rbp     # 0x70d9c
leaq 0x46ebe(%rip), %r13     # 0x70dba
movl -0xc(%r15), %edx
cmpl $0x13, %edx
je 0x29da1
movq -0x8(%r15), %r12
addq %r14, %r12
testl %eax, %eax
je 0x29f9c
cmpl $0x1, %eax
je 0x29f33
cmpl $0x2, %eax
jne 0x29fae
movq %r12, %rdi
leaq 0x80(%rsp), %rsi
jmp 0x29fa7
cmpl $0x7, %edx
jbe 0x29fbe
cmpl $0x13, %edx
jae 0x29fce
movdqa 0xe0(%rsp), %xmm0
movdqa %xmm0, 0xf0(%rsp)
addl $-0x8, %edx
leaq 0x43ab3(%rip), %rcx     # 0x6da14
movslq (%rcx,%rdx,4), %rax
addq %rcx, %rax
jmpq *%rax
movdqa 0x60(%rsp), %xmm0
movdqa 0x30(%rsp), %xmm1
movdqa 0x50(%rsp), %xmm2
movdqa 0x40(%rsp), %xmm3
callq 0x131e0
movl %eax, (%rsp)
movl $0x4, %edx
movq %r12, %rdi
movq %rsp, %rsi
callq 0x25a38
jmp 0x29feb
movq %r12, %rdi
leaq 0x88(%rsp), %rsi
callq 0x53ecc
jmp 0x29feb
movq (%rbx), %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl $0x26aa, %ecx           # imm = 0x26AA
jmp 0x29fdc
movq (%rbx), %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl $0x2625, %ecx           # imm = 0x2625
jmp 0x29fdc
movq (%rbx), %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl $0x2626, %ecx           # imm = 0x2626
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
movl (%r15), %eax
addq $0x10, %r15
cmpl $0x3, %eax
jne 0x29efc
jmp 0x29da1
movdqa 0xb0(%rsp), %xmm0
movdqa %xmm0, (%rsp)
movl $0x10, %edx
jmp 0x29f8f
movdqa 0x60(%rsp), %xmm0
movdqa 0x30(%rsp), %xmm1
movdqa 0x50(%rsp), %xmm2
movdqa 0x40(%rsp), %xmm3
callq 0x131e0
movl %eax, %ecx
shrl $0x10, %ecx
movzbl %cl, %ecx
movzbl %al, %edx
shll $0x10, %edx
andl $0xff00ff00, %eax       # imm = 0xFF00FF00
orl %edx, %eax
orl %ecx, %eax
jmp 0x29f87
movaps 0x90(%rsp), %xmm0
movss %xmm0, (%rsp)
movdqa 0xa0(%rsp), %xmm0
movd %xmm0, 0x4(%rsp)
movl $0x8, %edx
jmp 0x29f8f
movdqa 0x90(%rsp), %xmm0
movd %xmm0, (%rsp)
movl 0x2c(%rsp), %eax
movw %ax, 0x4(%rsp)
movl $0x6, %edx
jmp 0x29f8f
movl 0x28(%rsp), %eax
movl %eax, (%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0x8(%rsp)
movl $0xc, %edx
jmp 0x29f8f
movl $0x10, %edx
movq %r12, %rdi
leaq 0xf0(%rsp), %rsi
jmp 0x29f95
movaps 0xd0(%rsp), %xmm0
movaps %xmm0, (%rsp)
movdqa 0xc0(%rsp), %xmm0
movdqa %xmm0, 0x10(%rsp)
movl $0x20, %edx
jmp 0x29f8f