// File: /workspace/github_c_makefile_star2_O1/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 *0x46687(%rip)          # 0x603b0
movl %eax, %ebx
cmpb $0x1, %al
jne 0x19e32
cmpb $0x7, %bpl
jne 0x19d50
leaq 0x259f9(%rip), %rsi     # 0x3f739
movq %r15, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6bf5
movq %r14, %rdi
callq 0x6ad8
cmpb $0x6, %bpl
ja 0x19e32
movq %rax, %r12
movzbl %bpl, %eax
leaq 0x25994(%rip), %rcx     # 0x3f704
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x8, 0x18(%r12)
jne 0x19d92
movq (%r12), %rdi
callq 0x29984
movq $0x0, (%r12)
movq %r14, %rdi
callq 0x1b76f
jmp 0x19e32
movzwl 0x24(%r14), %eax
subw 0x20(%r14), %ax
movzwl 0x4(%r15), %ecx
subw (%r15), %cx
cmpw %cx, %ax
jne 0x19dd0
movzwl 0x26(%r14), %eax
subw 0x22(%r14), %ax
movzwl 0x6(%r15), %ecx
subw 0x2(%r15), %cx
cmpw %cx, %ax
je 0x19e32
movq %r14, %rdi
callq 0x1ab7a
movq %r14, %rdi
callq 0x1a365
jmp 0x19e32
testb $0x1, 0x19(%r12)
je 0x19e32
movq %r14, %rdi
callq 0x6697
movl 0x5c(%r14), %ecx
movzwl 0x1a(%rax), %edx
cmpw %dx, %cx
cmovgl %ecx, %edx
movw %dx, 0x5c(%r14)
movzwl 0x1c(%rax), %ecx
cmpw %cx, %dx
cmovlel %ecx, %edx
movw %dx, 0x5c(%r14)
movzwl 0x16(%rax), %ecx
cmpw %cx, %dx
cmovlel %ecx, %edx
movw %dx, 0x5c(%r14)
movzwl 0x18(%rax), %eax
cmpw %ax, %dx
cmovlel %eax, %edx
movw %dx, 0x5c(%r14)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq