static int walk_memory_regions_1(struct walk_memory_regions_data *data,

                                 abi_ulong base, int level, void **lp)

{

    abi_ulong pa;

    int i, rc;



    if (*lp == NULL) {

        return walk_memory_regions_end(data, base, 0);

    }



    if (level == 0) {

        PageDesc *pd = *lp;



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

            int prot = pd[i].flags;



            pa = base | (i << TARGET_PAGE_BITS);

            if (prot != data->prot) {

                rc = walk_memory_regions_end(data, pa, prot);

                if (rc != 0) {

                    return rc;

                }

            }

        }

    } else {

        void **pp = *lp;



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

            pa = base | ((abi_ulong)i <<

                (TARGET_PAGE_BITS + L2_BITS * level));

            rc = walk_memory_regions_1(data, pa, level - 1, pp + i);

            if (rc != 0) {

                return rc;

            }

        }

    }



    return 0;

}

static int walk_memory_regions_1(struct walk_memory_regions_data *data,

                                 abi_ulong base, int level, void **lp)

{

    abi_ulong pa;

    int i, rc;



    if (*lp == NULL) {

        return walk_memory_regions_end(data, base, 0);

    }



    if (level == 0) {

        PageDesc *pd = *lp;



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

            int prot = pd[i].flags;



            pa = base | (i << TARGET_PAGE_BITS);

            if (prot != data->prot) {

                rc = walk_memory_regions_end(data, pa, prot);

                if (rc != 0) {

                    return rc;

                }

            }

        }

    } else {

        void **pp = *lp;



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

            pa = base | ((abi_ulong)i <<

                (TARGET_PAGE_BITS + L2_BITS * level));

            rc = walk_memory_regions_1(data, pa, level - 1, pp + i);

            if (rc != 0) {

                return rc;

            }

        }

    }



    return 0;

}

static int FUNC_0(struct walk_memory_regions_data *VAR_0,

                                 abi_ulong VAR_1, int VAR_2, void **VAR_3)

{

    abi_ulong pa;

    int VAR_4, VAR_5;



    if (*VAR_3 == NULL) {

        return walk_memory_regions_end(VAR_0, VAR_1, 0);

    }



    if (VAR_2 == 0) {

        PageDesc *pd = *VAR_3;



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

            int prot = pd[VAR_4].flags;



            pa = VAR_1 | (VAR_4 << TARGET_PAGE_BITS);

            if (prot != VAR_0->prot) {

                VAR_5 = walk_memory_regions_end(VAR_0, pa, prot);

                if (VAR_5 != 0) {

                    return VAR_5;

                }

            }

        }

    } else {

        void **VAR_6 = *VAR_3;



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

            pa = VAR_1 | ((abi_ulong)VAR_4 <<

                (TARGET_PAGE_BITS + L2_BITS * VAR_2));

            VAR_5 = FUNC_0(VAR_0, pa, VAR_2 - 1, VAR_6 + VAR_4);

            if (VAR_5 != 0) {

                return VAR_5;

            }

        }

    }



    return 0;

}

static int FUNC_0(struct walk_memory_regions_data *VAR_0,
abi_ulong VAR_1, int VAR_2, void **VAR_3)
{ abi_ulong pa; int VAR_4, VAR_5; if (*VAR_3 == NULL) { return walk_memory_regions_end(VAR_0, VAR_1, 0); } if (VAR_2 == 0) { PageDesc *pd = *VAR_3; for (VAR_4 = 0; VAR_4 < L2_SIZE; ++VAR_4) { int prot = pd[VAR_4].flags; pa = VAR_1 | (VAR_4 << TARGET_PAGE_BITS); if (prot != VAR_0->prot) { VAR_5 = walk_memory_regions_end(VAR_0, pa, prot); if (VAR_5 != 0) { return VAR_5; } } } } else { void **VAR_6 = *VAR_3; for (VAR_4 = 0; VAR_4 < L2_SIZE; ++VAR_4) { pa = VAR_1 | ((abi_ulong)VAR_4 <<
(TARGET_PAGE_BITS + L2_BITS * VAR_2)); VAR_5 = FUNC_0(VAR_0, pa, VAR_2 - 1, VAR_6 + VAR_4); if (VAR_5 != 0) { return VAR_5; } } } return 0; }