Tory Lanez might not be staring down a 22-year prison sentence if he'd hired renowned defense attorney Jose Baez during the trial ... at least according to Baez, who's feeling good about winning an appeal.
Tory's new high-powered lawyer -- who famously won an acquittal for Casey Anthony -- joined us Tuesday on "TMZ Live," saying he's ready to go all out for Tory too, but, interestingly ... said he regrets the fact Tory didn't call him in for the trial.
While Baez wouldn't reveal too many specifics prior to going before the judge, he strongly insinuated there were things he would've done differently if he were repping Lanez during his trial for shooting Megan Thee Stallion.
That being said, he told us he's confident there were procedural errors made -- partly because it was a high-profile trial -- and that will be the foundation of Tory's appeal of the conviction.
As for how Tory's doing in jail while awaiting sentencing ... Baez says his client's never been convicted before, so he's never gone through anything like this, but says he's trying to make adjustments.
As we reported, Lanez pulled out all the stops last week, retaining David Kenner, Matthew Barhoma and Baez to work on his appeal.