What's the origin of Dog Day Afternoon?

Dog Day Afternoon is a 1975 American biographical crime drama film directed by Sidney Lumet and produced by Martin Bregman and Martin Elfand. The film stars Al Pacino, John Cazale, James Broderick, and Charles Durning. The screenplay is written by Frank Pierson and is based on the Life magazine article "The Boys in the Bank" by P. F. Kluge and Thomas Moore. The feature chronicled the 1972 robbery and hostage situation led by John Wojtowicz and Salvatore Naturile at a Chase Manhattan branch in Brooklyn.

This is a real incident that happened in NY in the mid-70s.  It's about this man (played by Al Pacino) who's married to a woman.  But then he also fell in love with a man.  His partner said he's trapped in the wrong body. So, Al Pacino decided to rob a bank to get money for his partner's sex change.