It’s in the Anuvijjakassapaṭipatti.
Suttaṃ saṃsandanatthāya, opammaṃ nidassanatthāya, attho viññāpanatthāya, paṭipucchā ṭhapanatthāya, okāsakammaṃ codanatthāya, codanā sāraṇatthāya, sāraṇā savacanīyatthāya, savacanīyaṃ palibodhatthāya, palibodho vinicchayatthāya, vinicchayo santīraṇatthāya, santīraṇaṃ ṭhānāṭhānagamanatthāya, ṭhānāṭhānagamanaṃ dummaṅkūnaṃ puggalānaṃ niggahatthāya, pesalānaṃ bhikkhūnaṃ sampaggahatthāya, saṅgho sampariggahasampaṭicchanatthāya, saṅghena anumatā puggalā paccekaṭṭhāyino avisaṃvādakaṭṭhāyino.
A clause is for the sake of reference, a simile is for the sake of illustration, a meaning is for the sake of instruction, a question (asked) in return is for the sake of setting aside, giving leave is for the sake of reproving, reproving is for the sake of making remember, making remember is for the sake of commands, a command is for the sake of impediments, an impediment is for the sake of investigating, investigating is for the sake of a decision, a decision is for the sake of referring to a possibility and what is not a possibility, referring to a possibility and what is not a possibility is for the sake of restraint of evil-minded individuals and for the sake of the support of well behaved monks; the Order is for the sake of agreement and acceptance; individuals approved of by the Order are persevering by themselves, are persevering in being trustworthy.
Vinayo saṃvaratthāya, saṃvaro avippaṭisāratthāya, avippaṭisāro pāmujjatthāya, pāmujjaṃ pītatthāya, pīti passaddhatthāya, passaddhi sukhatthāya, sukhaṃ samādhatthāya, samādhi yathābhūtañāṇadassanatthāya, yathābhūtañāṇadassanaṃ nibbidatthāya, nibbidā virāgatthāya, virāgo vimuttatthāya, vimutti vimuttiñāṇadassanatthāya, vimuttiñāṇadassanaṃ anupādāparinibbānatthāya. Etadatthā kathā, etadatthā mantanā, etadatthā upanisā, etadatthaṃ sotāvadhānaṃ: yadidaṃ anupādācittassa vimokkhoti.
Discipline is for the sake of restraint, restraint is for the sake of not being remorseful, not being remorseful is for the sake of joy, joy is for the sake of delight, delight is for the sake of tranquillity, tranquillity is for the sake of happiness, happiness is for the sake of concentration, concentration is for the sake of knowledge and vision of what has come to be as it really-is, knowledge and vision of what has come to be as it really is is for the sake of turning away, turning away is for the sake of dispassion, dispassion is for the sake of freedom, freedom is for the sake of the knowledge and vision of freedom, the knowledge and vision of freedom is for the sake of final nibbāna without clinging. According to this meaning is the talk. According to this meaning is the counsel. According to this meaning is the causal relation. According to this meaning is the lending ear, that is to say the deliverance of mind without clinging.