Remove asm volatile keyword for better performance and fix some bugs in tests