Introduction - If you have any usage issues, please Google them yourself
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <float.h>
unsigned __int64 mulmod(unsigned __int64 a, unsigned __int64 b, unsigned __int64 m)
{
static const double _2_64 = 18446744073709551616.0
unsigned __int64 rh, rl
__asm
{
xor edi,edi
mov eax,dword ptr [a]
mov ebx,dword ptr [b]
push eax
mov ecx,dword ptr [b+4]
mul ebx
mov dword ptr [rl],eax
mov dword ptr [rl+4],edx
pop eax
mul ecx
mov dword ptr [rh],edx
mov dword ptr [rh+4],edi
add dword ptr [rl+4],eax
adc dword ptr [rh],edi
mov eax,dword ptr [a+4]
mul ebx