fn decommit_into_memory<M: Memory>(
        &mut self,
        monotonic_cycle_counter: u32,
        partial_query: DecommittmentQuery,
        memory: &mut M,
    ) -> anyhow::Result<Option<Vec<U256>>> {
        assert!(partial_query.is_fresh);
        self.decommitment_requests.push((), partial_query.timestamp);

        let versioned_hash = VersionedCodeHash::from_query(&partial_query);
        let stored_hash = versioned_hash.to_stored_hash();
        // We are fetching a fresh bytecode that we didn't read before.
        let values = self.get_bytecode(stored_hash, partial_query.timestamp);
        let page_to_use = partial_query.memory_page;
        let timestamp = partial_query.timestamp;

        // Create a template query, that we'll use for writing into memory.
        // value & index are set to 0 - as they will be updated in the inner loop below.
        let mut tmp_q = MemoryQuery {
            timestamp,
            location: MemoryLocation {
                memory_type: MemoryType::Code,
                page: page_to_use,
                index: MemoryIndex(0),
            },
            value: U256::zero(),
            value_is_pointer: false,
            rw_flag: true,
        };
        self.decommitted_code_hashes
            .insert(stored_hash, Some(page_to_use.0), timestamp);

        // Copy the bytecode (that is stored in 'values' Vec) into the memory page.
        if B {
            for (i, value) in values.iter().enumerate() {
                tmp_q.location.index = MemoryIndex(i as u32);
                tmp_q.value = *value;
                memory.specialized_code_query(monotonic_cycle_counter, tmp_q);
            }
            // If we're in the witness mode - we also have to return the values.
            Ok(Some(values))
        } else {
            for (i, value) in values.into_iter().enumerate() {
                tmp_q.location.index = MemoryIndex(i as u32);
                tmp_q.value = value;
                memory.specialized_code_query(monotonic_cycle_counter, tmp_q);
            }

            Ok(None)
        }
    }
Loads a given bytecode hash into memory (see trait description for more details).
core/lib/multivm/src/versions/vm_latest/old_vm/oracles/decommitter.rs