Position a rack in the center of the oven and preheat to 400 degrees F.
Heat the oil in a heavy medium saucepan over medium heat. Add the garlic and onions. Add 1 teaspoon salt and 1/2 teaspoon pepper. Cook until the onion is tender, about 4 minutes. Stir in the cocoa powder. Add the broth, rosemary, vinegar and tomatoes. Bring the sauce to a simmer. Cover the pan. Reduce the heat to low and simmer for 10 minutes, stirring occasionally. Season with salt and pepper. Remove the pan from the heat.
Whisk the cocoa powder, allspice, dark brown sugar, salt and pepper in a small bowl to blend.
Place the pork on a heavy nonstick baking sheet. Rub the allspice mixture over the pork. Drizzle with olive oil and roast until a thermometer inserted into the center of the pork registers 145 degrees F, 25 to 30 minutes. Tent loosely with foil and let rest 10 minutes.
Cut the pork crosswise into 1/2-inch-thick slices. Arrange the slices on a platter. Spoon the sauce over the pork and serve.