A woman with two dawdling children in tow muttered, “I hate this f—ing building,” as she tried to find the place to pick up birth certificates.

A little farther away, a Cook County sheriff’s deputy barked at a man whose pocketknife had set off the metal detector and was trying to hide the prohibited item outside traffic court.

“Sir, what did you do with that knife?!” the deputy bellowed.

But among the bewildered, the harried, the I’d-rather-be-anywhere-but-here masses moving through the basement level of the Daley Center Wednesday, a couple from Edgewater were in for a lovely surprise.

Anthony Aranda, 50, and Terry Beauchamp, 49, decided to go get a marriage license Wednesday. As reporters swarmed, the couple said they had no idea they were the 10,000th same-sex couple in Cook County to pick up a marriage license since the clerk’s office began issuing them to gay people in early 2014.

Illinois became the 16th state to make gay marriage legal, after then-Gov. Pat Quinn signed the marriage law in November 2013.

Clerk David Orr was on hand to present the couple with a box full of goodies — including an all-expenses-paid trip to Las Vegas, where Aranda is from — and to sing the praises of the law that gives gay couples the same rights as straight ones.

“We’re all excited because equal marriage has come to Illinois,” Orr said, shortly before having the couple cut a white cake with rainbow-colored layers. “People have loved each for years, but now they can make it legal in the State of Illinois.”

Aranda and Beauchamp have been together for almost two decades.

“Eighteen years of living in sin,” said Aranda, a flight attendant. “Now it’s legal.”

The couple said they came downtown Wednesday — mostly because they both had the day off. Beauchamp sells luggage downtown.

“All of our relatives are getting older. So if we’re going to do a big blowout, now is our chance to do it,” Aranda said.

They’re planning to get wedding rings next week, in preparation for a wedding reception later this month in Andersonville.

Outwardly, at least, the couple appeared almost blasé about their coming betrothal.

“There was no proposal,” Aranda said. “It was like, you wanna do it? ‘Sure.’”

Although, the broader significance of their marriage isn’t lost on either.

“It’s great it’s got to this point where it’s an everyday occurrence, or should be,” Beauchamp said.