The way to tell what the government gets back is to look at any item that says "lending," "loan," "credit" or "facility."
Here's a slightly more detailed accounting:
This is a bit out of date, but the first thing to note is that of the amount potentially allocated, most of it has not yet been used. The peculiar psychology of the international bond and banking markets is that during a panic, if the government says we're ready to step in with X dollars to prevent a collapse, then there is no panic, and the amount X never actually has to get used. That's also why so many of the items are "guarantees" many of which have not had to be used.
The biggest chunk is the Fed's various bailouts. Despite the hysteria you hear about the Fed "shoveling money" to "greedy fatcats," generally, the Fed makes money on these loans. The commercial paper facility ($270 billion as of December, but may have been as high as $1.8 trillion) has already been paid back and re-lent; that's because commercial paper is very short term (30, 60, 90 days), and the program started in September. It's like a giant revolving credit account that corporations, that used to borrow from money market funds, now borrow from until the money market/commercial paper market returns to normal. Again, this is fairly profitable to the Fed.
Another big chunk of the Fed's program is lending to other central banks ("foreign exchange dollar swaps" in the OP at $327 billion). Since no central banks have collapsed, all of this money is likely to be paid back, although there may be losses or profit to the Fed as a result of the movements of currencies compared to dollars and each other.
Barney Frank says that he still believes that TARP will make money for the government ($350 billion). The TARP involved the Treasury buying preferred stock in banks and warrants to buy common stock, and the preferred stock pays dividends, so the recipients have already paid billions in dividends on the preferred to the government. Some banks are already offering to sell the preferred back to the government at face value, which means that the government will have made money on those bailouts (face value plus dividends).
So, as you can see, much of the bailout was simply lending and telling the financial sector, we'll backstop certain institutions; it was not a "giveaway".
If you want a big picture perspective, look at it this way. We used to have a functioning banking and lending system. There were trillions and trillions of dollars of savings that were being lent to corporations and individuals. That system collapsed. The trillions of savings fled to the safest investment on the planet -- lending to the federal government through the purchase of treasury bills. The federal government in turn stepped in and became the biggest bank in the world, taking over many of those lending functions.
As a result, a lot of the profits that the bank lending system used to make, are now being made by the federal government.
I will confess, however, that for some people it's much more "fun" to scream about the government giving away money to "fat cats" and putting us in debt forever, than adding up the tallies on spread sheets.
That said, this accounting is why I am opposed to Geithner's plan. Geithner's plan is genuinely a giveaway to the financial sector, and worst of all, it's a giveaway to hedge funds who hardly need it.