static void destroy_l2_mapping(PhysPageEntry *lp, unsigned level)

{

    unsigned i;

    PhysPageEntry *p = lp->u.node;



    if (!p) {

        return;

    }



    for (i = 0; i < L2_SIZE; ++i) {

        if (level > 0) {

            destroy_l2_mapping(&p[i], level - 1);

        } else {

            destroy_page_desc(p[i].u.leaf);

        }

    }

    g_free(p);

    lp->u.node = NULL;

}

static void destroy_l2_mapping(PhysPageEntry *lp, unsigned level)

{

    unsigned i;

    PhysPageEntry *p = lp->u.node;



    if (!p) {

        return;

    }



    for (i = 0; i < L2_SIZE; ++i) {

        if (level > 0) {

            destroy_l2_mapping(&p[i], level - 1);

        } else {

            destroy_page_desc(p[i].u.leaf);

        }

    }

    g_free(p);

    lp->u.node = NULL;

}

static void FUNC_0(PhysPageEntry *VAR_0, unsigned VAR_1)

{

    unsigned VAR_2;

    PhysPageEntry *p = VAR_0->u.node;



    if (!p) {

        return;

    }



    for (VAR_2 = 0; VAR_2 < L2_SIZE; ++VAR_2) {

        if (VAR_1 > 0) {

            FUNC_0(&p[VAR_2], VAR_1 - 1);

        } else {

            destroy_page_desc(p[VAR_2].u.leaf);

        }

    }

    g_free(p);

    VAR_0->u.node = NULL;

}

static void FUNC_0(PhysPageEntry *VAR_0, unsigned VAR_1)
{ unsigned VAR_2; PhysPageEntry *p = VAR_0->u.node; if (!p) { return; } for (VAR_2 = 0; VAR_2 < L2_SIZE; ++VAR_2) { if (VAR_1 > 0) { FUNC_0(&p[VAR_2], VAR_1 - 1); } else { destroy_page_desc(p[VAR_2].u.leaf); } } g_free(p); VAR_0->u.node = NULL; }