static void mem_info_pae32(Monitor *mon, CPUState *env)

{

    unsigned int l1, l2, l3;

    int prot, last_prot;

    uint64_t pdpe, pde, pte;

    uint64_t pdp_addr, pd_addr, pt_addr;

    target_phys_addr_t start, end;



    pdp_addr = env->cr[3] & ~0x1f;

    last_prot = 0;

    start = -1;

    for (l1 = 0; l1 < 4; l1++) {

        cpu_physical_memory_read(pdp_addr + l1 * 8, &pdpe, 8);

        pdpe = le64_to_cpu(pdpe);

        end = l1 << 30;

        if (pdpe & PG_PRESENT_MASK) {

            pd_addr = pdpe & 0x3fffffffff000ULL;

            for (l2 = 0; l2 < 512; l2++) {

                cpu_physical_memory_read(pd_addr + l2 * 8, &pde, 8);

                pde = le64_to_cpu(pde);

                end = (l1 << 30) + (l2 << 21);

                if (pde & PG_PRESENT_MASK) {

                    if (pde & PG_PSE_MASK) {

                        prot = pde & (PG_USER_MASK | PG_RW_MASK |

                                      PG_PRESENT_MASK);

                        mem_print(mon, &start, &last_prot, end, prot);

                    } else {

                        pt_addr = pde & 0x3fffffffff000ULL;

                        for (l3 = 0; l3 < 512; l3++) {

                            cpu_physical_memory_read(pt_addr + l3 * 8, &pte, 8);

                            pte = le64_to_cpu(pte);

                            end = (l1 << 30) + (l2 << 21) + (l3 << 12);

                            if (pte & PG_PRESENT_MASK) {

                                prot = pte & (PG_USER_MASK | PG_RW_MASK |

                                              PG_PRESENT_MASK);

                            } else {

                                prot = 0;

                            }

                            mem_print(mon, &start, &last_prot, end, prot);

                        }

                    }

                } else {

                    prot = 0;

                    mem_print(mon, &start, &last_prot, end, prot);

                }

            }

        } else {

            prot = 0;

            mem_print(mon, &start, &last_prot, end, prot);

        }

    }

    /* Flush last range */

    mem_print(mon, &start, &last_prot, (target_phys_addr_t)1 << 32, 0);

}

static void mem_info_pae32(Monitor *mon, CPUState *env)

{

    unsigned int l1, l2, l3;

    int prot, last_prot;

    uint64_t pdpe, pde, pte;

    uint64_t pdp_addr, pd_addr, pt_addr;

    target_phys_addr_t start, end;



    pdp_addr = env->cr[3] & ~0x1f;

    last_prot = 0;

    start = -1;

    for (l1 = 0; l1 < 4; l1++) {

        cpu_physical_memory_read(pdp_addr + l1 * 8, &pdpe, 8);

        pdpe = le64_to_cpu(pdpe);

        end = l1 << 30;

        if (pdpe & PG_PRESENT_MASK) {

            pd_addr = pdpe & 0x3fffffffff000ULL;

            for (l2 = 0; l2 < 512; l2++) {

                cpu_physical_memory_read(pd_addr + l2 * 8, &pde, 8);

                pde = le64_to_cpu(pde);

                end = (l1 << 30) + (l2 << 21);

                if (pde & PG_PRESENT_MASK) {

                    if (pde & PG_PSE_MASK) {

                        prot = pde & (PG_USER_MASK | PG_RW_MASK |

                                      PG_PRESENT_MASK);

                        mem_print(mon, &start, &last_prot, end, prot);

                    } else {

                        pt_addr = pde & 0x3fffffffff000ULL;

                        for (l3 = 0; l3 < 512; l3++) {

                            cpu_physical_memory_read(pt_addr + l3 * 8, &pte, 8);

                            pte = le64_to_cpu(pte);

                            end = (l1 << 30) + (l2 << 21) + (l3 << 12);

                            if (pte & PG_PRESENT_MASK) {

                                prot = pte & (PG_USER_MASK | PG_RW_MASK |

                                              PG_PRESENT_MASK);

                            } else {

                                prot = 0;

                            }

                            mem_print(mon, &start, &last_prot, end, prot);

                        }

                    }

                } else {

                    prot = 0;

                    mem_print(mon, &start, &last_prot, end, prot);

                }

            }

        } else {

            prot = 0;

            mem_print(mon, &start, &last_prot, end, prot);

        }

    }

    

    mem_print(mon, &start, &last_prot, (target_phys_addr_t)1 << 32, 0);

}

static void FUNC_0(Monitor *VAR_0, CPUState *VAR_1)

{

    unsigned int VAR_2, VAR_3, VAR_4;

    int VAR_5, VAR_6;

    uint64_t pdpe, pde, pte;

    uint64_t pdp_addr, pd_addr, pt_addr;

    target_phys_addr_t start, end;



    pdp_addr = VAR_1->cr[3] & ~0x1f;

    VAR_6 = 0;

    start = -1;

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

        cpu_physical_memory_read(pdp_addr + VAR_2 * 8, &pdpe, 8);

        pdpe = le64_to_cpu(pdpe);

        end = VAR_2 << 30;

        if (pdpe & PG_PRESENT_MASK) {

            pd_addr = pdpe & 0x3fffffffff000ULL;

            for (VAR_3 = 0; VAR_3 < 512; VAR_3++) {

                cpu_physical_memory_read(pd_addr + VAR_3 * 8, &pde, 8);

                pde = le64_to_cpu(pde);

                end = (VAR_2 << 30) + (VAR_3 << 21);

                if (pde & PG_PRESENT_MASK) {

                    if (pde & PG_PSE_MASK) {

                        VAR_5 = pde & (PG_USER_MASK | PG_RW_MASK |

                                      PG_PRESENT_MASK);

                        mem_print(VAR_0, &start, &VAR_6, end, VAR_5);

                    } else {

                        pt_addr = pde & 0x3fffffffff000ULL;

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

                            cpu_physical_memory_read(pt_addr + VAR_4 * 8, &pte, 8);

                            pte = le64_to_cpu(pte);

                            end = (VAR_2 << 30) + (VAR_3 << 21) + (VAR_4 << 12);

                            if (pte & PG_PRESENT_MASK) {

                                VAR_5 = pte & (PG_USER_MASK | PG_RW_MASK |

                                              PG_PRESENT_MASK);

                            } else {

                                VAR_5 = 0;

                            }

                            mem_print(VAR_0, &start, &VAR_6, end, VAR_5);

                        }

                    }

                } else {

                    VAR_5 = 0;

                    mem_print(VAR_0, &start, &VAR_6, end, VAR_5);

                }

            }

        } else {

            VAR_5 = 0;

            mem_print(VAR_0, &start, &VAR_6, end, VAR_5);

        }

    }

    

    mem_print(VAR_0, &start, &VAR_6, (target_phys_addr_t)1 << 32, 0);

}

static void FUNC_0(Monitor *VAR_0, CPUState *VAR_1)
{ unsigned int VAR_2, VAR_3, VAR_4; int VAR_5, VAR_6; uint64_t pdpe, pde, pte; uint64_t pdp_addr, pd_addr, pt_addr; target_phys_addr_t start, end; pdp_addr = VAR_1->cr[3] & ~0x1f; VAR_6 = 0; start = -1; for (VAR_2 = 0; VAR_2 < 4; VAR_2++) { cpu_physical_memory_read(pdp_addr + VAR_2 * 8, &pdpe, 8); pdpe = le64_to_cpu(pdpe); end = VAR_2 << 30; if (pdpe & PG_PRESENT_MASK) { pd_addr = pdpe & 0x3fffffffff000ULL; for (VAR_3 = 0; VAR_3 < 512; VAR_3++) { cpu_physical_memory_read(pd_addr + VAR_3 * 8, &pde, 8); pde = le64_to_cpu(pde); end = (VAR_2 << 30) + (VAR_3 << 21); if (pde & PG_PRESENT_MASK) { if (pde & PG_PSE_MASK) { VAR_5 = pde & (PG_USER_MASK | PG_RW_MASK |
PG_PRESENT_MASK); mem_print(VAR_0, &start, &VAR_6, end, VAR_5); } else { pt_addr = pde & 0x3fffffffff000ULL; for (VAR_4 = 0; VAR_4 < 512; VAR_4++) { cpu_physical_memory_read(pt_addr + VAR_4 * 8, &pte, 8); pte = le64_to_cpu(pte); end = (VAR_2 << 30) + (VAR_3 << 21) + (VAR_4 << 12); if (pte & PG_PRESENT_MASK) { VAR_5 = pte & (PG_USER_MASK | PG_RW_MASK |
PG_PRESENT_MASK); } else { VAR_5 = 0; } mem_print(VAR_0, &start, &VAR_6, end, VAR_5); } } } else { VAR_5 = 0; mem_print(VAR_0, &start, &VAR_6, end, VAR_5); } } } else { VAR_5 = 0; mem_print(VAR_0, &start, &VAR_6, end, VAR_5); } } mem_print(VAR_0, &start, &VAR_6, (target_phys_addr_t)1 << 32, 0); }