Gainwell Technologies is in talks to replace nearly $5.7 billion of leveraged loans, which would be the biggest refinancing from the beleaguered US software industry this year.