Galactic hail: The origin of the high-velocity cloud complex C