__restore_interrupt restores the state of the I bit in the status register to the value saved in x.
The value of x is returned from the __disable_interrupt, __enable_interrupt, and __save_interrupt intrinsic functions and is simply the previous value of the status register.
__restore_interrupt is an intrinsic function and produces inline code.