static void switch_v7m_sp(CPUARMState *env, bool new_spsel)

{

    uint32_t tmp;

    bool old_spsel = env->v7m.control & R_V7M_CONTROL_SPSEL_MASK;



    if (old_spsel != new_spsel) {

        tmp = env->v7m.other_sp;

        env->v7m.other_sp = env->regs[13];

        env->regs[13] = tmp;



        env->v7m.control = deposit32(env->v7m.control,

                                     R_V7M_CONTROL_SPSEL_SHIFT,

                                     R_V7M_CONTROL_SPSEL_LENGTH, new_spsel);

    }

}

static void switch_v7m_sp(CPUARMState *env, bool new_spsel)

{

    uint32_t tmp;

    bool old_spsel = env->v7m.control & R_V7M_CONTROL_SPSEL_MASK;



    if (old_spsel != new_spsel) {

        tmp = env->v7m.other_sp;

        env->v7m.other_sp = env->regs[13];

        env->regs[13] = tmp;



        env->v7m.control = deposit32(env->v7m.control,

                                     R_V7M_CONTROL_SPSEL_SHIFT,

                                     R_V7M_CONTROL_SPSEL_LENGTH, new_spsel);

    }

}

static void FUNC_0(CPUARMState *VAR_0, bool VAR_1)

{

    uint32_t tmp;

    bool old_spsel = VAR_0->v7m.control & R_V7M_CONTROL_SPSEL_MASK;



    if (old_spsel != VAR_1) {

        tmp = VAR_0->v7m.other_sp;

        VAR_0->v7m.other_sp = VAR_0->regs[13];

        VAR_0->regs[13] = tmp;



        VAR_0->v7m.control = deposit32(VAR_0->v7m.control,

                                     R_V7M_CONTROL_SPSEL_SHIFT,

                                     R_V7M_CONTROL_SPSEL_LENGTH, VAR_1);

    }

}

static void FUNC_0(CPUARMState *VAR_0, bool VAR_1)
{ uint32_t tmp; bool old_spsel = VAR_0->v7m.control & R_V7M_CONTROL_SPSEL_MASK; if (old_spsel != VAR_1) { tmp = VAR_0->v7m.other_sp; VAR_0->v7m.other_sp = VAR_0->regs[13]; VAR_0->regs[13] = tmp; VAR_0->v7m.control = deposit32(VAR_0->v7m.control,
R_V7M_CONTROL_SPSEL_SHIFT,
R_V7M_CONTROL_SPSEL_LENGTH, VAR_1); } }