// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_arc.c
// Function: lv_arc_design
static bool lv_arc_design(lv_obj_t * arc, 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) {
        lv_arc_ext_t * ext       = lv_obj_get_ext_attr(arc);
        const lv_style_t * style = lv_arc_get_style(arc, LV_ARC_STYLE_MAIN);

        lv_coord_t r       = (LV_MATH_MIN(lv_obj_get_width(arc), lv_obj_get_height(arc))) / 2;
        lv_coord_t x       = arc->coords.x1 + lv_obj_get_width(arc) / 2;
        lv_coord_t y       = arc->coords.y1 + lv_obj_get_height(arc) / 2;
        lv_opa_t opa_scale = lv_obj_get_opa_scale(arc);
        lv_draw_arc(x, y, r, mask, ext->angle_start, ext->angle_end, style, opa_scale);

        /*Draw circle on the ends if enabled */
        if(style->line.rounded) {
            lv_coord_t thick_half = style->line.width / 2;
            lv_coord_t cir_x      = ((r - thick_half) * lv_trigo_sin(ext->angle_start) >> LV_TRIGO_SHIFT);
            lv_coord_t cir_y      = ((r - thick_half) * lv_trigo_sin(ext->angle_start + 90) >> LV_TRIGO_SHIFT);

            lv_style_t cir_style;
            lv_style_copy(&cir_style, &lv_style_plain);
            cir_style.body.grad_color = style->line.color;
            cir_style.body.main_color = cir_style.body.grad_color;
            cir_style.body.radius     = LV_RADIUS_CIRCLE;
            lv_area_t cir_area;
            cir_area.x1 = cir_x + x - thick_half;
            cir_area.y1 = cir_y + y - thick_half;
            cir_area.x2 = cir_x + x + thick_half;
            cir_area.y2 = cir_y + y + thick_half;

            lv_draw_rect(&cir_area, mask, &cir_style, opa_scale);

            cir_x = ((r - thick_half) * lv_trigo_sin(ext->angle_end) >> LV_TRIGO_SHIFT);
            cir_y = ((r - thick_half) * lv_trigo_sin(ext->angle_end + 90) >> LV_TRIGO_SHIFT);

            cir_area.x1 = cir_x + x - thick_half;
            cir_area.y1 = cir_y + y - thick_half;
            cir_area.x2 = cir_x + x + thick_half;
            cir_area.y2 = cir_y + y + thick_half;

            lv_draw_rect(&cir_area, mask, &cir_style, opa_scale);
        }

    }
    /*Post draw when the children are drawn*/
    else if(mode == LV_DESIGN_DRAW_POST) {
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x2, %eax
jne 0xe29a
movb $0x0, -0x1(%rbp)
jmp 0xe606
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0xe5f3
movq -0x10(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xe7b0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8310
cwtl
movl %eax, -0x94(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8350
movw %ax, %cx
movl -0x94(%rbp), %eax
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0xe2fe
movq -0x10(%rbp), %rdi
callq 0x8310
cwtl
movl %eax, -0x98(%rbp)
jmp 0xe30e
movq -0x10(%rbp), %rdi
callq 0x8350
cwtl
movl %eax, -0x98(%rbp)
movl -0x98(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movw %ax, -0x32(%rbp)
movq -0x10(%rbp), %rax
movswl 0x20(%rax), %eax
movl %eax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8310
cwtl
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xa0(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movswl 0x22(%rax), %eax
movl %eax, -0x9c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8350
cwtl
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x9c(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x36(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa710
movb %al, -0x37(%rbp)
movw -0x34(%rbp), %di
movw -0x36(%rbp), %si
movw -0x32(%rbp), %dx
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movw (%rax), %r8w
movq -0x28(%rbp), %rax
movw 0x2(%rax), %r9w
movq -0x30(%rbp), %rax
movswl %di, %edi
movswl %si, %esi
movzwl %dx, %edx
movzwl %r8w, %r8d
movzwl %r9w, %r9d
movq %rax, (%rsp)
movzbl -0x37(%rbp), %eax
movl %eax, 0x8(%rsp)
callq 0x634d0
movq -0x30(%rbp), %rax
movb 0x41(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
je 0xe5f1
movq -0x30(%rbp), %rax
movswl 0x3e(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movw %ax, -0x3a(%rbp)
movswl -0x32(%rbp), %eax
movswl -0x3a(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xb0(%rbp)
movq -0x28(%rbp), %rax
movswl (%rax), %edi
callq 0x47220
movw %ax, %cx
movl -0xb0(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
sarl $0xf, %eax
movw %ax, -0x3c(%rbp)
movswl -0x32(%rbp), %eax
movswl -0x3a(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xac(%rbp)
movq -0x28(%rbp), %rax
movswl (%rax), %eax
addl $0x5a, %eax
movswl %ax, %edi
callq 0x47220
movw %ax, %cx
movl -0xac(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
sarl $0xf, %eax
movw %ax, -0x3e(%rbp)
leaq -0x88(%rbp), %rdi
leaq 0x7ab7c(%rip), %rsi     # 0x88fe8
callq 0xc550
movq -0x30(%rbp), %rax
movw 0x3c(%rax), %ax
movw %ax, -0x84(%rbp)
movw -0x84(%rbp), %ax
movw %ax, -0x86(%rbp)
movw $0x7c18, -0x82(%rbp)    # imm = 0x7C18
movswl -0x3c(%rbp), %eax
movswl -0x34(%rbp), %ecx
addl %ecx, %eax
movswl -0x3a(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x90(%rbp)
movswl -0x3e(%rbp), %eax
movswl -0x36(%rbp), %ecx
addl %ecx, %eax
movswl -0x3a(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x8e(%rbp)
movswl -0x3c(%rbp), %eax
movswl -0x34(%rbp), %ecx
addl %ecx, %eax
movswl -0x3a(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x8c(%rbp)
movswl -0x3e(%rbp), %eax
movswl -0x36(%rbp), %ecx
addl %ecx, %eax
movswl -0x3a(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x8a(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x90(%rbp), %rdi
leaq -0x88(%rbp), %rdx
movzbl -0x37(%rbp), %ecx
callq 0x5a9e0
movswl -0x32(%rbp), %eax
movswl -0x3a(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xa8(%rbp)
movq -0x28(%rbp), %rax
movswl 0x2(%rax), %edi
callq 0x47220
movw %ax, %cx
movl -0xa8(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
sarl $0xf, %eax
movw %ax, -0x3c(%rbp)
movswl -0x32(%rbp), %eax
movswl -0x3a(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xa4(%rbp)
movq -0x28(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x5a, %eax
movswl %ax, %edi
callq 0x47220
movw %ax, %cx
movl -0xa4(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
sarl $0xf, %eax
movw %ax, -0x3e(%rbp)
movswl -0x3c(%rbp), %eax
movswl -0x34(%rbp), %ecx
addl %ecx, %eax
movswl -0x3a(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x90(%rbp)
movswl -0x3e(%rbp), %eax
movswl -0x36(%rbp), %ecx
addl %ecx, %eax
movswl -0x3a(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x8e(%rbp)
movswl -0x3c(%rbp), %eax
movswl -0x34(%rbp), %ecx
addl %ecx, %eax
movswl -0x3a(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x8c(%rbp)
movswl -0x3e(%rbp), %eax
movswl -0x36(%rbp), %ecx
addl %ecx, %eax
movswl -0x3a(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x8a(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x90(%rbp), %rdi
leaq -0x88(%rbp), %rdx
movzbl -0x37(%rbp), %ecx
callq 0x5a9e0
jmp 0xe600
movzbl -0x19(%rbp), %eax
cmpl $0x1, %eax
jne 0xe5fe
jmp 0xe5fe
jmp 0xe600
jmp 0xe602
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)