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

    lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
    lv_coord_t w         = lv_obj_get_width(chart);
    /*Vertical lines works only if the width == point count. Else use the normal line type*/
    if(ext->point_cnt != w) {
        lv_chart_draw_lines(chart, mask);
        return;
    }

    uint16_t i;
    lv_point_t p1;
    lv_point_t p2;
    lv_coord_t p_act;
    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_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)
    {
        lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;
        style.line.color       = ser->color;

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

        for(i = 0; i < ext->point_cnt; i++) {
            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(p1.y == p2.y) {
                p2.x++;
            }

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

            p2.x = ((w * p_act) / (ext->point_cnt - 1)) + x_ofs;
            p1.x = p2.x;
            p1.y = p2.y;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %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, -0x1a(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x1e(%rax), %eax
movswl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
je 0x2546f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x24b40
jmp 0x256be
movq -0x8(%rbp), %rdi
callq 0x8350
movw %ax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movw 0x20(%rax), %ax
movw %ax, -0x2a(%rbp)
movq -0x8(%rbp), %rax
movw 0x22(%rax), %ax
movw %ax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa710
movb %al, -0x39(%rbp)
leaq -0x88(%rbp), %rdi
leaq 0x63b3a(%rip), %rsi     # 0x88fe8
callq 0xc550
movq -0x18(%rbp), %rax
movb 0x5f(%rax), %al
movb %al, -0x48(%rbp)
movq -0x18(%rbp), %rax
movw 0x5c(%rax), %ax
movw %ax, -0x4a(%rbp)
movq -0x18(%rbp), %rdi
callq 0x458e0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x256be
movq -0x18(%rbp), %rax
movb 0x5a(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x25502
movq -0x38(%rbp), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x90(%rbp)
jmp 0x2550c
xorl %eax, %eax
movl %eax, -0x90(%rbp)
jmp 0x2550c
movl -0x90(%rbp), %eax
movw %ax, -0x8a(%rbp)
movq -0x38(%rbp), %rax
movw 0x8(%rax), %ax
movw %ax, -0x4c(%rbp)
movswl -0x2a(%rbp), %eax
addl $0x0, %eax
movw %ax, -0x20(%rbp)
movswl -0x2a(%rbp), %eax
addl $0x0, %eax
movw %ax, -0x24(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movswl (%rax), %eax
movq -0x18(%rbp), %rcx
movswl 0x18(%rcx), %ecx
subl %ecx, %eax
movswl -0x28(%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 -0x28(%rbp), %eax
subl -0x30(%rbp), %eax
movswl -0x2c(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x22(%rbp)
movw -0x22(%rbp), %ax
movw %ax, -0x1e(%rbp)
movw $0x0, -0x1c(%rbp)
movzwl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0x1e(%rcx), %ecx
cmpl %ecx, %eax
jge 0x256a6
movswl -0x8a(%rbp), %eax
movzwl -0x1c(%rbp), %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzwl 0x1e(%rcx), %ecx
cltd
idivl %ecx
movw %dx, %ax
movw %ax, -0x26(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movswq -0x26(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movswl 0x18(%rcx), %ecx
subl %ecx, %eax
movswl -0x28(%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 -0x28(%rbp), %eax
subl -0x30(%rbp), %eax
movswl -0x2c(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x22(%rbp)
movswl -0x1e(%rbp), %eax
movswl -0x22(%rbp), %ecx
cmpl %ecx, %eax
jne 0x2562e
movw -0x24(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x24(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movswq -0x26(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
cmpl $0xffff83e8, %eax       # imm = 0xFFFF83E8
je 0x25662
movq -0x10(%rbp), %rdx
leaq -0x20(%rbp), %rdi
leaq -0x24(%rbp), %rsi
leaq -0x88(%rbp), %rcx
movzbl -0x39(%rbp), %r8d
callq 0x5fcd0
movswl -0x1a(%rbp), %eax
movswl -0x26(%rbp), %ecx
imull %ecx, %eax
movq -0x18(%rbp), %rcx
movzwl 0x1e(%rcx), %ecx
subl $0x1, %ecx
cltd
idivl %ecx
movswl -0x2a(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x24(%rbp)
movw -0x24(%rbp), %ax
movw %ax, -0x20(%rbp)
movw -0x22(%rbp), %ax
movw %ax, -0x1e(%rbp)
movw -0x1c(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1c(%rbp)
jmp 0x25593
jmp 0x256a8
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x45690
movq %rax, -0x38(%rbp)
jmp 0x254d6
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)