If Marissa Mayer, chief executive officer and president of Yahoo, gets discharged from her role, she could leave the company with a golden parachute worth millions.
Factoring in two separate scenarios as well as the terms of Mayer’s employment contract, accessible via the Securities and Exchange Commission’s website, the chief exec could leave either with $37 million or $12.5 million, CNNMoney reports. Which payout depends on the circumstances of her hypothetical departure.
Get Data Sheet, Fortune’s technology newsletter.
Yahoo (YHOO) is, of course, exploring a sale of its core Internet business. If Mayer were get the ax after helping to facilitate a deal, then her stock awards would immediately vest, landing her the bigger payday.
“She would get to take home three years salary ($3 million), roughly $9.5 million in stock awards that are scheduled to vest over the course of 2016 and about $24.5 million worth of awards that are scheduled to vest down the road,” according to CNNMoney’s calculations. That adds up to a total of $37 million.
For more on Yahoo’s Marissa Mayer, watch:
In the second scenario—that Mayer gets fired prior to a sale—she would make about a third of that sum. In total, $12.5 million: “$1 million in salary, a $2 million cash bonus and $9.5 million in stock that would vest in 2016,” per CNNMoney’s David Goldman.
Yahoo’s share price has dropped roughly 30% since Nov. 2014, significantly reducing the financial windfall that would result from the release of Mayer’s stock awards.
“We have no comment on the reports,” wrote Yahoo spokesperson Rebecca Neufeld in an email to Fortune.