That's a job for a planer. With a planer sled, you can flatten stuff as wide as the planer. You use a flat board as a base, with a small stop block on one end. If the board is warped, you place small wedges between base and board until the board is stable. Don't take off too much. Better to run it through a couple of times until the side is flat, then you can run the otherside without the sled.
There are also very simple jigs you can make to hold an uneven edge in place to make a straight edge. Just make sure the blade is exactly 90to the table. You can also joint an edge with a router table with a split fence. Just add a spacer behind the outfeed side and and run the board through. But I like the table saw jig better. Plenty of videos on these jigs.