Nymphomaniac Vol 1 and 2
(2014)

Volume 1
After the death of her father (Christian Slater), Young Joe's (Stacy Martin) sexual addition escalates to the point where she is having multiple sexual encounters in a single night.  After not seeing him for many years, Joe is reunited with her only true love Jerôme (Shia LaBeouf). However, while having sex with Jerôme, Joe is horrified to discover that she has lost the ability to orgasm.

Volume 2
The now older Joe (Charlotte Gainsbourg) has started visiting a man named K (Jamie Bell), who ties Joe up and beats her, for sexual release. This eventually results in Jerôme (Shia LaBeouf) leaving Joe with their son, who is later given to foster care.

Many years later, Joe is working for a man named L (Willem Dafoe) as a debt collector, extorting money out of people. After being quite successful with her new criminal career, Joe is asked to befriend a young girl named P (Mia Goth), with the hopes that she'll eventually become Joe's successor. Joe and P eventually begin a lesbian relationship with each other and Joe begins bringing her along on her jobs.  When Joe's latest target turns out to be a, now much older, Jerôme (Michael Pas), she sends P in by herself.

One night, when P didn't come home after going to Jerôme's to collect, she heads to his house and finds out that they have been having an affair with each other.  Jealous, Joe confronts the couple in an alley and tries to shoot Jerôme in the head. However, the gun doesn't go off and Jerôme proceeds to brutally beat Joe, before mockingly having sex with P in front of her (in the same manner as Joe's very first sexual encounter). P then proceeds to urinate on Joe, before both leave her lying on the ground.

This catches the story up to the start, where Joe is taken in by Seligman (Stellan Skarsgård). After finishing her story, Joe states that she is glad that she wasn't made a murderer and is now going to try to live a life of abstinence.  However, despite stating earlier that he has no interest in sex, Seligman tries to rape Joe as she sleeps. In self defense, Joe takes out the gun before the screen blacks out and the sounds of Joe shooting Seligman and running away can be heard.

Thanks Sean K!