// File: /workspace/github_c_makefile_star2_O2/OnionIoT[P]lv_example/lvgl/src/lv_core/lv_obj.c
// Function: delete_children
static void delete_children(lv_obj_t * obj)
{
    lv_obj_t * i;
    lv_obj_t * i_next;
    i = lv_ll_get_head(&(obj->child_ll));

    /*Remove from the group; remove before transversing children so that
     * the object still has access to all children during the
     * LV_SIGNAL_DEFOCUS call*/
#if LV_USE_GROUP
    lv_group_t * group = lv_obj_get_group(obj);
    if(group) lv_group_remove_obj(obj);
#endif

    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 suer free the resources used in `LV_EVENT_DELETE`*/
    lv_event_send(obj, LV_EVENT_DELETE, NULL);

    lv_event_mark_deleted(obj);

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

    /* Reset the 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);
    }

    /* 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);
    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*/
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
movq %r15, %rdi
callq 0x27db9
movq %rax, %r12
movq %rbx, %rdi
callq 0x4b8e
movq %rax, %r14
testq %rax, %rax
je 0x4c00
movq %rbx, %rdi
callq 0x2581
jmp 0x4c00
movq %r15, %rdi
movq %r12, %rsi
callq 0x27e93
movq %rax, %r13
movq %r12, %rdi
callq 0x4bb2
movq %r13, %r12
testq %r12, %r12
jne 0x4be7
pushq $0x13
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4caf
movq %rbx, %rdi
callq 0x4cf8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27715
xorl %edi, %edi
callq 0x7fb2
movq %rax, %r15
testq %rax, %rax
je 0x4c72
cmpq %rbx, 0x50(%r15)
je 0x4c3f
cmpq %rbx, 0x58(%r15)
jne 0x4c47
movq %r15, %rdi
callq 0x2ccf
cmpq %rbx, 0x60(%r15)
jne 0x4c52
andq $0x0, 0x60(%r15)
cmpq %r14, 0x88(%r15)
jne 0x4c6d
callq 0x36e6
cmpq %rbx, %rax
jne 0x4c6d
movq %r15, %rdi
callq 0x2ccf
movq %r15, %rdi
jmp 0x4c26
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq *0x30(%rbx)
movq %rbx, %rdi
callq 0x47bc
leaq 0x8(%rax), %rdi
movq %rbx, %rsi
callq 0x27e1c
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x4c9e
callq 0x27a7a
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x27a7a