//! ARMv8 AArch64 registers.

pub fn get_int_reg_name(is_64: bool, reg: u8, with_zr: bool) -> &'static str {
    const INT_REG: [[[&str; 32]; 2]; 2] = [
        [
            [
                "w0", "w1", "w2", "w3", "w4", "w5", "w6", "w7", "w8", "w9", "w10", "w11", "w12",
                "w13", "w14", "w15", "w16", "w17", "w18", "w19", "w20", "w21", "w22", "w23", "w24",
                "w25", "w26", "w27", "w28", "w29", "w30", "wsp",
            ],
            [
                "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12",
                "x13", "x14", "x15", "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23", "x24",
                "x25", "x26", "x27", "x28", "x29", "x30", "sp",
            ],
        ],
        [
            [
                "w0", "w1", "w2", "w3", "w4", "w5", "w6", "w7", "w8", "w9", "w10", "w11", "w12",
                "w13", "w14", "w15", "w16", "w17", "w18", "w19", "w20", "w21", "w22", "w23", "w24",
                "w25", "w26", "w27", "w28", "w29", "w30", "wzr",
            ],
            [
                "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12",
                "x13", "x14", "x15", "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23", "x24",
                "x25", "x26", "x27", "x28", "x29", "x30", "xzr",
            ],
        ],
    ];

    let is_sp = with_zr as usize;
    let is_64 = is_64 as usize;

    if reg >= 32 {
        return "<undefined>";
    }

    INT_REG[is_sp][is_64][reg as usize]
}

#[repr(usize)]
pub enum FpRegSize {
    B8,
    H16,
    S32,
    D64,
    Q128,
}

pub fn get_fp_reg_name(size: FpRegSize, reg_no: usize) -> &'static str {
    const FP_REG: [[&str; 32]; 5] = [
        [
            "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "b10", "b11", "b12", "b13",
            "b14", "b15", "b16", "b17", "b18", "b19", "b20", "b21", "b22", "b23", "b24", "b25",
            "b26", "b27", "b28", "b29", "b30", "b31",
        ],
        [
            "h0", "h1", "h2", "h3", "h4", "h5", "h6", "h7", "h8", "h9", "h10", "h11", "h12", "h13",
            "h14", "h15", "h16", "h17", "h18", "h19", "h20", "h21", "h22", "h23", "h24", "h25",
            "h26", "h27", "h28", "h29", "h30", "h31",
        ],
        [
            "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13",
            "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25",
            "s26", "s27", "s28", "s29", "s30", "s31",
        ],
        [
            "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", "d11", "d12", "d13",
            "d14", "d15", "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "d24", "d25",
            "d26", "d27", "d28", "d29", "d30", "d31",
        ],
        [
            "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", "q10", "q11", "q12", "q13",
            "q14", "q15", "q16", "q17", "q18", "q19", "q20", "q21", "q22", "q23", "q24", "q25",
            "q26", "q27", "q28", "q29", "q30", "q31",
        ],
    ];

    if reg_no >= 32 {
        return "<undefined>";
    }

    FP_REG[size as usize][reg_no]
}

pub fn get_sve_reg_name(is_64: bool, reg: u8) -> &'static str {
    const SVE_REG: [[&str; 32]; 2] = [
        [
            "z0.s", "z1.s", "z2.s", "z3.s", "z4.s", "z5.s", "z6.s", "z7.s", "z8.s", "z9.s",
            "z10.s", "z11.s", "z12.s", "z13.s", "z14.s", "z15.s", "z16.s", "z17.s", "z18.s",
            "z19.s", "z20.s", "z21.s", "z22.s", "z23.s", "z24.s", "z25.s", "z26.s", "z27.s",
            "z28.s", "z29.s", "z30.s", "z31.s",
        ],
        [
            "z0.d", "z1.d", "z2.d", "z3.d", "z4.d", "z5.d", "z6.d", "z7.d", "z8.d", "z9.d",
            "z10.d", "z11.d", "z12.d", "z13.d", "z14.d", "z15.d", "z16.d", "z17.d", "z18.d",
            "z19.d", "z20.d", "z21.d", "z22.d", "z23.d", "z24.d", "z25.d", "z26.d", "z27.d",
            "z28.d", "z29.d", "z30.d", "z31.d",
        ],
    ];

    if reg >= 32 {
        return "<undefined>";
    }

    let is_64 = is_64 as usize;
    SVE_REG[is_64][reg as usize]
}

#[repr(usize)]
pub enum SimdRegArrangement {
    Vector8B,
    Vector16B,
    Vector2H,
    Vector4H,
    Vector8H,
    Vector2S,
    Vector4S,
    Vector1D,
    Vector2D,
    Vector1Q,
}

pub fn get_simd_reg_name(reg: u8, simd_reg_arrangement: SimdRegArrangement) -> &'static str {
    const SIMD_REG_ARRANGEMENT: [[&str; 32]; 10] = [
        [
            "v0.8b", "v1.8b", "v2.8b", "v3.8b", "v4.8b", "v5.8b", "v6.8b", "v7.8b", "v8.8b",
            "v9.8b", "v10.8b", "v11.8b", "v12.8b", "v13.8b", "v14.8b", "v15.8b", "v16.8b",
            "v17.8b", "v18.8b", "v19.8b", "v20.8b", "v21.8b", "v22.8b", "v23.8b", "v24.8b",
            "v25.8b", "v26.8b", "v27.8b", "v28.8b", "v29.8b", "v30.8b", "v31.8b",
        ],
        [
            "v0.16b", "v1.16b", "v2.16b", "v3.16b", "v4.16b", "v5.16b", "v6.16b", "v7.16b",
            "v8.16b", "v9.16b", "v10.16b", "v11.16b", "v12.16b", "v13.16b", "v14.16b", "v15.16b",
            "v16.16b", "v17.16b", "v18.16b", "v19.16b", "v20.16b", "v21.16b", "v22.16b", "v23.16b",
            "v24.16b", "v25.16b", "v26.16b", "v27.16b", "v28.16b", "v29.16b", "v30.16b", "v31.16b",
        ],
        [
            "v0.2h", "v1.2h", "v2.2h", "v3.2h", "v4.2h", "v5.2h", "v6.2h", "v7.2h", "v8.2h",
            "v9.2h", "v10.2h", "v11.2h", "v12.2h", "v13.2h", "v14.2h", "v15.2h", "v16.2h",
            "v17.2h", "v18.2h", "v19.2h", "v20.2h", "v21.2h", "v22.2h", "v23.2h", "v24.2h",
            "v25.2h", "v26.2h", "v27.2h", "v28.2h", "v29.2h", "v30.2h", "v31.2h",
        ],
        [
            "v0.4h", "v1.4h", "v2.4h", "v3.4h", "v4.4h", "v5.4h", "v6.4h", "v7.4h", "v8.4h",
            "v9.4h", "v10.4h", "v11.4h", "v12.4h", "v13.4h", "v14.4h", "v15.4h", "v16.4h",
            "v17.4h", "v18.4h", "v19.4h", "v20.4h", "v21.4h", "v22.4h", "v23.4h", "v24.4h",
            "v25.4h", "v26.4h", "v27.4h", "v28.4h", "v29.4h", "v30.4h", "v31.4h",
        ],
        [
            "v0.8h", "v1.8h", "v2.8h", "v3.8h", "v4.8h", "v5.8h", "v6.8h", "v7.8h", "v8.8h",
            "v9.8h", "v10.8h", "v11.8h", "v12.8h", "v13.8h", "v14.8h", "v15.8h", "v16.8h",
            "v17.8h", "v18.8h", "v19.8h", "v20.8h", "v21.8h", "v22.8h", "v23.8h", "v24.8h",
            "v25.8h", "v26.8h", "v27.8h", "v28.8h", "v29.8h", "v30.8h", "v31.8h",
        ],
        [
            "v0.2s", "v1.2s", "v2.2s", "v3.2s", "v4.2s", "v5.2s", "v6.2s", "v7.2s", "v8.2s",
            "v9.2s", "v10.2s", "v11.2s", "v12.2s", "v13.2s", "v14.2s", "v15.2s", "v16.2s",
            "v17.2s", "v18.2s", "v19.2s", "v20.2s", "v21.2s", "v22.2s", "v23.2s", "v24.2s",
            "v25.2s", "v26.2s", "v27.2s", "v28.2s", "v29.2s", "v30.2s", "v31.2s",
        ],
        [
            "v0.4s", "v1.4s", "v2.4s", "v3.4s", "v4.4s", "v5.4s", "v6.4s", "v7.4s", "v8.4s",
            "v9.4s", "v10.4s", "v11.4s", "v12.4s", "v13.4s", "v14.4s", "v15.4s", "v16.4s",
            "v17.4s", "v18.4s", "v19.4s", "v20.4s", "v21.4s", "v22.4s", "v23.4s", "v24.4s",
            "v25.4s", "v26.4s", "v27.4s", "v28.4s", "v29.4s", "v30.4s", "v31.4s",
        ],
        [
            "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", "d11", "d12", "d13",
            "d14", "d15", "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "d24", "d25",
            "d26", "d27", "d28", "d29", "d30", "d31",
        ],
        [
            "v0.2d", "v1.2d", "v2.2d", "v3.2d", "v4.2d", "v5.2d", "v6.2d", "v7.2d", "v8.2d",
            "v9.2d", "v10.2d", "v11.2d", "v12.2d", "v13.2d", "v14.2d", "v15.2d", "v16.2d",
            "v17.2d", "v18.2d", "v19.2d", "v20.2d", "v21.2d", "v22.2d", "v23.2d", "v24.2d",
            "v25.2d", "v26.2d", "v27.2d", "v28.2d", "v29.2d", "v30.2d", "v31.2d",
        ],
        [
            "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", "q10", "q11", "q12", "q13",
            "q14", "q15", "q16", "q17", "q18", "q19", "q20", "q21", "q22", "q23", "q24", "q25",
            "q26", "q27", "q28", "q29", "q30", "q31",
        ],
    ];

    if reg >= 32 {
        return "<undefined>";
    }

    SIMD_REG_ARRANGEMENT[simd_reg_arrangement as usize][reg as usize]
}

pub const fn sys_reg_number(op0: u8, op1: u8, crn: u8, crm: u8, op2: u8) -> u32 {
    ((op0 as u32) << 14)
        | ((op1 as u32) << 11)
        | ((crn as u32) << 7)
        | ((crm as u32) << 3)
        | (op2 as u32)
}

#[derive(Debug, Copy, Clone)]
pub struct SysReg(pub u32, pub &'static str);

/// A list of all system registers.
/// Keep sorted by register ID.
pub const SYS_REGS: &[SysReg] = &[
    SysReg(sys_reg_number(2, 0, 0x0, 0x0, 2), "osdtrrx_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x0, 4), "dbgbvr0_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x0, 5), "dbgbcr0_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x0, 6), "dbgwvr0_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x0, 7), "dbgwcr0_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x1, 4), "dbgbvr1_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x1, 5), "dbgbcr1_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x1, 6), "dbgwvr1_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x1, 7), "dbgwcr1_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x2, 0), "mdccint_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x2, 2), "mdscr_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x2, 4), "dbgbvr2_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x2, 5), "dbgbcr2_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x2, 6), "dbgwvr2_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x2, 7), "dbgwcr2_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x3, 2), "osdtrtx_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x3, 4), "dbgbvr3_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x3, 5), "dbgbcr3_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x3, 6), "dbgwvr3_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x3, 7), "dbgwcr3_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x4, 2), "mdselr_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x4, 4), "dbgbvr4_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x4, 5), "dbgbcr4_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x4, 6), "dbgwvr4_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x4, 7), "dbgwcr4_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x5, 4), "dbgbvr5_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x5, 5), "dbgbcr5_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x5, 6), "dbgwvr5_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x5, 7), "dbgwcr5_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x6, 2), "oseccr_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x6, 4), "dbgbvr6_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x6, 5), "dbgbcr6_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x6, 6), "dbgwvr6_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x6, 7), "dbgwcr6_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x7, 4), "dbgbvr7_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x7, 5), "dbgbcr7_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x7, 6), "dbgwvr7_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x7, 7), "dbgwcr7_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x8, 4), "dbgbvr8_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x8, 5), "dbgbcr8_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x8, 6), "dbgwvr8_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x8, 7), "dbgwcr8_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x9, 4), "dbgbvr9_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x9, 5), "dbgbcr9_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x9, 6), "dbgwvr9_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0x9, 7), "dbgwcr9_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xa, 4), "dbgbvr10_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xa, 5), "dbgbcr10_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xa, 6), "dbgwvr10_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xa, 7), "dbgwcr10_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xb, 4), "dbgbvr11_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xb, 5), "dbgbcr11_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xb, 6), "dbgwvr11_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xb, 7), "dbgwcr11_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xc, 4), "dbgbvr12_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xc, 5), "dbgbcr12_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xc, 6), "dbgwvr12_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xc, 7), "dbgwcr12_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xd, 4), "dbgbvr13_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xd, 5), "dbgbcr13_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xd, 6), "dbgwvr13_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xd, 7), "dbgwcr13_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xe, 4), "dbgbvr14_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xe, 5), "dbgbcr14_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xe, 6), "dbgwvr14_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xe, 7), "dbgwcr14_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xf, 4), "dbgbvr15_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xf, 5), "dbgbcr15_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xf, 6), "dbgwvr15_el1"),
    SysReg(sys_reg_number(2, 0, 0x0, 0xf, 7), "dbgwcr15_el1"),
    SysReg(sys_reg_number(2, 0, 0x1, 0x0, 0), "mdrar_el1"),
    SysReg(sys_reg_number(2, 0, 0x1, 0x0, 4), "oslar_el1"),
    SysReg(sys_reg_number(2, 0, 0x1, 0x1, 4), "oslsr_el1"),
    SysReg(sys_reg_number(2, 0, 0x1, 0x3, 4), "osdlr_el1"),
    SysReg(sys_reg_number(2, 0, 0x1, 0x4, 4), "dbgprcr_el1"),
    SysReg(sys_reg_number(2, 0, 0x7, 0x8, 6), "dbgclaimset_el1"),
    SysReg(sys_reg_number(2, 0, 0x7, 0x9, 6), "dbgclaimclr_el1"),
    SysReg(sys_reg_number(2, 0, 0x7, 0xe, 6), "dbgauthstatus_el1"),
    SysReg(sys_reg_number(2, 0, 0x8, 0x0, 0), "csrcr_el1"),
    SysReg(sys_reg_number(2, 0, 0x8, 0x0, 1), "csrptr_el1"),
    SysReg(sys_reg_number(2, 0, 0x8, 0x0, 3), "csrptridx_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x8, 0), "pmevcntsvr0_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x8, 1), "pmevcntsvr1_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x8, 2), "pmevcntsvr2_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x8, 3), "pmevcntsvr3_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x8, 4), "pmevcntsvr4_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x8, 5), "pmevcntsvr5_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x8, 6), "pmevcntsvr6_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x8, 7), "pmevcntsvr7_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x9, 0), "pmevcntsvr8_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x9, 1), "pmevcntsvr9_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x9, 2), "pmevcntsvr10_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x9, 3), "pmevcntsvr11_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x9, 4), "pmevcntsvr12_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x9, 5), "pmevcntsvr13_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x9, 6), "pmevcntsvr14_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0x9, 7), "pmevcntsvr15_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xa, 0), "pmevcntsvr16_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xa, 1), "pmevcntsvr17_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xa, 2), "pmevcntsvr18_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xa, 3), "pmevcntsvr19_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xa, 4), "pmevcntsvr20_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xa, 5), "pmevcntsvr21_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xa, 6), "pmevcntsvr22_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xa, 7), "pmevcntsvr23_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xb, 0), "pmevcntsvr24_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xb, 1), "pmevcntsvr25_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xb, 2), "pmevcntsvr26_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xb, 3), "pmevcntsvr27_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xb, 4), "pmevcntsvr28_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xb, 5), "pmevcntsvr29_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xb, 6), "pmevcntsvr30_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xb, 7), "pmccntsvr_el1"),
    SysReg(sys_reg_number(2, 0, 0xe, 0xc, 0), "pmicntsvr_el1"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x0, 1), "trctraceidr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x0, 2), "trcvictlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x0, 4), "trcseqevr0"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x0, 5), "trccntrldvr0"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x0, 6), "trcidr8"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x0, 7), "trcimspec0"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x1, 0), "trcprgctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x1, 1), "trcqctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x1, 2), "trcviiectlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x1, 4), "trcseqevr1"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x1, 5), "trccntrldvr1"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x1, 6), "trcidr9"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x1, 7), "trcimspec1"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x2, 0), "trcprocselr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x2, 1), "trciteedcr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x2, 2), "trcvissctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x2, 4), "trcseqevr2"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x2, 5), "trccntrldvr2"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x2, 6), "trcidr10"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x2, 7), "trcimspec2"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x3, 0), "trcstatr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x3, 2), "trcvipcssctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x3, 5), "trccntrldvr3"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x3, 6), "trcidr11"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x3, 7), "trcimspec3"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x4, 0), "trcconfigr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x4, 5), "trccntctlr0"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x4, 6), "trcidr12"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x4, 7), "trcimspec4"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x5, 5), "trccntctlr1"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x5, 6), "trcidr13"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x5, 7), "trcimspec5"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x6, 0), "trcauxctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x6, 4), "trcseqrstevr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x6, 5), "trccntctlr2"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x6, 7), "trcimspec6"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x7, 4), "trcseqstr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x7, 5), "trccntctlr3"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x7, 7), "trcimspec7"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x8, 0), "trceventctl0r"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x8, 2), "trcvdctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x8, 4), "trcextinselr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x8, 4), "trcextinselr0"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x8, 5), "trccntvr0"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x8, 7), "trcidr0"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x9, 0), "trceventctl1r"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x9, 2), "trcvdsacctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x9, 4), "trcextinselr1"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x9, 5), "trccntvr1"),
    SysReg(sys_reg_number(2, 1, 0x0, 0x9, 7), "trcidr1"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xa, 0), "trcrsr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xa, 2), "trcvdarcctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xa, 4), "trcextinselr2"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xa, 5), "trccntvr2"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xa, 7), "trcidr2"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xb, 0), "trcstallctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xb, 4), "trcextinselr3"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xb, 5), "trccntvr3"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xb, 7), "trcidr3"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xc, 0), "trctsctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xc, 7), "trcidr4"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xd, 0), "trcsyncpr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xd, 7), "trcidr5"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xe, 0), "trcccctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xe, 7), "trcidr6"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xf, 0), "trcbbctlr"),
    SysReg(sys_reg_number(2, 1, 0x0, 0xf, 7), "trcidr7"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x0, 1), "trcrsctlr16"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x0, 2), "trcssccr0"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x0, 3), "trcsspcicr0"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x0, 4), "trcoslar"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x1, 1), "trcrsctlr17"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x1, 2), "trcssccr1"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x1, 3), "trcsspcicr1"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x1, 4), "trcoslsr"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x2, 0), "trcrsctlr2"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x2, 1), "trcrsctlr18"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x2, 2), "trcssccr2"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x2, 3), "trcsspcicr2"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x3, 0), "trcrsctlr3"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x3, 1), "trcrsctlr19"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x3, 2), "trcssccr3"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x3, 3), "trcsspcicr3"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x4, 0), "trcrsctlr4"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x4, 1), "trcrsctlr20"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x4, 2), "trcssccr4"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x4, 3), "trcsspcicr4"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x4, 4), "trcpdcr"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x5, 0), "trcrsctlr5"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x5, 1), "trcrsctlr21"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x5, 2), "trcssccr5"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x5, 3), "trcsspcicr5"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x5, 4), "trcpdsr"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x6, 0), "trcrsctlr6"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x6, 1), "trcrsctlr22"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x6, 2), "trcssccr6"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x6, 3), "trcsspcicr6"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x7, 0), "trcrsctlr7"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x7, 1), "trcrsctlr23"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x7, 2), "trcssccr7"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x7, 3), "trcsspcicr7"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x8, 0), "trcrsctlr8"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x8, 1), "trcrsctlr24"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x8, 2), "trcsscsr0"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x9, 0), "trcrsctlr9"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x9, 1), "trcrsctlr25"),
    SysReg(sys_reg_number(2, 1, 0x1, 0x9, 2), "trcsscsr1"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xa, 0), "trcrsctlr10"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xa, 1), "trcrsctlr26"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xa, 2), "trcsscsr2"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xb, 0), "trcrsctlr11"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xb, 1), "trcrsctlr27"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xb, 2), "trcsscsr3"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xc, 0), "trcrsctlr12"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xc, 1), "trcrsctlr28"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xc, 2), "trcsscsr4"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xd, 0), "trcrsctlr13"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xd, 1), "trcrsctlr29"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xd, 2), "trcsscsr5"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xe, 0), "trcrsctlr14"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xe, 1), "trcrsctlr30"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xe, 2), "trcsscsr6"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xf, 0), "trcrsctlr15"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xf, 1), "trcrsctlr31"),
    SysReg(sys_reg_number(2, 1, 0x1, 0xf, 2), "trcsscsr7"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x0, 0), "trcacvr0"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x0, 1), "trcacvr8"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x0, 2), "trcacatr0"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x0, 3), "trcacatr8"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x0, 4), "trcdvcvr0"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x0, 5), "trcdvcvr4"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x0, 6), "trcdvcmr0"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x0, 7), "trcdvcmr4"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x2, 0), "trcacvr1"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x2, 1), "trcacvr9"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x2, 2), "trcacatr1"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x2, 3), "trcacatr9"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x4, 0), "trcacvr2"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x4, 1), "trcacvr10"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x4, 2), "trcacatr2"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x4, 3), "trcacatr10"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x4, 4), "trcdvcvr1"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x4, 5), "trcdvcvr5"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x4, 6), "trcdvcmr1"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x4, 7), "trcdvcmr5"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x6, 0), "trcacvr3"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x6, 1), "trcacvr11"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x6, 2), "trcacatr3"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x6, 3), "trcacatr11"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x8, 0), "trcacvr4"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x8, 1), "trcacvr12"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x8, 2), "trcacatr4"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x8, 3), "trcacatr12"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x8, 4), "trcdvcvr2"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x8, 5), "trcdvcvr6"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x8, 6), "trcdvcmr2"),
    SysReg(sys_reg_number(2, 1, 0x2, 0x8, 7), "trcdvcmr6"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xa, 0), "trcacvr5"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xa, 1), "trcacvr13"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xa, 2), "trcacatr5"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xa, 3), "trcacatr13"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xc, 0), "trcacvr6"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xc, 1), "trcacvr14"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xc, 2), "trcacatr6"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xc, 3), "trcacatr14"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xc, 4), "trcdvcvr3"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xc, 5), "trcdvcvr7"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xc, 6), "trcdvcmr3"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xc, 7), "trcdvcmr7"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xe, 0), "trcacvr7"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xe, 1), "trcacvr15"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xe, 2), "trcacatr7"),
    SysReg(sys_reg_number(2, 1, 0x2, 0xe, 3), "trcacatr15"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x0, 0), "trccidcvr0"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x0, 1), "trcvmidcvr0"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x0, 2), "trccidcctlr0"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x1, 2), "trccidcctlr1"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x2, 0), "trccidcvr1"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x2, 1), "trcvmidcvr1"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x2, 2), "trcvmidcctlr0"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x3, 2), "trcvmidcctlr1"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x4, 0), "trccidcvr2"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x4, 1), "trcvmidcvr2"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x6, 0), "trccidcvr3"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x6, 1), "trcvmidcvr3"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x8, 0), "trccidcvr4"),
    SysReg(sys_reg_number(2, 1, 0x3, 0x8, 1), "trcvmidcvr4"),
    SysReg(sys_reg_number(2, 1, 0x3, 0xa, 0), "trccidcvr5"),
    SysReg(sys_reg_number(2, 1, 0x3, 0xa, 1), "trcvmidcvr5"),
    SysReg(sys_reg_number(2, 1, 0x3, 0xc, 0), "trccidcvr6"),
    SysReg(sys_reg_number(2, 1, 0x3, 0xc, 1), "trcvmidcvr6"),
    SysReg(sys_reg_number(2, 1, 0x3, 0xe, 0), "trccidcvr7"),
    SysReg(sys_reg_number(2, 1, 0x3, 0xe, 1), "trcvmidcvr7"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x0, 4), "trcitctrl"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x2, 7), "trcdevid"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x3, 7), "trcdevtype"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x4, 7), "trcpidr4"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x5, 7), "trcpidr5"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x6, 7), "trcpidr6"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x7, 7), "trcpidr7"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x8, 6), "trcclaimset"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x8, 7), "trcpidr0"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x9, 6), "trcclaimclr"),
    SysReg(sys_reg_number(2, 1, 0x7, 0x9, 7), "trcpidr1"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xa, 6), "trcdevaff0"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xa, 7), "trcpidr2"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xb, 6), "trcdevaff1"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xb, 7), "trcpidr3"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xc, 6), "trclar"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xc, 7), "trccidr0"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xd, 6), "trclsr"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xd, 7), "trccidr1"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xe, 6), "trcauthstatus"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xe, 7), "trccidr2"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xf, 6), "trcdevarch"),
    SysReg(sys_reg_number(2, 1, 0x7, 0xf, 7), "trccidr3"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x0, 0), "brbinf0_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x0, 1), "brbsrc0_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x0, 2), "brbtgt0_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x0, 4), "brbinf16_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x0, 5), "brbsrc16_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x0, 6), "brbtgt16_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x1, 0), "brbinf1_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x1, 1), "brbsrc1_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x1, 2), "brbtgt1_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x1, 4), "brbinf17_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x1, 5), "brbsrc17_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x1, 6), "brbtgt17_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x2, 0), "brbinf2_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x2, 1), "brbsrc2_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x2, 2), "brbtgt2_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x2, 4), "brbinf18_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x2, 5), "brbsrc18_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x2, 6), "brbtgt18_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x3, 0), "brbinf3_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x3, 1), "brbsrc3_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x3, 2), "brbtgt3_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x3, 4), "brbinf19_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x3, 5), "brbsrc19_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x3, 6), "brbtgt19_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x4, 0), "brbinf4_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x4, 1), "brbsrc4_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x4, 2), "brbtgt4_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x4, 4), "brbinf20_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x4, 5), "brbsrc20_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x4, 6), "brbtgt20_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x5, 0), "brbinf5_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x5, 1), "brbsrc5_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x5, 2), "brbtgt5_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x5, 4), "brbinf21_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x5, 5), "brbsrc21_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x5, 6), "brbtgt21_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x6, 0), "brbinf6_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x6, 1), "brbsrc6_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x6, 2), "brbtgt6_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x6, 4), "brbinf22_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x6, 5), "brbsrc22_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x6, 6), "brbtgt22_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x7, 0), "brbinf7_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x7, 1), "brbsrc7_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x7, 2), "brbtgt7_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x7, 4), "brbinf23_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x7, 5), "brbsrc23_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x7, 6), "brbtgt23_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x8, 0), "brbinf8_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x8, 1), "brbsrc8_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x8, 2), "brbtgt8_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x8, 4), "brbinf24_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x8, 5), "brbsrc24_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x8, 6), "brbtgt24_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x9, 0), "brbinf9_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x9, 1), "brbsrc9_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x9, 2), "brbtgt9_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x9, 4), "brbinf25_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x9, 5), "brbsrc25_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0x9, 6), "brbtgt25_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xa, 0), "brbinf10_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xa, 1), "brbsrc10_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xa, 2), "brbtgt10_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xa, 4), "brbinf26_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xa, 5), "brbsrc26_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xa, 6), "brbtgt26_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xb, 0), "brbinf11_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xb, 1), "brbsrc11_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xb, 2), "brbtgt11_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xb, 4), "brbinf27_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xb, 5), "brbsrc27_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xb, 6), "brbtgt27_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xc, 0), "brbinf12_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xc, 1), "brbsrc12_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xc, 2), "brbtgt12_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xc, 4), "brbinf28_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xc, 5), "brbsrc28_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xc, 6), "brbtgt28_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xd, 0), "brbinf13_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xd, 1), "brbsrc13_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xd, 2), "brbtgt13_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xd, 4), "brbinf29_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xd, 5), "brbsrc29_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xd, 6), "brbtgt29_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xe, 0), "brbinf14_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xe, 1), "brbsrc14_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xe, 2), "brbtgt14_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xe, 4), "brbinf30_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xe, 5), "brbsrc30_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xe, 6), "brbtgt30_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xf, 0), "brbinf15_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xf, 1), "brbsrc15_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xf, 2), "brbtgt15_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xf, 4), "brbinf31_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xf, 5), "brbsrc31_el1"),
    SysReg(sys_reg_number(2, 1, 0x8, 0xf, 6), "brbtgt31_el1"),
    SysReg(sys_reg_number(2, 1, 0x9, 0x0, 0), "brbcr_el1"),
    SysReg(sys_reg_number(2, 1, 0x9, 0x0, 1), "brbfcr_el1"),
    SysReg(sys_reg_number(2, 1, 0x9, 0x0, 2), "brbts_el1"),
    SysReg(sys_reg_number(2, 1, 0x9, 0x1, 0), "brbinfinj_el1"),
    SysReg(sys_reg_number(2, 1, 0x9, 0x1, 1), "brbsrcinj_el1"),
    SysReg(sys_reg_number(2, 1, 0x9, 0x1, 2), "brbtgtinj_el1"),
    SysReg(sys_reg_number(2, 1, 0x9, 0x2, 0), "brbidr0_el1"),
    SysReg(sys_reg_number(2, 2, 0x0, 0x0, 0), "teecr32_el1"),
    SysReg(sys_reg_number(2, 2, 0x1, 0x0, 0), "teehbr32_el1"),
    SysReg(sys_reg_number(2, 3, 0x0, 0x1, 0), "mdccsr_el0"),
    SysReg(sys_reg_number(2, 3, 0x0, 0x4, 0), "dbgdtr_el0"),
    SysReg(sys_reg_number(2, 3, 0x0, 0x5, 0), "dbgdtrrx_el0"),
    SysReg(sys_reg_number(2, 3, 0x8, 0x0, 0), "csrcr_el0"),
    SysReg(sys_reg_number(2, 3, 0x8, 0x0, 1), "csrptr_el0"),
    SysReg(sys_reg_number(2, 3, 0x8, 0x0, 2), "csridr_el0"),
    SysReg(sys_reg_number(2, 3, 0x8, 0x0, 3), "csrptridx_el0"),
    SysReg(sys_reg_number(2, 4, 0x0, 0x7, 0), "dbgvcr32_el2"),
    SysReg(sys_reg_number(2, 4, 0x8, 0x0, 0), "csrcr_el2"),
    SysReg(sys_reg_number(2, 4, 0x8, 0x0, 1), "csrptr_el2"),
    SysReg(sys_reg_number(2, 4, 0x8, 0x0, 3), "csrptridx_el2"),
    SysReg(sys_reg_number(2, 4, 0x9, 0x0, 0), "brbcr_el2"),
    SysReg(sys_reg_number(2, 5, 0x8, 0x0, 0), "csrcr_el12"),
    SysReg(sys_reg_number(2, 5, 0x8, 0x0, 1), "csrptr_el12"),
    SysReg(sys_reg_number(2, 5, 0x9, 0x0, 0), "brbcr_el12"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x0, 0), "midr_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x0, 4), "mpuir_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x0, 5), "mpidr_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x0, 6), "revidr_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x1, 0), "id_pfr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x1, 1), "id_pfr1_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x1, 2), "id_dfr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x1, 3), "id_afr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x1, 4), "id_mmfr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x1, 5), "id_mmfr1_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x1, 6), "id_mmfr2_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x1, 7), "id_mmfr3_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x2, 0), "id_isar0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x2, 1), "id_isar1_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x2, 2), "id_isar2_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x2, 3), "id_isar3_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x2, 4), "id_isar4_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x2, 5), "id_isar5_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x2, 6), "id_mmfr4_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x2, 7), "id_isar6_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x3, 0), "mvfr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x3, 1), "mvfr1_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x3, 2), "mvfr2_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x3, 4), "id_pfr2_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x3, 5), "id_dfr1_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x3, 6), "id_mmfr5_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x4, 0), "id_aa64pfr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x4, 1), "id_aa64pfr1_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x4, 4), "id_aa64zfr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x4, 5), "id_aa64smfr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x5, 0), "id_aa64dfr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x5, 1), "id_aa64dfr1_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x5, 4), "id_aa64afr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x5, 5), "id_aa64afr1_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x6, 0), "id_aa64isar0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x6, 1), "id_aa64isar1_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x6, 2), "id_aa64isar2_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x7, 0), "id_aa64mmfr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x7, 1), "id_aa64mmfr1_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x7, 2), "id_aa64mmfr2_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x7, 3), "id_aa64mmfr3_el1"),
    SysReg(sys_reg_number(3, 0, 0x0, 0x7, 4), "id_aa64mmfr4_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x0, 0), "sctlr_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x0, 1), "actlr_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x0, 2), "cpacr_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x0, 3), "sctlr2_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x0, 5), "rgsr_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x0, 6), "gcr_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x2, 0), "zcr_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x2, 1), "trfcr_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x2, 3), "trcitecr_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x2, 4), "smpri_el1"),
    SysReg(sys_reg_number(3, 0, 0x1, 0x2, 6), "smcr_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x0, 0), "ttbr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x0, 1), "ttbr1_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x0, 2), "tcr_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x0, 3), "tcr2_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x1, 0), "apiakeylo_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x1, 1), "apiakeyhi_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x1, 2), "apibkeylo_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x1, 3), "apibkeyhi_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x2, 0), "apdakeylo_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x2, 1), "apdakeyhi_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x2, 2), "apdbkeylo_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x2, 3), "apdbkeyhi_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x3, 0), "apgakeylo_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x3, 1), "apgakeyhi_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x5, 0), "gcscr_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x5, 1), "gcspr_el1"),
    SysReg(sys_reg_number(3, 0, 0x2, 0x5, 2), "gcscre0_el1"),
    SysReg(sys_reg_number(3, 0, 0x4, 0x0, 0), "spsr_el1"),
    SysReg(sys_reg_number(3, 0, 0x4, 0x0, 1), "elr_el1"),
    SysReg(sys_reg_number(3, 0, 0x4, 0x1, 0), "sp_el0"),
    SysReg(sys_reg_number(3, 0, 0x4, 0x2, 0), "spsel"),
    SysReg(sys_reg_number(3, 0, 0x4, 0x2, 2), "currentel"),
    SysReg(sys_reg_number(3, 0, 0x4, 0x2, 3), "pan"),
    SysReg(sys_reg_number(3, 0, 0x4, 0x2, 4), "uao"),
    SysReg(sys_reg_number(3, 0, 0x4, 0x3, 0), "allint"),
    SysReg(sys_reg_number(3, 0, 0x4, 0x6, 0), "icc_pmr_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x1, 0), "afsr0_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x1, 1), "afsr1_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x2, 0), "esr_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x3, 0), "erridr_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x3, 1), "errselr_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x3, 2), "erxgsr_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x4, 0), "erxfr_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x4, 1), "erxctlr_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x4, 2), "erxstatus_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x4, 3), "erxaddr_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x4, 4), "erxpfgf_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x4, 5), "erxpfgctl_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x4, 6), "erxpfgcdn_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x5, 0), "erxmisc0_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x5, 1), "erxmisc1_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x5, 2), "erxmisc2_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x5, 3), "erxmisc3_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x6, 0), "tfsr_el1"),
    SysReg(sys_reg_number(3, 0, 0x5, 0x6, 1), "tfsre0_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x0, 0), "far_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x0, 5), "pfar_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x1, 1), "prenr_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x2, 1), "prselr_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x8, 0), "prbar_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x8, 1), "prlar_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x8, 4), "prbar1_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x8, 5), "prlar1_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x9, 0), "prbar2_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x9, 1), "prlar2_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x9, 4), "prbar3_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0x9, 5), "prlar3_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xa, 0), "prbar4_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xa, 1), "prlar4_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xa, 4), "prbar5_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xa, 5), "prlar5_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xb, 0), "prbar6_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xb, 1), "prlar6_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xb, 4), "prbar7_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xb, 5), "prlar7_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xc, 0), "prbar8_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xc, 1), "prlar8_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xc, 4), "prbar9_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xc, 5), "prlar9_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xd, 0), "prbar10_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xd, 1), "prlar10_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xd, 4), "prbar11_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xd, 5), "prlar11_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xe, 0), "prbar12_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xe, 1), "prlar12_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xe, 4), "prbar13_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xe, 5), "prlar13_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xf, 0), "prbar14_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xf, 1), "prlar14_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xf, 4), "prbar15_el1"),
    SysReg(sys_reg_number(3, 0, 0x6, 0xf, 5), "prlar15_el1"),
    SysReg(sys_reg_number(3, 0, 0x7, 0x4, 0), "par_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0x9, 0), "pmscr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0x9, 1), "pmsnevfr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0x9, 2), "pmsicr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0x9, 3), "pmsirr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0x9, 4), "pmsfcr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0x9, 5), "pmsevfr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0x9, 6), "pmslatfr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0x9, 7), "pmsidr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xa, 0), "pmblimitr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xa, 1), "pmbptr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xa, 3), "pmbsr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xa, 7), "pmbidr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xb, 0), "trblimitr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xb, 1), "trbptr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xb, 2), "trbbaser_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xb, 3), "trbsr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xb, 4), "trbmar_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xb, 6), "trbtrg_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xb, 7), "trbidr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xd, 3), "pmsscr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xe, 1), "pmintenset_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xe, 2), "pmintenclr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xe, 4), "pmuacr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xe, 5), "pmecr_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xe, 6), "pmmir_el1"),
    SysReg(sys_reg_number(3, 0, 0x9, 0xe, 7), "pmiar_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x2, 0), "mair_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x2, 1), "mair2_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x2, 2), "pire0_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x2, 3), "pir_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x2, 4), "por_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x2, 5), "s2por_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x3, 0), "amair_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x3, 1), "amair2_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x4, 0), "lorsa_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x4, 1), "lorea_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x4, 2), "lorn_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x4, 3), "lorc_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x4, 4), "mpamidr_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x4, 7), "lorid_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x5, 0), "mpam1_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x5, 1), "mpam0_el1"),
    SysReg(sys_reg_number(3, 0, 0xa, 0x5, 3), "mpamsm_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x0, 0), "vbar_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x0, 1), "rvbar_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x0, 2), "rmr_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x1, 0), "isr_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x1, 1), "disr_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x8, 0), "icc_iar0_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x8, 1), "icc_eoir0_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x8, 2), "icc_hppir0_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x8, 3), "icc_bpr0_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x8, 4), "icc_ap0r0_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x8, 5), "icc_ap0r1_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x8, 6), "icc_ap0r2_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x8, 7), "icc_ap0r3_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x9, 0), "icc_ap1r0_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x9, 1), "icc_ap1r1_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x9, 2), "icc_ap1r2_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x9, 3), "icc_ap1r3_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0x9, 5), "icc_nmiar1_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xb, 1), "icc_dir_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xb, 3), "icc_rpr_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xb, 5), "icc_sgi1r_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xb, 6), "icc_asgi1r_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xb, 7), "icc_sgi0r_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xc, 0), "icc_iar1_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xc, 1), "icc_eoir1_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xc, 2), "icc_hppir1_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xc, 3), "icc_bpr1_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xc, 4), "icc_ctlr_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xc, 5), "icc_sre_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xc, 6), "icc_igrpen0_el1"),
    SysReg(sys_reg_number(3, 0, 0xc, 0xc, 7), "icc_igrpen1_el1"),
    SysReg(sys_reg_number(3, 0, 0xd, 0x0, 1), "contextidr_el1"),
    SysReg(sys_reg_number(3, 0, 0xd, 0x0, 3), "rcwsmask_el1"),
    SysReg(sys_reg_number(3, 0, 0xd, 0x0, 4), "tpidr_el1"),
    SysReg(sys_reg_number(3, 0, 0xd, 0x0, 5), "accdata_el1"),
    SysReg(sys_reg_number(3, 0, 0xd, 0x0, 6), "rcwmask_el1"),
    SysReg(sys_reg_number(3, 0, 0xd, 0x0, 7), "scxtnum_el1"),
    SysReg(sys_reg_number(3, 0, 0xe, 0x1, 0), "cntkctl_el1"),
    SysReg(sys_reg_number(3, 1, 0x0, 0x0, 0), "ccsidr_el1"),
    SysReg(sys_reg_number(3, 1, 0x0, 0x0, 1), "clidr_el1"),
    SysReg(sys_reg_number(3, 1, 0x0, 0x0, 2), "ccsidr2_el1"),
    SysReg(sys_reg_number(3, 1, 0x0, 0x0, 4), "gmid_el1"),
    SysReg(sys_reg_number(3, 1, 0x0, 0x0, 6), "smidr_el1"),
    SysReg(sys_reg_number(3, 1, 0x0, 0x0, 7), "aidr_el1"),
    SysReg(sys_reg_number(3, 2, 0x0, 0x0, 0), "csselr_el1"),
    SysReg(sys_reg_number(3, 3, 0x0, 0x0, 1), "ctr_el0"),
    SysReg(sys_reg_number(3, 3, 0x0, 0x0, 7), "dczid_el0"),
    SysReg(sys_reg_number(3, 3, 0x2, 0x4, 0), "rndr"),
    SysReg(sys_reg_number(3, 3, 0x2, 0x4, 1), "rndrrs"),
    SysReg(sys_reg_number(3, 3, 0x2, 0x5, 1), "gcspr_el0"),
    SysReg(sys_reg_number(3, 3, 0x4, 0x2, 0), "nzcv"),
    SysReg(sys_reg_number(3, 3, 0x4, 0x2, 1), "daif"),
    SysReg(sys_reg_number(3, 3, 0x4, 0x2, 2), "svcr"),
    SysReg(sys_reg_number(3, 3, 0x4, 0x2, 5), "dit"),
    SysReg(sys_reg_number(3, 3, 0x4, 0x2, 6), "ssbs"),
    SysReg(sys_reg_number(3, 3, 0x4, 0x2, 7), "tco"),
    SysReg(sys_reg_number(3, 3, 0x4, 0x4, 0), "fpcr"),
    SysReg(sys_reg_number(3, 3, 0x4, 0x4, 1), "fpsr"),
    SysReg(sys_reg_number(3, 3, 0x4, 0x5, 0), "dspsr_el0"),
    SysReg(sys_reg_number(3, 3, 0x4, 0x5, 1), "dlr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0x4, 0), "pmicntr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0x6, 0), "pmicfiltr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xc, 0), "pmcr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xc, 1), "pmcntenset_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xc, 2), "pmcntenclr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xc, 3), "pmovsclr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xc, 4), "pmswinc_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xc, 5), "pmselr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xc, 6), "pmceid0_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xc, 7), "pmceid1_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xd, 0), "pmccntr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xd, 1), "pmxevtyper_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xd, 2), "pmxevcntr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xd, 4), "pmzr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xe, 0), "pmuserenr_el0"),
    SysReg(sys_reg_number(3, 3, 0x9, 0xe, 3), "pmovsset_el0"),
    SysReg(sys_reg_number(3, 3, 0xa, 0x2, 4), "por_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x0, 2), "tpidr_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x0, 3), "tpidrro_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x0, 5), "tpidr2_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x0, 7), "scxtnum_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x2, 0), "amcr_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x2, 1), "amcfgr_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x2, 2), "amcgcr_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x2, 3), "amuserenr_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x2, 4), "amcntenclr0_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x2, 5), "amcntenset0_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x2, 6), "amcg1idr_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x3, 0), "amcntenclr1_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x3, 1), "amcntenset1_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x4, 0), "amevcntr00_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x4, 1), "amevcntr01_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x4, 2), "amevcntr02_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x4, 3), "amevcntr03_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x6, 0), "amevtyper00_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x6, 1), "amevtyper01_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x6, 2), "amevtyper02_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0x6, 3), "amevtyper03_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xc, 0), "amevcntr10_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xc, 1), "amevcntr11_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xc, 2), "amevcntr12_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xc, 3), "amevcntr13_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xc, 4), "amevcntr14_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xc, 5), "amevcntr15_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xc, 6), "amevcntr16_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xc, 7), "amevcntr17_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xd, 0), "amevcntr18_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xd, 1), "amevcntr19_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xd, 2), "amevcntr110_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xd, 3), "amevcntr111_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xd, 4), "amevcntr112_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xd, 5), "amevcntr113_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xd, 6), "amevcntr114_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xd, 7), "amevcntr115_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xe, 0), "amevtyper10_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xe, 1), "amevtyper11_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xe, 2), "amevtyper12_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xe, 3), "amevtyper13_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xe, 4), "amevtyper14_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xe, 5), "amevtyper15_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xe, 6), "amevtyper16_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xe, 7), "amevtyper17_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xf, 0), "amevtyper18_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xf, 1), "amevtyper19_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xf, 2), "amevtyper110_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xf, 3), "amevtyper111_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xf, 4), "amevtyper112_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xf, 5), "amevtyper113_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xf, 6), "amevtyper114_el0"),
    SysReg(sys_reg_number(3, 3, 0xd, 0xf, 7), "amevtyper115_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x0, 0), "cntfrq_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x0, 1), "cntpct_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x0, 2), "cntvct_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x0, 5), "cntpctss_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x0, 6), "cntvctss_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x2, 0), "cntp_tval_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x2, 1), "cntp_ctl_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x2, 2), "cntp_cval_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x3, 0), "cntv_tval_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x3, 1), "cntv_ctl_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x3, 2), "cntv_cval_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x8, 0), "pmevcntr0_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x8, 1), "pmevcntr1_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x8, 2), "pmevcntr2_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x8, 3), "pmevcntr3_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x8, 4), "pmevcntr4_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x8, 5), "pmevcntr5_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x8, 6), "pmevcntr6_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x8, 7), "pmevcntr7_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x9, 0), "pmevcntr8_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x9, 1), "pmevcntr9_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x9, 2), "pmevcntr10_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x9, 3), "pmevcntr11_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x9, 4), "pmevcntr12_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x9, 5), "pmevcntr13_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x9, 6), "pmevcntr14_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0x9, 7), "pmevcntr15_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xa, 0), "pmevcntr16_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xa, 1), "pmevcntr17_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xa, 2), "pmevcntr18_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xa, 3), "pmevcntr19_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xa, 4), "pmevcntr20_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xa, 5), "pmevcntr21_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xa, 6), "pmevcntr22_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xa, 7), "pmevcntr23_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xb, 0), "pmevcntr24_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xb, 1), "pmevcntr25_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xb, 2), "pmevcntr26_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xb, 3), "pmevcntr27_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xb, 4), "pmevcntr28_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xb, 5), "pmevcntr29_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xb, 6), "pmevcntr30_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xc, 0), "pmevtyper0_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xc, 1), "pmevtyper1_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xc, 2), "pmevtyper2_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xc, 3), "pmevtyper3_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xc, 4), "pmevtyper4_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xc, 5), "pmevtyper5_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xc, 6), "pmevtyper6_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xc, 7), "pmevtyper7_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xd, 0), "pmevtyper8_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xd, 1), "pmevtyper9_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xd, 2), "pmevtyper10_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xd, 3), "pmevtyper11_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xd, 4), "pmevtyper12_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xd, 5), "pmevtyper13_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xd, 6), "pmevtyper14_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xd, 7), "pmevtyper15_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xe, 0), "pmevtyper16_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xe, 1), "pmevtyper17_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xe, 2), "pmevtyper18_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xe, 3), "pmevtyper19_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xe, 4), "pmevtyper20_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xe, 5), "pmevtyper21_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xe, 6), "pmevtyper22_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xe, 7), "pmevtyper23_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xf, 0), "pmevtyper24_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xf, 1), "pmevtyper25_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xf, 2), "pmevtyper26_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xf, 3), "pmevtyper27_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xf, 4), "pmevtyper28_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xf, 5), "pmevtyper29_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xf, 6), "pmevtyper30_el0"),
    SysReg(sys_reg_number(3, 3, 0xe, 0xf, 7), "pmccfiltr_el0"),
    SysReg(sys_reg_number(3, 4, 0x0, 0x0, 0), "vpidr_el2"),
    SysReg(sys_reg_number(3, 4, 0x0, 0x0, 4), "mpuir_el2"),
    SysReg(sys_reg_number(3, 4, 0x0, 0x0, 5), "vmpidr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x0, 0), "sctlr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x0, 1), "actlr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x0, 3), "sctlr2_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x1, 0), "hcr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x1, 1), "mdcr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x1, 2), "cptr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x1, 3), "hstr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x1, 4), "hfgrtr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x1, 5), "hfgwtr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x1, 6), "hfgitr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x1, 7), "hacr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x2, 0), "zcr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x2, 1), "trfcr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x2, 2), "hcrx_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x2, 3), "trcitecr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x2, 5), "smprimap_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x2, 6), "smcr_el2"),
    SysReg(sys_reg_number(3, 4, 0x1, 0x3, 1), "sder32_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x0, 0), "ttbr0_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x0, 1), "ttbr1_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x0, 2), "tcr_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x0, 3), "tcr2_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x1, 0), "vttbr_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x1, 2), "vtcr_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x2, 0), "vncr_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x5, 0), "gcscr_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x5, 1), "gcspr_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x6, 0), "vsttbr_el2"),
    SysReg(sys_reg_number(3, 4, 0x2, 0x6, 2), "vstcr_el2"),
    SysReg(sys_reg_number(3, 4, 0x3, 0x0, 0), "dacr32_el2"),
    SysReg(sys_reg_number(3, 4, 0x3, 0x1, 0), "hdfgrtr2_el2"),
    SysReg(sys_reg_number(3, 4, 0x3, 0x1, 1), "hdfgwtr2_el2"),
    SysReg(sys_reg_number(3, 4, 0x3, 0x1, 2), "hfgrtr2_el2"),
    SysReg(sys_reg_number(3, 4, 0x3, 0x1, 3), "hfgwtr2_el2"),
    SysReg(sys_reg_number(3, 4, 0x3, 0x1, 4), "hdfgrtr_el2"),
    SysReg(sys_reg_number(3, 4, 0x3, 0x1, 5), "hdfgwtr_el2"),
    SysReg(sys_reg_number(3, 4, 0x3, 0x1, 6), "hafgrtr_el2"),
    SysReg(sys_reg_number(3, 4, 0x4, 0x0, 0), "spsr_el2"),
    SysReg(sys_reg_number(3, 4, 0x4, 0x0, 1), "elr_el2"),
    SysReg(sys_reg_number(3, 4, 0x4, 0x1, 0), "sp_el1"),
    SysReg(sys_reg_number(3, 4, 0x4, 0x3, 0), "spsr_irq"),
    SysReg(sys_reg_number(3, 4, 0x4, 0x3, 1), "spsr_abt"),
    SysReg(sys_reg_number(3, 4, 0x4, 0x3, 2), "spsr_und"),
    SysReg(sys_reg_number(3, 4, 0x4, 0x3, 3), "spsr_fiq"),
    SysReg(sys_reg_number(3, 4, 0x5, 0x0, 1), "ifsr32_el2"),
    SysReg(sys_reg_number(3, 4, 0x5, 0x1, 0), "afsr0_el2"),
    SysReg(sys_reg_number(3, 4, 0x5, 0x1, 1), "afsr1_el2"),
    SysReg(sys_reg_number(3, 4, 0x5, 0x2, 0), "esr_el2"),
    SysReg(sys_reg_number(3, 4, 0x5, 0x2, 3), "vsesr_el2"),
    SysReg(sys_reg_number(3, 4, 0x5, 0x3, 0), "fpexc32_el2"),
    SysReg(sys_reg_number(3, 4, 0x5, 0x6, 0), "tfsr_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x0, 0), "far_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x0, 4), "hpfar_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x0, 5), "pfar_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x1, 1), "prenr_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x2, 1), "prselr_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x8, 0), "prbar_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x8, 1), "prlar_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x8, 4), "prbar1_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x8, 5), "prlar1_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x9, 0), "prbar2_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x9, 1), "prlar2_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x9, 4), "prbar3_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0x9, 5), "prlar3_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xa, 0), "prbar4_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xa, 1), "prlar4_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xa, 4), "prbar5_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xa, 5), "prlar5_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xb, 0), "prbar6_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xb, 1), "prlar6_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xb, 4), "prbar7_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xb, 5), "prlar7_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xc, 0), "prbar8_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xc, 1), "prlar8_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xc, 4), "prbar9_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xc, 5), "prlar9_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xd, 0), "prbar10_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xd, 1), "prlar10_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xd, 4), "prbar11_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xd, 5), "prlar11_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xe, 0), "prbar12_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xe, 1), "prlar12_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xe, 4), "prbar13_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xe, 5), "prlar13_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xf, 0), "prbar14_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xf, 1), "prlar14_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xf, 4), "prbar15_el2"),
    SysReg(sys_reg_number(3, 4, 0x6, 0xf, 5), "prlar15_el2"),
    SysReg(sys_reg_number(3, 4, 0x9, 0x9, 0), "pmscr_el2"),
    SysReg(sys_reg_number(3, 4, 0x9, 0xa, 4), "pmsdsfr_el1"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x1, 1), "mair2_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x2, 0), "mair_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x2, 2), "pire0_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x2, 3), "pir_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x2, 4), "por_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x2, 5), "s2pir_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x3, 0), "amair_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x3, 1), "amair2_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x4, 0), "mpamhcr_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x4, 1), "mpamvpmv_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x5, 0), "mpam2_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x6, 0), "mpamvpm0_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x6, 1), "mpamvpm1_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x6, 2), "mpamvpm2_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x6, 3), "mpamvpm3_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x6, 4), "mpamvpm4_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x6, 5), "mpamvpm5_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x6, 6), "mpamvpm6_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x6, 7), "mpamvpm7_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x8, 0), "mecid_p0_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x8, 1), "mecid_a0_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x8, 2), "mecid_p1_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x8, 3), "mecid_a1_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x8, 7), "mecidr_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x9, 0), "vmecid_p_el2"),
    SysReg(sys_reg_number(3, 4, 0xa, 0x9, 1), "vmecid_a_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x0, 0), "vbar_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x0, 1), "rvbar_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x0, 2), "rmr_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x1, 1), "vdisr_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x8, 0), "ich_ap0r0_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x8, 1), "ich_ap0r1_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x8, 2), "ich_ap0r2_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x8, 3), "ich_ap0r3_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x9, 0), "ich_ap1r0_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x9, 1), "ich_ap1r1_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x9, 2), "ich_ap1r2_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x9, 3), "ich_ap1r3_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0x9, 5), "icc_sre_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xb, 0), "ich_hcr_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xb, 1), "ich_vtr_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xb, 2), "ich_misr_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xb, 3), "ich_eisr_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xb, 5), "ich_elrsr_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xb, 7), "ich_vmcr_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xc, 0), "ich_lr0_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xc, 1), "ich_lr1_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xc, 2), "ich_lr2_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xc, 3), "ich_lr3_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xc, 4), "ich_lr4_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xc, 5), "ich_lr5_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xc, 6), "ich_lr6_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xc, 7), "ich_lr7_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xd, 0), "ich_lr8_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xd, 1), "ich_lr9_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xd, 2), "ich_lr10_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xd, 3), "ich_lr11_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xd, 4), "ich_lr12_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xd, 5), "ich_lr13_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xd, 6), "ich_lr14_el2"),
    SysReg(sys_reg_number(3, 4, 0xc, 0xd, 7), "ich_lr15_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x0, 1), "contextidr_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x0, 2), "tpidr_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x0, 7), "scxtnum_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x8, 0), "amevcntvoff00_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x8, 1), "amevcntvoff01_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x8, 2), "amevcntvoff02_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x8, 3), "amevcntvoff03_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x8, 4), "amevcntvoff04_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x8, 5), "amevcntvoff05_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x8, 6), "amevcntvoff06_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x8, 7), "amevcntvoff07_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x9, 0), "amevcntvoff08_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x9, 1), "amevcntvoff09_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x9, 2), "amevcntvoff010_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x9, 3), "amevcntvoff011_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x9, 4), "amevcntvoff012_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x9, 5), "amevcntvoff013_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x9, 6), "amevcntvoff014_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0x9, 7), "amevcntvoff015_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xa, 0), "amevcntvoff10_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xa, 1), "amevcntvoff11_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xa, 2), "amevcntvoff12_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xa, 3), "amevcntvoff13_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xa, 4), "amevcntvoff14_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xa, 5), "amevcntvoff15_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xa, 6), "amevcntvoff16_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xa, 7), "amevcntvoff17_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xb, 0), "amevcntvoff18_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xb, 1), "amevcntvoff19_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xb, 2), "amevcntvoff110_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xb, 3), "amevcntvoff111_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xb, 4), "amevcntvoff112_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xb, 5), "amevcntvoff113_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xb, 6), "amevcntvoff114_el2"),
    SysReg(sys_reg_number(3, 4, 0xd, 0xb, 7), "amevcntvoff115_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x0, 3), "cntvoff_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x0, 6), "cntpoff_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x1, 0), "cnthctl_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x2, 0), "cnthp_tval_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x2, 1), "cnthp_ctl_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x2, 2), "cnthp_cval_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x3, 0), "cnthv_tval_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x3, 1), "cnthv_ctl_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x3, 2), "cnthv_cval_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x4, 0), "cnthvs_tval_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x4, 1), "cnthvs_ctl_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x4, 2), "cnthvs_cval_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x5, 0), "cnthps_tval_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x5, 1), "cnthps_ctl_el2"),
    SysReg(sys_reg_number(3, 4, 0xe, 0x5, 2), "cnthps_cval_el2"),
    SysReg(sys_reg_number(3, 5, 0x1, 0x0, 0), "sctlr_el12"),
    SysReg(sys_reg_number(3, 5, 0x1, 0x0, 2), "cpacr_el12"),
    SysReg(sys_reg_number(3, 5, 0x1, 0x0, 3), "sctlr2_el12"),
    SysReg(sys_reg_number(3, 5, 0x1, 0x2, 0), "zcr_el12"),
    SysReg(sys_reg_number(3, 5, 0x1, 0x2, 1), "trfcr_el12"),
    SysReg(sys_reg_number(3, 5, 0x1, 0x2, 3), "trcitecr_el12"),
    SysReg(sys_reg_number(3, 5, 0x1, 0x2, 6), "smcr_el12"),
    SysReg(sys_reg_number(3, 5, 0x2, 0x0, 0), "ttbr0_el12"),
    SysReg(sys_reg_number(3, 5, 0x2, 0x0, 1), "ttbr1_el12"),
    SysReg(sys_reg_number(3, 5, 0x2, 0x0, 2), "tcr_el12"),
    SysReg(sys_reg_number(3, 5, 0x2, 0x0, 3), "tcr2_el12"),
    SysReg(sys_reg_number(3, 5, 0x2, 0x5, 0), "gcscr_el12"),
    SysReg(sys_reg_number(3, 5, 0x2, 0x5, 1), "gcspr_el12"),
    SysReg(sys_reg_number(3, 5, 0x4, 0x0, 0), "spsr_el12"),
    SysReg(sys_reg_number(3, 5, 0x4, 0x0, 1), "elr_el12"),
    SysReg(sys_reg_number(3, 5, 0x5, 0x1, 0), "afsr0_el12"),
    SysReg(sys_reg_number(3, 5, 0x5, 0x1, 1), "afsr1_el12"),
    SysReg(sys_reg_number(3, 5, 0x5, 0x2, 0), "esr_el12"),
    SysReg(sys_reg_number(3, 5, 0x5, 0x6, 0), "tfsr_el12"),
    SysReg(sys_reg_number(3, 5, 0x6, 0x0, 0), "far_el12"),
    SysReg(sys_reg_number(3, 5, 0x6, 0x0, 5), "pfar_el12"),
    SysReg(sys_reg_number(3, 5, 0x9, 0x9, 0), "pmscr_el12"),
    SysReg(sys_reg_number(3, 5, 0xa, 0x2, 0), "mair_el12"),
    SysReg(sys_reg_number(3, 5, 0xa, 0x2, 1), "mair2_el12"),
    SysReg(sys_reg_number(3, 5, 0xa, 0x2, 2), "pire0_el12"),
    SysReg(sys_reg_number(3, 5, 0xa, 0x2, 3), "pir_el12"),
    SysReg(sys_reg_number(3, 5, 0xa, 0x2, 4), "por_el12"),
    SysReg(sys_reg_number(3, 5, 0xa, 0x3, 0), "amair_el12"),
    SysReg(sys_reg_number(3, 5, 0xa, 0x3, 1), "amair2_el12"),
    SysReg(sys_reg_number(3, 5, 0xa, 0x5, 0), "mpam1_el12"),
    SysReg(sys_reg_number(3, 5, 0xc, 0x0, 0), "vbar_el12"),
    SysReg(sys_reg_number(3, 5, 0xd, 0x0, 1), "contextidr_el12"),
    SysReg(sys_reg_number(3, 5, 0xd, 0x0, 7), "scxtnum_el12"),
    SysReg(sys_reg_number(3, 5, 0xe, 0x1, 0), "cntkctl_el12"),
    SysReg(sys_reg_number(3, 5, 0xe, 0x2, 0), "cntp_tval_el02"),
    SysReg(sys_reg_number(3, 5, 0xe, 0x2, 1), "cntp_ctl_el02"),
    SysReg(sys_reg_number(3, 5, 0xe, 0x2, 2), "cntp_cval_el02"),
    SysReg(sys_reg_number(3, 5, 0xe, 0x3, 0), "cntv_tval_el02"),
    SysReg(sys_reg_number(3, 5, 0xe, 0x3, 1), "cntv_ctl_el02"),
    SysReg(sys_reg_number(3, 5, 0xe, 0x3, 2), "cntv_cval_el02"),
    SysReg(sys_reg_number(3, 6, 0x1, 0x0, 0), "sctlr_el3"),
    SysReg(sys_reg_number(3, 6, 0x1, 0x0, 1), "actlr_el3"),
    SysReg(sys_reg_number(3, 6, 0x1, 0x0, 3), "sctlr2_el3"),
    SysReg(sys_reg_number(3, 6, 0x1, 0x1, 0), "scr_el3"),
    SysReg(sys_reg_number(3, 6, 0x1, 0x1, 1), "sder32_el3"),
    SysReg(sys_reg_number(3, 6, 0x1, 0x1, 2), "cptr_el3"),
    SysReg(sys_reg_number(3, 6, 0x1, 0x2, 0), "zcr_el3"),
    SysReg(sys_reg_number(3, 6, 0x1, 0x2, 6), "smcr_el3"),
    SysReg(sys_reg_number(3, 6, 0x1, 0x3, 1), "mdcr_el3"),
    SysReg(sys_reg_number(3, 6, 0x2, 0x0, 0), "ttbr0_el3"),
    SysReg(sys_reg_number(3, 6, 0x2, 0x0, 2), "tcr_el3"),
    SysReg(sys_reg_number(3, 6, 0x2, 0x1, 4), "gptbr_el3"),
    SysReg(sys_reg_number(3, 6, 0x2, 0x1, 6), "gpccr_el3"),
    SysReg(sys_reg_number(3, 6, 0x2, 0x5, 0), "gcscr_el3"),
    SysReg(sys_reg_number(3, 6, 0x2, 0x5, 1), "gcspr_el3"),
    SysReg(sys_reg_number(3, 6, 0x4, 0x0, 0), "spsr_el3"),
    SysReg(sys_reg_number(3, 6, 0x4, 0x0, 1), "elr_el3"),
    SysReg(sys_reg_number(3, 6, 0x4, 0x1, 0), "sp_el2"),
    SysReg(sys_reg_number(3, 6, 0x5, 0x1, 0), "afsr0_el3"),
    SysReg(sys_reg_number(3, 6, 0x5, 0x1, 1), "afsr1_el3"),
    SysReg(sys_reg_number(3, 6, 0x5, 0x2, 0), "esr_el3"),
    SysReg(sys_reg_number(3, 6, 0x5, 0x6, 0), "tfsr_el3"),
    SysReg(sys_reg_number(3, 6, 0x6, 0x0, 0), "far_el3"),
    SysReg(sys_reg_number(3, 6, 0x6, 0x0, 5), "mfar_el3"),
    SysReg(sys_reg_number(3, 6, 0xa, 0x1, 1), "mair2_el3"),
    SysReg(sys_reg_number(3, 6, 0xa, 0x2, 0), "mair_el3"),
    SysReg(sys_reg_number(3, 6, 0xa, 0x2, 3), "pir_el3"),
    SysReg(sys_reg_number(3, 6, 0xa, 0x2, 4), "por_el3"),
    SysReg(sys_reg_number(3, 6, 0xa, 0x3, 0), "amair_el3"),
    SysReg(sys_reg_number(3, 6, 0xa, 0x3, 1), "amair2_el3"),
    SysReg(sys_reg_number(3, 6, 0xa, 0x5, 0), "mpam3_el3"),
    SysReg(sys_reg_number(3, 6, 0xa, 0xa, 1), "mecid_rl_a_el3"),
    SysReg(sys_reg_number(3, 6, 0xc, 0x0, 0), "vbar_el3"),
    SysReg(sys_reg_number(3, 6, 0xc, 0x0, 1), "rvbar_el3"),
    SysReg(sys_reg_number(3, 6, 0xc, 0x0, 2), "rmr_el3"),
    SysReg(sys_reg_number(3, 6, 0xc, 0xc, 4), "icc_ctlr_el3"),
    SysReg(sys_reg_number(3, 6, 0xc, 0xc, 5), "icc_sre_el3"),
    SysReg(sys_reg_number(3, 6, 0xc, 0xc, 7), "icc_igrpen1_el3"),
    SysReg(sys_reg_number(3, 6, 0xd, 0x0, 2), "tpidr_el3"),
    SysReg(sys_reg_number(3, 6, 0xd, 0x0, 7), "scxtnum_el3"),
    SysReg(sys_reg_number(3, 7, 0xe, 0x2, 0), "cntps_tval_el1"),
    SysReg(sys_reg_number(3, 7, 0xe, 0x2, 1), "cntps_ctl_el1"),
    SysReg(sys_reg_number(3, 7, 0xe, 0x2, 2), "cntps_cval_el1"),
];

/// Get the system register name from the system register number if it exists.
/// Returns None if the system register is not found.
pub fn get_sys_reg_name(sys_reg: u32) -> Option<&'static SysReg> {
    // As the array above is sorted by the system register number, we can use binary
    // search to find the system register.

    SYS_REGS
        .binary_search_by_key(&sys_reg, |&SysReg(num, _)| num)
        .ok()
        .map(|idx| &SYS_REGS[idx])
}
