NEW YORK — “How you doing? How you doing? How you doing, brother?” Mayor Bill de Blasio asks each person he meets, like a talking Joey Tribbiani doll that got stuck on repeat, handing out water and high-fives as he goes.

It’s 1 p.m. on the Saturday of the hottest heat wave to hit the city since 2013 — 98 with a heat index of 110 — and de Blasio is on a mission to show the people who gave him his job that he is here for them.

He’s dressed in “heat reality mode”: khakis, a navy-blue polo and navy-blue leather sneakers from Cole Haan. Already, he’s led a meeting with his emergency management team (“I’m here to give you the rousing speech that the worst is yet to come,” he began with a chuckle) and has spent every moment in between on TV or the radio giving New Yorkers stern but basic reminders to stay hydrated and call 911 if they feel the symptoms of heatstroke.

Soon he’s hopped into his black SUV heading toward McCarren Park Pool in Williamsburg, Brooklyn, one of the city’s 53 free, outdoor, chlorinated slices of paradise that cater to people who don’t have air conditioning or a place in the Hamptons. “Ooh, that’s the mayor!” some kids shout as de Blasio walks inside. The commotion turns the already chaotic pool, filled to its 1,500-person capacity, into a madhouse, until it seems like every person in it is rising up from the water in unison to shake his hand or touch the hem.

They are among the working-class black and brown folks who make up de Blasio’s base; according to an April Quinnipiac poll, he enjoys a 66 percent approval rating among black voters, a 40 percent approval rating among Hispanic voters, and a 58 percent disapproval rating among white voters.

Somewhere across the pool, a chant begins: “De Blasio for President! De Blasio for President!”

De Blasio, who is 58 years old and 6-foot-5, was one of the last candidates to toss his hat into that Dunkin’ grab bag of a Democratic field, but unlike the 23 other candidates, he’s endured a barrage of derision from press and citizens alike who don’t like the idea of their mayor looking for a second job — particularly when many of them don’t think he’s done a good job at this one. De Blasio seems to be boldly raising the question: Is it possible to both run a city of 8.6 million opinionated people, and run for president simultaneously, and do either of them well?

History would say no. John Lindsay, the only other sitting New York City mayor to run for president, mounted a failed attempt for the Democratic nomination in 1972. And he looked like a Kennedy.

“The thing de Blasio is going through is something every mayor goes through. New Yorkers love to quibble with or totally destroy their mayors,” says Bill Cunningham, a former political and City Hall aide for Mayor Michael Bloomberg. Former mayor Rudolph W. Giuliani might have cut crime, Cunningham says, but half the city despised him before 9/11. Bloomberg raised taxes his first year in office and got eviscerated, and still got reelected.

De Blasio hasn’t made it easier on himself, particularly in recent days.

Case in point, the Saturday before the heat wave, he’d been campaigning for the presidency in rural Iowa when a major blackout plunged the West Side of Manhattan into darkness. Rather than make a big show of setting up a command center in Iowa or use his (rather small) campaign funds to charter a private plane, he stayed where he was for an hour or so, then drove four hours to Chicago, where he missed the last plane of the night, and didn’t get back to the city until the morning, long after the lights had come on.

“The most important thing in the first hour was to be in a location where I could have consistent communication to know what’s happening and give the right instructions and confirm the right people are in place,” de Blasio said afterward. Once his team saw the blackout had spread, they moved quickly to get him home, but the damage had been done.

A day later, the New York Post ran a cover demanding the mayor’s resignation: “De Blasio Must Go!”

The resignation demand was “ludicrous,” de Blasio said, but being gone during the blackout was not a good look.

'Natural friction'

De Blasio’s presidential campaign announcement was greeted with another classic New York Post cover declaring, “Everyone Hates Bill!” claiming he’d pulled off the rare feat of uniting Black Lives Matter protesters, cops, community activists and Whoopi Goldberg in agreement that he should definitely not run. Then Vox published a piece called, “Why Bill de Blasio is so hated, explained,” that was actually a nuanced examination of the bad press he’s received relative to his not-so-bad record.

Stop-and-frisk policing has reduced dramatically under de Blasio, but BLM protesters are upset that the officer who killed Eric Garner is still on NYPD payroll, five years after Garner’s death, and that de Blasio hasn’t taken a stronger stance. Cops believe de Blasio, who has pushed for retraining the entire force to foster better officer-community relations, hasn’t stood up for them in controversial shootings when it’s mattered. While he frequently cites the more than 100,000 units of affordable housing he’s created or preserved, critics say they’re not helping the poorest New Yorkers and have increased racial segregation.

“It’s the second-toughest political job and the world’s toughest press corps, so there’s always going to be a natural friction,” says Eric Phillips, de Blasio’s former press secretary. “But he was elected in a race that no one thought he would win, so take that into account. There’s a very, very narrow band of people who disproportionately don’t like the mayor.”

Among the claims he’s staking his “Working Families First” presidential race on: He delivered on his promise of universal pre-K; he mandated two-weeks paid sick leave; he raised the minimum wage to $15 an hour.

“The thing that is confounding is that Upper West Side liberals should love him,” says Bob Hardt, political director of the local TV network NY1. “But he’s so interested in bridging the haves and the have-nots that he’s alienating the white middle and upper class — not the 1 percent, but the 10 percent.”

Rebecca Katz, a former de Blasio strategist, adds: “He started off his tenure railing against elites, and he was unapologetic. It just so happens that a handful of reporters and columnists fall into the categories he’s attacked. Then they go write think pieces because they are college-educated, and they don’t like his attitude.” (Asked about his presidential campaign, she said, “I was hoping it wasn’t true.”)

If you know anything about him, you probably know about his gym routine. Every day, while living on the Upper East Side in Gracie Mansion, he drives 11 miles in a taxpayer-funded SUV to the YMCA in his old neighborhood, Park Slope, Brooklyn. It’s mentioned in practically every article written about him. When he announced his presidential bid, fliers appeared at the Y stating, “By entering these premises, you agree not to run for President of the United States in 2020 or in any future race. . . . You agree to focus solely on your current job here in New York City, which you are not excelling at.”

Talk to de Blasio about the gym, and he doesn’t see it as a lark, but a personal imperative . “I’m proud to say I’ve lost weight,” he says. “This is like conditioning for athletics. You want to be maximum energy. . . . I was carrying probably 10 or 15 more pounds than I am now.”

Different perceptions

Petty issues, such as the mayor’s choice of a gym, have sometimes obscured the bigger problems of his tenure. The homelessness population is nearly 60,000, which is a drop from a historic high, also during de Blasio’s tenure. The New York City Housing Authority, was in such disarray — kids getting poisoned by lead paint; hundreds of people without heat in the winter or air conditioning, right before the heat wave — that a federal monitor had to take over. And then there’s de Blasio’s fundraising woes. He was under investigation in 2016, and much of his campaign funds have come from big donors in New York who have a stake in his mayoral business.

His support among African Americans has taken hits of late. “All you have to figure out for an example of why he should not run is Eric Garner,” says Bertha Lewis, an activist and founder of the Black Institute, who is a former de Blasio supporter.

De Blasio said his actions in the Garner case were slowed by the Justice Department’s investigation and need to ensure due process, but in the future “unless stopped by court order or the request of kin, we will immediately begin our disciplinary process when an unarmed civilian is killed at the hands of an officer.”

Still, judging from the reception he was getting at the pool, the idea that everyone hates him isn’t at all true.

People there want to know about his wife, Chirlane McCray, who does unpaid work for the city including running a mental health initiative called ThriveNYC. She is African American and very popular. Their son, Dante, is a New York State policy debate champion, just graduated from Yale with a degree in political science, has a great Afro and is a paid adviser on his dad’s campaign. An ad he recorded for De Blasio’s 2013 mayoral bid is said to have turned the tide in the election.

“He’s a great mayor,” says Shamika Lilley, who came over to get a selfie. “The thing about the blackout, I didn’t know they expected everyone to be everywhere at the same time. It’s ridiculous.”

'A joyful campaigner'

So why run for president?

For one, he seems to like it. “He’s so happy,” says Grace Rauh, a reporter and podcaster for NY1, who covers the mayor at home and on the campaign trail. “He’s a joyful campaigner. In South Carolina, he high-fived me on the way into an event. I couldn’t believe it. He wouldn’t even break into a smile when he sees a reporter in New York.”

For another, he’s passionate that his presidency would ultimately help New York City: “We can’t fix our infrastructure and our public housing, for example, without a much greater federal role.”

His longtime friend and adviser Peter Ragone says, “If you have a record and a vision, why not throw your hat in the ring? He certainly has a lot more executive experience than most of the other candidates.”

Here are the facts: New York City is the largest city in America. It has the largest school system, the largest police force and a budget of almost $93 billion.

De Blasio hopes if he can hammer that home on the debate stage this week, that all those massive systems were under his purview and didn’t fall apart, while he kept crime down for six years and managed to create half a million jobs, he might stand a chance. “I think the question always is how do you put your ideas into action?” he says. “My job is to make that vivid and to help people see what that experience means, because it’s just a pure differentiator. There are a lot of people who have not had executive experience. There are other people who have had it but not in a setting as challenging as this.”

De Blasio doesn’t name names, but South Bend, Ind., for example, has a population of 102,000, which is 20 times fewer people than live in the borough of Queens.

Yet, Mayor Pete Buttigieg, as the New York Post pointed out in July, has raised more from New York City residents ($2.35 million in the past three months) than de Blasio has nationwide, in his whole campaign ($1.1 million).

“I think the voters, not the insiders, not the pundits, always care about what you can do to improve their lives,” de Blasio says, in response. “One of the leading Dems in Iowa said to me that his belief with caucus voters is the vast majority don’t make a firm final decision until 10 days before. That puts you well into January.”

De Blasio has reason for irrational confidence; he wasn’t supposed to be mayor. “What I’ve learned time and time again, always as an underdog,” de Blasio says, “is that people make their decisions very, very late, and it’s based on trying to find who will actually reach them, who will actually change their lives.”

In the 2013 race, for a very long time, he was running fourth. “De Blasio wins the primary because he’s like that speed skater, Apolo Anton Ohno,” Cunningham says. “Everybody else fell down, and he went across the line and got the gold medal. Weiner fell down, Quinn fell down, Thompson fell down. They all self-destructed in one way or another, and he just managed to skate across the finish line and won the primary and became mayor.” He just needs 23 people to fall down this time.