and the deeps rose beneath them in towering anger , and waves like unto mountains moving with great caps of writhen snow bore them up amid the wreckage of the clouds , and after many days cast them away upon the shores of middle-earth .