Added optimized inline assembly thunks. Thanks to the original author.