// File: /workspace/github_c_makefile_star2_O1/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 $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
movlps %xmm0, 0x88(%rsp)
movq %xmm1, 0x80(%rsp)
movq 0x28(%rsi), %r12
movq 0x30(%rsi), %rax
movq %rax, 0x78(%rsp)
movl (%r12), %eax
cmpl $0x3, %eax
jne 0x29cc7
addq 0x78(%rsp), %rbx
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movaps 0x44912(%rip), %xmm1    # 0x6e5e0
movaps %xmm1, %xmm4
cmpltps %xmm3, %xmm4
xorps %xmm0, %xmm0
xorps %xmm6, %xmm6
cmpnltps %xmm3, %xmm6
xorps %xmm5, %xmm5
cmpltps %xmm3, %xmm5
orps %xmm4, %xmm5
orps %xmm4, %xmm6
andps %xmm1, %xmm5
andps %xmm6, %xmm5
andnps %xmm3, %xmm6
orps %xmm5, %xmm6
cvtps2pd %xmm6, %xmm3
movaps %xmm3, 0xe0(%rsp)
movss 0x44be9(%rip), %xmm3    # 0x6e8f4
mulss %xmm6, %xmm3
cvttss2si %xmm3, %rcx
movq %rcx, 0x70(%rsp)
movaps %xmm1, %xmm3
cmpltps %xmm2, %xmm3
xorps %xmm4, %xmm4
cmpnltps %xmm2, %xmm4
cmpltps %xmm2, %xmm0
orps %xmm3, %xmm0
orps %xmm3, %xmm4
andps %xmm1, %xmm0
andps %xmm4, %xmm0
andnps %xmm2, %xmm4
orps %xmm0, %xmm4
cvtps2pd %xmm4, %xmm0
movaps %xmm0, 0xd0(%rsp)
movaps %xmm4, %xmm5
movlhps %xmm6, %xmm5            # xmm5 = xmm5[0],xmm6[0]
pshufd $0x55, %xmm4, %xmm0     # xmm0 = xmm4[1,1,1,1]
movdqa %xmm0, 0x40(%rsp)
movaps 0x44890(%rip), %xmm0    # 0x6e5f0
mulps %xmm5, %xmm0
cvttps2dq %xmm0, %xmm1
movdqa %xmm1, %xmm2
psrad $0x1f, %xmm2
movaps 0x44889(%rip), %xmm3    # 0x6e600
subps %xmm3, %xmm0
cvttps2dq %xmm0, %xmm0
pand %xmm2, %xmm0
por %xmm1, %xmm0
movdqa %xmm0, 0xc0(%rsp)
movaps 0x4487a(%rip), %xmm0    # 0x6e610
mulps %xmm4, %xmm0
cvttps2dq %xmm0, %xmm1
movdqa %xmm1, %xmm2
psrad $0x1f, %xmm2
subps %xmm3, %xmm0
cvttps2dq %xmm0, %xmm0
pand %xmm2, %xmm0
por %xmm1, %xmm0
movdqa %xmm0, 0xb0(%rsp)
movaps 0x4485b(%rip), %xmm0    # 0x6e620
movaps %xmm5, 0xf0(%rsp)
mulps %xmm5, %xmm0
cvttps2dq %xmm0, %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
pshufhw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,1,2,3,4,6,6,7]
pshufd $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3]
movdqa %xmm0, 0xa0(%rsp)
movaps %xmm4, 0x50(%rsp)
movaps %xmm4, %xmm0
mulps 0x44835(%rip), %xmm0    # 0x6e630
cvttps2dq %xmm0, %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movdqa %xmm0, 0x90(%rsp)
movaps %xmm6, %xmm0
mulss 0x44ae0(%rip), %xmm0    # 0x6e8f8
movaps %xmm6, 0x60(%rsp)
pshufd $0x55, %xmm6, %xmm1     # xmm1 = xmm6[1,1,1,1]
movdqa %xmm1, 0x30(%rsp)
cvttss2si %xmm0, %ecx
movl %ecx, 0x2c(%rsp)
addq $0x4, %r12
movq 0x5e1b5(%rip), %r14     # 0x87ff0
leaq 0x47f68(%rip), %rbp     # 0x71daa
cmpl $0x13, (%r12)
je 0x29cad
movq 0x4(%r12), %r15
addq %rbx, %r15
testl %eax, %eax
je 0x29f32
cmpl $0x1, %eax
je 0x29e7f
cmpl $0x2, %eax
jne 0x29f48
movl (%r12), %edx
movq %r15, %rdi
leaq 0x80(%rsp), %rsi
jmp 0x29f41
movl (%r12), %r13d
cmpl $0x7, %r13d
ja 0x29eaa
movq (%r14), %rdi
leaq 0x47ef9(%rip), %rsi     # 0x71d8c
movq %rbp, %rdx
movl $0x2625, %ecx           # imm = 0x2625
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
cmpl $0x13, %r13d
jb 0x29ed1
movq (%r14), %rdi
leaq 0x47ed2(%rip), %rsi     # 0x71d8c
movq %rbp, %rdx
movl $0x2626, %ecx           # imm = 0x2626
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
leal -0x13(%r13), %eax
cmpl $-0xb, %eax
jb 0x29f69
movaps 0xf0(%rsp), %xmm0
movaps %xmm0, 0x100(%rsp)
addl $-0x8, %r13d
leaq 0x44b1b(%rip), %rcx     # 0x6ea14
movslq (%rcx,%r13,4), %rax
addq %rcx, %rax
jmpq *%rax
movaps 0x50(%rsp), %xmm0
movdqa 0x40(%rsp), %xmm1
movdqa 0x60(%rsp), %xmm2
movaps 0x30(%rsp), %xmm3
callq 0x131e0
movl %eax, (%rsp)
movl $0x4, %edx
movq %r15, %rdi
movq %rsp, %rsi
callq 0x258b3
jmp 0x29f69
movl (%r12), %edx
movq %r15, %rdi
leaq 0x88(%rsp), %rsi
callq 0x54a22
jmp 0x29f69
movq (%r14), %rdi
leaq 0x47e3a(%rip), %rsi     # 0x71d8c
movq %rbp, %rdx
movl $0x26aa, %ecx           # imm = 0x26AA
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
movl 0xc(%r12), %eax
addq $0x10, %r12
cmpl $0x3, %eax
jne 0x29e42
jmp 0x29cad
movaps 0xc0(%rsp), %xmm0
movaps %xmm0, (%rsp)
movl $0x10, %edx
jmp 0x29f25
movaps 0x50(%rsp), %xmm0
movdqa 0x40(%rsp), %xmm1
movdqa 0x60(%rsp), %xmm2
movaps 0x30(%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 0x29f1d
movaps 0xa0(%rsp), %xmm0
movlps %xmm0, (%rsp)
movl $0x8, %edx
jmp 0x29f25
movaps 0x90(%rsp), %xmm0
movss %xmm0, (%rsp)
movl 0x2c(%rsp), %eax
movw %ax, 0x4(%rsp)
movl $0x6, %edx
jmp 0x29f25
movaps 0xb0(%rsp), %xmm0
movlps %xmm0, (%rsp)
movq 0x70(%rsp), %rax
movl %eax, 0x8(%rsp)
movl $0xc, %edx
jmp 0x29f25
movl $0x10, %edx
movq %r15, %rdi
leaq 0x100(%rsp), %rsi
jmp 0x29f2b
movaps 0xd0(%rsp), %xmm0
movaps %xmm0, (%rsp)
movaps 0xe0(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movl $0x20, %edx
jmp 0x29f25