Real estate franchisor and brokerage Realogy Corp. said it turned a $58 million profit in the third quarter, thanks in part to a debt restructuring that allowed the company to claim a $75 million gain and stay in compliance with agreements governing nearly $3 billion in loans. Realogy said commission revenue was down 13 percent from a year ago, to $878 million — the main factor driving a decline in net revenue of the same magnitude, to $1.17 billion. But Realogy cut expenses even more drastically — by 20 percent, to $1.11 billion. Realogy reported a decrease of $89 million in commission expenses paid to real estate agents at company-owned offices as a result of a reduction in revenue and receiving a larger share of the commission-split rate. Realogy also reduced operating costs by 22 percent from a year ago, to $309 million, and slashed marketing expenditures for the quarter by 24 percent, to $38 million.