// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_list_push_rect_uv
NK_INTERN void
nk_draw_list_push_rect_uv(struct nk_draw_list *list, struct nk_vec2 a,
    struct nk_vec2 c, struct nk_vec2 uva, struct nk_vec2 uvc,
    struct nk_color color)
{
    void *vtx;
    struct nk_vec2 uvb;
    struct nk_vec2 uvd;
    struct nk_vec2 b;
    struct nk_vec2 d;

    struct nk_colorf col;
    nk_draw_index *idx;
    nk_draw_index index;
    NK_ASSERT(list);
    if (!list) return;

    nk_color_fv(&col.r, color);
    uvb = nk_vec2(uvc.x, uva.y);
    uvd = nk_vec2(uva.x, uvc.y);
    b = nk_vec2(c.x, a.y);
    d = nk_vec2(a.x, c.y);

    index = (nk_draw_index)list->vertex_count;
    vtx = nk_draw_list_alloc_vertices(list, 4);
    idx = nk_draw_list_alloc_elements(list, 6);
    if (!vtx || !idx) return;

    idx[0] = (nk_draw_index)(index+0); idx[1] = (nk_draw_index)(index+1);
    idx[2] = (nk_draw_index)(index+2); idx[3] = (nk_draw_index)(index+0);
    idx[4] = (nk_draw_index)(index+2); idx[5] = (nk_draw_index)(index+3);

    vtx = nk_draw_vertex(vtx, &list->config, a, uva, col);
    vtx = nk_draw_vertex(vtx, &list->config, b, uvb, col);
    vtx = nk_draw_vertex(vtx, &list->config, c, uvc, col);
    vtx = nk_draw_vertex(vtx, &list->config, d, uvd, col);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %esi, %ebp
movaps %xmm3, 0x30(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x80(%rsp)
movq %rdi, %rbx
movl 0xcc(%rdi), %r15d
movl $0x4, %esi
callq 0x29cac
movq %rax, %r14
movl $0x6, %esi
movq %rbx, %rdi
callq 0x29d2b
testq %r14, %r14
setne %cl
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2b9be
movaps 0x20(%rsp), %xmm2
movaps %xmm2, %xmm1
movaps 0x80(%rsp), %xmm0
shufps $0x1, %xmm0, %xmm1      # xmm1 = xmm1[1,0],xmm0[0,0]
shufps $0xe2, %xmm0, %xmm1     # xmm1 = xmm1[2,0],xmm0[2,3]
movaps %xmm1, 0x70(%rsp)
movaps %xmm0, %xmm1
shufps $0x1, %xmm2, %xmm1      # xmm1 = xmm1[1,0],xmm2[0,0]
shufps $0xe2, %xmm2, %xmm1     # xmm1 = xmm1[2,0],xmm2[2,3]
movaps %xmm1, 0x50(%rsp)
movaps 0x30(%rsp), %xmm1
movaps %xmm1, %xmm2
movaps %xmm1, %xmm3
movaps 0x90(%rsp), %xmm1
shufps $0x1, %xmm1, %xmm2      # xmm2 = xmm2[1,0],xmm1[0,0]
shufps $0xe2, %xmm1, %xmm2     # xmm2 = xmm2[2,0],xmm1[2,3]
movaps %xmm2, 0x60(%rsp)
movaps %xmm1, %xmm4
movl %ebp, %ecx
shrl $0x10, %ecx
movl $0xff, %edx
andl %edx, %ecx
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
shufps $0x1, %xmm3, %xmm4      # xmm4 = xmm4[1,0],xmm3[0,0]
movaps %xmm4, %xmm7
movaps %xmm3, %xmm5
movss 0x42001(%rip), %xmm3    # 0x6d8b0
mulss %xmm3, %xmm2
movaps %xmm2, %xmm4
movl %ebp, %ecx
shrl $0x18, %ecx
cvtsi2ss %ecx, %xmm6
mulss %xmm3, %xmm6
movl %ebp, %ecx
shrl $0x8, %ecx
andl %edx, %ecx
andl %edx, %ebp
movd %ebp, %xmm3
pinsrw $0x2, %ecx, %xmm3
shufps $0xe2, %xmm5, %xmm7     # xmm7 = xmm7[2,0],xmm5[2,3]
movaps %xmm7, 0x40(%rsp)
cvtdq2ps %xmm3, %xmm3
mulps 0x41cd8(%rip), %xmm3    # 0x6d5c0
movaps %xmm3, %xmm2
movaps %xmm3, (%rsp)
unpcklps %xmm6, %xmm4            # xmm4 = xmm4[0],xmm6[0],xmm4[1],xmm6[1]
movaps %xmm4, %xmm3
movaps %xmm4, 0x10(%rsp)
movw %r15w, (%rax)
leal 0x1(%r15), %ecx
movw %cx, 0x2(%rax)
leal 0x2(%r15), %ecx
movw %cx, 0x4(%rax)
movw %r15w, 0x6(%rax)
movw %cx, 0x8(%rax)
addl $0x3, %r15d
movw %r15w, 0xa(%rax)
movq 0x98(%rbx), %rsi
movq 0xa0(%rbx), %rdx
movq %r14, %rdi
callq 0x29d6f
movq 0x98(%rbx), %rsi
movq 0xa0(%rbx), %rdx
movq %rax, %rdi
movaps 0x50(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movaps (%rsp), %xmm2
movaps 0x10(%rsp), %xmm3
callq 0x29d6f
movq 0x98(%rbx), %rsi
movq 0xa0(%rbx), %rdx
movq %rax, %rdi
movaps 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movaps (%rsp), %xmm2
movaps 0x10(%rsp), %xmm3
callq 0x29d6f
movq 0x98(%rbx), %rsi
movq 0xa0(%rbx), %rdx
movq %rax, %rdi
movaps 0x70(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
movaps (%rsp), %xmm2
movaps 0x10(%rsp), %xmm3
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x29d6f
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq