SN 55.21 wrote:
Sometimes, when I enter Kapilavatthu in the evening after visiting with the Blessed One or with the monks who inspire the mind, I meet up with a runaway elephant, a runaway horse, a runaway chariot, a runaway cart, or a runaway person. At times like that my mindfulness with regard to the Blessed One gets muddled, my mindfulness with regard to the Dhamma... the Sangha gets muddled. The thought occurs to me, 'If I were to die at this moment, what would be my destination? What would be my future course?"
"Have no fear, Mahanama! Have no fear! Your death will not be a bad one, your demise will not be bad. If one's mind has long been nurtured with conviction, nurtured with virtue, nurtured with learning, nurtured with relinquishment, nurtured with discernment, then when the body — endowed with form, composed of the four primary elements, born from mother & father, nourished with rice & porridge, subject to inconstancy, rubbing, pressing, dissolution, & dispersion — is eaten by crows, vultures, hawks, dogs, hyenas, or all sorts of creatures, nevertheless the mind — long nurtured with conviction, nurtured with virtue, learning, relinquishment, & discernment — rises upward and separates out