// File: /workspace/github_c_makefile_star2_O1/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 0xe442
movq %rsi, %r14
movq %rdi, %r15
xorl %esi, %esi
callq 0x8d10
cmpw $0x0, 0xc(%rax)
jle 0xe433
movq %rax, %r12
movq %r15, %rdi
callq 0x5651
movl %eax, %ebp
movq %r15, %rdi
callq 0x567b
cmpw %ax, %bp
movq %r14, 0x10(%rsp)
movq %r15, %rdi
jge 0xe346
callq 0x5651
jmp 0xe34b
callq 0x567b
movzwl %ax, %ecx
shrl $0xf, %ecx
addl %eax, %ecx
movswl %cx, %ebp
sarl %ebp
movzwl 0x1a(%r12), %eax
movzwl 0x16(%r12), %ecx
cmpw %cx, %ax
cmovll %eax, %ecx
subl %ecx, %ebp
movzwl 0x20(%r15), %r13d
movq %r15, %rdi
callq 0x5651
movzwl %ax, %ecx
shrl $0xf, %ecx
addl %eax, %ecx
movswl %cx, %r14d
shrl %r14d
addw %r13w, %r14w
movzwl 0x22(%r15), %eax
movw %ax, 0xe(%rsp)
movq %r15, %rdi
callq 0x567b
movzwl %ax, %ecx
shrl $0xf, %ecx
addl %eax, %ecx
movswl %cx, %r13d
shrl %r13d
addw 0xe(%rsp), %r13w
leaq 0x51b5e(%rip), %rsi     # 0x5ff18
leaq 0x20(%rsp), %rdi
callq 0x798d
leaq 0x20(%rsp), %rcx
movb $0x0, 0x8(%rcx)
movw $0x7c18, 0x6(%rcx)      # imm = 0x7C18
movzwl 0xa(%r12), %eax
movw %ax, 0xa(%rcx)
movzwl 0xc(%r12), %eax
movw %ax, 0xc(%rcx)
movl %r14d, %eax
subl %ebp, %eax
leaq 0x18(%rsp), %r12
movw %ax, (%r12)
movl %r13d, %eax
subl %ebp, %eax
movw %ax, 0x2(%r12)
addl %ebp, %r14d
movw %r14w, 0x4(%r12)
addl %r13d, %ebp
movw %bp, 0x6(%r12)
movq %r15, %rdi
callq 0x69cc
movzbl %al, %ecx
movq %r12, %rdi
movq 0x10(%rsp), %r14
movq %r14, %rsi
leaq 0x20(%rsp), %rdx
callq 0x365ac
movzbl %bl, %edx
movq %r15, %rdi
movq %r14, %rsi
callq *0x51ec6(%rip)          # 0x60308
cmpb $0x2, %bl
setne %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq