WIP: Fix inline assembly

Note: Rebased on top of another PR.

* [x] Implement read+write
* [ ] Sanitize options
* [ ] Fix liveness