// File: /workspace/github_c_makefile_star2_O1/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 *0x39061(%rip)          # 0x60480
movl %eax, %ebx
cmpb $0x1, %al
jne 0x274c7
cmpb $0x7, %bpl
jne 0x2744c
leaq 0x186b3(%rip), %rsi     # 0x3fae9
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6bf5
movq %r14, %rdi
callq 0x6ad8
movzbl %bpl, %esi
cmpb $0x4, %bpl
ja 0x2747e
leaq 0x18637(%rip), %rcx     # 0x3fa9c
movslq (%rcx,%rsi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
jmp 0x274c7
cmpl $0x12, %esi
jne 0x274c7
movq (%rax), %rdi
movq %r15, %rdx
callq *0x30(%rdi)
jmp 0x274c7
movzwl 0x4(%r15), %ebp
subw (%r15), %bp
incl %ebp
movq %r14, %rdi
callq 0x5651
cmpw %ax, %bp
jne 0x274bf
movzwl 0x6(%r15), %ebp
subw 0x2(%r15), %bp
incl %ebp
movq %r14, %rdi
callq 0x567b
cmpw %ax, %bp
je 0x274c7
movq %r14, %rdi
callq 0x27616
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 0x274c7
movq %r14, %rdi
xorl %esi, %esi
callq 0x51a3
testq %rax, %rax
je 0x274c7
movq %rax, %r12
movq %r12, %rdi
movl $0x2, %esi
callq 0x6a3c
movl %eax, %ebp
movq %r14, %rdi
movq %r12, %rsi
callq 0x51a3
movq %rax, %r13
testb %bpl, %bpl
jne 0x2751f
movq %r12, %rdi
movq %r15, %rsi
callq 0x5255
movq %r13, %r12
testq %r13, %r13
jne 0x274f2
jmp 0x274c7