rsi: make rsi_dbg a regular function