A Clockwork Orange.
A Stanley Kubrick film. Starring Malcolm McDowell, Patrick Magee etc..
Alex (Malcolm McDowell), the central character, is a charismatic,
antisocial delinquent whose interests include classical music
(especially Beethoven), committing rape, theft, and ultra-violence. He
leads a small gang of thugs, Pete (Michael Tarn), Georgie (James
Marcus), and Dim (Warren Clarke), whom he calls his droogs (from the
Russian word друг, which is "friend", "buddy"). [.....]
After it was cited as having inspired copycat acts of violence, the
film was withdrawn from British cinemas at Kubrick's behest, and it
was also banned in several other countries. Later gaining a cult following it has been re-released there.
Wikipedia 2023.

By Box Office Mojo, Fair use, https://en.wikipedia.org/w/index.php?curid=56677118
Alex is convicted of murder and sentenced to 14 years in prison.
Two years into the sentence, Alex eagerly takes up an offer to be a
test subject for the Minister of the Interior's new Ludovico
technique, an experimental aversion therapy for rehabilitating
criminals within two weeks.
Alex is strapped to a chair, his eyes are
clamped open, and he is injected with drugs. He is then forced to
watch films of sex and violence, some of which are accompanied by the
music of his favourite composer, Ludwig van Beethoven. Alex becomes
nauseated by the films and, fearing the technique will make him sick
upon hearing Beethoven, begs for an end to the treatment.