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

    /* Include the ancient signal function */
    res = scrl_signal(scrl, sign, param);
    if(res != LV_RES_OK) return res;
    if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");

    lv_obj_t * ta     = lv_obj_get_parent(scrl);
    lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);

    if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
        /*Set ext. size because the cursor might be out of this object*/
        const lv_style_t * style_label = lv_obj_get_style(ext->label);
        lv_coord_t font_h              = lv_font_get_line_height(style_label->text.font);
        scrl->ext_draw_pad             = LV_MATH_MAX(scrl->ext_draw_pad, style_label->text.line_space + font_h);
    } else if(sign == LV_SIGNAL_CORD_CHG) {
        /*Set the label width according to the text area width*/
        if(ext->label) {
            if(lv_obj_get_width(scrl) != lv_area_get_width(param) ||
               lv_obj_get_height(scrl) != lv_area_get_height(param)) {

                const lv_style_t * style_scrl = lv_obj_get_style(scrl);
                lv_obj_set_width(ext->label, lv_page_get_fit_width(ta));
                lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top);
                lv_label_set_text(ext->label, NULL); /*Refresh the label*/

                refr_cursor_area(ta);
            }
        }
    } else if(sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESS_LOST ||
              sign == LV_SIGNAL_RELEASED) {
        update_cursor_position_on_click(ta, sign, (lv_indev_t *)param);
    }

    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r13
movl %esi, %ebp
movq %rdi, %r14
callq *0x41a3f(%rip)          # 0x603f8
movl %eax, %ebx
cmpb $0x1, %al
jne 0x1ea11
cmpb $0x7, %bpl
jne 0x1e9e2
leaq 0x24bf1(%rip), %rsi     # 0x435bd
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6c02
movq %r14, %rdi
callq 0x4ab5
movq %rax, %r15
movq %rax, %rdi
callq 0x6af7
movq %rax, %r12
movzbl %bpl, %esi
movb $0x1, %bl
leal -0x8(%rsi), %eax
cmpl $0x4, %eax
jae 0x1ea22
movq %r15, %rdi
movq %r13, %rdx
callq 0x20aef
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x2, %esi
je 0x1ea55
cmpl $0x6, %esi
jne 0x1ea11
movq 0x50(%r12), %rdi
callq 0x66b6
movq 0x28(%rax), %rcx
movzbl 0x10(%rcx), %ecx
movswl 0x5c(%r14), %edx
movswl 0x32(%rax), %eax
addl %ecx, %eax
cmpl %edx, %eax
cmovll %edx, %eax
movw %ax, 0x5c(%r14)
jmp 0x1ea11
cmpq $0x0, 0x50(%r12)
je 0x1ea11
movq %r14, %rdi
callq 0x566d
movzwl 0x4(%r13), %ecx
subw (%r13), %cx
incl %ecx
cmpw %cx, %ax
jne 0x1ea8f
movq %r14, %rdi
callq 0x5697
movzwl 0x6(%r13), %ecx
subw 0x2(%r13), %cx
incl %ecx
cmpw %cx, %ax
je 0x1ea11
movq %r14, %rdi
callq 0x66b6
movq %rax, %r14
movq 0x50(%r12), %r13
movq %r15, %rdi
callq 0x26af3
movswl %ax, %esi
movq %r13, %rdi
callq 0x570d
movq 0x50(%r12), %rdi
movswl 0x1a(%r14), %esi
movswl 0x16(%r14), %edx
callq 0x4ad8
movq 0x50(%r12), %rdi
xorl %esi, %esi
callq 0x1a6da
movq %r15, %rdi
callq 0x1ff6e
jmp 0x1ea11