(1) If such person is detained under the provisions sections 466 or section 471, and such Inspector General or visitors shall certify that, in his or their judgment, he may be released or to be detained in custody, or to be transferred to a public lunatic asylum if he has not been already sent to such an asylum; and in case it orders him to be...