You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: core_state.rs
    path of file: ./repos/probe-rs/probe-rs/src/core
    
    the code of the file until where you have to start completion: use crate::{
    architecture::{
        arm::{
            ap::MemoryAp,
            core::{CortexAState, CortexMState}
    
    pub(crate) fn memory_ap(&self) -> MemoryAp {
        let arm_core_access_options = match self.core_access_options {
            ResolvedCoreOptions::Arm { ref options, .. } => options,
            _ => unreachable!("This should never happen. Please file a bug if it does."),
        };

        let dp = match arm_core_access_options.psel {
            0 => DpAddress::Default,
            x => DpAddress::Multidrop(x),
        };

        let ap = ApAddress {
            dp,
            ap: arm_core_access_options.ap,
        };

        MemoryAp::new(ap)
    }