Real Madrid won the International Champions Cup in Australia after a 4-1 thrashing of Manuel Pellegrini's Manchester City.