EZ: Towards Efficient Asynchronous Protocol Gateway Construction