Reverse state and inputs in higher-order cpu