the signal handling code isn't shown, but basically, in the first version, the first thing that happens off the bottom of the loop is saving k and x to the stack. This is good for performance, because signal handling is a rare operation, avoiding the spilling cost within the loop