“And what is the noble method that he has clearly seen and thoroughly penetrated with wisdom?
Here, bhikkhus, the noble disciple attends closely and carefully to dependent origination itself thus:
‘When this exists, that comes to be;
with the arising of this, that arises.
When this does not exist, that does not come to be;
with the cessation of this, that ceases.
That is, with ignorance as condition, volitional formations come to be;
with volitional formations as condition, consciousness;
with consciousness as condition, name-and-form;
with name-and-form as condition, the six sense bases;
with the six sense bases as condition, contact;
with contact as condition, feeling;
with feeling as condition, craving;
with craving as condition, clinging;
with clinging as condition, existence;
with existence as condition, birth;
with birth as condition, aging-and-death, sorrow, lamentation, pain, displeasure, and despair come to be.
Such is the origin of this whole mass of suffering.
“But with the remainderless fading away and cessation of ignorance comes cessation of volitional formations;
with the cessation of volitional formations, cessation of consciousness;
with the cessation of consciousness, cessation of name-and-form;
with the cessation of name-and-form, cessation of the six sense bases;
with the cessation of the six sense bases, cessation of contact;
with the cessation of contact, cessation of feeling;
with the cessation of feeling, cessation of craving;
with the cessation of craving, cessation of clinging;
with the cessation of clinging, cessation of existence;
with the cessation of existence, cessation of birth; with the cessation of birth, aging-and-death, sorrow, lamentation, pain, displeasure, and despair cease.
Such is the cessation of this whole mass of suffering.”
Dutiyapañcaverabhayasutta SN 12.42 https://suttacentral.net/sn12.42