// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_win.c
// Function: lv_win_signal
static lv_res_t lv_win_signal(lv_obj_t * win, lv_signal_t sign, void * param)
{
    lv_res_t res;

    /* Include the ancient signal function */
    res = ancestor_signal(win, sign, param);
    if(res != LV_RES_OK) return res;
    if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);

    lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
    if(sign == LV_SIGNAL_CHILD_CHG) { /*Move children to the page*/
        lv_obj_t * page = ext->page;
        if(page != NULL) {
            lv_obj_t * child;
            child = lv_obj_get_child(win, NULL);
            while(child != NULL) {
                if(lv_obj_is_protected(child, LV_PROTECT_PARENT) == false) {
                    lv_obj_t * tmp = child;
                    child          = lv_obj_get_child(win, child); /*Get the next child before move this*/
                    lv_obj_set_parent(tmp, page);
                } else {
                    child = lv_obj_get_child(win, child);
                }
            }
        }
    } else if(sign == LV_SIGNAL_STYLE_CHG) {
        lv_win_realign(win);
    } else if(sign == LV_SIGNAL_CORD_CHG) {
        /*If the size is changed refresh the window*/
        if(lv_area_get_width(param) != lv_obj_get_width(win) || lv_area_get_height(param) != lv_obj_get_height(win)) {
            lv_win_realign(win);
        }
    } else if(sign == LV_SIGNAL_CLEANUP) {
        ext->header = NULL; /*These objects were children so they are already invalid*/
        ext->page   = NULL;
        ext->title  = NULL;
    } else if(sign == LV_SIGNAL_CONTROL) {
        /*Forward all the control signals to the page*/
        ext->page->signal_cb(ext->page, sign, param);
    }

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq 0x48ec3(%rip), %rax     # 0x89550
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 0x406b4
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x40847
movzbl -0x11(%rbp), %eax
cmpl $0x7, %eax
jne 0x406d5
movq -0x20(%rbp), %rdi
leaq 0x280d1(%rip), %rsi     # 0x68799
callq 0xaa80
movb %al, -0x1(%rbp)
jmp 0x40847
movq -0x10(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x30(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x1, %eax
jne 0x40773
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x4076e
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7c20
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x4076c
movq -0x40(%rbp), %rdi
movl $0x2, %esi
callq 0xa7d0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x40759
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x7c20
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7d50
jmp 0x4076a
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x7c20
movq %rax, -0x40(%rbp)
jmp 0x40712
jmp 0x4076e
jmp 0x40841
movzbl -0x11(%rbp), %eax
cmpl $0x4, %eax
jne 0x4078a
movq -0x10(%rbp), %rdi
callq 0x409d0
jmp 0x4083f
movzbl -0x11(%rbp), %eax
cmpl $0x2, %eax
jne 0x407e4
movq -0x20(%rbp), %rdi
callq 0x41530
cwtl
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8310
movw %ax, %cx
movl -0x4c(%rbp), %eax
movswl %cx, %ecx
cmpl %ecx, %eax
jne 0x407d9
movq -0x20(%rbp), %rdi
callq 0x41550
cwtl
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8350
movw %ax, %cx
movl -0x50(%rbp), %eax
movswl %cx, %ecx
cmpl %ecx, %eax
je 0x407e2
movq -0x10(%rbp), %rdi
callq 0x409d0
jmp 0x4083d
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0x40812
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x4083b
movzbl -0x11(%rbp), %eax
cmpl $0x12, %eax
jne 0x40839
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rdi
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rdx
movzbl %cl, %esi
callq *%rax
jmp 0x4083b
jmp 0x4083d
jmp 0x4083f
jmp 0x40841
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq