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

    uint8_t div_i;
    uint8_t div_i_end;
    uint8_t div_i_start;
    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;

    if(ext->hdiv_cnt != 0) {
        /*Draw side lines if no border*/
        if(style->body.border.width != 0) {
            div_i_start = 1;
            div_i_end   = ext->hdiv_cnt;
        } else {
            div_i_start = 0;
            div_i_end   = ext->hdiv_cnt + 1;
        }

        p1.x = 0 + x_ofs;
        p2.x = w + x_ofs;
        for(div_i = div_i_start; div_i <= div_i_end; div_i++) {
            p1.y = (int32_t)((int32_t)(h - style->line.width) * div_i) / (ext->hdiv_cnt + 1);
            p1.y += y_ofs;
            p2.y = p1.y;
            lv_draw_line(&p1, &p2, mask, style, opa_scale);
        }
    }

    if(ext->vdiv_cnt != 0) {
        /*Draw side lines if no border*/
        if(style->body.border.width != 0) {
            div_i_start = 1;
            div_i_end   = ext->vdiv_cnt;
        } else {
            div_i_start = 0;
            div_i_end   = ext->vdiv_cnt + 1;
        }

        p1.y = 0 + y_ofs;
        p2.y = h + y_ofs;
        for(div_i = div_i_start; div_i <= div_i_end; div_i++) {
            p1.x = (int32_t)((int32_t)(w - style->line.width) * div_i) / (ext->vdiv_cnt + 1);
            p1.x += x_ofs;
            p2.x = p1.x;
            lv_draw_line(&p1, &p2, mask, style, opa_scale);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa080
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa710
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8310
movw %ax, -0x2e(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8350
movw %ax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movw 0x20(%rax), %ax
movw %ax, -0x32(%rbp)
movq -0x8(%rbp), %rax
movw 0x22(%rax), %ax
movw %ax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x1c(%rax), %eax
cmpl $0x0, %eax
je 0x24a66
movq -0x20(%rbp), %rax
movswl 0xc(%rax), %eax
cmpl $0x0, %eax
je 0x249c6
movb $0x1, -0x24(%rbp)
movq -0x18(%rbp), %rax
movb 0x1c(%rax), %al
movb %al, -0x23(%rbp)
jmp 0x249d8
movb $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x1c(%rax), %eax
addl $0x1, %eax
movb %al, -0x23(%rbp)
movswl -0x32(%rbp), %eax
addl $0x0, %eax
movw %ax, -0x28(%rbp)
movswl -0x2e(%rbp), %eax
movswl -0x32(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x2c(%rbp)
movb -0x24(%rbp), %al
movb %al, -0x22(%rbp)
movzbl -0x22(%rbp), %eax
movzbl -0x23(%rbp), %ecx
cmpl %ecx, %eax
jg 0x24a64
movswl -0x30(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0x3e(%rcx), %ecx
subl %ecx, %eax
movzbl -0x22(%rbp), %ecx
imull %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1c(%rcx), %ecx
addl $0x1, %ecx
cltd
idivl %ecx
movw %ax, -0x26(%rbp)
movswl -0x34(%rbp), %ecx
movswl -0x26(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x26(%rbp)
movw -0x26(%rbp), %ax
movw %ax, -0x2a(%rbp)
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
movzbl -0x21(%rbp), %r8d
callq 0x5fcd0
movb -0x22(%rbp), %al
addb $0x1, %al
movb %al, -0x22(%rbp)
jmp 0x249f7
jmp 0x24a66
movq -0x18(%rbp), %rax
movzbl 0x1d(%rax), %eax
cmpl $0x0, %eax
je 0x24b34
movq -0x20(%rbp), %rax
movswl 0xc(%rax), %eax
cmpl $0x0, %eax
je 0x24a94
movb $0x1, -0x24(%rbp)
movq -0x18(%rbp), %rax
movb 0x1d(%rax), %al
movb %al, -0x23(%rbp)
jmp 0x24aa6
movb $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x1d(%rax), %eax
addl $0x1, %eax
movb %al, -0x23(%rbp)
movswl -0x34(%rbp), %eax
addl $0x0, %eax
movw %ax, -0x26(%rbp)
movswl -0x30(%rbp), %eax
movswl -0x34(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x2a(%rbp)
movb -0x24(%rbp), %al
movb %al, -0x22(%rbp)
movzbl -0x22(%rbp), %eax
movzbl -0x23(%rbp), %ecx
cmpl %ecx, %eax
jg 0x24b32
movswl -0x2e(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0x3e(%rcx), %ecx
subl %ecx, %eax
movzbl -0x22(%rbp), %ecx
imull %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1d(%rcx), %ecx
addl $0x1, %ecx
cltd
idivl %ecx
movw %ax, -0x28(%rbp)
movswl -0x32(%rbp), %ecx
movswl -0x28(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x28(%rbp)
movw -0x28(%rbp), %ax
movw %ax, -0x2c(%rbp)
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
movzbl -0x21(%rbp), %r8d
callq 0x5fcd0
movb -0x22(%rbp), %al
addb $0x1, %al
movb %al, -0x22(%rbp)
jmp 0x24ac5
jmp 0x24b34
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)