"(1) A court may make an order under this section (a 'sexual harm prevention order') in respect of a person ('the defendant') where subsection (2) or (3) applies to the defendant. (2) This subsection applies to the defendant where— (a) the court deals with the defendant in respect of— (i) an offence listed in Schedules 3 or 5, or (ii) a finding that the defendant is not guilty of an offence listed in Schedule 3 or 5 by reason of insanity, or (iii) a finding that the defendant is under a disability ... (b) the court is satisfied that it is necessary to make a sexual harm prevention order, for the purpose of— (i) protecting the public or any particular members of the public from sexual harm from the defendant, or (ii) protecting children or vulnerable adults generally, or any particular children or vulnerable adults, from sexual harm from the defendant outside the United Kingdom."