The Sutra of Perfect Enlightenment 圆觉经
The Sutra of Perfect Enlightenment (Yuanjue jing 圆觉经, Its full Chinese title: 大方廣圓覺修多羅了義經, lit. 'the Great Vaipulya Sutra on the Perfect Enlightenment, Sanskrit: Mahāvaipulya pūrṇabuddha-sūtra prasannārtha-sūtra), is an important Mahayana sutra. The sutra was extremely popular and influential in East Asian Buddhism.
Its translation into Chinese is traditionally attributed to Buddhatrāta, an Indian monk who translated the work from Sanskrit in 693 in the White Horse Temple of Luoyang.
The sutra deals directly with the subject of Tathagathagarbha i.e. Buddha nature, the perfect enlightened nature. It also assembles the teachings of the Surangama Sutra. One may ask if the Buddha nature is originally pure, how come it gives rise to a thought of ignorance (fundamental ignorance) which gives rise to all the phenomena and Samsara (the cycle of reincarnation) ? And when one becomes a Buddha, will one again gives rise to ignorance?
In the sutra the Buddha says this kind of question is not the right kind of question. Because a thought of ignorance (delusion) is fundamentally unreal, like a person with a sick eye and saw there is a flower that appears in the sky (but the flower was actually unreal), or like someone who stares at the moon for too long and saw a second moon (the second moon was also unreal), but we are attached to it and think it is real, due to our attachment hence we are being trapped in the cycle of reincarnation for countless eons. The Buddha also says if one hasn’t exited the cycle of reincarnation and tried to understand the perfect enlightened nature (the Buddha nature), then the understanding of such nature also has the nature of reincarnation (i.e. it is not the right understanding). Hence, one should first cut off all attachment and tried to exit the cycle of reincarnation first, then one would know that Samsara and Nirvana are all like dreams (Nirvana is only used for the unenlightened, when one becomes enlightened, there is also no such attachment to the so-called concept of Nirvana, Buddha nature or Buddhahood). All talks, words and sutras are simply ways of convenience to help sentient beings to awaken the perfect enlightened nature.
Regarding the question of whether when one realises Buddhahood, one will again give rise to ignorance, the Buddha says it is like smelting gold ore. The gold does not come into being because of smelting; it is already perfect gold (the Buddha nature is always here), and after refinement will never again become ore (when one becomes a Buddha, one will never give rise to ignorance again). Even though it passes through endless time, the nature of the gold is never corrupted. It is wrong to say that it is not originally perfect. The Perfect Enlightenment of the Tathāgata is also like this."
You can read the English translation of the Sutra of Perfect Enlightenment (translated by Charles Muller) here.