as much as somebody can/could do to do something

as much as somebody can/could ˈdo (not) to do something

used to say that something is/was difficult to do: No dessert for me, thanks. It was as much as I could do to finish the main course.