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

    uint16_t i;
    lv_area_t col_a;
    lv_area_t col_mask;
    bool mask_ret;
    lv_coord_t w = lv_obj_get_width(chart);
    lv_coord_t h = lv_obj_get_height(chart);
    int32_t y_tmp;
    lv_chart_series_t * ser;
    lv_style_t rects;
    lv_coord_t col_w = w / ((ext->series.num + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/
    lv_coord_t x_ofs = col_w / 2;                                    /*Shift with a half col.*/

    lv_style_copy(&rects, &lv_style_plain);
    rects.body.border.width = 0;
    rects.body.radius       = 0;
    rects.body.opa          = ext->series.opa;

    col_a.y2 = chart->coords.y2;

    lv_coord_t x_act;

    /*Go through all points*/
    for(i = 0; i < ext->point_cnt; i++) {
        x_act = (int32_t)((int32_t)w * i) / ext->point_cnt;
        x_act += chart->coords.x1 + x_ofs;

        /*Draw the current point of all data line*/
        LV_LL_READ_BACK(ext->series_ll, ser)
        {
            lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;

            col_a.x1 = x_act;
            col_a.x2 = col_a.x1 + col_w;
            x_act += col_w;

            if(col_a.x2 < mask->x1) continue;
            if(col_a.x1 > mask->x2) break;

            rects.body.main_color = ser->color;
            rects.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark);

            lv_coord_t 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);
            col_a.y1         = h - y_tmp + chart->coords.y1;

            mask_ret = lv_area_intersect(&col_mask, mask, &col_a);
            if(mask_ret != false && ser->points[p_act] != LV_CHART_POINT_DEF) {
                lv_draw_rect(&chart->coords, &col_mask, &rects, lv_obj_get_opa_scale(chart));
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %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, -0x2e(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8350
movw %ax, -0x30(%rbp)
movswl -0x2e(%rbp), %eax
movq -0x18(%rbp), %rcx
movzbl 0x5e(%rcx), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rdx
movzwl 0x1e(%rdx), %edx
imull %edx, %ecx
cltd
idivl %ecx
movw %ax, -0x8a(%rbp)
movswl -0x8a(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movw %ax, -0x8c(%rbp)
leaq -0x88(%rbp), %rdi
leaq 0x64186(%rip), %rsi     # 0x88fe8
callq 0xc550
movw $0x0, -0x7c(%rbp)
movw $0x0, -0x82(%rbp)
movq -0x18(%rbp), %rax
movb 0x5f(%rax), %al
movb %al, -0x80(%rbp)
movq -0x8(%rbp), %rax
movw 0x26(%rax), %ax
movw %ax, -0x1c(%rbp)
movw $0x0, -0x1a(%rbp)
movzwl -0x1a(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0x1e(%rcx), %ecx
cmpl %ecx, %eax
jge 0x2512a
movswl -0x2e(%rbp), %eax
movzwl -0x1a(%rbp), %ecx
imull %ecx, %eax
movq -0x18(%rbp), %rcx
movzwl 0x1e(%rcx), %ecx
cltd
idivl %ecx
movw %ax, -0x8e(%rbp)
movq -0x8(%rbp), %rax
movswl 0x20(%rax), %ecx
movswl -0x8c(%rbp), %eax
addl %eax, %ecx
movswl -0x8e(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x8e(%rbp)
movq -0x18(%rbp), %rdi
callq 0x458e0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x25117
movq -0x18(%rbp), %rax
movb 0x5a(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x24f1d
movq -0x40(%rbp), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x9c(%rbp)
jmp 0x24f27
xorl %eax, %eax
movl %eax, -0x9c(%rbp)
jmp 0x24f27
movl -0x9c(%rbp), %eax
movw %ax, -0x90(%rbp)
movw -0x8e(%rbp), %ax
movw %ax, -0x22(%rbp)
movswl -0x22(%rbp), %eax
movswl -0x8a(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x1e(%rbp)
movswl -0x8a(%rbp), %ecx
movswl -0x8e(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x8e(%rbp)
movswl -0x1e(%rbp), %eax
movq -0x10(%rbp), %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x24f7b
jmp 0x25101
movswl -0x22(%rbp), %eax
movq -0x10(%rbp), %rcx
movswl 0x4(%rcx), %ecx
cmpl %ecx, %eax
jle 0x24f90
jmp 0x25117
movq -0x40(%rbp), %rax
movw 0x8(%rax), %ax
movw %ax, -0x86(%rbp)
movw -0x94(%rbp), %ax
andw $-0x20, %ax
orw $0x0, %ax
movw %ax, -0x94(%rbp)
movw -0x94(%rbp), %ax
andw $0xf81f, %ax            # imm = 0xF81F
orw $0x0, %ax
movw %ax, -0x94(%rbp)
movw -0x94(%rbp), %ax
andw $0x7ff, %ax             # imm = 0x7FF
orw $0x0, %ax
movw %ax, -0x94(%rbp)
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movb 0x60(%rax), %al
movw -0x94(%rbp), %dx
movzwl %dx, %edi
movzwl 0x8(%rcx), %esi
movzbl %al, %edx
callq 0x25a10
movw %ax, -0x92(%rbp)
movw -0x92(%rbp), %ax
movw %ax, -0x84(%rbp)
movswl -0x90(%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, -0x96(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movswq -0x96(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movswl 0x18(%rcx), %ecx
subl %ecx, %eax
movswl -0x30(%rbp), %ecx
imull %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%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, -0x34(%rbp)
movswl -0x30(%rbp), %eax
subl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
movswl 0x22(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x20(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x2a(%rbp), %rdi
leaq -0x22(%rbp), %rdx
callq 0x427d0
andb $0x1, %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x250ff
movq -0x40(%rbp), %rax
movq (%rax), %rax
movswq -0x96(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
cmpl $0xffff83e8, %eax       # imm = 0xFFFF83E8
je 0x250ff
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xa8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa710
movq -0xa8(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
leaq -0x88(%rbp), %rdx
movzbl %al, %ecx
callq 0x5a9e0
jmp 0x25101
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x45690
movq %rax, -0x40(%rbp)
jmp 0x24ef1
jmp 0x25119
movw -0x1a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1a(%rbp)
jmp 0x24e92
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)