// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_core/lv_obj.c
// Function: lv_obj_del
lv_res_t lv_obj_del(lv_obj_t * obj)
{
    LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
    lv_obj_invalidate(obj);

    /*Delete from the group*/
#if LV_USE_GROUP
    lv_group_t * group = lv_obj_get_group(obj);
    if(group) lv_group_remove_obj(obj);
#endif

        /*Remove the animations from this object*/
#if LV_USE_ANIMATION
    lv_anim_del(obj, NULL);
#endif

    /*Recursively delete the children*/
    lv_obj_t * i;
    lv_obj_t * i_next;
    i = lv_ll_get_head(&(obj->child_ll));
    while(i != NULL) {
        /*Get the next object before delete this*/
        i_next = lv_ll_get_next(&(obj->child_ll), i);

        /*Call the recursive del to the child too*/
        delete_children(i);

        /*Set i to the next node*/
        i = i_next;
    }

    /*Let the user free the resources used in `LV_EVENT_DELETE`*/
    lv_event_send(obj, LV_EVENT_DELETE, NULL);

    lv_event_mark_deleted(obj);

    /* Reset all input devices if the object to delete is used*/
    lv_indev_t * indev = lv_indev_get_next(NULL);
    while(indev) {
        if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) {
            lv_indev_reset(indev);
        }
        if(indev->proc.types.pointer.last_pressed == obj) {
            indev->proc.types.pointer.last_pressed = NULL;
        }

#if LV_USE_GROUP
        if(indev->group == group && obj == lv_indev_get_obj_act()) {
            lv_indev_reset(indev);
        }
#endif
        indev = lv_indev_get_next(indev);
    }

    /* All children deleted.
     * Now clean up the object specific data*/
    obj->signal_cb(obj, LV_SIGNAL_CLEANUP, NULL);

    /*Remove the object from parent's children list*/
    lv_obj_t * par = lv_obj_get_parent(obj);
    if(par == NULL) { /*It is a screen*/
        lv_disp_t * d = lv_obj_get_disp(obj);
        lv_ll_rem(&d->scr_ll, obj);
    } else {
        lv_ll_rem(&(par->child_ll), obj);
    }

    /*Delete the base objects*/
    if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr);
    lv_mem_free(obj); /*Free the object itself*/

    /*Send a signal to the parent to notify it about the child delete*/
    if(par != NULL) {
        par->signal_cb(par, LV_SIGNAL_CHILD_CHG, NULL);
    }

    return LV_RES_INV;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xd120
testb $0x1, %al
jne 0x75eb
movq -0x8(%rbp), %rsi
leaq 0x60b18(%rip), %rdi     # 0x680fc
callq 0xd410
jmp 0x75e9
movq -0x8(%rbp), %rdi
callq 0x7430
movq -0x8(%rbp), %rdi
callq 0x77c0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x7611
movq -0x8(%rbp), %rdi
callq 0x2800
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x44560
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x45660
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x765e
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0x458a0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7800
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x762f
movq -0x8(%rbp), %rdi
movl $0x13, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x7990
movq -0x8(%rbp), %rdi
callq 0x7a00
xorl %eax, %eax
movl %eax, %edi
callq 0xded0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x7715
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rax
cmpq -0x8(%rbp), %rax
je 0x76ad
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x76b6
movq -0x28(%rbp), %rdi
callq 0x3a70
movq -0x28(%rbp), %rax
movq 0x60(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x76d0
movq -0x28(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x7703
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x4ef0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jne 0x7703
movq -0x28(%rbp), %rdi
callq 0x3a70
movq -0x28(%rbp), %rdi
callq 0xded0
movq %rax, -0x28(%rbp)
jmp 0x7686
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x71b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x775d
movq -0x8(%rbp), %rdi
callq 0x7a40
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
addq $0x48, %rdi
movq -0x8(%rbp), %rsi
callq 0x45790
jmp 0x776e
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
callq 0x45790
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x7786
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x44ec0
movq -0x8(%rbp), %rdi
callq 0x44ec0
cmpq $0x0, -0x30(%rbp)
je 0x77ad
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x30(%rbp), %rdi
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)