// File: /workspace/github_c_makefile_star2_O3/space222[P]silo/./nuklear.h
// Function: nk_chart_begin_colored
NK_API int
nk_chart_begin_colored(struct nk_context *ctx, enum nk_chart_type type,
    struct nk_color color, struct nk_color highlight,
    int count, float min_value, float max_value)
{
    struct nk_window *win;
    struct nk_chart *chart;
    const struct nk_style *config;
    const struct nk_style_chart *style;

    const struct nk_style_item *background;
    struct nk_rect bounds = {0, 0, 0, 0};

    NK_ASSERT(ctx);
    NK_ASSERT(ctx->current);
    NK_ASSERT(ctx->current->layout);

    if (!ctx || !ctx->current || !ctx->current->layout) return 0;
    if (!nk_widget(&bounds, ctx)) {
        chart = &ctx->current->layout->chart;
        nk_zero(chart, sizeof(*chart));
        return 0;
    }

    win = ctx->current;
    config = &ctx->style;
    chart = &win->layout->chart;
    style = &config->chart;

    /* setup basic generic chart  */
    nk_zero(chart, sizeof(*chart));
    chart->x = bounds.x + style->padding.x;
    chart->y = bounds.y + style->padding.y;
    chart->w = bounds.w - 2 * style->padding.x;
    chart->h = bounds.h - 2 * style->padding.y;
    chart->w = NK_MAX(chart->w, 2 * style->padding.x);
    chart->h = NK_MAX(chart->h, 2 * style->padding.y);

    /* add first slot into chart */
    {struct nk_chart_slot *slot = &chart->slots[chart->slot++];
    slot->type = type;
    slot->count = count;
    slot->color = color;
    slot->highlight = highlight;
    slot->min = NK_MIN(min_value, max_value);
    slot->max = NK_MAX(min_value, max_value);
    slot->range = slot->max - slot->min;}

    /* draw chart background */
    background = &style->background;
    if (background->type == NK_STYLE_ITEM_IMAGE) {
        nk_draw_image(&win->buffer, bounds, &background->data.image, nk_white);
    } else {
        nk_fill_rect(&win->buffer, bounds, style->rounding, style->border_color);
        nk_fill_rect(&win->buffer, nk_shrink_rect(bounds, style->border),
            style->rounding, style->background.data.color);
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorps %xmm2, %xmm2
movaps %xmm2, (%rsp)
testq %rdi, %rdi
je 0x1bca3
movq %rdi, %rbx
movq 0x3fe8(%rdi), %rax
testq %rax, %rax
je 0x1bcc2
movl %esi, 0x18(%rsp)
movl %edx, 0x1c(%rsp)
movss %xmm0, 0x20(%rsp)
movss %xmm1, 0x24(%rsp)
cmpq $0x0, 0xa8(%rax)
je 0x1bce1
movl %r8d, %ebp
movl %ecx, %r12d
movq %rsp, %rdi
movq %rbx, %rsi
callq 0xfe72
movq 0x3fe8(%rbx), %r15
movq 0xa8(%r15), %r13
leaq 0xf8(%r13), %r14
testl %eax, %eax
je 0x1bae9
movl %ebp, 0x14(%rsp)
movq %r14, %rbp
andq $0x3, %rbp
je 0x1bb33
movl %r12d, 0x10(%rsp)
movl $0x4, %r12d
subq %rbp, %r12
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x20d0
leaq (%r14,%r12), %rdi
movl $0xb0, %edx
xorl %esi, %esi
callq 0x20d0
leaq (%r14,%r12), %rdi
addq $0xb0, %rdi
movl 0x10(%rsp), %r12d
xorl %esi, %esi
movq %rbp, %rdx
callq 0x20d0
movl (%r14), %r14d
jmp 0x1bb49
movq %r14, %r15
andq $0x3, %r15
je 0x1bc81
movl $0x4, %r12d
subq %r15, %r12
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x20d0
leaq (%r14,%r12), %rdi
movl $0xb0, %edx
xorl %esi, %esi
callq 0x20d0
leaq (%r14,%r12), %rdi
addq $0xb0, %rdi
xorl %esi, %esi
movq %r15, %rdx
jmp 0x1bc8d
leaq 0x10c(%r13), %rdi
xorl %r14d, %r14d
movl $0xa0, %edx
xorl %esi, %esi
callq 0x20d0
movsd (%rsp), %xmm0
movsd 0x12c4(%rbx), %xmm1
addps %xmm1, %xmm0
movlps %xmm0, 0xfc(%r13)
movsd 0x8(%rsp), %xmm0
addps %xmm1, %xmm1
subps %xmm1, %xmm0
maxps %xmm0, %xmm1
movlps %xmm1, 0x104(%r13)
leal 0x1(%r14), %eax
movl %eax, 0xf8(%r13)
movslq %r14d, %rax
leaq (%rax,%rax,4), %rax
movl 0x18(%rsp), %ecx
movl %ecx, 0x10c(%r13,%rax,8)
movl 0x14(%rsp), %ecx
movl %ecx, 0x124(%r13,%rax,8)
movl 0x1c(%rsp), %ecx
movl %ecx, 0x110(%r13,%rax,8)
movl %r12d, 0x114(%r13,%rax,8)
movss 0x20(%rsp), %xmm2
movaps %xmm2, %xmm0
movss 0x24(%rsp), %xmm1
minss %xmm1, %xmm0
movss %xmm0, 0x118(%r13,%rax,8)
maxss %xmm2, %xmm1
movss %xmm1, 0x11c(%r13,%rax,8)
subss %xmm0, %xmm1
movss %xmm1, 0x120(%r13,%rax,8)
addq $0x68, %r15
cmpl $0x1, 0x1290(%rbx)
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
jne 0x1bc20
addq $0x1298, %rbx           # imm = 0x1298
movq %r15, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7c36
jmp 0x1bc7a
movss 0x12c0(%rbx), %xmm2
movl 0x12b0(%rbx), %esi
movq %r15, %rdi
callq 0x7178
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movss 0x12bc(%rbx), %xmm3
movaps %xmm3, %xmm0
shufps $0x0, %xmm3, %xmm0      # xmm0 = xmm0[0,0],xmm3[0,0]
addps %xmm1, %xmm0
addss %xmm3, %xmm3
shufps $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
movaps %xmm3, %xmm1
maxps %xmm2, %xmm1
subps %xmm3, %xmm1
movss 0x12c0(%rbx), %xmm2
movl 0x1298(%rbx), %esi
movq %r15, %rdi
callq 0x7178
movl $0x1, %ebx
jmp 0x1bc92
xorl %ebx, %ebx
movl $0xb4, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20d0
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaa69(%rip), %rdi      # 0x26713
leaq 0x7a22(%rip), %rsi      # 0x236d3
leaq 0xbc72(%rip), %rcx      # 0x2792a
movl $0x5de4, %edx           # imm = 0x5DE4
callq 0x20a0
leaq 0x94d2(%rip), %rdi      # 0x2519b
leaq 0x7a03(%rip), %rsi      # 0x236d3
leaq 0xbc53(%rip), %rcx      # 0x2792a
movl $0x5de5, %edx           # imm = 0x5DE5
callq 0x20a0
leaq 0x962f(%rip), %rdi      # 0x25317
leaq 0x79e4(%rip), %rsi      # 0x236d3
leaq 0xbc34(%rip), %rcx      # 0x2792a
movl $0x5de6, %edx           # imm = 0x5DE6
callq 0x20a0