// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_page.c
// Function: lv_page_design
static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mode_t mode)
{
    if(mode == LV_DESIGN_COVER_CHK) {
        return ancestor_design(page, mask, mode);
    }
    /*Cache page bg style for temporary modification*/
    const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG);
    lv_style_t style_tmp;
    lv_style_copy(&style_tmp, style);

    if(mode == LV_DESIGN_DRAW_MAIN) {
        /*Draw without border*/
        style_tmp.body.border.width = 0;
        lv_draw_rect(&page->coords, mask, &style_tmp, lv_obj_get_opa_scale(page));

    } else if(mode == LV_DESIGN_DRAW_POST) {
        /*Draw only a border*/
        style_tmp.body.shadow.width = 0;
        style_tmp.body.opa          = LV_OPA_TRANSP;
        lv_draw_rect(&page->coords, mask, &style_tmp, lv_obj_get_opa_scale(page));

        lv_page_ext_t * ext = lv_obj_get_ext_attr(page);

        /*Draw the scrollbars*/
        lv_area_t sb_area;
        if(ext->sb.hor_draw && (ext->sb.mode & LV_SB_MODE_HIDE) == 0) {
            /*Convert the relative coordinates to absolute*/
            lv_area_copy(&sb_area, &ext->sb.hor_area);
            sb_area.x1 += page->coords.x1;
            sb_area.y1 += page->coords.y1;
            sb_area.x2 += page->coords.x1;
            sb_area.y2 += page->coords.y1;
            lv_draw_rect(&sb_area, mask, ext->sb.style, lv_obj_get_opa_scale(page));
        }

        if(ext->sb.ver_draw && (ext->sb.mode & LV_SB_MODE_HIDE) == 0) {
            /*Convert the relative coordinates to absolute*/
            lv_area_copy(&sb_area, &ext->sb.ver_area);
            sb_area.x1 += page->coords.x1;
            sb_area.y1 += page->coords.y1;
            sb_area.x2 += page->coords.x1;
            sb_area.y2 += page->coords.y1;
            lv_draw_rect(&sb_area, mask, ext->sb.style, lv_obj_get_opa_scale(page));
        }

#if LV_USE_ANIMATION
        {
            lv_coord_t page_w = lv_obj_get_width(page);
            lv_coord_t page_h = lv_obj_get_height(page);

            lv_area_t flash_area;

            if(ext->edge_flash.top_ip) {
                flash_area.x1 = page->coords.x1 - page_w;
                flash_area.x2 = page->coords.x2 + page_w;
                flash_area.y1 = page->coords.y1 - 3 * page_w + ext->edge_flash.state;
                flash_area.y2 = page->coords.y1 + ext->edge_flash.state;
            } else if(ext->edge_flash.bottom_ip) {
                flash_area.x1 = page->coords.x1 - page_w;
                flash_area.x2 = page->coords.x2 + page_w;
                flash_area.y1 = page->coords.y2 - ext->edge_flash.state;
                flash_area.y2 = page->coords.y2 + 3 * page_w - ext->edge_flash.state;
            } else if(ext->edge_flash.right_ip) {
                flash_area.x1 = page->coords.x2 - ext->edge_flash.state;
                flash_area.x2 = page->coords.x2 + 3 * page_h - ext->edge_flash.state;
                flash_area.y1 = page->coords.y1 - page_h;
                flash_area.y2 = page->coords.y2 + page_h;
            } else if(ext->edge_flash.left_ip) {
                flash_area.x1 = page->coords.x1 - 3 * page_h + ext->edge_flash.state;
                flash_area.x2 = page->coords.x1 + ext->edge_flash.state;
                flash_area.y1 = page->coords.y1 - page_h;
                flash_area.y2 = page->coords.y2 + page_h;
            }

            if(ext->edge_flash.left_ip || ext->edge_flash.right_ip || ext->edge_flash.top_ip ||
               ext->edge_flash.bottom_ip) {
                lv_style_t flash_style;
                lv_style_copy(&flash_style, ext->edge_flash.style);
                flash_style.body.radius = LV_RADIUS_CIRCLE;
                uint32_t opa            = (flash_style.body.opa * ext->edge_flash.state) / LV_PAGE_END_FLASH_SIZE;
                flash_style.body.opa    = opa;
                lv_draw_rect(&flash_area, mask, &flash_style, lv_obj_get_opa_scale(page));
            }
        }
#endif
    }

    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 0x3d950
movq 0x4bc08(%rip), %rax     # 0x89540
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movzbl -0x19(%rbp), %edx
callq *%rax
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x3deb1
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x3e100
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0xc550
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x3d9bd
movw $0x0, -0x64(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xf0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa710
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
leaq -0x70(%rbp), %rdx
movzbl %al, %ecx
callq 0x5a9e0
jmp 0x3dead
movzbl -0x19(%rbp), %eax
cmpl $0x1, %eax
jne 0x3deab
movw $0x0, -0x5e(%rbp)
movb $0x0, -0x68(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x100(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa710
movq -0x100(%rbp), %rdi
movq -0xf8(%rbp), %rsi
leaq -0x70(%rbp), %rdx
movzbl %al, %ecx
callq 0x5a9e0
movq -0x10(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movb 0x28(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x3dae8
movq -0x78(%rbp), %rax
movb 0x28(%rax), %al
shrb $0x2, %al
andb $0x7, %al
movzbl %al, %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x3dae8
movq -0x78(%rbp), %rsi
addq $0x10, %rsi
addq $0x8, %rsi
leaq -0x80(%rbp), %rdi
callq 0x3f560
movq -0x10(%rbp), %rax
movswl 0x20(%rax), %ecx
movswl -0x80(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %ecx
movswl -0x7e(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x7e(%rbp)
movq -0x10(%rbp), %rax
movswl 0x20(%rax), %ecx
movswl -0x7c(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x7c(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %ecx
movswl -0x7a(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x7a(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x108(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa710
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
leaq -0x80(%rbp), %rdi
movzbl %al, %ecx
callq 0x5a9e0
movq -0x78(%rbp), %rax
movb 0x28(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x3dbb4
movq -0x78(%rbp), %rax
movb 0x28(%rax), %al
shrb $0x2, %al
andb $0x7, %al
movzbl %al, %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x3dbb4
movq -0x78(%rbp), %rsi
addq $0x10, %rsi
addq $0x10, %rsi
leaq -0x80(%rbp), %rdi
callq 0x3f560
movq -0x10(%rbp), %rax
movswl 0x20(%rax), %ecx
movswl -0x80(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %ecx
movswl -0x7e(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x7e(%rbp)
movq -0x10(%rbp), %rax
movswl 0x20(%rax), %ecx
movswl -0x7c(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x7c(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %ecx
movswl -0x7a(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x7a(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa710
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rdx
leaq -0x80(%rbp), %rdi
movzbl %al, %ecx
callq 0x5a9e0
movq -0x10(%rbp), %rdi
callq 0x8310
movw %ax, -0x82(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8350
movw %ax, -0x84(%rbp)
movq -0x78(%rbp), %rax
movb 0x40(%rax), %al
shrb %al
andb $0x1, %al
cmpb $0x0, %al
je 0x3dc56
movq -0x10(%rbp), %rax
movswl 0x20(%rax), %eax
movswl -0x82(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x8c(%rbp)
movq -0x10(%rbp), %rax
movswl 0x24(%rax), %eax
movswl -0x82(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %eax
movswl -0x82(%rbp), %ecx
imull $0x3, %ecx, %ecx
subl %ecx, %eax
movq -0x78(%rbp), %rcx
movswl 0x30(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x8a(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %eax
movq -0x78(%rbp), %rcx
movswl 0x30(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x86(%rbp)
jmp 0x3dde0
movq -0x78(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x2, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x3dcd9
movq -0x10(%rbp), %rax
movswl 0x20(%rax), %eax
movswl -0x82(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x8c(%rbp)
movq -0x10(%rbp), %rax
movswl 0x24(%rax), %eax
movswl -0x82(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movswl 0x26(%rax), %eax
movq -0x78(%rbp), %rcx
movswl 0x30(%rcx), %ecx
subl %ecx, %eax
movw %ax, -0x8a(%rbp)
movq -0x10(%rbp), %rax
movswl 0x26(%rax), %eax
movswl -0x82(%rbp), %ecx
imull $0x3, %ecx, %ecx
addl %ecx, %eax
movq -0x78(%rbp), %rcx
movswl 0x30(%rcx), %ecx
subl %ecx, %eax
movw %ax, -0x86(%rbp)
jmp 0x3ddde
movq -0x78(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x3, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x3dd5c
movq -0x10(%rbp), %rax
movswl 0x24(%rax), %eax
movq -0x78(%rbp), %rcx
movswl 0x30(%rcx), %ecx
subl %ecx, %eax
movw %ax, -0x8c(%rbp)
movq -0x10(%rbp), %rax
movswl 0x24(%rax), %eax
movswl -0x84(%rbp), %ecx
imull $0x3, %ecx, %ecx
addl %ecx, %eax
movq -0x78(%rbp), %rcx
movswl 0x30(%rcx), %ecx
subl %ecx, %eax
movw %ax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %eax
movswl -0x84(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x8a(%rbp)
movq -0x10(%rbp), %rax
movswl 0x26(%rax), %eax
movswl -0x84(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x86(%rbp)
jmp 0x3dddc
movq -0x78(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x4, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x3ddda
movq -0x10(%rbp), %rax
movswl 0x20(%rax), %eax
movswl -0x84(%rbp), %ecx
imull $0x3, %ecx, %ecx
subl %ecx, %eax
movq -0x78(%rbp), %rcx
movswl 0x30(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x8c(%rbp)
movq -0x10(%rbp), %rax
movswl 0x20(%rax), %eax
movq -0x78(%rbp), %rcx
movswl 0x30(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %eax
movswl -0x84(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x8a(%rbp)
movq -0x10(%rbp), %rax
movswl 0x26(%rax), %eax
movswl -0x84(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x86(%rbp)
jmp 0x3dddc
jmp 0x3ddde
jmp 0x3dde0
movq -0x78(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x3de2f
movq -0x78(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x3de2f
movq -0x78(%rbp), %rax
movb 0x40(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x3de2f
movq -0x78(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x3dea9
movq -0x78(%rbp), %rax
movq 0x38(%rax), %rsi
leaq -0xd8(%rbp), %rdi
callq 0xc550
movw $0x7c18, -0xd2(%rbp)    # imm = 0x7C18
movzbl -0xd0(%rbp), %eax
movq -0x78(%rbp), %rcx
movswl 0x30(%rcx), %ecx
imull %ecx, %eax
movl $0x19, %ecx
cltd
idivl %ecx
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
movb %al, -0xd0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa710
movq -0x128(%rbp), %rsi
leaq -0x8c(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
movzbl %al, %ecx
callq 0x5a9e0
jmp 0x3deab
jmp 0x3dead
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nop