// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_nine_slice
NK_API void
nk_draw_nine_slice(struct nk_command_buffer *b, struct nk_rect r,
    const struct nk_nine_slice *slc, struct nk_color col)
{
    struct nk_image img;
    const struct nk_image *slcimg = (const struct nk_image*)slc;
    nk_ushort rgnX, rgnY, rgnW, rgnH;
    rgnX = slcimg->region[0];
    rgnY = slcimg->region[1];
    rgnW = slcimg->region[2];
    rgnH = slcimg->region[3];

    /* top-left */
    img.handle = slcimg->handle;
    img.w = slcimg->w;
    img.h = slcimg->h;
    img.region[0] = rgnX;
    img.region[1] = rgnY;
    img.region[2] = slc->l;
    img.region[3] = slc->t;

    nk_draw_image(b,
        nk_rect(r.x, r.y, (float)slc->l, (float)slc->t),
        &img, col);

#define IMG_RGN(x, y, w, h) img.region[0] = (nk_ushort)(x); img.region[1] = (nk_ushort)(y); img.region[2] = (nk_ushort)(w); img.region[3] = (nk_ushort)(h);

    /* top-center */
    IMG_RGN(rgnX + slc->l, rgnY, rgnW - slc->l - slc->r, slc->t);
    nk_draw_image(b,
        nk_rect(r.x + (float)slc->l, r.y, (float)(r.w - slc->l - slc->r), (float)slc->t),
        &img, col);

    /* top-right */
    IMG_RGN(rgnX + rgnW - slc->r, rgnY, slc->r, slc->t);
    nk_draw_image(b,
        nk_rect(r.x + r.w - (float)slc->r, r.y, (float)slc->r, (float)slc->t),
        &img, col);

    /* center-left */
    IMG_RGN(rgnX, rgnY + slc->t, slc->l, rgnH - slc->t - slc->b);
    nk_draw_image(b,
        nk_rect(r.x, r.y + (float)slc->t, (float)slc->l, (float)(r.h - slc->t - slc->b)),
        &img, col);

    /* center */
    IMG_RGN(rgnX + slc->l, rgnY + slc->t, rgnW - slc->l - slc->r, rgnH - slc->t - slc->b);
    nk_draw_image(b,
        nk_rect(r.x + (float)slc->l, r.y + (float)slc->t, (float)(r.w - slc->l - slc->r), (float)(r.h - slc->t - slc->b)),
        &img, col);

    /* center-right */
    IMG_RGN(rgnX + rgnW - slc->r, rgnY + slc->t, slc->r, rgnH - slc->t - slc->b);
    nk_draw_image(b,
        nk_rect(r.x + r.w - (float)slc->r, r.y + (float)slc->t, (float)slc->r, (float)(r.h - slc->t - slc->b)),
        &img, col);

    /* bottom-left */
    IMG_RGN(rgnX, rgnY + rgnH - slc->b, slc->l, slc->b);
    nk_draw_image(b,
        nk_rect(r.x, r.y + r.h - (float)slc->b, (float)slc->l, (float)slc->b),
        &img, col);

    /* bottom-center */
    IMG_RGN(rgnX + slc->l, rgnY + rgnH - slc->b, rgnW - slc->l - slc->r, slc->b);
    nk_draw_image(b,
        nk_rect(r.x + (float)slc->l, r.y + r.h - (float)slc->b, (float)(r.w - slc->l - slc->r), (float)slc->b),
        &img, col);

    /* bottom-right */
    IMG_RGN(rgnX + rgnW - slc->r, rgnY + rgnH - slc->b, slc->r, slc->b);
    nk_draw_image(b,
        nk_rect(r.x + r.w - (float)slc->r, r.y + r.h - (float)slc->b, (float)slc->r, (float)slc->b),
        &img, col);

#undef IMG_RGN
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edx, 0x4(%rsp)
movq %rsi, %r12
movaps %xmm1, 0x50(%rsp)
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, %xmm1
movaps %xmm0, 0x10(%rsp)
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
movaps %xmm1, 0x80(%rsp)
movl 0x10(%rsi), %r14d
movzwl 0x12(%rsi), %eax
movq %rax, 0x30(%rsp)
movq (%rsi), %rax
leaq 0x90(%rsp), %r15
movq %rax, (%r15)
movq 0x8(%rsi), %rbp
movq %rbp, 0x8(%r15)
movq 0x18(%rsi), %rax
movq %rax, %xmm2
movw %ax, 0x10(%r15)
shrl $0x10, %eax
movw %ax, 0x12(%r15)
xorps %xmm1, %xmm1
punpcklwd %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
cvtdq2ps %xmm2, %xmm1
movq %rdi, %rbx
movq %rdi, 0x78(%rsp)
movq %r15, %rsi
callq 0x134d0
movzwl 0x18(%r12), %eax
movq %rbp, %r13
shrq $0x20, %r13
leal (%rax,%r13), %ecx
movq %r13, 0x28(%rsp)
movw %cx, 0xc(%r15)
shrq $0x30, %rbp
movw %bp, 0xe(%r15)
movzwl 0x1c(%r12), %ecx
movq %r14, 0x38(%rsp)
movl %r14d, %esi
subl %eax, %esi
subl %ecx, %esi
movw %si, 0x10(%r15)
movzwl 0x1a(%r12), %edx
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
movaps 0x50(%rsp), %xmm1
subss %xmm2, %xmm1
cvtsi2ss %ecx, %xmm0
subss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
movw %dx, 0x12(%r15)
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps 0x10(%rsp), %xmm0
addss %xmm2, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movl 0x4(%rsp), %ebx
movl %ebx, %edx
callq 0x134d0
leal (%r14,%r13), %ecx
movl %ecx, 0x8(%rsp)
movzwl 0x1c(%r12), %eax
subl %eax, %ecx
movw %cx, 0xc(%r15)
movw %bp, 0xe(%r15)
movw %ax, 0x10(%r15)
movzwl 0x1a(%r12), %ecx
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movw %cx, 0x12(%r15)
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
movq 0x30(%rsp), %r14
leal (%r14,%rbp), %eax
movl %eax, 0xc(%rsp)
movaps 0x10(%rsp), %xmm0
movaps %xmm0, %xmm3
addps 0x50(%rsp), %xmm3
movaps %xmm3, 0x60(%rsp)
subss %xmm1, %xmm3
movss %xmm3, %xmm0            # xmm0 = xmm3[0],xmm0[1,2,3]
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movq 0x78(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x134d0
movq 0x28(%rsp), %rbx
movw %bx, 0xc(%r15)
movzwl 0x1a(%r12), %eax
leal (%rax,%rbp), %ecx
movw %cx, 0xe(%r15)
movzwl 0x18(%r12), %ecx
movw %cx, 0x10(%r15)
movzwl 0x1e(%r12), %edx
movl %r14d, %edi
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
subl %eax, %edi
subl %edx, %edi
movw %di, 0x12(%r15)
movaps 0x80(%rsp), %xmm0
addss %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
movaps 0x40(%rsp), %xmm3
subss %xmm2, %xmm3
xorps %xmm2, %xmm2
cvtsi2ss %edx, %xmm2
subss %xmm2, %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movaps 0x10(%rsp), %xmm2
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
shufps $0xe2, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,3]
movq %r13, %rdi
movq %r13, %r14
movq %r15, %rsi
movl 0x4(%rsp), %r13d
movl %r13d, %edx
callq 0x134d0
movq 0x18(%r12), %rax
movq %rax, %xmm0
leal (%rax,%rbx), %ecx
movw %cx, 0xc(%r15)
shrl $0x10, %eax
addl %ebp, %eax
movw %ax, 0xe(%r15)
movd 0x1c(%r12), %xmm2
movdqa %xmm0, %xmm1
paddw %xmm2, %xmm1
movd %xmm1, %eax
movq 0x38(%rsp), %rcx
subl %eax, %ecx
pextrw $0x1, %xmm1, %eax
movw %cx, 0x10(%r15)
movq 0x30(%rsp), %rbx
movl %ebx, %ecx
subl %eax, %ecx
movw %cx, 0x12(%r15)
xorps %xmm3, %xmm3
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
cvtdq2ps %xmm0, %xmm0
movaps 0x50(%rsp), %xmm1
subps %xmm0, %xmm1
addps 0x10(%rsp), %xmm0
punpcklwd %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3]
cvtdq2ps %xmm2, %xmm2
subps %xmm2, %xmm1
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x134d0
movzwl 0x1c(%r12), %eax
movl 0x8(%rsp), %ecx
subl %eax, %ecx
movw %cx, 0xc(%r15)
movzwl 0x1a(%r12), %ecx
leal (%rcx,%rbp), %edx
movw %dx, 0xe(%r15)
movw %ax, 0x10(%r15)
movzwl 0x1e(%r12), %edx
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
subl %ecx, %ebx
subl %edx, %ebx
movaps 0x60(%rsp), %xmm0
subss %xmm1, %xmm0
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
movaps 0x80(%rsp), %xmm3
addss %xmm2, %xmm3
unpcklps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
xorps %xmm3, %xmm3
cvtsi2ss %edx, %xmm3
movw %bx, 0x12(%r15)
movaps 0x40(%rsp), %xmm4
subss %xmm2, %xmm4
subss %xmm3, %xmm4
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %ebp
movl %r13d, %edx
callq 0x134d0
movq 0x28(%rsp), %rbx
movw %bx, 0xc(%r15)
movzwl 0x1e(%r12), %eax
movl 0xc(%rsp), %r13d
movl %r13d, %ecx
subl %eax, %ecx
movw %cx, 0xe(%r15)
movzwl 0x18(%r12), %ecx
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
movw %cx, 0x10(%r15)
movw %ax, 0x12(%r15)
movaps 0x60(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm0, 0x40(%rsp)
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
subss %xmm2, %xmm0
movaps 0x10(%rsp), %xmm3
movlhps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0]
shufps $0xe2, %xmm3, %xmm0     # xmm0 = xmm0[2,0],xmm3[2,3]
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x134d0
movzwl 0x18(%r12), %eax
movq %rbx, %rcx
addl %eax, %ecx
movw %cx, 0xc(%r15)
movzwl 0x1e(%r12), %ecx
movl %r13d, %edx
subl %ecx, %edx
movw %dx, 0xe(%r15)
movzwl 0x1c(%r12), %edx
movq 0x38(%rsp), %rdi
subl %eax, %edi
subl %edx, %edi
movw %di, 0x10(%r15)
xorps %xmm4, %xmm4
cvtsi2ss %eax, %xmm4
movaps 0x10(%rsp), %xmm0
addss %xmm4, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
movaps 0x40(%rsp), %xmm2
subss %xmm1, %xmm2
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
xorps %xmm2, %xmm2
cvtsi2ss %edx, %xmm2
movw %cx, 0x12(%r15)
movaps 0x50(%rsp), %xmm3
subss %xmm4, %xmm3
subss %xmm2, %xmm3
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
movaps %xmm3, %xmm1
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x134d0
movl 0x1c(%r12), %eax
movd %eax, %xmm0
movl 0x8(%rsp), %ecx
subl %eax, %ecx
movw %cx, 0xc(%r15)
movl %eax, %ecx
shrl $0x10, %ecx
movl %r13d, %edx
subl %ecx, %edx
movw %dx, 0xe(%r15)
movw %ax, 0x10(%r15)
movw %cx, 0x12(%r15)
punpcklwd 0x45f2c(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1],xmm0[2],mem[2],xmm0[3],mem[3]
cvtdq2ps %xmm0, %xmm1
movaps 0x60(%rsp), %xmm0
subps %xmm1, %xmm0
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x134d0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq