I understand that 余裕 means margin, leeway, as well as composure or comfort that seems to intuitively follow from the original meaning. However in this sentence it seems to be used in a negative sense, unless I'm misunderstanding here. The sentence itself (context is talking about band rehearsal):
昨夜の段階でも余裕で壊滅中だった俺は、 ちょっとばかり目眩がしたけど、師の命令には逆らえず、 1曲目よりもかなり早い段階で全体練習が始まった。
Is it being used here to describe him as failing by a large margin? And looking through Google, 余裕で不合格 and 余裕で負ける seem to see some use as well. Any clarification or corrections of any misunderstandings I have would be appreciated.