static void gen_mtpr(int rb, int regno)

{

    TCGv tmp;

    int data;



    if (rb == 31) {

        tmp = tcg_const_i64(0);

    } else {

        tmp = cpu_ir[rb];

    }



    /* The basic registers are data only, and unknown registers

       are read-zero, write-ignore.  */

    data = cpu_pr_data(regno);

    if (data != 0) {

        if (data & PR_BYTE) {

            tcg_gen_st8_i64(tmp, cpu_env, data & ~PR_BYTE);

        } else if (data & PR_LONG) {

            tcg_gen_st32_i64(tmp, cpu_env, data & ~PR_LONG);

        } else {

            tcg_gen_st_i64(tmp, cpu_env, data);

        }

    }



    if (rb == 31) {

        tcg_temp_free(tmp);

    }

}

static void gen_mtpr(int rb, int regno)

{

    TCGv tmp;

    int data;



    if (rb == 31) {

        tmp = tcg_const_i64(0);

    } else {

        tmp = cpu_ir[rb];

    }



    



    data = cpu_pr_data(regno);

    if (data != 0) {

        if (data & PR_BYTE) {

            tcg_gen_st8_i64(tmp, cpu_env, data & ~PR_BYTE);

        } else if (data & PR_LONG) {

            tcg_gen_st32_i64(tmp, cpu_env, data & ~PR_LONG);

        } else {

            tcg_gen_st_i64(tmp, cpu_env, data);

        }

    }



    if (rb == 31) {

        tcg_temp_free(tmp);

    }

}

static void FUNC_0(int VAR_0, int VAR_1)

{

    TCGv tmp;

    int VAR_2;



    if (VAR_0 == 31) {

        tmp = tcg_const_i64(0);

    } else {

        tmp = cpu_ir[VAR_0];

    }



    



    VAR_2 = cpu_pr_data(VAR_1);

    if (VAR_2 != 0) {

        if (VAR_2 & PR_BYTE) {

            tcg_gen_st8_i64(tmp, cpu_env, VAR_2 & ~PR_BYTE);

        } else if (VAR_2 & PR_LONG) {

            tcg_gen_st32_i64(tmp, cpu_env, VAR_2 & ~PR_LONG);

        } else {

            tcg_gen_st_i64(tmp, cpu_env, VAR_2);

        }

    }



    if (VAR_0 == 31) {

        tcg_temp_free(tmp);

    }

}

static void FUNC_0(int VAR_0, int VAR_1)
{ TCGv tmp; int VAR_2; if (VAR_0 == 31) { tmp = tcg_const_i64(0); } else { tmp = cpu_ir[VAR_0]; } VAR_2 = cpu_pr_data(VAR_1); if (VAR_2 != 0) { if (VAR_2 & PR_BYTE) { tcg_gen_st8_i64(tmp, cpu_env, VAR_2 & ~PR_BYTE); } else if (VAR_2 & PR_LONG) { tcg_gen_st32_i64(tmp, cpu_env, VAR_2 & ~PR_LONG); } else { tcg_gen_st_i64(tmp, cpu_env, VAR_2); } } if (VAR_0 == 31) { tcg_temp_free(tmp); } }