// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
callq *0x38985(%rip)          # 0x60480
movl %eax, %ebx
cmpb $0x1, %al
jne 0x27baa
cmpb $0x7, %bpl
jne 0x27b28
leaq 0x1816f(%rip), %rsi     # 0x3fc81
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6c02
movq %r14, %rdi
callq 0x6af7
movzbl %bpl, %ecx
movb $0x1, %bl
cmpb $0x4, %bpl
ja 0x27b5c
leaq 0x180f1(%rip), %rdx     # 0x3fc34
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
jmp 0x27baa
cmpl $0x12, %ecx
jne 0x27baa
movq (%rax), %rdi
movl $0x12, %esi
movq %r15, %rdx
callq *0x30(%rdi)
jmp 0x27baa
movzwl 0x4(%r15), %ebp
subw (%r15), %bp
incl %ebp
movq %r14, %rdi
callq 0x566d
cmpw %ax, %bp
jne 0x27ba2
movzwl 0x6(%r15), %ebp
subw 0x2(%r15), %bp
incl %ebp
movq %r14, %rdi
callq 0x5697
cmpw %ax, %bp
je 0x27baa
movq %r14, %rdi
callq 0x27d16
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rax), %r15
testq %r15, %r15
je 0x27baa
movq %r14, %rdi
xorl %esi, %esi
callq 0x51a7
testq %rax, %rax
je 0x27baa
movq %rax, %r12
movq %r12, %rdi
movl $0x2, %esi
callq 0x6a5b
movl %eax, %ebp
movq %r14, %rdi
movq %r12, %rsi
callq 0x51a7
movq %rax, %r13
testb %bpl, %bpl
jne 0x27c02
movq %r12, %rdi
movq %r15, %rsi
callq 0x5259
movq %r13, %r12
testq %r13, %r13
jne 0x27bd5
jmp 0x27baa