The American survived a sublimely brutal test of wills, and a late-night house of horrors in Arthur Ashe Stadium.