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

    nk_flags ret = 0;
    struct nk_vec2 cur;
    struct nk_rect bounds;
    struct nk_color color;
    float step;
    float range;
    float ratio;

    NK_ASSERT(slot >= 0 && slot < NK_CHART_MAX_SLOT);
    step = g->w / (float)g->slots[slot].count;
    range = g->slots[slot].max - g->slots[slot].min;
    ratio = (value - g->slots[slot].min) / range;

    if (g->slots[slot].index == 0) {
        /* first data point does not have a connection */
        g->slots[slot].last.x = g->x;
        g->slots[slot].last.y = (g->y + g->h) - ratio * (float)g->h;

        bounds.x = g->slots[slot].last.x - 2;
        bounds.y = g->slots[slot].last.y - 2;
        bounds.w = bounds.h = 4;

        color = g->slots[slot].color;
        if (!(layout->flags & NK_WINDOW_ROM) && i &&
            NK_INBOX(i->mouse.pos.x,i->mouse.pos.y, g->slots[slot].last.x-3, g->slots[slot].last.y-3, 6, 6)){
            ret = nk_input_is_mouse_hovering_rect(i, bounds) ? NK_CHART_HOVERING : 0;
            ret |= (i->mouse.buttons[NK_BUTTON_LEFT].down &&
                i->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;
            color = g->slots[slot].highlight;
        }
        if (g->slots[slot].show_markers) {
            nk_fill_rect(out, bounds, 0, color);
        }
        g->slots[slot].index += 1;
        return ret;
    }

    /* draw a line between the last data point and the new one */
    color = g->slots[slot].color;
    cur.x = g->x + (float)(step * (float)g->slots[slot].index);
    cur.y = (g->y + g->h) - (ratio * (float)g->h);
    nk_stroke_line(out, g->slots[slot].last.x, g->slots[slot].last.y, cur.x, cur.y, 1.0f, color);

    bounds.x = cur.x - 3;
    bounds.y = cur.y - 3;
    bounds.w = bounds.h = 6;

    /* user selection of current data point */
    if (!(layout->flags & NK_WINDOW_ROM)) {
        if (nk_input_is_mouse_hovering_rect(i, bounds)) {
            ret = NK_CHART_HOVERING;
            ret |= (!i->mouse.buttons[NK_BUTTON_LEFT].down &&
                i->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;
            color = g->slots[slot].highlight;
        }
    }
    if (g->slots[slot].show_markers) {
        nk_fill_rect(out, nk_rect(cur.x - 2, cur.y - 2, 4, 4), 0, color);
    }

    /* save current data point position */
    g->slots[slot].last.x = cur.x;
    g->slots[slot].last.y = cur.y;
    g->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
movq 0xa8(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x88(%rsp), %rax
movq 0x4780(%rax), %rax
cmpl $0x0, 0x1b0(%rax)
je 0x75dab
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x75db8
movq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x80(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x54(%rsp)
cmpl $0x0, 0x70(%rsp)
jl 0x75de9
cmpl $0x4, 0x70(%rsp)
jl 0x75e1c
movq 0x4f200(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x3b5a6(%rip), %rsi     # 0xb13a0
leaq 0x3b5bd(%rip), %rdx     # 0xb13be
movl $0x702a, %ecx           # imm = 0x702A
movb $0x0, %al
callq 0x13ec0
movq 0x4f1dc(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x75e1e
movq 0x78(%rsp), %rax
movss 0xc(%rax), %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, 0x34(%rsp)
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x10(%rax), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
subss 0xc(%rax), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x74(%rsp), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
subss 0xc(%rax), %xmm0
divss 0x30(%rsp), %xmm0
movss %xmm0, 0x2c(%rsp)
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x24(%rax)
jne 0x761ed
movq 0x78(%rsp), %rax
movss 0x4(%rax), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x1c(%rax)
movq 0x78(%rsp), %rax
movss 0x8(%rax), %xmm1
movq 0x78(%rsp), %rax
addss 0x10(%rax), %xmm1
movss 0x2c(%rsp), %xmm0
movq 0x78(%rsp), %rax
movss 0x10(%rax), %xmm2
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x20(%rax)
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x1c(%rax), %xmm0
movss 0x3757a(%rip), %xmm1    # 0xad4e4
subss %xmm1, %xmm0
movss %xmm0, 0x3c(%rsp)
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x20(%rax), %xmm0
movss 0x3754e(%rip), %xmm1    # 0xad4e4
subss %xmm1, %xmm0
movss %xmm0, 0x40(%rsp)
movss 0x37594(%rip), %xmm0    # 0xad53c
movss %xmm0, 0x48(%rsp)
movss 0x37586(%rip), %xmm0    # 0xad53c
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, 0x38(%rsp)
movq 0x68(%rsp), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x76187
cmpq $0x0, 0x60(%rsp)
je 0x76187
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x1c(%rax), %xmm1
movss 0x37508(%rip), %xmm0    # 0xad524
subss %xmm0, %xmm1
movq 0x60(%rsp), %rax
movss 0x144(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x76187
movq 0x60(%rsp), %rax
movss 0x144(%rax), %xmm1
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x1c(%rax), %xmm0
movss 0x374bf(%rip), %xmm2    # 0xad524
subss %xmm2, %xmm0
movss 0x3748f(%rip), %xmm2    # 0xad500
addss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x76187
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x20(%rax), %xmm1
movss 0x37484(%rip), %xmm0    # 0xad524
subss %xmm0, %xmm1
movq 0x60(%rsp), %rax
movss 0x148(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x76187
movq 0x60(%rsp), %rax
movss 0x148(%rax), %xmm1
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x20(%rax), %xmm0
movss 0x3743b(%rip), %xmm2    # 0xad524
subss %xmm2, %xmm0
movss 0x3740b(%rip), %xmm2    # 0xad500
addss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x76187
movq 0x60(%rsp), %rdi
movsd 0x3c(%rsp), %xmm0
movsd 0x44(%rsp), %xmm1
callq 0x15440
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, 0x54(%rsp)
movq 0x60(%rsp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x104(%rcx)
movb %al, 0xf(%rsp)
je 0x76152
movq 0x60(%rsp), %rax
cmpl $0x0, 0x108(%rax)
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %dl
xorl %eax, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
orl 0x54(%rsp), %eax
movl %eax, 0x54(%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, 0x38(%rsp)
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x28(%rax)
je 0x761bf
movq 0x58(%rsp), %rdi
movsd 0x3c(%rsp), %xmm0
movsd 0x44(%rsp), %xmm1
movl 0x38(%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 0x54(%rsp), %eax
movl %eax, 0x94(%rsp)
jmp 0x7649a
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0x38(%rsp)
movq 0x78(%rsp), %rax
movss 0x4(%rax), %xmm1
movss 0x34(%rsp), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
cvtsi2ssl 0x24(%rax), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x4c(%rsp)
movq 0x78(%rsp), %rax
movss 0x8(%rax), %xmm1
movq 0x78(%rsp), %rax
addss 0x10(%rax), %xmm1
movss 0x2c(%rsp), %xmm0
movq 0x78(%rsp), %rax
movss 0x10(%rax), %xmm2
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x50(%rsp)
movq 0x58(%rsp), %rdi
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x1c(%rax), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss 0x20(%rax), %xmm1
movss 0x4c(%rsp), %xmm2
movss 0x50(%rsp), %xmm3
movl 0x38(%rsp), %esi
movss 0x37217(%rip), %xmm4    # 0xad4e8
callq 0x13960
movss 0x4c(%rsp), %xmm0
movss 0x37240(%rip), %xmm1    # 0xad524
subss %xmm1, %xmm0
movss %xmm0, 0x3c(%rsp)
movss 0x50(%rsp), %xmm0
movss 0x37228(%rip), %xmm1    # 0xad524
subss %xmm1, %xmm0
movss %xmm0, 0x40(%rsp)
movss 0x371f2(%rip), %xmm0    # 0xad500
movss %xmm0, 0x48(%rsp)
movss 0x371e4(%rip), %xmm0    # 0xad500
movss %xmm0, 0x44(%rsp)
movq 0x68(%rsp), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x763b9
movq 0x60(%rsp), %rdi
movsd 0x3c(%rsp), %xmm0
movsd 0x44(%rsp), %xmm1
callq 0x15440
cmpl $0x0, %eax
je 0x763b7
movl $0x1, 0x54(%rsp)
movq 0x60(%rsp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x104(%rcx)
movb %al, 0xe(%rsp)
jne 0x76382
movq 0x60(%rsp), %rax
cmpl $0x0, 0x108(%rax)
setne %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %dl
xorl %eax, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
orl 0x54(%rsp), %eax
movl %eax, 0x54(%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, 0x38(%rsp)
jmp 0x763b9
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x28(%rax)
je 0x76431
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
movss 0x4c(%rsp), %xmm0
movss 0x50(%rsp), %xmm1
movss 0x370f3(%rip), %xmm2    # 0xad4e4
subss %xmm2, %xmm0
subss %xmm2, %xmm1
movss 0x3713b(%rip), %xmm3    # 0xad53c
movaps %xmm3, %xmm2
callq 0x151a0
movq (%rsp), %rdi
movlpd %xmm0, 0x1c(%rsp)
movlpd %xmm1, 0x24(%rsp)
movsd 0x1c(%rsp), %xmm0
movsd 0x24(%rsp), %xmm1
movl 0x38(%rsp), %esi
xorps %xmm2, %xmm2
callq 0x13f10
movss 0x4c(%rsp), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x1c(%rax)
movss 0x50(%rsp), %xmm0
movq 0x78(%rsp), %rax
addq $0x14, %rax
movslq 0x70(%rsp), %rcx
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x20(%rax)
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 0x54(%rsp), %eax
movl %eax, 0x94(%rsp)
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq
nopl (%rax)