SÃO PAULO, Brazil — Brazil’s sickly economy is hemorrhaging thousands of jobs a day, states are scrambling to pay police officers and teachers, and money for subsidized meals is in such short supply that one legislator suggested that the poor could “eat every other day.”

Still, not everyone is suffering. Civil servants in the judicial branch are enjoying a 41 percent raise. Legislators here in São Paulo, Brazil’s largest city, voted to increase their own salaries by more than 26 percent. And Congress, which is preparing to cut pension benefits around the country, is now allowing its members to retire with lifelong pensions after just two years in office.

Brazil is struggling to pull out of its worst economic crisis in decades, and President Michel Temer says the country needs to curb public spending to do so.

Yet it did not help his dismal approval ratings when he hosted a lavish taxpayer-funded banquet to persuade members of Congress to support his budget cuts, with 300 guests eating shrimp and filet mignon.