From the Mahanidana Sutta (DN15):
"If one is asked, 'From what requisite condition does contact come?'
one should say, 'Contact comes from name-and-form as its requisite
condition.'
"If one is asked, 'From what requisite condition does name-and-form
come?' one should say, 'Name-and-form comes from consciousness as its
requisite condition.'
"If one is asked, 'From what requisite condition does consciousness
come?' one should say, 'Consciousness comes from name-and-form as its
requisite condition.'
"Thus, Ananda, from name-and-form as a requisite condition comes
consciousness. From consciousness as a requisite condition comes
name-and-form. From name-and-form as a requisite condition comes
contact. From contact as a requisite condition comes feeling. From
feeling as a requisite condition comes craving. From craving as a
requisite condition comes clinging. From clinging as a requisite
condition comes becoming. From becoming as a requisite condition comes
birth. From birth as a requisite condition, aging, death, sorrow,
lamentation, pain, distress, and despair come into play. Such is the
origination of this entire mass of stress.
Did you notice the loop?
Piya Tan in his commentary on Dependent Origination, talks about five versions of Dependent Origination in the Pali suttas:
Roderick S Bucknell (1999) identifies five main variations or versions
of dependent arising: the standard version(s), the branched
version, the looped version, the Sn (Sutta nipāta) version and the
ancestor of the standard version.
The looped version is so called because it represents consciousness
and name-and-form as mutually conditioning each other,
and "this causal loop is confirmed when the series is reiterated in
summary in the "normal" or forward direction," thus:
Conditioned by name-and-form is consciousness.
Conditioned by consciousness is name-and-form.
Conditioned by name-and-form is contact
The most famous example of the looped version is found in the
Mahā Nidāna Sutta ; other examples are found in the
Nala, kalapiya Sutta and the Mahâpadāna Sutta.
The Mahanidana Sutta (DN15) continues in its explanation:
Name-and-form
"'From consciousness as a requisite condition comes name-and-form.'
Thus it has been said. And this is the way to understand how from
consciousness as a requisite condition comes name-and-form. If
consciousness were not to descend into the mother's womb, would
name-and-form take shape in the womb?"
"No, lord."
"If, after descending into the womb, consciousness were to depart,
would name-and-form be produced for this world?"
"No, lord."
"If the consciousness of the young boy or girl were to be cut off,
would name-and-form ripen, grow, and reach maturity?"
"No, lord."
"Thus this is a cause, this is a reason, this is an origination, this
is a requisite condition for name-and-form, i.e., consciousness."
Consciousness
"'From name-and-form as a requisite condition comes consciousness.'
Thus it has been said. And this is the way to understand how from
name-and-form as a requisite condition comes consciousness. If
consciousness were not to gain a foothold in name-and-form, would a
coming-into-play of the origination of birth, aging, death, and stress
in the future be discerned?
"No, lord."
"Thus this is a cause, this is a reason, this is an origination, this
is a requisite condition for consciousness, i.e., name-and-form.
"This is the extent to which there is birth, aging, death, passing
away, and re-arising. This is the extent to which there are means of
designation, expression, and delineation. This is the extent to which
the sphere of discernment extends, the extent to which the cycle
revolves for the manifesting (discernibility) of this world — i.e.,
name-and-form together with consciousness.
Piya Tan explains this in his same commentary on Dependent Origination:
However, in the looped versions of Diagram 5b, the nāma-rūpa
that feeds viññāṇa is what, in Abhidhamma, is called the
bhav’aṅga, the “birth continuum.” At the moment of dying, this
bhav’aṅga is the cuti-citta, “death-consciousness,”
and is also the paṭisandhi citta, “rebirth-consciousness”
of the next life.
The modern term for this is the existential consciousness .
So, DN15 says that name-and-form is the condition for consciousness, which is the condition for name-and-form, which is the condition for contact. This is in the looped version of Dependent Origination.
Based on Piya Tan's explanation, the first name-and-form is from the previous life, which is the condition for consciousness. This consciousness, at death, is what the Abhidhamma calls cuti-citta or the "death consciousness" of the previous life, and is the same patisandhi citta or "rebirth consciousness" of the new life. This consciousness, is the requisite condition for the name-and-form of the next life. The second name-and-form is therefore the name-and-form of the next life. This is very clearly proven by the DN15 quote:
"'From consciousness as a requisite condition comes name-and-form.'
Thus it has been said. And this is the way to understand how from
consciousness as a requisite condition comes name-and-form. If
consciousness were not to descend into the mother's womb, would
name-and-form take shape in the womb?"
"'From name-and-form as a requisite condition comes consciousness.'
Thus it has been said. And this is the way to understand how from
name-and-form as a requisite condition comes consciousness. If
consciousness were not to gain a foothold in name-and-form, would a
coming-into-play of the origination of birth, aging, death, and stress
in the future be discerned?