// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_chart_begin_colored
NK_API nk_bool
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 = nk_rgb_factor(color, style->color_factor);
    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;
    slot->show_markers = style->show_markers;}

    /* draw chart background */
    background = &style->background;

    switch(background->type) {
        case NK_STYLE_ITEM_IMAGE:
            nk_draw_image(&win->buffer, bounds, &background->data.image, nk_rgb_factor(nk_white, style->color_factor));
            break;
        case NK_STYLE_ITEM_NINE_SLICE:
            nk_draw_nine_slice(&win->buffer, bounds, &background->data.slice, nk_rgb_factor(nk_white, style->color_factor));
            break;
        case NK_STYLE_ITEM_COLOR:
            nk_fill_rect(&win->buffer, bounds, style->rounding, nk_rgb_factor(style->border_color, style->color_factor));
            nk_fill_rect(&win->buffer, nk_shrink_rect(bounds, style->border),
                style->rounding, nk_rgb_factor(style->background.data.color, style->color_factor));
            break;
    }
    return 1;
}

// Assembly:
subq $0xf8, %rsp
movl %edx, 0xf0(%rsp)
movl %ecx, 0xec(%rsp)
movq %rdi, 0xe0(%rsp)
movl %esi, 0xdc(%rsp)
movl %r8d, 0xd8(%rsp)
movss %xmm0, 0xd4(%rsp)
movss %xmm1, 0xd0(%rsp)
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x13c40
cmpq $0x0, 0xe0(%rsp)
jne 0x74f50
movq 0x500cc(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x3c472(%rip), %rsi     # 0xb13a0
leaq 0x3c489(%rip), %rdx     # 0xb13be
movl $0x6fba, %ecx           # imm = 0x6FBA
movb $0x0, %al
callq 0x13ec0
movq 0x500a8(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x74f52
jmp 0x74f54
movq 0xe0(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
jne 0x74f99
movq 0x50083(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x3c429(%rip), %rsi     # 0xb13a0
leaq 0x3c440(%rip), %rdx     # 0xb13be
movl $0x6fbb, %ecx           # imm = 0x6FBB
movb $0x0, %al
callq 0x13ec0
movq 0x5005f(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x74f9b
jmp 0x74f9d
movq 0xe0(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x74fe9
movq 0x50033(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x3c3d9(%rip), %rsi     # 0xb13a0
leaq 0x3c3f0(%rip), %rdx     # 0xb13be
movl $0x6fbc, %ecx           # imm = 0x6FBC
movb $0x0, %al
callq 0x13ec0
movq 0x5000f(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x74feb
cmpq $0x0, 0xe0(%rsp)
je 0x75021
movq 0xe0(%rsp), %rax
cmpq $0x0, 0x4780(%rax)
je 0x75021
movq 0xe0(%rsp), %rax
movq 0x4780(%rax), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x75031
movl $0x0, 0xf4(%rsp)
jmp 0x755e8
movq 0xe0(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x139c0
cmpl $0x0, %eax
jne 0x75091
movq 0xe0(%rsp), %rax
movq 0x4780(%rax), %rax
movq 0xa8(%rax), %rax
addq $0xf8, %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rdi
movl $0xc4, %esi
callq 0x2f0e0
movl $0x0, 0xf4(%rsp)
jmp 0x755e8
movq 0xe0(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0xc8(%rsp)
movq 0xe0(%rsp), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, 0xb8(%rsp)
movq 0xc8(%rsp), %rax
movq 0xa8(%rax), %rax
addq $0xf8, %rax
movq %rax, 0xc0(%rsp)
movq 0xb8(%rsp), %rax
addq $0x14c0, %rax           # imm = 0x14C0
movq %rax, 0xb0(%rsp)
movq 0xc0(%rsp), %rdi
movl $0xc4, %esi
callq 0x2f0e0
movss 0x98(%rsp), %xmm0
movq 0xb0(%rsp), %rax
addss 0x3c(%rax), %xmm0
movq 0xc0(%rsp), %rax
movss %xmm0, 0x4(%rax)
movss 0x9c(%rsp), %xmm0
movq 0xb0(%rsp), %rax
addss 0x40(%rax), %xmm0
movq 0xc0(%rsp), %rax
movss %xmm0, 0x8(%rax)
movss 0xa0(%rsp), %xmm0
movq 0xb0(%rsp), %rax
movss 0x3c(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movq 0xc0(%rsp), %rax
movss %xmm0, 0xc(%rax)
movss 0xa4(%rsp), %xmm0
movq 0xb0(%rsp), %rax
movss 0x40(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movq 0xc0(%rsp), %rax
movss %xmm0, 0x10(%rax)
movq 0xc0(%rsp), %rax
movss 0xc(%rax), %xmm1
movq 0xb0(%rsp), %rax
movss 0x38328(%rip), %xmm0    # 0xad4e4
mulss 0x3c(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x751e3
movq 0xb0(%rsp), %rax
movss 0x3830e(%rip), %xmm0    # 0xad4e4
mulss 0x3c(%rax), %xmm0
movss %xmm0, 0x68(%rsp)
jmp 0x751f6
movq 0xc0(%rsp), %rax
movss 0xc(%rax), %xmm0
movss %xmm0, 0x68(%rsp)
movss 0x68(%rsp), %xmm0
movq 0xc0(%rsp), %rax
movss %xmm0, 0xc(%rax)
movq 0xc0(%rsp), %rax
movss 0x10(%rax), %xmm1
movq 0xb0(%rsp), %rax
movss 0x382be(%rip), %xmm0    # 0xad4e4
mulss 0x40(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x7524d
movq 0xb0(%rsp), %rax
movss 0x382a4(%rip), %xmm0    # 0xad4e4
mulss 0x40(%rax), %xmm0
movss %xmm0, 0x64(%rsp)
jmp 0x75260
movq 0xc0(%rsp), %rax
movss 0x10(%rax), %xmm0
movss %xmm0, 0x64(%rsp)
movss 0x64(%rsp), %xmm0
movq 0xc0(%rsp), %rax
movss %xmm0, 0x10(%rax)
movq 0xc0(%rsp), %rax
addq $0x14, %rax
movq 0xc0(%rsp), %rdx
movl (%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, (%rdx)
movslq %ecx, %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x90(%rsp)
movl 0xdc(%rsp), %ecx
movq 0x90(%rsp), %rax
movl %ecx, (%rax)
movl 0xd8(%rsp), %ecx
movq 0x90(%rsp), %rax
movl %ecx, 0x18(%rax)
movq 0x90(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xb0(%rsp), %rax
movss 0x44(%rax), %xmm0
movl 0xf0(%rsp), %edi
callq 0x15100
movl %eax, %ecx
movq 0x58(%rsp), %rax
movl %ecx, 0x8c(%rsp)
movl 0x8c(%rsp), %ecx
movl %ecx, 0x4(%rax)
movq 0x90(%rsp), %rax
movl 0xec(%rsp), %ecx
movl %ecx, 0x8(%rax)
movss 0xd4(%rsp), %xmm1
movss 0xd0(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x7533d
movss 0xd4(%rsp), %xmm0
movss %xmm0, 0x54(%rsp)
jmp 0x7534c
movss 0xd0(%rsp), %xmm0
movss %xmm0, 0x54(%rsp)
movss 0x54(%rsp), %xmm0
movq 0x90(%rsp), %rax
movss %xmm0, 0xc(%rax)
movss 0xd4(%rsp), %xmm1
movss 0xd0(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x75387
movss 0xd0(%rsp), %xmm0
movss %xmm0, 0x50(%rsp)
jmp 0x75396
movss 0xd4(%rsp), %xmm0
movss %xmm0, 0x50(%rsp)
movss 0x50(%rsp), %xmm0
movq 0x90(%rsp), %rax
movss %xmm0, 0x10(%rax)
movq 0x90(%rsp), %rax
movss 0xc(%rax), %xmm1
movss 0x10(%rax), %xmm0
subss %xmm1, %xmm0
movss %xmm0, 0x14(%rax)
movq 0xb0(%rsp), %rax
movl 0x4c(%rax), %ecx
movq 0x90(%rsp), %rax
movl %ecx, 0x28(%rax)
movq 0xb0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x4c(%rsp)
testl %eax, %eax
je 0x754f7
jmp 0x75402
movl 0x4c(%rsp), %eax
subl $0x1, %eax
je 0x7541b
jmp 0x7540d
movl 0x4c(%rsp), %eax
subl $0x2, %eax
je 0x75489
jmp 0x755dd
movq 0xc8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x38(%rsp)
movq 0xa8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x40(%rsp)
movq 0xb0(%rsp), %rax
movss 0x44(%rax), %xmm0
movl 0x3be60(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movl %eax, 0x88(%rsp)
movsd 0x98(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm1
movl 0x88(%rsp), %edx
callq 0x14690
jmp 0x755dd
movq 0xc8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x28(%rsp)
movq 0xa8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
movq 0xb0(%rsp), %rax
movss 0x44(%rax), %xmm0
movl 0x3bdf2(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl %eax, 0x84(%rsp)
movsd 0x98(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm1
movl 0x84(%rsp), %edx
callq 0x152a0
jmp 0x755dd
movq 0xc8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x8(%rsp)
movq 0xb0(%rsp), %rax
movss 0x38(%rax), %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x44(%rax), %xmm0
movl 0x28(%rax), %edi
callq 0x15100
movq 0x8(%rsp), %rdi
movss 0x14(%rsp), %xmm2
movl %eax, 0x80(%rsp)
movsd 0x98(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm1
movl 0x80(%rsp), %esi
callq 0x13f10
movq 0xc8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x18(%rsp)
movq 0xb0(%rsp), %rax
movss 0x34(%rax), %xmm2
movsd 0x98(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm1
callq 0x75600
movlpd %xmm0, 0x70(%rsp)
movlpd %xmm1, 0x78(%rsp)
movq 0xb0(%rsp), %rax
movss 0x38(%rax), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x44(%rax), %xmm0
movl 0x8(%rax), %edi
callq 0x15100
movq 0x18(%rsp), %rdi
movss 0x24(%rsp), %xmm2
movl %eax, 0x6c(%rsp)
movsd 0x70(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
movl 0x6c(%rsp), %esi
callq 0x13f10
movl $0x1, 0xf4(%rsp)
movl 0xf4(%rsp), %eax
addq $0xf8, %rsp
retq
nopw (%rax,%rax)