AMD interview question

Draw state diagram