Step 1
To make the pickled apples, in a small pot, combine ¼ cup water with vinegar, sugar, allspice, coriander and salt. Bring to a simmer and cook, stirring, until sugar dissolves, 2 to 3 minutes.
Step 2
Put apples and jalapeños in a medium heatproof bowl or jar, and pour hot vinegar mixture on top. Let cool to room temperature and let pickle for at least 2 hours. (Mixture can be made up to 1 week ahead and stored in the refrigerator.)
Step 3
Rub pork all over with rosemary, fennel seeds, salt and pepper. Refrigerate, fat side up and uncovered, for at least 2 hours and up to overnight.
Step 4
Heat oven to 425 degrees. Place pork on a rimmed 11-by-18-inch sheet pan. Scatter apples, onion, garlic and cinnamon stick in an even layer around pork loin. Transfer baking sheet to oven rack, and add chicken stock, then carefully pour in cider (it’s best to position pan in oven, then pour in liquid). You may not need all of the cider here. You can add more later as it roasts—stop if it threatens to overflow.
Step 5
Roast until pork reaches 135 degrees internally, 35 to 50 minutes. Keep an eye on the pork. If all the cider evaporates and baking dish starts to burn while the pork is cooking, add a splash more cider.
Step 6
Transfer pork to a cutting board, tent with foil, and let it rest for 10 minutes.
Step 7
Meanwhile, transfer roasted apples, onions and garlic to a serving platter (discard cinnamon sticks). Scrape jus and any golden bits from baking sheet into a small pot, and bring to a simmer (add a little more chicken stock if needed). Whisk in butter and a pinch of salt and cook until the sauce is reduced by about a third (you just want to thicken it up a bit), 3 to 7 minutes. Pour in any juices from the cutting board where the pork loin is resting.
Step 8
Slice pork and place on a serving platter, along with the roasted apples and onions. Drizzle some of the sauce and also some of the liquid from the pickled apples on top. Garnish with the rosemary, and serve with pickled apples and jalapeños alongside.