Rolling OTM calls and wash sale cost basis

There were some great explanations and links here:  https://ttlc.intuit.com/community/taxes/discussion/wash-rules-for-options/00/2916250.

 

However, parsing the IRS legalese physically hurts my brain. My situation is a simple OTM Roll of a Short Call.

 

#1 I sell an OTM call for PEP for $400. I close it for $500. I am out $100. The cost basis is $500 afaik. 

#2 I then immediately sell another ITM PEP for $200. It expires worthless. The cost basis is $0 afaik.

 

All transactions occur in 2022.

 

Ignoring wash sale issues, my net is $100 positive. 

 

However, the $100 is a wash rule loss in #1 afaik.

However, again, it seems I can adjust the cost basis of #2 from $0 to $100. 

If so, my net is $100 positive.

 

Is this correct?