Not that I understood the Japanese in this to know exactly what happened, but I think this was the first "Happy End" I saw that involved no deaths.
Reimu got penetrated by anon's throwing blade, which also took Marisa's hat. Lacking her accessory, Marisa was faced with harsh words by Reimu as she yelled for help, which hurted her. However, Marisa herself was not without a return - she ridiculed Reimu for losing her virginity (calling her a "second-hand mamu-mamu"). In the end, Reimu was released and Marisa got her (torn) hat back. Having been insulted by each other, the two yukkuri decided to divorce, and there's your happy ending.