Question about overallotment (greenshoe)

I have a good overview of how this works, however I am not 100% of the amount if shares that ends up being issued. Let’s say a company wants to raise 100m USD, issues 100m shares at 1$ each. The underwriter has an overallotment option of 15%. Scenarios:

1. The overallotment option has been exercises before the stocks starts to trade, meaning the bank is short 15%.
1.1. The stock rises: The underwriter buys back shares at the IPO price from the issuer. 15m more shares are issued and the number of total outstanding shares is 115?
1.2. The stock falls: The underwriter buys back the shares in the market. The short position is closed out and the effective amount of outstanding shares is 100m?
–> The bank is shorting stocks it has not borrow, so it is effectively a naked short?

2. The overallotment option has not been exercises before the stocks starts to trade.
2.1. The stock rises: The underwriter exercises the option to buy shares from the issuer at the IPO price and sell at the higher price in the market. Total number of outstanding shares increases to 115m
2.2. The stock falls: The underwriter cannot buy back shares, because it does not have any short position because the greenshoe option was not exercises. If it buys it means it effectively takes a long position?