// File: /workspace/github_c_makefile_star2_O2/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 0x719c
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 0x50e5
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 0x26880
testb %al, %al
je 0x718e
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq *0x38(%rbx)
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x50e5
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x26880
testb %al, %al
je 0x7180
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x27ea3
movq %rax, %r13
movq %rsp, %r15
leaq 0x30(%rsp), %r12
leaq 0x18(%rsp), %rbp
testq %r13, %r13
je 0x7180
movq %r13, %rdi
movq %r15, %rsi
callq 0x50e5
movq (%rsp), %xmm0
movd 0x5c(%r13), %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 %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x26880
testb %al, %al
je 0x7170
movq %r13, %rdi
movq %r12, %rsi
callq 0x7055
movq %r14, %rdi
movq %r13, %rsi
callq 0x27dc6
movq %rax, %r13
jmp 0x7119
leaq 0x8(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq *0x38(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)