// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_fill_triangle
NK_API void
nk_fill_triangle(struct nk_command_buffer *b, float x0, float y0, float x1,
    float y1, float x2, float y2, struct nk_color c)
{
    struct nk_command_triangle_filled *cmd;
    NK_ASSERT(b);
    if (!b || c.a == 0) return;
    if (!b) return;
    if (b->use_clipping) {
        const struct nk_rect *clip = &b->clip;
        if (!NK_INBOX(x0, y0, clip->x, clip->y, clip->w, clip->h) &&
            !NK_INBOX(x1, y1, clip->x, clip->y, clip->w, clip->h) &&
            !NK_INBOX(x2, y2, clip->x, clip->y, clip->w, clip->h))
            return;
    }

    cmd = (struct nk_command_triangle_filled*)
        nk_command_buffer_push(b, NK_COMMAND_TRIANGLE_FILLED, sizeof(*cmd));
    if (!cmd) return;
    cmd->a.x = (short)x0;
    cmd->a.y = (short)y0;
    cmd->b.x = (short)x1;
    cmd->b.y = (short)y1;
    cmd->c.x = (short)x2;
    cmd->c.y = (short)y2;
    cmd->color = c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movl %esi, %ebx
movq %rdi, %r14
testq %rdi, %rdi
jne 0x27d69
movq 0x602e6(%rip), %r15     # 0x87ff0
movq (%r15), %rdi
leaq 0x4a078(%rip), %rsi     # 0x71d8c
leaq 0x4a08f(%rip), %rdx     # 0x71daa
movl $0x241c, %ecx           # imm = 0x241C
xorl %eax, %eax
movaps %xmm5, 0x50(%rsp)
movaps %xmm4, 0x40(%rsp)
movaps %xmm2, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm3, (%rsp)
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movaps (%rsp), %xmm3
movaps 0x10(%rsp), %xmm1
movaps 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm2
movaps 0x40(%rsp), %xmm4
movaps 0x50(%rsp), %xmm5
testq %r14, %r14
sete %al
cmpl $0x1000000, %ebx        # imm = 0x1000000
setb %cl
orb %al, %cl
jne 0x27ea5
cmpl $0x0, 0x18(%r14)
je 0x27e1b
movss 0x8(%r14), %xmm7
ucomiss %xmm7, %xmm0
jb 0x27dbb
movss 0x10(%r14), %xmm6
addss %xmm7, %xmm6
ucomiss %xmm0, %xmm6
jbe 0x27dbb
movss 0xc(%r14), %xmm6
ucomiss %xmm6, %xmm1
jb 0x27dbb
addss 0x14(%r14), %xmm6
ucomiss %xmm1, %xmm6
ja 0x27e1b
ucomiss %xmm7, %xmm2
jb 0x27de5
movss 0x10(%r14), %xmm6
addss %xmm7, %xmm6
ucomiss %xmm2, %xmm6
jbe 0x27de5
movss 0xc(%r14), %xmm6
ucomiss %xmm6, %xmm3
jb 0x27de5
addss 0x14(%r14), %xmm6
ucomiss %xmm3, %xmm6
ja 0x27e1b
ucomiss %xmm7, %xmm4
jb 0x27ea5
addss 0x10(%r14), %xmm7
ucomiss %xmm4, %xmm7
jbe 0x27ea5
movss 0xc(%r14), %xmm6
ucomiss %xmm6, %xmm5
jb 0x27ea5
addss 0x14(%r14), %xmm6
ucomiss %xmm5, %xmm6
jbe 0x27ea5
movl $0x20, %edx
movq %r14, %rdi
movl $0xc, %esi
movaps %xmm5, 0x50(%rsp)
movaps %xmm4, 0x40(%rsp)
movaps %xmm2, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm3, (%rsp)
callq 0x2703d
movaps (%rsp), %xmm5
movaps 0x10(%rsp), %xmm4
movaps 0x20(%rsp), %xmm3
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm2
movaps 0x50(%rsp), %xmm1
testq %rax, %rax
je 0x27ea5
movl %ebx, %ecx
shrl $0x18, %ecx
unpcklps %xmm5, %xmm0            # xmm0 = xmm0[0],xmm5[0],xmm0[1],xmm5[1]
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
movlhps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
cvttps2dq %xmm3, %xmm0
packssdw %xmm0, %xmm0
movq %xmm0, 0x10(%rax)
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
cvttps2dq %xmm2, %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movd %xmm0, 0x18(%rax)
movw %bx, 0x1c(%rax)
shrl $0x10, %ebx
movb %bl, 0x1e(%rax)
movb %cl, 0x1f(%rax)
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq