In the raydium protocol,how amm and orderbook are integrated?I want to know how the output amount is calculated and to try simulating that in at hand.