unsafe fn gen_get_values(
        &mut self,
        builder: LLVMBuilderRef,
        ptr: LLVMValueRef,
        size: LLVMValueRef,
        buffer: LLVMValueRef,
        position: LLVMValueRef,
    ) -> WeldResult<LLVMValueRef> {
        let elem_size = self.size_of(LLVMGetElementType(LLVMTypeOf(ptr)));
        let size = LLVMBuildNSWMul(builder, size, elem_size, c_str!(""));

        let pointer = self.gen_at(builder, &SER_TY, buffer, position)?;

        // Write the value.
        let pointer_untyped =
            LLVMBuildBitCast(builder, ptr, LLVMPointerType(self.i8_type(), 0), c_str!(""));
        self.intrinsics
            .call_memcpy(builder, pointer_untyped, pointer, size);
        let new_position = LLVMBuildAdd(builder, position, size, c_str!(""));
        Ok(new_position)
    }
Write a series of values from the serialization buffer and update offset.

The passed pointer should have enough allocated space to hold the deserialized values; this
method does not perform allocation.
weld/src/codegen/llvm2/serde.rs