Before we go any further, the answer is (usually) -N % N.
"Usually", because for example MSVC with "SDL checks" enabled is offended by the negation of an unsigned integer and you may need to subtract from zero (this may also apply to your programming language of choice), or you may know something about N that enables a better solution, or something else that I don't care to list.
In case such a simple expression needs an explanation, what's happening here is first we unconditionally subtract N from 264 (this is allowed because N < 264 by definition, N is a 64-bit unsigned integer), then reduce that modulo N. That's it. There's nothing complex going on.
Despite this lack of complexity, I thought this trick was worth dedicating a blog post to anyway, because more complex suggestions are regularly made. A classic "internet commenter's favourite" is implementing modular exponentiation with the exponentiation by squaring algorithm, and then just calling modpow(2, 64, N). It is indeed possible to compute 264 mod N this way, but not without some trickery, and most of the computation will turn out to be useless.
The usual, not "problem" exactly but let's call it a "difficulty", with modular exponentiation is that you generally don't have a nice built-in modular multiplication to base it on, you need to implement that too and it's non-trivial: the product before reducing it modulo N can be twice as wide as whatever integer type you were trying to work with. There are various ways to deal with that, of which I will describe none; this is not a post about modular multiplication.
Even with that difficulty surmounted: only the last iteration of the exponentiation by squaring algorithm would be useful. Iterations before the last iteration, either calculate pure powers of two (while the intermediate result stays under N), or already incorporate some reduction but do so redundantly, the last iteration may as well do all the reduction. That's not to say that the intermediate reductions are in general useless in modular exponentiation, far from it, but in this case they are useless. Given that you have implemented modular multiplication, you may as well directly take the modular square of 232 mod N (some implementation of modular multiplication may not allow that if N is small, that can be worked around again, but let's ignore this extra complication). Depending on the implementation, you may also be able to directly reduce 264 mod N using half of a modular multiplication.
It would still be more complicated than -N % N.
Some of you may have noticed that while using exponentiation by squaring to compute 264 mod N, you don't need to handle 128-bit product. The biggest it can get is 65 bits, and only a specific value: 264 itself. Maybe you can handle it in a special way and avoid the more complicated general case? Actually yes, but if you do that you're halfway to reinventing -N % N.