// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq 0x581bb(%rip), %rax     # 0x894c8
movq -0x10(%rbp), %rdi
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rdx
movzbl %cl, %esi
callq *%rax
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x1, %eax
je 0x31334
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x314f7
movzbl -0x11(%rbp), %eax
cmpl $0x7, %eax
jne 0x31355
movq -0x20(%rbp), %rdi
leaq 0x3adcd(%rip), %rsi     # 0x6c115
callq 0xaa80
movb %al, -0x1(%rbp)
jmp 0x314f7
movq -0x10(%rbp), %rdi
callq 0x71b0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x38(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x6, %eax
jne 0x313e8
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xa080
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x33480
movzbl %al, %eax
movw %ax, -0x42(%rbp)
movq -0x10(%rbp), %rax
movswl 0x5c(%rax), %eax
movq -0x40(%rbp), %rcx
movswl 0x32(%rcx), %ecx
movswl -0x42(%rbp), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jle 0x313c4
movq -0x10(%rbp), %rax
movswl 0x5c(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x313d5
movq -0x40(%rbp), %rax
movswl 0x32(%rax), %eax
movswl -0x42(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x5c(%rax)
jmp 0x314f1
movzbl -0x11(%rbp), %eax
cmpl $0x2, %eax
jne 0x314b6
movq -0x38(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x314b4
movq -0x10(%rbp), %rdi
callq 0x8310
cwtl
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
callq 0x34840
movw %ax, %cx
movl -0x58(%rbp), %eax
movswl %cx, %ecx
cmpl %ecx, %eax
jne 0x3144a
movq -0x10(%rbp), %rdi
callq 0x8350
cwtl
movl %eax, -0x5c(%rbp)
movq -0x20(%rbp), %rdi
callq 0x34860
movw %ax, %cx
movl -0x5c(%rbp), %eax
movswl %cx, %ecx
cmpl %ecx, %eax
je 0x314b2
movq -0x10(%rbp), %rdi
callq 0xa080
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3ec60
movq -0x68(%rbp), %rdi
movswl %ax, %esi
callq 0x8430
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x50(%rbp), %rax
movw 0x1a(%rax), %cx
movq -0x50(%rbp), %rax
movswl %cx, %esi
movswl 0x16(%rax), %edx
callq 0x71f0
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2a630
movq -0x30(%rbp), %rdi
callq 0x334a0
jmp 0x314b4
jmp 0x314ef
movzbl -0x11(%rbp), %eax
cmpl $0x9, %eax
je 0x314da
movzbl -0x11(%rbp), %eax
cmpl $0x8, %eax
je 0x314da
movzbl -0x11(%rbp), %eax
cmpl $0xa, %eax
je 0x314da
movzbl -0x11(%rbp), %eax
cmpl $0xb, %eax
jne 0x314ed
movq -0x30(%rbp), %rdi
movb -0x11(%rbp), %al
movq -0x20(%rbp), %rdx
movzbl %al, %esi
callq 0x34880
jmp 0x314ef
jmp 0x314f1
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq