static inline int get_phys_addr(CPUState *env, uint32_t address,

                                int access_type, int is_user,

                                uint32_t *phys_ptr, int *prot,

                                target_ulong *page_size)

{

    /* Fast Context Switch Extension.  */

    if (address < 0x02000000)

        address += env->cp15.c13_fcse;



    if ((env->cp15.c1_sys & 1) == 0) {

        /* MMU/MPU disabled.  */

        *phys_ptr = address;

        *prot = PAGE_READ | PAGE_WRITE;

        *page_size = TARGET_PAGE_SIZE;

        return 0;

    } else if (arm_feature(env, ARM_FEATURE_MPU)) {

        *page_size = TARGET_PAGE_SIZE;

	return get_phys_addr_mpu(env, address, access_type, is_user, phys_ptr,

				 prot);

    } else if (env->cp15.c1_sys & (1 << 23)) {

        return get_phys_addr_v6(env, address, access_type, is_user, phys_ptr,

                                prot, page_size);

    } else {

        return get_phys_addr_v5(env, address, access_type, is_user, phys_ptr,

                                prot, page_size);

    }

}

static inline int get_phys_addr(CPUState *env, uint32_t address,

                                int access_type, int is_user,

                                uint32_t *phys_ptr, int *prot,

                                target_ulong *page_size)

{

    

    if (address < 0x02000000)

        address += env->cp15.c13_fcse;



    if ((env->cp15.c1_sys & 1) == 0) {

        

        *phys_ptr = address;

        *prot = PAGE_READ | PAGE_WRITE;

        *page_size = TARGET_PAGE_SIZE;

        return 0;

    } else if (arm_feature(env, ARM_FEATURE_MPU)) {

        *page_size = TARGET_PAGE_SIZE;

	return get_phys_addr_mpu(env, address, access_type, is_user, phys_ptr,

				 prot);

    } else if (env->cp15.c1_sys & (1 << 23)) {

        return get_phys_addr_v6(env, address, access_type, is_user, phys_ptr,

                                prot, page_size);

    } else {

        return get_phys_addr_v5(env, address, access_type, is_user, phys_ptr,

                                prot, page_size);

    }

}

static inline int FUNC_0(CPUState *VAR_0, uint32_t VAR_1,

                                int VAR_2, int VAR_3,

                                uint32_t *VAR_4, int *VAR_5,

                                target_ulong *VAR_6)

{

    

    if (VAR_1 < 0x02000000)

        VAR_1 += VAR_0->cp15.c13_fcse;



    if ((VAR_0->cp15.c1_sys & 1) == 0) {

        

        *VAR_4 = VAR_1;

        *VAR_5 = PAGE_READ | PAGE_WRITE;

        *VAR_6 = TARGET_PAGE_SIZE;

        return 0;

    } else if (arm_feature(VAR_0, ARM_FEATURE_MPU)) {

        *VAR_6 = TARGET_PAGE_SIZE;

	return get_phys_addr_mpu(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4,

				 VAR_5);

    } else if (VAR_0->cp15.c1_sys & (1 << 23)) {

        return get_phys_addr_v6(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4,

                                VAR_5, VAR_6);

    } else {

        return get_phys_addr_v5(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4,

                                VAR_5, VAR_6);

    }

}

static inline int FUNC_0(CPUState *VAR_0, uint32_t VAR_1,
int VAR_2, int VAR_3,
uint32_t *VAR_4, int *VAR_5,
target_ulong *VAR_6)
{ if (VAR_1 < 0x02000000)
VAR_1 += VAR_0->cp15.c13_fcse; if ((VAR_0->cp15.c1_sys & 1) == 0) { *VAR_4 = VAR_1; *VAR_5 = PAGE_READ | PAGE_WRITE; *VAR_6 = TARGET_PAGE_SIZE; return 0; } else if (arm_feature(VAR_0, ARM_FEATURE_MPU)) { *VAR_6 = TARGET_PAGE_SIZE; return get_phys_addr_mpu(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4,
VAR_5); } else if (VAR_0->cp15.c1_sys & (1 << 23)) { return get_phys_addr_v6(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4,
VAR_5, VAR_6); } else { return get_phys_addr_v5(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4,
VAR_5, VAR_6); } }