// File: /workspace/github_c_makefile_star2_O2/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_preload.c
// Function: lv_preload_design
static bool lv_preload_design(lv_obj_t * preload, 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 a circle as background*/
        const lv_style_t * style = lv_arc_get_style(preload, LV_ARC_STYLE_MAIN);
        if(style->body.border.width > 0) {
            lv_coord_t r = (LV_MATH_MIN(lv_obj_get_width(preload), lv_obj_get_height(preload))) / 2;
            r -= LV_MATH_MIN(style->body.padding.left, style->body.padding.top);

            lv_coord_t x = preload->coords.x1 + lv_obj_get_width(preload) / 2;
            lv_coord_t y = preload->coords.y1 + lv_obj_get_height(preload) / 2;

            lv_style_t bg_style;
            lv_style_copy(&bg_style, &lv_style_plain);
            bg_style.body.opa          = LV_OPA_TRANSP;
            bg_style.body.radius       = LV_RADIUS_CIRCLE;
            bg_style.body.border.color = style->body.border.color;
            bg_style.body.border.width = style->body.border.width;

            lv_area_t bg_area;
            bg_area.x1 = x - r;
            bg_area.y1 = y - r;
            bg_area.x2 = x + r;
            bg_area.y2 = y + r;

            lv_draw_rect(&bg_area, mask, &bg_style, lv_obj_get_opa_scale(preload));
        }
        /*Draw the arc above the background circle */
        ancestor_design(preload, mask, mode);
    }
    /*Post draw when the children are drawn*/
    else if(mode == LV_DESIGN_DRAW_POST) {
    }

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebx
testl %edx, %edx
jne 0xd8f1
movq %rsi, %r14
movq %rdi, %r15
xorl %esi, %esi
callq 0x84b6
cmpw $0x0, 0xc(%rax)
jle 0xd8e3
movq %rax, %r12
movq %r15, %rdi
callq 0x5308
movl %eax, %ebp
movq %r15, %rdi
callq 0x5332
movq %r15, %rdi
cmpw %ax, %bp
jge 0xd7fb
callq 0x5308
jmp 0xd800
callq 0x5332
movw $0x2, %cx
cwtd
idivw %cx
movl %eax, %ebp
movzwl 0x1a(%r12), %eax
movzwl 0x16(%r12), %ecx
cmpw %cx, %ax
cmovll %eax, %ecx
subl %ecx, %ebp
movss 0x20(%r15), %xmm0
movaps %xmm0, (%rsp)
movq %r15, %rdi
callq 0x5308
movl %eax, %r13d
movdqa (%rsp), %xmm0
pinsrw $0x1, 0x22(%r15), %xmm0
movdqa %xmm0, (%rsp)
movq %r15, %rdi
callq 0x5332
movd %r13d, %xmm0
pinsrw $0x1, %eax, %xmm0
movdqa %xmm0, %xmm1
psrlw $0xf, %xmm1
paddw %xmm0, %xmm1
psraw $0x1, %xmm1
paddw (%rsp), %xmm1
movdqa %xmm1, (%rsp)
leaq 0x5069e(%rip), %rsi     # 0x5df18
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x74d4
movb $0x0, 0x8(%r13)
movw $0x7c18, 0x6(%r13)      # imm = 0x7C18
movl 0xa(%r12), %eax
movl %eax, 0xa(%r13)
movd %ebp, %xmm0
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
movdqa (%rsp), %xmm2
movdqa %xmm2, %xmm1
psubw %xmm0, %xmm1
pshufd $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
paddw %xmm2, %xmm0
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq 0x18(%rsp), %r12
movq %xmm1, (%r12)
movq %r15, %rdi
callq 0x6649
movzbl %al, %ecx
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x336d4
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq *0x50a17(%rip)          # 0x5e308
cmpb $0x2, %bl
setne %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq