// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_chart_push_column
NK_INTERN nk_flags
nk_chart_push_column(const struct nk_context *ctx, struct nk_window *win,
    struct nk_chart *chart, float value, int slot)
{
    struct nk_command_buffer *out = &win->buffer;
    const struct nk_input *in = ctx->current->widgets_disabled ? 0 : &ctx->input;
    struct nk_panel *layout = win->layout;

    float ratio;
    nk_flags ret = 0;
    struct nk_color color;
    struct nk_rect item = {0,0,0,0};

    NK_ASSERT(slot >= 0 && slot < NK_CHART_MAX_SLOT);
    if (chart->slots[slot].index  >= chart->slots[slot].count)
        return nk_false;
    if (chart->slots[slot].count) {
        float padding = (float)(chart->slots[slot].count-1);
        item.w = (chart->w - padding) / (float)(chart->slots[slot].count);
    }

    /* calculate bounds of current bar chart entry */
    color = chart->slots[slot].color;;
    item.h = chart->h * NK_ABS((value/chart->slots[slot].range));
    if (value >= 0) {
        ratio = (value + NK_ABS(chart->slots[slot].min)) / NK_ABS(chart->slots[slot].range);
        item.y = (chart->y + chart->h) - chart->h * ratio;
    } else {
        ratio = (value - chart->slots[slot].max) / chart->slots[slot].range;
        item.y = chart->y + (chart->h * NK_ABS(ratio)) - item.h;
    }
    item.x = chart->x + ((float)chart->slots[slot].index * item.w);
    item.x = item.x + ((float)chart->slots[slot].index);

    /* user chart bar selection */
    if (!(layout->flags & NK_WINDOW_ROM) && in &&
        NK_INBOX(in->mouse.pos.x,in->mouse.pos.y,item.x,item.y,item.w,item.h)) {
        ret = NK_CHART_HOVERING;
        ret |= (!in->mouse.buttons[NK_BUTTON_LEFT].down &&
                in->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;
        color = chart->slots[slot].highlight;
    }
    nk_fill_rect(out, item, 0, color);
    chart->slots[slot].index += 1;
    return ret;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movss %xmm0, 0x74(%rsp)
movl %ecx, 0x70(%rsp)
movq 0x80(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x68(%rsp)
movq 0x88(%rsp), %rax
movq 0x4780(%rax), %rax
cmpl $0x0, 0x1b0(%rax)
je 0x76508
xorl %eax, %eax
movq %rax, 0x30(%rsp)
jmp 0x76515
movq 0x88(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x80(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x50(%rsp)
leaq 0x3c(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x13c40
cmpl $0x0, 0x70(%rsp)
jl 0x7655a
cmpl $0x4, 0x70(%rsp)
jl 0x7658d
movq 0x4ea8f(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x3ae35(%rip), %rsi     # 0xb13a0
leaq 0x3ae4c(%rip), %rdx     # 0xb13be
movl $0x7071, %ecx           # imm = 0x7071
movb $0x0, %al
callq 0x13ec0
movq 0x4ea6b(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x7658f
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
movq 0x78(%rsp), %rcx
addq $0x14, %rcx
movslq 0x70(%rsp), %rdx
imulq $0x2c, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jl 0x765d1
movl $0x0, 0x94(%rsp)
jmp 0x76acf
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
je 0x76645
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
subl $0x1, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x38(%rsp)
movq 0x78(%rsp), %rax
movss 0xc(%rax), %xmm0
subss 0x38(%rsp), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
cvtsi2ssl 0x18(%rax), %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x44(%rsp)
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0x4c(%rsp)
movq 0x78(%rsp), %rax
movss 0x10(%rax), %xmm0
movss %xmm0, 0x2c(%rsp)
movss 0x74(%rsp), %xmm1
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
divss 0x14(%rax), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x766ce
movss 0x74(%rsp), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
divss 0x14(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, 0x28(%rsp)
jmp 0x766f4
movss 0x74(%rsp), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
divss 0x14(%rax), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x2c(%rsp), %xmm0
movss 0x28(%rsp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, 0x48(%rsp)
movss 0x74(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x76872
movss 0x74(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
ucomiss 0xc(%rax), %xmm0
jbe 0x76775
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0xc(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, 0x20(%rsp)
jmp 0x76795
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0xc(%rax), %xmm0
movss %xmm0, 0x20(%rsp)
movss 0x24(%rsp), %xmm0
movss 0x20(%rsp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x1c(%rsp)
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
ucomiss 0x14(%rax), %xmm0
jbe 0x767f8
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x14(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, 0x18(%rsp)
jmp 0x76818
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x14(%rax), %xmm0
movss %xmm0, 0x18(%rsp)
movss 0x1c(%rsp), %xmm0
movss 0x18(%rsp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x54(%rsp)
movq 0x78(%rsp), %rax
movss 0x8(%rax), %xmm1
movq 0x78(%rsp), %rax
addss 0x10(%rax), %xmm1
movq 0x78(%rsp), %rax
movss 0x10(%rax), %xmm0
movss 0x54(%rsp), %xmm2
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x40(%rsp)
jmp 0x76929
movss 0x74(%rsp), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
subss 0x10(%rax), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
divss 0x14(%rax), %xmm0
movss %xmm0, 0x54(%rsp)
movq 0x78(%rsp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x10(%rsp)
movq 0x78(%rsp), %rax
movss 0x10(%rax), %xmm0
movss %xmm0, 0x14(%rsp)
xorps %xmm0, %xmm0
ucomiss 0x54(%rsp), %xmm0
jbe 0x768f7
movss 0x54(%rsp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, 0xc(%rsp)
jmp 0x76903
movss 0x54(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0x10(%rsp), %xmm1
movss 0x14(%rsp), %xmm0
movss 0xc(%rsp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
subss 0x48(%rsp), %xmm0
movss %xmm0, 0x40(%rsp)
movq 0x78(%rsp), %rax
movss 0x4(%rax), %xmm1
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
cvtsi2ssl 0x24(%rax), %xmm0
movss 0x44(%rsp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x3c(%rsp)
movss 0x3c(%rsp), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
cvtsi2ssl 0x24(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x3c(%rsp)
movq 0x58(%rsp), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x76a89
cmpq $0x0, 0x60(%rsp)
je 0x76a89
movss 0x3c(%rsp), %xmm1
movq 0x60(%rsp), %rax
movss 0x144(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x76a89
movq 0x60(%rsp), %rax
movss 0x144(%rax), %xmm1
movss 0x3c(%rsp), %xmm0
addss 0x44(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x76a89
movss 0x40(%rsp), %xmm1
movq 0x60(%rsp), %rax
movss 0x148(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x76a89
movq 0x60(%rsp), %rax
movss 0x148(%rax), %xmm1
movss 0x40(%rsp), %xmm0
addss 0x48(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x76a89
movl $0x1, 0x50(%rsp)
movq 0x60(%rsp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x104(%rcx)
movb %al, 0xb(%rsp)
jne 0x76a54
movq 0x60(%rsp), %rax
cmpl $0x0, 0x108(%rax)
setne %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %dl
xorl %eax, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
orl 0x50(%rsp), %eax
movl %eax, 0x50(%rsp)
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, 0x4c(%rsp)
movq 0x68(%rsp), %rdi
movsd 0x3c(%rsp), %xmm0
movsd 0x44(%rsp), %xmm1
movl 0x4c(%rsp), %esi
xorps %xmm2, %xmm2
callq 0x13f10
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x24(%rax)
movl 0x50(%rsp), %eax
movl %eax, 0x94(%rsp)
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq
nop