Restore_flags puts the cpu flags back to what was were saved before
cli(). This includes resetting the interrupt flag to whatever it was
before cli() was issued. In some cases sti() is not safe because IF
may already be masked, safer to save the current state then restore it
instead of assuming IF was already 1.