// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_chart.c
// Function: lv_chart_draw_lines
static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask)
{
    lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);

    uint16_t i;
    lv_point_t p1;
    lv_point_t p2;
    lv_coord_t w     = lv_obj_get_width(chart);
    lv_coord_t h     = lv_obj_get_height(chart);
    lv_coord_t x_ofs = chart->coords.x1;
    lv_coord_t y_ofs = chart->coords.y1;
    int32_t y_tmp;
    lv_coord_t p_prev;
    lv_coord_t p_act;
    lv_chart_series_t * ser;
    lv_opa_t opa_scale = lv_obj_get_opa_scale(chart);
    lv_style_t style;
    lv_style_copy(&style, &lv_style_plain);
    style.line.opa   = ext->series.opa;
    style.line.width = ext->series.width;

    /*Go through all data lines*/
    LV_LL_READ_BACK(ext->series_ll, ser)
    {
        style.line.color = ser->color;

        lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;

        p1.x = 0 + x_ofs;
        p2.x = 0 + x_ofs;

        p_prev = start_point;
        y_tmp  = (int32_t)((int32_t)ser->points[p_prev] - ext->ymin) * h;
        y_tmp  = y_tmp / (ext->ymax - ext->ymin);
        p2.y   = h - y_tmp + y_ofs;

        for(i = 1; i < ext->point_cnt; i++) {
            p1.x = p2.x;
            p1.y = p2.y;

            p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs;

            p_act = (start_point + i) % ext->point_cnt;

            y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h;
            y_tmp = y_tmp / (ext->ymax - ext->ymin);
            p2.y  = h - y_tmp + y_ofs;

            if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF)
                lv_draw_line(&p1, &p2, mask, &style, opa_scale);

            p_prev = p_act;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8310
movw %ax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8350
movw %ax, -0x26(%rbp)
movq -0x8(%rbp), %rax
movw 0x20(%rax), %ax
movw %ax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movw 0x22(%rax), %ax
movw %ax, -0x2a(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa710
movb %al, -0x41(%rbp)
leaq -0x90(%rbp), %rdi
leaq 0x6443c(%rip), %rsi     # 0x88fe8
callq 0xc550
movq -0x18(%rbp), %rax
movb 0x5f(%rax), %al
movb %al, -0x50(%rbp)
movq -0x18(%rbp), %rax
movw 0x5c(%rax), %ax
movw %ax, -0x52(%rbp)
movq -0x18(%rbp), %rdi
callq 0x458e0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x24dcc
movq -0x40(%rbp), %rax
movw 0x8(%rax), %ax
movw %ax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movb 0x5a(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x24c0c
movq -0x40(%rbp), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x98(%rbp)
jmp 0x24c16
xorl %eax, %eax
movl %eax, -0x98(%rbp)
jmp 0x24c16
movl -0x98(%rbp), %eax
movw %ax, -0x92(%rbp)
movswl -0x28(%rbp), %eax
addl $0x0, %eax
movw %ax, -0x1e(%rbp)
movswl -0x28(%rbp), %eax
addl $0x0, %eax
movw %ax, -0x22(%rbp)
movw -0x92(%rbp), %ax
movw %ax, -0x32(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movswq -0x32(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movswl 0x18(%rcx), %ecx
subl %ecx, %eax
movswl -0x26(%rbp), %ecx
imull %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x18(%rbp), %rcx
movswl 0x1a(%rcx), %ecx
movq -0x18(%rbp), %rdx
movswl 0x18(%rdx), %edx
subl %edx, %ecx
cltd
idivl %ecx
movl %eax, -0x30(%rbp)
movswl -0x26(%rbp), %eax
subl -0x30(%rbp), %eax
movswl -0x2a(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x20(%rbp)
movw $0x1, -0x1a(%rbp)
movzwl -0x1a(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0x1e(%rcx), %ecx
cmpl %ecx, %eax
jge 0x24db4
movw -0x22(%rbp), %ax
movw %ax, -0x1e(%rbp)
movw -0x20(%rbp), %ax
movw %ax, -0x1c(%rbp)
movswl -0x24(%rbp), %eax
movzwl -0x1a(%rbp), %ecx
imull %ecx, %eax
movq -0x18(%rbp), %rcx
movzwl 0x1e(%rcx), %ecx
subl $0x1, %ecx
cltd
idivl %ecx
movswl -0x28(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x22(%rbp)
movswl -0x92(%rbp), %eax
movzwl -0x1a(%rbp), %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzwl 0x1e(%rcx), %ecx
cltd
idivl %ecx
movw %dx, %ax
movw %ax, -0x34(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movswq -0x34(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movswl 0x18(%rcx), %ecx
subl %ecx, %eax
movswl -0x26(%rbp), %ecx
imull %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x18(%rbp), %rcx
movswl 0x1a(%rcx), %ecx
movq -0x18(%rbp), %rdx
movswl 0x18(%rdx), %edx
subl %edx, %ecx
cltd
idivl %ecx
movl %eax, -0x30(%rbp)
movswl -0x26(%rbp), %eax
subl -0x30(%rbp), %eax
movswl -0x2a(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x20(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movswq -0x32(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
cmpl $0xffff83e8, %eax       # imm = 0xFFFF83E8
je 0x24d9b
movq -0x40(%rbp), %rax
movq (%rax), %rax
movswq -0x34(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
cmpl $0xffff83e8, %eax       # imm = 0xFFFF83E8
je 0x24d9b
movq -0x10(%rbp), %rdx
leaq -0x1e(%rbp), %rdi
leaq -0x22(%rbp), %rsi
leaq -0x90(%rbp), %rcx
movzbl -0x41(%rbp), %r8d
callq 0x5fcd0
movw -0x34(%rbp), %ax
movw %ax, -0x32(%rbp)
movw -0x1a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1a(%rbp)
jmp 0x24c9a
jmp 0x24db6
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x45690
movq %rax, -0x40(%rbp)
jmp 0x24bd4
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)