Any chance you, or anyone else has documentation on x86_64 Windows calling conventions? That's where I've been getting stuck.
After you read that, you might want to look at the LLVM source
/// The C convention as implemented on Windows/x86-64 and
/// AArch64. This convention differs from the more common
/// \c X86_64_SysV convention in a number of ways, most notably in
/// that XMM registers used to pass arguments are shadowed by GPRs,
/// and vice versa.
/// On AArch64, this is identical to the normal C (AAPCS) calling
/// convention for normal functions, but floats are passed in integer
/// registers to variadic functions.
As to why, the best we have is informed speculation:
The MSDN links above are quite detailed on what Windows implements. The post by Eli at https://eli.thegreenplace.net/2011/09/06/stack-frame-layout-... goes over some Windows differences towards the end.