Preheat the oven to 350°F (180°C). If you have a convection setting, turn that on as well.
To prepare the rosemary pork loin, peel the carrots and cut the garlic heads in half lengthwise. If needed, remove the fatty parts and the membrane from the meat.
Oil the bottom of a 9×13 baking dish. Place the carrots and garlic heads in the dish. Add 4-5 fresh rosemary sprigs. Pour in 1/4 cup of white wine and the same amount of water.
Season the whole pork loin with salt and freshly ground black pepper. Place it on top of the vegetables and arrange the remaining rosemary sprigs over it.
Put it in the oven for about 90 minutes; there is no need to cover it. While it bakes, spoon a few tablespoons of the pan juices over the roast after 30, 60, and 75 minutes. Remove it from the oven and let it rest for 10 minutes, covered with aluminum foil.
Rosemary gravy
For the rosemary gravy, remove the carrots, garlic, and rosemary sprigs from the baking dish. Set the dish over low heat on the stove with the meat juices still in it. Add the flour, stir, and let it cook for 1-2 minutes.
Pour in 1/2 cup of white wine. Stir until smooth and cook for 2 minutes so the alcohol evaporates and the gravy thickens.
Pour in 1/2 cup of water, stir, and add 1 fresh rosemary sprig. Cook for 2 minutes so it thickens slightly. Taste and add salt if needed.
Add the butter, stir until it melts completely, and immediately turn off the heat.