Stock market slumps following two days of gains