incorporated assembly functions from f265 project, commit 5f455c48f78f979f21eb46061f0e54cf34244a94