Fuck ethical dilemma, whats the legality of the trolley problem

Will you get charged with manslaughter if you pull? Murder even? What about if you dont? Is it still murder? Is saving more people a valid legal argument? If theres any lawyers here what are your thoughts on it?