// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_roller.c
// Function: lv_roller_design
static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_design_mode_t mode)
{
    /*Return false if the object is not covers the mask_p area*/
    if(mode == LV_DESIGN_COVER_CHK) {
        return false;
    }
    /*Draw the object*/
    else if(mode == LV_DESIGN_DRAW_MAIN) {
        draw_bg(roller, mask);

        const lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG);
        lv_opa_t opa_scale       = lv_obj_get_opa_scale(roller);
        const lv_font_t * font   = style->text.font;
        lv_roller_ext_t * ext    = lv_obj_get_ext_attr(roller);
        lv_coord_t font_h        = lv_font_get_line_height(font);
        lv_area_t rect_area;
        rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - style->text.line_space / 2;
        if((font_h & 0x1) && (style->text.line_space & 0x1)) rect_area.y1--; /*Compensate the two rounding error*/
        rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1;
        lv_area_t roller_coords;
        lv_obj_get_coords(roller, &roller_coords);
        lv_obj_get_inner_coords(roller, &roller_coords);

        rect_area.x1 = roller_coords.x1;
        rect_area.x2 = roller_coords.x2;

        lv_draw_rect(&rect_area, mask, ext->ddlist.sel_style, opa_scale);
    }
    /*Post draw when the children are drawn*/
    else if(mode == LV_DESIGN_DRAW_POST) {
        const lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG);
        lv_roller_ext_t * ext    = lv_obj_get_ext_attr(roller);
        const lv_font_t * font   = style->text.font;
        lv_coord_t font_h        = lv_font_get_line_height(font);
        lv_opa_t opa_scale       = lv_obj_get_opa_scale(roller);

        /*Redraw the text on the selected area with a different color*/
        lv_area_t rect_area;
        rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - style->text.line_space / 2;
        if((font_h & 0x1) && (style->text.line_space & 0x1)) rect_area.y1--; /*Compensate the two rounding error*/
        rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1;
        rect_area.x1 = roller->coords.x1;
        rect_area.x2 = roller->coords.x2;
        lv_area_t mask_sel;
        bool area_ok;
        area_ok = lv_area_intersect(&mask_sel, mask, &rect_area);
        if(area_ok) {
            const lv_style_t * sel_style = lv_roller_get_style(roller, LV_ROLLER_STYLE_SEL);
            lv_style_t new_style;
            lv_txt_flag_t txt_align = LV_TXT_FLAG_NONE;

            {
                lv_label_align_t label_align = lv_label_get_align(ext->ddlist.label);

                if(LV_LABEL_ALIGN_CENTER == label_align) {
                    txt_align |= LV_TXT_FLAG_CENTER;
                } else if(LV_LABEL_ALIGN_RIGHT == label_align) {
                    txt_align |= LV_TXT_FLAG_RIGHT;
                }
            }

            lv_style_copy(&new_style, style);
            new_style.text.color = sel_style->text.color;
            new_style.text.opa   = sel_style->text.opa;
            lv_draw_label(&ext->ddlist.label->coords, &mask_sel, &new_style, opa_scale,
                          lv_label_get_text(ext->ddlist.label), txt_align, NULL, NULL, NULL, lv_obj_get_base_dir(ext->ddlist.label));
        }
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x2, %eax
jne 0x188aa
movb $0x0, -0x1(%rbp)
jmp 0x18c8d
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x189fd
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x19880
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x197c0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa710
movb %al, -0x29(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x19680
movzbl %al, %eax
movw %ax, -0x42(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %eax
movl %eax, -0xe8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8350
cwtl
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xe8(%rbp), %eax
addl %ecx, %eax
movl %eax, -0xe4(%rbp)
movswl -0x42(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xe4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xe0(%rbp)
movq -0x28(%rbp), %rax
movswl 0x32(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xe0(%rbp), %eax
subl %ecx, %eax
movw %ax, -0x48(%rbp)
movswl -0x42(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1899a
movq -0x28(%rbp), %rax
movswl 0x32(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1899a
movw -0x48(%rbp), %ax
addw $-0x1, %ax
movw %ax, -0x48(%rbp)
movswl -0x48(%rbp), %eax
movswl -0x42(%rbp), %ecx
addl %ecx, %eax
movq -0x28(%rbp), %rcx
movswl 0x32(%rcx), %ecx
addl %ecx, %eax
subl $0x1, %eax
movw %ax, -0x44(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x52(%rbp), %rsi
callq 0x7fb0
movq -0x10(%rbp), %rdi
leaq -0x52(%rbp), %rsi
callq 0x9fa0
movw -0x52(%rbp), %ax
movw %ax, -0x4a(%rbp)
movw -0x4e(%rbp), %ax
movw %ax, -0x46(%rbp)
movq -0x18(%rbp), %rsi
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rdx
leaq -0x4a(%rbp), %rdi
movzbl -0x29(%rbp), %ecx
callq 0x5a9e0
jmp 0x18c87
movzbl -0x19(%rbp), %eax
cmpl $0x1, %eax
jne 0x18c85
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x197c0
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0x19680
movzbl %al, %eax
movw %ax, -0x72(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa710
movb %al, -0x73(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %eax
movl %eax, -0xf4(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8350
cwtl
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xf4(%rbp), %eax
addl %ecx, %eax
movl %eax, -0xf0(%rbp)
movswl -0x72(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xf0(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xec(%rbp)
movq -0x60(%rbp), %rax
movswl 0x32(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xec(%rbp), %eax
subl %ecx, %eax
movw %ax, -0x7a(%rbp)
movswl -0x72(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x18ae0
movq -0x60(%rbp), %rax
movswl 0x32(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x18ae0
movw -0x7a(%rbp), %ax
addw $-0x1, %ax
movw %ax, -0x7a(%rbp)
movswl -0x7a(%rbp), %eax
movswl -0x72(%rbp), %ecx
addl %ecx, %eax
movq -0x60(%rbp), %rcx
movswl 0x32(%rcx), %ecx
addl %ecx, %eax
subl $0x1, %eax
movw %ax, -0x76(%rbp)
movq -0x10(%rbp), %rax
movw 0x20(%rax), %ax
movw %ax, -0x7c(%rbp)
movq -0x10(%rbp), %rax
movw 0x24(%rax), %ax
movw %ax, -0x78(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x84(%rbp), %rdi
leaq -0x7c(%rbp), %rdx
callq 0x427d0
andb $0x1, %al
movb %al, -0x85(%rbp)
testb $0x1, -0x85(%rbp)
je 0x18c83
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x197c0
movq %rax, -0x90(%rbp)
movb $0x0, -0xd9(%rbp)
movq -0x68(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2ab50
movb %al, -0xda(%rbp)
movzbl -0xda(%rbp), %ecx
movl $0x1, %eax
cmpl %ecx, %eax
jne 0x18b8d
movzbl -0xd9(%rbp), %eax
orl $0x4, %eax
movb %al, -0xd9(%rbp)
jmp 0x18baf
movzbl -0xda(%rbp), %ecx
movl $0x2, %eax
cmpl %ecx, %eax
jne 0x18bad
movzbl -0xd9(%rbp), %eax
orl $0x8, %eax
movb %al, -0xd9(%rbp)
jmp 0x18baf
movq -0x60(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0xc550
movq -0x90(%rbp), %rax
movw 0x20(%rax), %ax
movw %ax, -0xb8(%rbp)
movq -0x90(%rbp), %rax
movb 0x34(%rax), %al
movb %al, -0xa4(%rbp)
movq -0x68(%rbp), %rax
movq 0x50(%rax), %rax
addq $0x20, %rax
movq %rax, -0x110(%rbp)
movb -0x73(%rbp), %al
movb %al, -0x101(%rbp)
movq -0x68(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2abc0
movq %rax, -0x100(%rbp)
movb -0xd9(%rbp), %al
movb %al, -0xf5(%rbp)
movq -0x68(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x7180
movq -0x110(%rbp), %rdi
movb -0x101(%rbp), %cl
movq -0x100(%rbp), %r8
movb -0xf5(%rbp), %r9b
leaq -0x84(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
xorl %r10d, %r10d
movzbl %cl, %ecx
movzbl %r9b, %r9d
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movzbl %al, %eax
movl %eax, 0x18(%rsp)
callq 0x5f210
jmp 0x18c85
jmp 0x18c87
jmp 0x18c89
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax,%rax)