// File: /workspace/github_c_makefile_star2_O2/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 0x199c3
movq %rdi, %rbx
movq 0x3fe8(%rdi), %rax
testq %rax, %rax
je 0x199e2
movl %ecx, 0x1c(%rsp)
movss %xmm0, 0x20(%rsp)
movss %xmm1, 0x24(%rsp)
cmpq $0x0, 0xa8(%rax)
je 0x19a01
movl %esi, %r15d
movl %edx, %r13d
movl %r8d, %r12d
movq %rsp, %rdi
movq %rbx, %rsi
callq 0xe786
movq 0x3fe8(%rbx), %r14
movq 0xa8(%r14), %rbp
leaq 0xf8(%rbp), %rdi
movl $0xb4, %esi
testl %eax, %eax
je 0x19964
callq 0x4e90
movsd (%rsp), %xmm0
movsd 0x12c4(%rbx), %xmm1
addps %xmm1, %xmm0
movlps %xmm0, 0xfc(%rbp)
movsd 0x8(%rsp), %xmm0
addps %xmm1, %xmm1
subps %xmm1, %xmm0
maxps %xmm0, %xmm1
movlps %xmm1, 0x104(%rbp)
movslq 0xf8(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0xf8(%rbp)
imulq $0x28, %rax, %rax
movl %r15d, 0x10c(%rbp,%rax)
movl %r12d, 0x124(%rbp,%rax)
movl %r13d, 0x110(%rbp,%rax)
movl 0x1c(%rsp), %ecx
movl %ecx, 0x114(%rbp,%rax)
movss 0x20(%rsp), %xmm2
movaps %xmm2, %xmm0
movss 0x24(%rsp), %xmm1
minss %xmm1, %xmm0
movss %xmm0, 0x118(%rbp,%rax)
maxss %xmm2, %xmm1
movss %xmm1, 0x11c(%rbp,%rax)
subss %xmm0, %xmm1
movss %xmm1, 0x120(%rbp,%rax)
addq $0x68, %r14
cmpl $0x1, 0x1290(%rbx)
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
jne 0x1996d
addq $0x1298, %rbx           # imm = 0x1298
pushq $-0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x72e2
jmp 0x199b1
callq 0x4e90
xorl %eax, %eax
jmp 0x199b4
movss 0x12c0(%rbx), %xmm2
movl 0x12b0(%rbx), %esi
movq %r14, %rdi
callq 0x6858
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movss 0x12bc(%rbx), %xmm2
callq 0x19a20
movss 0x12c0(%rbx), %xmm2
movl 0x1298(%rbx), %esi
movq %r14, %rdi
callq 0x6858
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9d19(%rip), %rdi      # 0x236e3
leaq 0x6cd2(%rip), %rsi      # 0x206a3
leaq 0xaf22(%rip), %rcx      # 0x248fa
movl $0x5de4, %edx           # imm = 0x5DE4
callq 0x20a0
leaq 0x8782(%rip), %rdi      # 0x2216b
leaq 0x6cb3(%rip), %rsi      # 0x206a3
leaq 0xaf03(%rip), %rcx      # 0x248fa
movl $0x5de5, %edx           # imm = 0x5DE5
callq 0x20a0
leaq 0x88df(%rip), %rdi      # 0x222e7
leaq 0x6c94(%rip), %rsi      # 0x206a3
leaq 0xaee4(%rip), %rcx      # 0x248fa
movl $0x5de6, %edx           # imm = 0x5DE6
callq 0x20a0