Use a port a power and push it back out the best you can. If there are any bent parts you are in luck because the teryx cage is made up of multiple pieces that all just bolt together and they are not real expensive. Replace any parts that got bent very much because they will be weaker after your roll over.
If the cage is trashed have a custom cage made. The stock cage isnít awesome.
The frame itself is fairly robust, if you bent the frame it is most likely the half round frame extensions where the cage uprights are bolted on. A portapower is basically a small hydraulic jack with extensions and multiple ends that can be used to do some pretty heavy duty pushing/bending.
As stated above you can buy each piece of the rollcage. If you look at the cage and follow it down you can see where it bolts on to the frame at the A, B, and C pillars....look for two big bolts right where the body plastics starts at each location. Did a quick look at the parts catalog online and if you got the entire cage it's probably around $1,000. Looks to be 11 pieces, though good chance not all of them would need replaced. Any tube that has any deformation (kinking, bend, etc...) should be replaced as you have lost some strength in it. For that price, and if you plan to keep running it the same way, you might want to look into having a custom cage built. That $1,000 would go a long way to a custom one and would have a much bettter chance of surviving without damage.