Analog Devices interview question

A state machine question for complex input signal.