// File: /workspace/github_c_makefile_star2_O1/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 *0x42230(%rip)          # 0x603f8
movl %eax, %ebx
cmpb $0x1, %al
jne 0x1e21e
cmpb $0x7, %bpl
jne 0x1e1f1
leaq 0x251f2(%rip), %rsi     # 0x433cd
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6bf5
movq %r14, %rdi
callq 0x4abf
movq %rax, %r15
movq %rax, %rdi
callq 0x6ad8
movq %rax, %r12
movzbl %bpl, %esi
leal -0x8(%rsi), %eax
cmpl $0x4, %eax
jae 0x1e22f
movq %r15, %rdi
movq %r13, %rdx
callq 0x202fb
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x2, %esi
je 0x1e262
cmpl $0x6, %esi
jne 0x1e21e
movq 0x50(%r12), %rdi
callq 0x6697
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 0x1e21e
cmpq $0x0, 0x50(%r12)
je 0x1e21e
movq %r14, %rdi
callq 0x5651
movzwl 0x4(%r13), %ecx
subw (%r13), %cx
incl %ecx
cmpw %cx, %ax
jne 0x1e29c
movq %r14, %rdi
callq 0x567b
movzwl 0x6(%r13), %ecx
subw 0x2(%r13), %cx
incl %ecx
cmpw %cx, %ax
je 0x1e21e
movq %r14, %rdi
callq 0x6697
movq %rax, %r14
movq 0x50(%r12), %r13
movq %r15, %rdi
callq 0x2641d
movswl %ax, %esi
movq %r13, %rdi
callq 0x56f1
movq 0x50(%r12), %rdi
movswl 0x1a(%r14), %esi
movswl 0x16(%r14), %edx
callq 0x4ae2
movq 0x50(%r12), %rdi
xorl %esi, %esi
callq 0x19f13
movq %r15, %rdi
callq 0x1f77a
jmp 0x1e21e