static int disas_cp_insn(CPUState *env, DisasContext *s, uint32_t insn)

{

    TCGv tmp, tmp2;

    uint32_t rd = (insn >> 12) & 0xf;

    uint32_t cp = (insn >> 8) & 0xf;

    if (IS_USER(s)) {

        return 1;

    }



    if (insn & ARM_CP_RW_BIT) {

        if (!env->cp[cp].cp_read)

            return 1;

        gen_set_pc_im(s->pc);

        tmp = new_tmp();

        tmp2 = tcg_const_i32(insn);

        gen_helper_get_cp(tmp, cpu_env, tmp2);

        tcg_temp_free(tmp2);

        store_reg(s, rd, tmp);

    } else {

        if (!env->cp[cp].cp_write)

            return 1;

        gen_set_pc_im(s->pc);

        tmp = load_reg(s, rd);

        tmp2 = tcg_const_i32(insn);

        gen_helper_set_cp(cpu_env, tmp2, tmp);

        tcg_temp_free(tmp2);

        dead_tmp(tmp);

    }

    return 0;

}

static int disas_cp_insn(CPUState *env, DisasContext *s, uint32_t insn)

{

    TCGv tmp, tmp2;

    uint32_t rd = (insn >> 12) & 0xf;

    uint32_t cp = (insn >> 8) & 0xf;

    if (IS_USER(s)) {

        return 1;

    }



    if (insn & ARM_CP_RW_BIT) {

        if (!env->cp[cp].cp_read)

            return 1;

        gen_set_pc_im(s->pc);

        tmp = new_tmp();

        tmp2 = tcg_const_i32(insn);

        gen_helper_get_cp(tmp, cpu_env, tmp2);

        tcg_temp_free(tmp2);

        store_reg(s, rd, tmp);

    } else {

        if (!env->cp[cp].cp_write)

            return 1;

        gen_set_pc_im(s->pc);

        tmp = load_reg(s, rd);

        tmp2 = tcg_const_i32(insn);

        gen_helper_set_cp(cpu_env, tmp2, tmp);

        tcg_temp_free(tmp2);

        dead_tmp(tmp);

    }

    return 0;

}

        dead_tmp(tmp);         dead_tmp(tmp);         dead_tmp(tmp);         dead_tmp(tmp);         tmp = new_tmp();         dead_tmp(tmp);         tmp = new_tmp();         dead_tmp(tmp);         dead_tmp(tmp);         tmp = new_tmp();         dead_tmp(tmp);         dead_tmp(tmp);         dead_tmp(tmp);         dead_tmp(tmp);         tmp = new_tmp();         tmp = new_tmp();         dead_tmp(tmp);         tmp = new_tmp();         dead_tmp(tmp);         tmp = new_tmp();         dead_tmp(tmp);         tmp = new_tmp();         dead_tmp(tmp);         dead_tmp(tmp);         dead_tmp(tmp);         tmp = new_tmp();         dead_tmp(tmp);         tmp = new_tmp();         dead_tmp(tmp);         dead_tmp(tmp);         dead_tmp(tmp);
static int FUNC_0(CPUState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2)

{

    TCGv tmp, tmp2;

    uint32_t rd = (VAR_2 >> 12) & 0xf;

    uint32_t cp = (VAR_2 >> 8) & 0xf;

    if (IS_USER(VAR_1)) {

        return 1;

    }



    if (VAR_2 & ARM_CP_RW_BIT) {

        if (!VAR_0->cp[cp].cp_read)

            return 1;

        gen_set_pc_im(VAR_1->pc);

        tmp = new_tmp();

        tmp2 = tcg_const_i32(VAR_2);

        gen_helper_get_cp(tmp, cpu_env, tmp2);

        tcg_temp_free(tmp2);

        store_reg(VAR_1, rd, tmp);

    } else {

        if (!VAR_0->cp[cp].cp_write)

            return 1;

        gen_set_pc_im(VAR_1->pc);

        tmp = load_reg(VAR_1, rd);

        tmp2 = tcg_const_i32(VAR_2);

        gen_helper_set_cp(cpu_env, tmp2, tmp);

        tcg_temp_free(tmp2);

        dead_tmp(tmp);

    }

    return 0;

}

static int FUNC_0(CPUState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2)
{ TCGv tmp, tmp2; uint32_t rd = (VAR_2 >> 12) & 0xf; uint32_t cp = (VAR_2 >> 8) & 0xf; if (IS_USER(VAR_1)) { return 1; } if (VAR_2 & ARM_CP_RW_BIT) { if (!VAR_0->cp[cp].cp_read)
return 1; gen_set_pc_im(VAR_1->pc); tmp = new_tmp(); tmp2 = tcg_const_i32(VAR_2); gen_helper_get_cp(tmp, cpu_env, tmp2); tcg_temp_free(tmp2); store_reg(VAR_1, rd, tmp); } else { if (!VAR_0->cp[cp].cp_write)
return 1; gen_set_pc_im(VAR_1->pc); tmp = load_reg(VAR_1, rd); tmp2 = tcg_const_i32(VAR_2); gen_helper_set_cp(cpu_env, tmp2, tmp); tcg_temp_free(tmp2); dead_tmp(tmp); } return 0; }