The five-time winner of the Open needed just 95 minutes to see off 48th-ranked Berlocq, who has never defeated a top-ten opponent and never looked like breaking that streak on Thursday.
The seventh-seeded Federer will face either 26th-seeded Sam Querrey of the United States or France's Adrian Mannarino for a place in the last 16, with a clash with Nadal a tantalizing prospect in the quarterfinals.
"I didn't know Rafa was in my quarter -- I'm kidding,'' said Federer, who is playing at his lowest ranking at a major in 11 years.
"I am well aware of the draw, but at the moment I am clearly focusing on round by round and it would be a big mistake if I was thinking too much about Rafa," he said.
"I would love to be in that situation but for that to happen I have to keep playing well and keep winning.''
Federer fired six aces and 37 winners past Berlocq on the Arthur Ashe Stadium but his 25 unforced errors may well be pounced upon by the better players he is set to face in the second week.