New York -- GMAC LLC, the finance company partly owned by General Motors Corp., is negotiating terms of a $3.5 billion loan for its struggling mortgage subsidiary Residential Capital LLC to keep it out of bankruptcy in hopes of finding a buyer or breaking it up, Bloomberg reported.

ResCap, the eighth-largest U.S. residential lender in 2007, said Monday that it will not be able to pay its debt obligations unless it comes up with an additional $600 million by the end of June.

ResCap is seeking a $3.5 billion credit line from GMAC. Themortgage unit is also asking GMAC to retire $350 million of outstanding debt and extend an additional $150 million through an existing line of credit, the company said in an SEC filing.

On Monday, ResCap began offering as little as 80 cents on the dollar to exchange or buy back $14 billion of bonds to extend maturities until 2010 or 2015 and stave off bankruptcy.

ResCap has lost $5.3 billion in the past six quarters, Bloomberg reported.

Last week, losses at ResCap contributed to a $589 million first quarter loss at GMAC. GM last week said that $276 million of its $3.3 billion first-quarter loss was due to its stake in the finance company.