// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_label.c
// Function: lv_label_signal
static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param)
{
    lv_res_t res;

    /* Include the ancient signal function */
    res = ancestor_signal(label, sign, param);
    if(res != LV_RES_OK) return res;
    if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);

    lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
    if(sign == LV_SIGNAL_CLEANUP) {
        if(ext->static_txt == 0) {
            lv_mem_free(ext->text);
            ext->text = NULL;
        }
        lv_label_dot_tmp_free(label);
    } else if(sign == LV_SIGNAL_STYLE_CHG) {
        /*Revert dots for proper refresh*/
        lv_label_revert_dots(label);

        lv_label_refr_text(label);
    } else if(sign == LV_SIGNAL_CORD_CHG) {
        if(lv_area_get_width(&label->coords) != lv_area_get_width(param) ||
           lv_area_get_height(&label->coords) != lv_area_get_height(param)) {
            lv_label_revert_dots(label);
            lv_label_refr_text(label);
        }
    } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
        if(ext->body_draw) {
            const lv_style_t * style = lv_label_get_style(label, LV_LABEL_STYLE_MAIN);

            label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.left);
            label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.right);
            label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.top);
            label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.bottom);
        }
    }
    else if(sign == LV_SIGNAL_BASE_DIR_CHG) {
#if LV_USE_BIDI
        if(ext->static_txt == 0) lv_label_set_text(label, NULL);
#endif
    } else if(sign == LV_SIGNAL_GET_TYPE) {
        lv_obj_type_t * buf = param;
        uint8_t i;
        for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/
            if(buf->type[i] == NULL) break;
        }
        buf->type[i] = "lv_label";
    }

    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
callq *0x45eb2(%rip)          # 0x603b0
movl %eax, %ebx
cmpb $0x1, %al
jne 0x1a5f7
cmpb $0x7, %bpl
jne 0x1a525
leaq 0x2536c(%rip), %rsi     # 0x3f881
movq %r15, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6c02
movq %r14, %rdi
callq 0x6af7
movb $0x1, %bl
cmpb $0x6, %bpl
ja 0x1a5f7
movq %rax, %r12
movzbl %bpl, %eax
leaq 0x25305(%rip), %rcx     # 0x3f84c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x8, 0x18(%r12)
jne 0x1a569
movq (%r12), %rdi
callq 0x2a006
movq $0x0, (%r12)
movq %r14, %rdi
callq 0x1bf7d
jmp 0x1a5f7
movzwl 0x24(%r14), %eax
subw 0x20(%r14), %ax
movzwl 0x4(%r15), %ecx
subw (%r15), %cx
cmpw %cx, %ax
jne 0x1a5a7
movzwl 0x26(%r14), %eax
subw 0x22(%r14), %ax
movzwl 0x6(%r15), %ecx
subw 0x2(%r15), %cx
cmpw %cx, %ax
je 0x1a5f7
movq %r14, %rdi
callq 0x1b31d
movq %r14, %rdi
callq 0x1ab2c
jmp 0x1a5f7
testb $0x1, 0x19(%r12)
je 0x1a5f7
movq %r14, %rdi
callq 0x66b6
movl 0x5c(%r14), %ecx
movq 0x16(%rax), %xmm0
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
pmaxsw %xmm0, %xmm1
movdqa %xmm1, %xmm0
psrld $0x10, %xmm0
pmaxsw %xmm1, %xmm0
movd %xmm0, %eax
cmpw %cx, %ax
cmovgl %eax, %ecx
movw %cx, 0x5c(%r14)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq