Replace `.as_imm_buf` with `.as_ptr` and `.as_mut_buf` with `.as_mut_ptr`