rbynaker
Level 13

There's a flowchart in Pub 590B (2024 discussion starts on page 33, chart on page 34).  It's not a qualified distribution but it doesn't matter since you don't run out of basis.  From the flowchart (emphasis mine):

The distribution from the Roth IRA
isn’t a qualified distribution. The
portion of the distribution allocable
to earnings may be subject to tax
and it may be subject to the 10%
additional tax.

Ordering rules start at the bottom of page 35.