Goldman Sachs has at least one billion reasons to hope President Trump’s paring back of Dodd-Frank will include the Volcker Rule.

The Wall Street bank, which has already banked a cool $1 billion profit with its early stage investment in Israeli car tech company Mobileye, lost out on nearly doubling that gain when it sold off its stake in the company to comply with the Volcker Rule, sources said.

Goldman Sachs will get to earn a little of that “lost” profit back now that it has been hired by Mobileye to act as an adviser on its $15 billion sale to Intel, The Post has learned.

The hiring was made in recent days, sources said.

Previously, Mobileye was working only with investment bank Raymond James.

Goldman made most of its $1 billion profit soon after it helped take Mobileye public in 2014 at $25 a share — then the largest US initial public offering of an Israeli company.

A the time of the IPO, Goldman owned roughly 17.5 percent of the company, whose computer chips and cameras alert cars to brake to avoid hitting other cars and pedestrians, thanks to an early $130 million investment in the company — and a followup 2013 investment.

The first investment came in 2007, just as Mobileye’s technology was getting into cars and when it needed the cash to survive.

But the firm had to sell its shares, owned through Goldman Sachs Investment Partners, its private-equity fund, to comply with 2013’s Volcker Rule, which restricts banks from making speculative bets with its own money.

Partly as a result of the Volcker Rule, Goldman, around 2015, sold all its Mobileye shares, netting a roughly $1 billion profit, two sources said.

If it didn’t have to sell the stake, Mobileye’s fast-rising stock price would have handed Goldman another nearly $1 billion profit when it agreed to be bought this month by Intel, sources said.

“They were the only institution that funded them in the financial crisis,” a source said. At the time, Mobileye had a reported $600 million valuation.

It is now worth $13.5 billion.

Mobileye shares at the end of 2015 traded at $35.98 a share. Intel is paying $63.54 per share for the company.

Mobileye is coveted because of the role it is likely to play not only in today’s cars — as it helps drivers to avoid accidents — but in driverless cars.

The company has retained Goldman for the Intel sale even though it has already signed a deal because it wants to reward the bank for its help over the years, a source said.

Goldman declined to comment.