October 13, 2020 | 8:37pm

If anyone knows Dak Prescott’s pain, it’s Alex Smith.

Just hours before Prescott’s gruesome ankle injury on Sunday, Smith returned from his own lengthy absence, playing for the first time since November 2018. At that time, he broke his right tibia and fibula and nearly faced amputation after the wound became infected.

Smith, who underwent 17 surgeries to save his leg, said on the Dan Patrick show Tuesday that he considered sending the Cowboys quarterback a consolatory text after seeing the horrific injury — a compound ankle fracture and dislocation — live.

“I feel like I’ve become a little bit of an expert with the lower leg, so I knew it looked like his ankle immediately,” Smith said on the Dan Patrick Show. “I’ve been thinking about him a lot. I’ve checked up on him through our mutual friends. I thought a lot about shooting him a text, but part of me also didn’t want to scare the hell out of him by shooting him a text and getting him thinking he might be headed down this road. I’ll let the infection risk kind of get out of the way and hopefully reach out here soon.

Alex Smith; Dak Prescott
Alex Smith; Dak PrescottGetty Images (2)

“For me, especially with Dak, I feel like we have a ton in common,” Smith added. “Because he played for my same coaches up in college. Dan Mullen coached him in college, my good friend Brian Johnson was his quarterbacks coach all through college. Dak’s a guy I keep up with a lot, certainly in the division as well, so I have a ton of respect for him. I love his game. I love him as a human being, everything he’s about, so I had just gotten home from our game, celebrating and taking it all in with my wife and kids. We had the Cowboy game on, so I watched it happen live.”

Prescott has been discharged from the hospital after a successful operation, and is now recovering at home. Smith went 9-17 for 37 yards after entering the game in relief of Kyle Allen.