int get_physical_address(CPUState * env, target_ulong * physical,

			 int *prot, target_ulong address,

			 int rw, int access_type)

{

    /* P1, P2 and P4 areas do not use translation */

    if ((address >= 0x80000000 && address < 0xc0000000) ||

	address >= 0xe0000000) {

	if (!(env->sr & SR_MD)

	    && (address < 0xe0000000 || address > 0xe4000000)) {

	    /* Unauthorized access in user mode (only store queues are available) */

	    fprintf(stderr, "Unauthorized access\n");

	    return (rw & PAGE_WRITE) ? MMU_DTLB_MISS_WRITE :

		MMU_DTLB_MISS_READ;

	}

	/* Mask upper 3 bits */

	*physical = address & 0x1FFFFFFF;

	*prot = PAGE_READ | PAGE_WRITE;

	return MMU_OK;

    }



    /* If MMU is disabled, return the corresponding physical page */

    if (!env->mmucr & MMUCR_AT) {

	*physical = address & 0x1FFFFFFF;

	*prot = PAGE_READ | PAGE_WRITE;

	return MMU_OK;

    }



    /* We need to resort to the MMU */

    return get_mmu_address(env, physical, prot, address, rw, access_type);

}

int get_physical_address(CPUState * env, target_ulong * physical,

			 int *prot, target_ulong address,

			 int rw, int access_type)

{

    

    if ((address >= 0x80000000 && address < 0xc0000000) ||

	address >= 0xe0000000) {

	if (!(env->sr & SR_MD)

	    && (address < 0xe0000000 || address > 0xe4000000)) {

	    

	    fprintf(stderr, "Unauthorized access\n");

	    return (rw & PAGE_WRITE) ? MMU_DTLB_MISS_WRITE :

		MMU_DTLB_MISS_READ;

	}

	

	*physical = address & 0x1FFFFFFF;

	*prot = PAGE_READ | PAGE_WRITE;

	return MMU_OK;

    }



    

    if (!env->mmucr & MMUCR_AT) {

	*physical = address & 0x1FFFFFFF;

	*prot = PAGE_READ | PAGE_WRITE;

	return MMU_OK;

    }



    

    return get_mmu_address(env, physical, prot, address, rw, access_type);

}

int FUNC_0(CPUState * VAR_0, target_ulong * VAR_1,

			 int *VAR_2, target_ulong VAR_3,

			 int VAR_4, int VAR_5)

{

    

    if ((VAR_3 >= 0x80000000 && VAR_3 < 0xc0000000) ||

	VAR_3 >= 0xe0000000) {

	if (!(VAR_0->sr & SR_MD)

	    && (VAR_3 < 0xe0000000 || VAR_3 > 0xe4000000)) {

	    

	    fprintf(stderr, "Unauthorized access\n");

	    return (VAR_4 & PAGE_WRITE) ? MMU_DTLB_MISS_WRITE :

		MMU_DTLB_MISS_READ;

	}

	

	*VAR_1 = VAR_3 & 0x1FFFFFFF;

	*VAR_2 = PAGE_READ | PAGE_WRITE;

	return MMU_OK;

    }



    

    if (!VAR_0->mmucr & MMUCR_AT) {

	*VAR_1 = VAR_3 & 0x1FFFFFFF;

	*VAR_2 = PAGE_READ | PAGE_WRITE;

	return MMU_OK;

    }



    

    return get_mmu_address(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);

}

int FUNC_0(CPUState * VAR_0, target_ulong * VAR_1,
int *VAR_2, target_ulong VAR_3,
int VAR_4, int VAR_5)
{ if ((VAR_3 >= 0x80000000 && VAR_3 < 0xc0000000) ||
VAR_3 >= 0xe0000000) { if (!(VAR_0->sr & SR_MD)
&& (VAR_3 < 0xe0000000 || VAR_3 > 0xe4000000)) { fprintf(stderr, "Unauthorized access\n"); return (VAR_4 & PAGE_WRITE) ? MMU_DTLB_MISS_WRITE :
MMU_DTLB_MISS_READ; } *VAR_1 = VAR_3 & 0x1FFFFFFF; *VAR_2 = PAGE_READ | PAGE_WRITE; return MMU_OK; } if (!VAR_0->mmucr & MMUCR_AT) { *VAR_1 = VAR_3 & 0x1FFFFFFF; *VAR_2 = PAGE_READ | PAGE_WRITE; return MMU_OK; } return get_mmu_address(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5); }