// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xe8, %rsp
movl %edx, 0xe0(%rsp)
movl %ecx, 0xdc(%rsp)
movq %rdi, 0xd0(%rsp)
movl %esi, 0xcc(%rsp)
movl %r8d, 0xc8(%rsp)
movss %xmm0, 0xc4(%rsp)
movss %xmm1, 0xc0(%rsp)
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x20d0
cmpq $0x0, 0xd0(%rsp)
je 0x30acf
jmp 0x30aee
leaq 0x17a49(%rip), %rdi     # 0x4851f
leaq 0x148d6(%rip), %rsi     # 0x453b3
movl $0x5de4, %edx           # imm = 0x5DE4
leaq 0x18c4d(%rip), %rcx     # 0x49736
callq 0x20a0
movq 0xd0(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x30b02
jmp 0x30b21
leaq 0x163f0(%rip), %rdi     # 0x46ef9
leaq 0x148a3(%rip), %rsi     # 0x453b3
movl $0x5de5, %edx           # imm = 0x5DE5
leaq 0x18c1a(%rip), %rcx     # 0x49736
callq 0x20a0
movq 0xd0(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
je 0x30b3c
jmp 0x30b5b
leaq 0x16532(%rip), %rdi     # 0x47075
leaq 0x14869(%rip), %rsi     # 0x453b3
movl $0x5de6, %edx           # imm = 0x5DE6
leaq 0x18be0(%rip), %rcx     # 0x49736
callq 0x20a0
cmpq $0x0, 0xd0(%rsp)
je 0x30b91
movq 0xd0(%rsp), %rax
cmpq $0x0, 0x3fe8(%rax)
je 0x30b91
movq 0xd0(%rsp), %rax
movq 0x3fe8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x30ba1
movl $0x0, 0xe4(%rsp)
jmp 0x31039
movq 0xd0(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x1cd90
cmpl $0x0, %eax
jne 0x30c01
movq 0xd0(%rsp), %rax
movq 0x3fe8(%rax), %rax
movq 0xa8(%rax), %rax
addq $0xf8, %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
movl $0xb4, %esi
callq 0x8150
movl $0x0, 0xe4(%rsp)
jmp 0x31039
movq 0xd0(%rsp), %rax
movq 0x3fe8(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xd0(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0xa8(%rsp)
movq 0xb8(%rsp), %rax
movq 0xa8(%rax), %rax
addq $0xf8, %rax
movq %rax, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
addq $0x1128, %rax           # imm = 0x1128
movq %rax, 0xa0(%rsp)
movq 0xb0(%rsp), %rdi
movl $0xb4, %esi
callq 0x8150
movss 0x88(%rsp), %xmm0
movq 0xa0(%rsp), %rax
addss 0x34(%rax), %xmm0
movq 0xb0(%rsp), %rax
movss %xmm0, 0x4(%rax)
movss 0x8c(%rsp), %xmm0
movq 0xa0(%rsp), %rax
addss 0x38(%rax), %xmm0
movq 0xb0(%rsp), %rax
movss %xmm0, 0x8(%rax)
movss 0x90(%rsp), %xmm0
movq 0xa0(%rsp), %rax
movss 0x34(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movq 0xb0(%rsp), %rax
movss %xmm0, 0xc(%rax)
movss 0x94(%rsp), %xmm0
movq 0xa0(%rsp), %rax
movss 0x38(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movq 0xb0(%rsp), %rax
movss %xmm0, 0x10(%rax)
movq 0xb0(%rsp), %rax
movss 0xc(%rax), %xmm1
movq 0xa0(%rsp), %rax
movss 0x143dc(%rip), %xmm0    # 0x45108
mulss 0x34(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x30d53
movq 0xa0(%rsp), %rax
movss 0x143c2(%rip), %xmm0    # 0x45108
mulss 0x34(%rax), %xmm0
movss %xmm0, 0x18(%rsp)
jmp 0x30d66
movq 0xb0(%rsp), %rax
movss 0xc(%rax), %xmm0
movss %xmm0, 0x18(%rsp)
movss 0x18(%rsp), %xmm0
movq 0xb0(%rsp), %rax
movss %xmm0, 0xc(%rax)
movq 0xb0(%rsp), %rax
movss 0x10(%rax), %xmm1
movq 0xa0(%rsp), %rax
movss 0x14372(%rip), %xmm0    # 0x45108
mulss 0x38(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x30dbd
movq 0xa0(%rsp), %rax
movss 0x14358(%rip), %xmm0    # 0x45108
mulss 0x38(%rax), %xmm0
movss %xmm0, 0x14(%rsp)
jmp 0x30dd0
movq 0xb0(%rsp), %rax
movss 0x10(%rax), %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x14(%rsp), %xmm0
movq 0xb0(%rsp), %rax
movss %xmm0, 0x10(%rax)
movq 0xb0(%rsp), %rax
addq $0x14, %rax
movq 0xb0(%rsp), %rdx
movl (%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, (%rdx)
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x80(%rsp)
movl 0xcc(%rsp), %ecx
movq 0x80(%rsp), %rax
movl %ecx, (%rax)
movl 0xc8(%rsp), %ecx
movq 0x80(%rsp), %rax
movl %ecx, 0x18(%rax)
movq 0x80(%rsp), %rax
movl 0xe0(%rsp), %ecx
movl %ecx, 0x4(%rax)
movq 0x80(%rsp), %rax
movl 0xdc(%rsp), %ecx
movl %ecx, 0x8(%rax)
movss 0xc4(%rsp), %xmm1
movss 0xc0(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x30e81
movss 0xc4(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
jmp 0x30e90
movss 0xc0(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0x10(%rsp), %xmm0
movq 0x80(%rsp), %rax
movss %xmm0, 0xc(%rax)
movss 0xc4(%rsp), %xmm1
movss 0xc0(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x30ecb
movss 0xc0(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
jmp 0x30eda
movss 0xc4(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0xc(%rsp), %xmm0
movq 0x80(%rsp), %rax
movss %xmm0, 0x10(%rax)
movq 0x80(%rsp), %rax
movss 0x10(%rax), %xmm0
movq 0x80(%rsp), %rax
subss 0xc(%rax), %xmm0
movq 0x80(%rsp), %rax
movss %xmm0, 0x14(%rax)
movq 0xa0(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x30f78
movq 0xb8(%rsp), %rdi
addq $0x68, %rdi
movups 0x88(%rsp), %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0x98(%rsp), %rsi
addq $0x8, %rsi
movl $0xffffffff, 0x6c(%rsp) # imm = 0xFFFFFFFF
movsd 0x70(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
movl 0x6c(%rsp), %edx
callq 0xc3c0
jmp 0x3102e
movq 0xb8(%rsp), %rdi
addq $0x68, %rdi
movups 0x88(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0xa0(%rsp), %rax
movss 0x30(%rax), %xmm2
movl 0x20(%rax), %eax
movl %eax, 0x4c(%rsp)
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movl 0x4c(%rsp), %esi
callq 0xb130
movq 0xb8(%rsp), %rax
addq $0x68, %rax
movq %rax, (%rsp)
movups 0x88(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0xa0(%rsp), %rax
movss 0x2c(%rax), %xmm2
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
callq 0x31050
movq (%rsp), %rdi
movlpd %xmm0, 0x3c(%rsp)
movlpd %xmm1, 0x44(%rsp)
movq 0xa0(%rsp), %rax
movss 0x30(%rax), %xmm2
movl 0x8(%rax), %eax
movl %eax, 0x1c(%rsp)
movsd 0x3c(%rsp), %xmm0
movsd 0x44(%rsp), %xmm1
movl 0x1c(%rsp), %esi
callq 0xb130
movl $0x1, 0xe4(%rsp)
movl 0xe4(%rsp), %eax
addq $0xe8, %rsp
retq
nopl (%rax,%rax)