Eh? Most processors really do "remember" IRQs raised while the status register has them disabled and trigger them when you CLI or equivalent.

Why are the IRQs firing in the first place?