// File: /workspace/github_c_makefile_star2_O3/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 0xe392
movq %rsi, %r14
movq %rdi, %r15
xorl %esi, %esi
callq 0x8c7d
cmpw $0x0, 0xc(%rax)
jle 0xe384
movq %rax, %r12
movq %r15, %rdi
callq 0x566d
movl %eax, %ebp
movq %r15, %rdi
callq 0x5697
cmpw %ax, %bp
movq %r14, 0x10(%rsp)
movq %r15, %rdi
jge 0xe293
callq 0x566d
jmp 0xe298
callq 0x5697
movzwl %ax, %ecx
shrl $0xf, %ecx
addl %eax, %ecx
movswl %cx, %r14d
sarl %r14d
movzwl 0x1a(%r12), %eax
movzwl 0x16(%r12), %ecx
cmpw %cx, %ax
cmovll %eax, %ecx
subl %ecx, %r14d
movss 0x20(%r15), %xmm0
movaps %xmm0, (%rsp)
movq %r15, %rdi
callq 0x566d
movl %eax, %ebp
movdqa (%rsp), %xmm0
pinsrw $0x1, 0x22(%r15), %xmm0
movdqa %xmm0, (%rsp)
movq %r15, %rdi
callq 0x5697
movd %ebp, %xmm0
pinsrw $0x1, %eax, %xmm0
movdqa %xmm0, %xmm1
psrlw $0xf, %xmm1
paddw %xmm0, %xmm1
psraw $0x1, %xmm1
paddw (%rsp), %xmm1
movdqa %xmm1, (%rsp)
leaq 0x51c03(%rip), %rsi     # 0x5ff18
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x799d
movb $0x0, 0x8(%r13)
movw $0x7c18, 0x6(%r13)      # imm = 0x7C18
movl 0xa(%r12), %eax
movl %eax, 0xa(%r13)
movd %r14d, %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 0x69eb
movzbl %al, %ecx
movq %r12, %rdi
movq 0x10(%rsp), %r14
movq %r14, %rsi
movq %r13, %rdx
callq 0x36968
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq *0x51f76(%rip)          # 0x60308
cmpb $0x2, %bl
setne %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq