// File: /workspace/github_c_makefile_star2_O2/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 *0x41935(%rip)          # 0x5e3f8
movl %eax, %ebx
cmpb $0x1, %al
jne 0x1cb1b
cmpb $0x7, %bpl
jne 0x1caec
leaq 0x2296f(%rip), %rsi     # 0x3f445
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x684b
movq %r14, %rdi
callq 0x47bc
movq %rax, %r15
movq %rax, %rdi
callq 0x6747
movq %rax, %r12
movzbl %bpl, %esi
movb $0x1, %bl
leal -0x8(%rsi), %eax
cmpl $0x4, %eax
jae 0x1cb2c
movq %r15, %rdi
movq %r13, %rdx
callq 0x1ead1
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x2, %esi
je 0x1cb5f
cmpl $0x6, %esi
jne 0x1cb1b
movq 0x50(%r12), %rdi
callq 0x6316
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 0x1cb1b
cmpq $0x0, 0x50(%r12)
je 0x1cb1b
movq %r14, %rdi
callq 0x5308
movzwl 0x4(%r13), %ecx
subw (%r13), %cx
incl %ecx
cmpw %cx, %ax
jne 0x1cb99
movq %r14, %rdi
callq 0x5332
movzwl 0x6(%r13), %ecx
subw 0x2(%r13), %cx
incl %ecx
cmpw %cx, %ax
je 0x1cb1b
movq %r14, %rdi
callq 0x6316
movq %rax, %r14
movq 0x50(%r12), %r13
movq %r15, %rdi
callq 0x2476e
movswl %ax, %esi
movq %r13, %rdi
callq 0x53a8
movq 0x50(%r12), %rdi
movswl 0x1a(%r14), %esi
movswl 0x16(%r14), %edx
callq 0x47df
movq 0x50(%r12), %rdi
xorl %esi, %esi
callq 0x18a9a
movq %r15, %rdi
callq 0x1df9e
jmp 0x1cb1b