This is required according to the Windows x64 calling convention: https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#callercallee-saved-registers We didn't do this, and this didn't appear to cause any problems. But we should do it anyway for correctness.
This uses Mingw-w64, which seems to be the de facto standard for porting Unixy programs to Windows.