// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_core/lv_refr.c
// Function: lv_refr_obj
static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
{
    /*Do not refresh hidden objects*/
    if(obj->hidden != 0) return;

    bool union_ok; /* Store the return value of area_union */
    /* Truncate the original mask to the coordinates of the parent
     * because the parent and its children are visible only here */
    lv_area_t obj_mask;
    lv_area_t obj_ext_mask;
    lv_area_t obj_area;
    lv_coord_t ext_size = obj->ext_draw_pad;
    lv_obj_get_coords(obj, &obj_area);
    obj_area.x1 -= ext_size;
    obj_area.y1 -= ext_size;
    obj_area.x2 += ext_size;
    obj_area.y2 += ext_size;
    union_ok = lv_area_intersect(&obj_ext_mask, mask_ori_p, &obj_area);

    /*Draw the parent and its children only if they ore on 'mask_parent'*/
    if(union_ok != false) {

        /* Redraw the object */
        obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN);

#if MASK_AREA_DEBUG
        static lv_color_t debug_color = LV_COLOR_RED;
        lv_draw_fill(&obj_ext_mask, &obj_ext_mask, debug_color, LV_OPA_50);
        debug_color.full *= 17;
        debug_color.full += 0xA1;
#endif
        /*Create a new 'obj_mask' without 'ext_size' because the children can't be visible there*/
        lv_obj_get_coords(obj, &obj_area);
        union_ok = lv_area_intersect(&obj_mask, mask_ori_p, &obj_area);
        if(union_ok != false) {
            lv_area_t mask_child; /*Mask from obj and its child*/
            lv_obj_t * child_p;
            lv_area_t child_area;
            LV_LL_READ_BACK(obj->child_ll, child_p)
            {
                lv_obj_get_coords(child_p, &child_area);
                ext_size = child_p->ext_draw_pad;
                child_area.x1 -= ext_size;
                child_area.y1 -= ext_size;
                child_area.x2 += ext_size;
                child_area.y2 += ext_size;
                /* Get the union (common parts) of original mask (from obj)
                 * and its child */
                union_ok = lv_area_intersect(&mask_child, &obj_mask, &child_area);

                /*If the parent and the child has common area then refresh the child */
                if(union_ok) {
                    /*Refresh the next children*/
                    lv_refr_obj(child_p, &mask_child);
                }
            }
        }

        /* If all the children are redrawn make 'post draw' design */
        obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_POST);
    }
}

// Assembly:
testb $0x10, 0x58(%rdi)
jne 0x7648
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movss 0x5c(%rdi), %xmm0
movaps %xmm0, 0x20(%rsp)
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0x542b
movq (%r15), %xmm0
pshuflw $0x0, 0x20(%rsp), %xmm1 # xmm1 = mem[0,0,0,0,4,5,6,7]
movdqa %xmm0, %xmm2
psubw %xmm1, %xmm2
paddw %xmm1, %xmm0
pshufd $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movq %xmm2, (%r15)
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x28d24
testb %al, %al
je 0x763a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq *0x38(%rbx)
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x542b
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x28d24
testb %al, %al
je 0x762a
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x2a458
testq %rax, %rax
je 0x762a
movq %rax, %r15
movq %rsp, %r12
leaq 0x30(%rsp), %r13
leaq 0x18(%rsp), %rbp
movq %r15, %rdi
movq %r12, %rsi
callq 0x542b
movq (%rsp), %xmm0
movd 0x5c(%r15), %xmm1
pshuflw $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0,4,5,6,7]
movdqa %xmm0, %xmm2
psubw %xmm1, %xmm2
paddw %xmm1, %xmm0
pshufd $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movq %xmm2, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x28d24
testb %al, %al
je 0x7617
movq %r15, %rdi
movq %r13, %rsi
callq 0x74fc
movq %r14, %rdi
movq %r15, %rsi
callq 0x2a369
movq %rax, %r15
testq %rax, %rax
jne 0x75c5
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq *0x38(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)