Complex sentence: The court decided that medical evidence is needed to prove that the defendant was not aware of what they were doing, and if this is available, the burden of proof lies with the prosecution to prove that intention was present.
Split into simpler sentences: The court decided that medical evidence is needed to prove that the defendant was not aware of what they were doing. Also, if this is given, then the burden of proof lies with the prosecution to prove that intention was present.