Toreador will book a net gain of about $21.2 million in the third quarter from the deal.