// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_chart.c
// Function: lv_chart_design
static bool lv_chart_design(lv_obj_t * chart, const lv_area_t * mask, lv_design_mode_t mode)
{
    if(mode == LV_DESIGN_COVER_CHK) {
        /*Return false if the object is not covers the mask_p area*/
        return ancestor_design_f(chart, mask, mode);
    } else if(mode == LV_DESIGN_DRAW_MAIN) {
        /*Draw the background*/
        lv_draw_rect(&chart->coords, mask, lv_obj_get_style(chart), lv_obj_get_opa_scale(chart));

        lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);

        lv_chart_draw_div(chart, mask);

        /* Adjust the mask to remove the margin (clips chart contents to be within background) */

        lv_area_t mask_tmp, adjusted_mask;
        lv_obj_get_coords(chart, &mask_tmp);

        bool union_ok = lv_area_intersect(&adjusted_mask, mask, &mask_tmp);

        if(union_ok) {
                if(ext->type & LV_CHART_TYPE_LINE) lv_chart_draw_lines(chart, &adjusted_mask);
                if(ext->type & LV_CHART_TYPE_COLUMN) lv_chart_draw_cols(chart, &adjusted_mask);
                if(ext->type & LV_CHART_TYPE_POINT) lv_chart_draw_points(chart, &adjusted_mask);
                if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_draw_vertical_lines(chart, &adjusted_mask);
                if(ext->type & LV_CHART_TYPE_AREA) lv_chart_draw_areas(chart, &adjusted_mask);
        }

        lv_chart_draw_axes(chart, mask);
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x2, %eax
jne 0x233fd
movq 0x6606b(%rip), %rax     # 0x89450
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movzbl -0x19(%rbp), %edx
callq *%rax
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x23535
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x2352f
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa080
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa710
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movzbl %al, %ecx
callq 0x5a9e0
movq -0x10(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x24930
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7fb0
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x427d0
andb $0x1, %al
movb %al, -0x39(%rbp)
testb $0x1, -0x39(%rbp)
je 0x23522
movq -0x28(%rbp), %rax
movzbl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x234ac
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x24b40
movq -0x28(%rbp), %rax
movzbl 0x20(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x234c9
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x24de0
movq -0x28(%rbp), %rax
movzbl 0x20(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x234e6
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x25140
movq -0x28(%rbp), %rax
movzbl 0x20(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x23503
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x25420
movq -0x28(%rbp), %rax
movzbl 0x20(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x23520
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x256d0
jmp 0x23522
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x259c0
jmp 0x23531
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq