What did Henry IV have to do to regain control of France after a period of civil war?

Switch allegiance from Spain to England
Pull the nation out of the Thirty Years' War
Grant freedom to Protestants
Personally change from Protestantism to Catholicism