// File: /workspace/github_c_makefile_star2_O2/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 *0x45aec(%rip)          # 0x5e3b0
movl %eax, %ebx
cmpb $0x1, %al
jne 0x189ba
cmpb $0x7, %bpl
jne 0x188eb
leaq 0x22e9a(%rip), %rsi     # 0x3b775
movq %r15, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x684b
movq %r14, %rdi
callq 0x6747
movb $0x1, %bl
cmpb $0x6, %bpl
ja 0x189ba
movq %rax, %r12
movzbl %bpl, %eax
leaq 0x22e33(%rip), %rcx     # 0x3b740
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x8, 0x18(%r12)
jne 0x1892c
movq (%r12), %rdi
callq 0x27a7a
andq $0x0, (%r12)
movq %r14, %rdi
callq 0x1a22c
jmp 0x189ba
movzwl 0x24(%r14), %eax
subw 0x20(%r14), %ax
movzwl 0x4(%r15), %ecx
subw (%r15), %cx
cmpw %cx, %ax
jne 0x1896a
movzwl 0x26(%r14), %eax
subw 0x22(%r14), %ax
movzwl 0x6(%r15), %ecx
subw 0x2(%r15), %cx
cmpw %cx, %ax
je 0x189ba
movq %r14, %rdi
callq 0x19698
movq %r14, %rdi
callq 0x18ee2
jmp 0x189ba
testb $0x1, 0x19(%r12)
je 0x189ba
movq %r14, %rdi
callq 0x6316
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