This has been covered million time before, but even though Goldman repaid the tarp loans, they are still getting loans through the fed since they decided to buy a consumer bank for that exact purpose.
Also, the bailout of AIG was really a bailout of Goldman. In other words, AIG got bailed out so that they could pay Goldman their enormous losses on securities that they bought from Goldman.
So yes, they would have gotten those bonuses regardless, and no, you can't say they would have failed without it.