// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_core/lv_obj.c
// Function: lv_obj_design
static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode)
{
    if(mode == LV_DESIGN_COVER_CHK) {

        /*Most trivial test. Is the mask fully IN the object? If no it surely doesn't cover it*/
        if(lv_area_is_in(mask_p, &obj->coords) == false) return false;

        /*Can cover the area only if fully solid (no opacity)*/
        const lv_style_t * style = lv_obj_get_style(obj);
        if(style->body.opa < LV_OPA_MAX) return false;

        /* Because of the radius it is not sure the area is covered
         * Check the areas where there is no radius*/
        lv_coord_t r = style->body.radius;

        if(r == LV_RADIUS_CIRCLE) return false;

        lv_area_t area_tmp;

        /*Check horizontally without radius*/
        lv_obj_get_coords(obj, &area_tmp);
        area_tmp.x1 += r;
        area_tmp.x2 -= r;
        if(lv_area_is_in(mask_p, &area_tmp) == false) return false;

        /*Check vertically without radius*/
        lv_obj_get_coords(obj, &area_tmp);
        area_tmp.y1 += r;
        area_tmp.y2 -= r;
        if(lv_area_is_in(mask_p, &area_tmp) == false) return false;

    } else if(mode == LV_DESIGN_DRAW_MAIN) {
        const lv_style_t * style = lv_obj_get_style(obj);
        lv_draw_rect(&obj->coords, mask_p, style, lv_obj_get_opa_scale(obj));
    }

    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 0x711c
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
callq 0x42ae0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x7046
movb $0x0, -0x1(%rbp)
jmp 0x7171
movq -0x10(%rbp), %rdi
callq 0xa080
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0xfb, %eax
jge 0x706b
movb $0x0, -0x1(%rbp)
jmp 0x7171
movq -0x28(%rbp), %rax
movw 0x6(%rax), %ax
movw %ax, -0x2a(%rbp)
movswl -0x2a(%rbp), %eax
cmpl $0x7c18, %eax           # imm = 0x7C18
jne 0x708b
movb $0x0, -0x1(%rbp)
jmp 0x7171
movq -0x10(%rbp), %rdi
leaq -0x32(%rbp), %rsi
callq 0x7fb0
movswl -0x2a(%rbp), %ecx
movswl -0x32(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x32(%rbp)
movswl -0x2a(%rbp), %ecx
movswl -0x2e(%rbp), %eax
subl %ecx, %eax
movw %ax, -0x2e(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x32(%rbp), %rsi
callq 0x42ae0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x70d4
movb $0x0, -0x1(%rbp)
jmp 0x7171
movq -0x10(%rbp), %rdi
leaq -0x32(%rbp), %rsi
callq 0x7fb0
movswl -0x2a(%rbp), %ecx
movswl -0x30(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x30(%rbp)
movswl -0x2a(%rbp), %ecx
movswl -0x2c(%rbp), %eax
subl %ecx, %eax
movw %ax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x32(%rbp), %rsi
callq 0x42ae0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x711a
movb $0x0, -0x1(%rbp)
jmp 0x7171
jmp 0x716d
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x716b
movq -0x10(%rbp), %rdi
callq 0xa080
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
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
jmp 0x716d
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)