at the top of (one's) lungs
As loudly as one can. I've hardly slept because my infant has been crying at the top of her lungs all night. Sing at the top of your lungs so that the people in the last row of the auditorium can hear you!
at the top of one's lungs
Also, at the top of one's voice. With an extremely loud voice. For example, The babies in the nursery all were crying at the top of their lungs. The noun top here refers to the greatest degree of volume (that is, loudest) rather than high pitch, a usage dating from the mid-1500s.
at the top of (one's) lungs
As loudly as one's voice will allow.