A profit , after five years of losses , would be critical to GM 's ability to float a stock offering to repay some of the $ 52-billion investment and loans the federal government has poured into the company over the last year .