pub(super) fn align_metadata_address(
    spec: &SideMetadataSpec,
    metadata_addr: Address,
    bit: u8
) -> (Address, u8)
Expand description

Align an pair of a metadata address and a metadata bit offset to the start of this metadata value. For example, when the metadata is 4 bits, it should only start at bit 0 or bit 4. When the metadata is 16 bits, it should only start at bit 0, and its metadata address should be aligned to 2 bytes. This is important, as contiguous_meta_address_to_address can only convert the start address of metadata to the data address.