// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_tileview.c
// Function: lv_tileview_scrl_signal
static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param)
{

    lv_res_t res;

    /* Include the ancient signal function */
    res = ancestor_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 * tileview         = lv_obj_get_parent(scrl);
    const lv_style_t * style_bg = lv_tileview_get_style(tileview, LV_TILEVIEW_STYLE_MAIN);

    /*Apply constraint on moving of the tileview*/
    if(sign == LV_SIGNAL_CORD_CHG) {
        lv_indev_t * indev = lv_indev_get_act();
        if(indev) {
            lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview);

            /*Set horizontal drag constraint if no vertical constraint an dragged to valid x
             * direction */
            if(ext->drag_ver == 0 &&
               ((ext->drag_right_en && indev->proc.types.pointer.drag_sum.x <= -LV_INDEV_DEF_DRAG_LIMIT) ||
                (ext->drag_left_en && indev->proc.types.pointer.drag_sum.x >= LV_INDEV_DEF_DRAG_LIMIT))) {
                ext->drag_hor = 1;
            }
            /*Set vertical drag constraint if no horizontal constraint an dragged to valid y
             * direction */
            if(ext->drag_hor == 0 &&
               ((ext->drag_bottom_en && indev->proc.types.pointer.drag_sum.y <= -LV_INDEV_DEF_DRAG_LIMIT) ||
                (ext->drag_top_en && indev->proc.types.pointer.drag_sum.y >= LV_INDEV_DEF_DRAG_LIMIT))) {
                ext->drag_ver = 1;
            }

#if LV_USE_ANIMATION
            if(ext->drag_hor) {
                ext->page.edge_flash.top_ip    = 0;
                ext->page.edge_flash.bottom_ip = 0;
            }

            if(ext->drag_ver) {
                ext->page.edge_flash.right_ip = 0;
                ext->page.edge_flash.left_ip  = 0;
            }
#endif

            lv_coord_t x = lv_obj_get_x(scrl);
            lv_coord_t y = lv_obj_get_y(scrl);
            lv_coord_t h = lv_obj_get_height(tileview);
            lv_coord_t w = lv_obj_get_width(tileview);
            if(ext->drag_top_en == 0) {
                if(y > -(ext->act_id.y * h) && indev->proc.types.pointer.vect.y > 0 && ext->drag_hor == 0) {
#if LV_USE_ANIMATION
                    if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 &&
                       ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 &&
                       ext->page.edge_flash.bottom_ip == 0) {
                        ext->page.edge_flash.top_ip = 1;
                        lv_page_start_edge_flash(tileview);
                    }
#endif

                    lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top);
                }
            }
            if(ext->drag_bottom_en == 0 && indev->proc.types.pointer.vect.y < 0 && ext->drag_hor == 0) {
                if(y < -(ext->act_id.y * h)) {
#if LV_USE_ANIMATION
                    if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 &&
                       ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 &&
                       ext->page.edge_flash.bottom_ip == 0) {
                        ext->page.edge_flash.bottom_ip = 1;
                        lv_page_start_edge_flash(tileview);
                    }
#endif
                }

                lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top);
            }
            if(ext->drag_left_en == 0) {
                if(x > -(ext->act_id.x * w) && indev->proc.types.pointer.vect.x > 0 && ext->drag_ver == 0) {
#if LV_USE_ANIMATION
                    if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 &&
                       ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 &&
                       ext->page.edge_flash.bottom_ip == 0) {
                        ext->page.edge_flash.left_ip = 1;
                        lv_page_start_edge_flash(tileview);
                    }
#endif

                    lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.left);
                }
            }
            if(ext->drag_right_en == 0 && indev->proc.types.pointer.vect.x < 0 && ext->drag_ver == 0) {
                if(x < -(ext->act_id.x * w)) {
#if LV_USE_ANIMATION
                    if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 &&
                       ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 &&
                       ext->page.edge_flash.bottom_ip == 0) {
                        ext->page.edge_flash.right_ip = 1;
                        lv_page_start_edge_flash(tileview);
                    }
#endif
                }

                lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.top);
            }

            /*Apply the drag constraints*/
            if(ext->drag_ver == 0)
                lv_obj_set_y(scrl, -ext->act_id.y * lv_obj_get_height(tileview) + style_bg->body.padding.top);
            if(ext->drag_hor == 0)
                lv_obj_set_x(scrl, -ext->act_id.x * lv_obj_get_width(tileview) + style_bg->body.padding.left);
        }
    }
    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 0x6a663(%rip), %rax     # 0x89420
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 0x1ede4
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x1f465
movzbl -0x11(%rbp), %eax
cmpl $0x7, %eax
jne 0x1ee05
movq -0x20(%rbp), %rdi
leaq 0x4d31d(%rip), %rsi     # 0x6c115
callq 0xaa80
movb %al, -0x1(%rbp)
jmp 0x1f465
movq -0x10(%rbp), %rdi
callq 0x71b0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x1f9d0
movq %rax, -0x38(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x2, %eax
jne 0x1f45f
callq 0x4b70
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x1f45d
movq -0x30(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1eeb5
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1ee84
movq -0x40(%rbp), %rax
movswl 0x44(%rax), %eax
cmpl $-0xa, %eax
jle 0x1eea5
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1eeb5
movq -0x40(%rbp), %rax
movswl 0x44(%rax), %eax
cmpl $0xa, %eax
jl 0x1eeb5
movq -0x48(%rbp), %rax
movb 0x60(%rax), %cl
andb $-0x11, %cl
orb $0x10, %cl
movb %cl, 0x60(%rax)
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1ef17
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1eee9
movq -0x40(%rbp), %rax
movswl 0x46(%rax), %eax
cmpl $-0xa, %eax
jle 0x1ef07
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1ef17
movq -0x40(%rbp), %rax
movswl 0x46(%rax), %eax
cmpl $0xa, %eax
jl 0x1ef17
movq -0x48(%rbp), %rax
movb 0x60(%rax), %cl
andb $-0x21, %cl
orb $0x20, %cl
movb %cl, 0x60(%rax)
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x4, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x1ef47
movq -0x48(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x40(%rax)
movq -0x48(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x5, %cl
orb $0x0, %cl
movb %cl, 0x40(%rax)
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x5, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x1ef77
movq -0x48(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x9, %cl
orb $0x0, %cl
movb %cl, 0x40(%rax)
movq -0x48(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x11, %cl
orb $0x0, %cl
movb %cl, 0x40(%rax)
movq -0x10(%rbp), %rdi
callq 0x7350
movw %ax, -0x4a(%rbp)
movq -0x10(%rbp), %rdi
callq 0x73c0
movw %ax, -0x4c(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8350
movw %ax, -0x4e(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8310
movw %ax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f0ac
movswl -0x4c(%rbp), %eax
movq -0x48(%rbp), %rcx
movswl 0x5e(%rcx), %edx
movswl -0x4e(%rbp), %ecx
imull %ecx, %edx
xorl %ecx, %ecx
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x1f0aa
movq -0x40(%rbp), %rax
movswl 0x42(%rax), %eax
cmpl $0x0, %eax
jle 0x1f0aa
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f0aa
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1f081
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f081
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f081
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f081
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f081
movq -0x48(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x3, %cl
orb $0x2, %cl
movb %cl, 0x40(%rax)
movq -0x30(%rbp), %rdi
callq 0x3f410
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rax
movswl 0x5e(%rax), %ecx
xorl %eax, %eax
subl %ecx, %eax
movswl -0x4e(%rbp), %ecx
imull %ecx, %eax
movq -0x38(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movswl %ax, %esi
callq 0x8120
jmp 0x1f0ac
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f1ab
movq -0x40(%rbp), %rax
movswl 0x42(%rax), %eax
cmpl $0x0, %eax
jge 0x1f1ab
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f1ab
movswl -0x4c(%rbp), %eax
movq -0x48(%rbp), %rcx
movswl 0x5e(%rcx), %edx
movswl -0x4e(%rbp), %ecx
imull %ecx, %edx
xorl %ecx, %ecx
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x1f182
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1f180
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f180
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f180
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f180
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f180
movq -0x48(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x5, %cl
orb $0x4, %cl
movb %cl, 0x40(%rax)
movq -0x30(%rbp), %rdi
callq 0x3f410
jmp 0x1f182
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rax
movswl 0x5e(%rax), %ecx
xorl %eax, %eax
subl %ecx, %eax
movswl -0x4e(%rbp), %ecx
imull %ecx, %eax
movq -0x38(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movswl %ax, %esi
callq 0x8120
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f2af
movswl -0x4a(%rbp), %eax
movq -0x48(%rbp), %rcx
movswl 0x5c(%rcx), %edx
movswl -0x50(%rbp), %ecx
imull %ecx, %edx
xorl %ecx, %ecx
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x1f2ad
movq -0x40(%rbp), %rax
movswl 0x40(%rax), %eax
cmpl $0x0, %eax
jle 0x1f2ad
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f2ad
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1f284
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f284
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f284
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f284
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f284
movq -0x48(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x11, %cl
orb $0x10, %cl
movb %cl, 0x40(%rax)
movq -0x30(%rbp), %rdi
callq 0x3f410
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rax
movswl 0x5c(%rax), %ecx
xorl %eax, %eax
subl %ecx, %eax
movswl -0x50(%rbp), %ecx
imull %ecx, %eax
movq -0x38(%rbp), %rcx
movswl 0x1a(%rcx), %ecx
addl %ecx, %eax
movswl %ax, %esi
callq 0x80b0
jmp 0x1f2af
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f3af
movq -0x40(%rbp), %rax
movswl 0x40(%rax), %eax
cmpl $0x0, %eax
jge 0x1f3af
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f3af
movswl -0x4a(%rbp), %eax
movq -0x48(%rbp), %rcx
movswl 0x5c(%rcx), %edx
movswl -0x50(%rbp), %ecx
imull %ecx, %edx
xorl %ecx, %ecx
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x1f386
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1f384
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f384
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f384
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f384
movq -0x48(%rbp), %rax
movb 0x40(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f384
movq -0x48(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x9, %cl
orb $0x8, %cl
movb %cl, 0x40(%rax)
movq -0x30(%rbp), %rdi
callq 0x3f410
jmp 0x1f386
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rax
movswl 0x5c(%rax), %ecx
xorl %eax, %eax
subl %ecx, %eax
movswl -0x50(%rbp), %ecx
imull %ecx, %eax
movq -0x38(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movswl %ax, %esi
callq 0x80b0
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f405
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
movswl 0x5e(%rax), %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8350
movq -0x60(%rbp), %rdi
movw %ax, %cx
movl -0x54(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
movq -0x38(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movswl %ax, %esi
callq 0x8120
movq -0x48(%rbp), %rax
movb 0x60(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1f45b
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rax
movswl 0x5c(%rax), %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x64(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8310
movq -0x70(%rbp), %rdi
movw %ax, %cx
movl -0x64(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
movq -0x38(%rbp), %rcx
movswl 0x1a(%rcx), %ecx
addl %ecx, %eax
movswl %ax, %esi
callq 0x80b0
jmp 0x1f45d
jmp 0x1f45f
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nop