#define NB0 256 #define NB1 8 #define NC0 8 #define NC1 64 typedef unsigned int UI; typedef unsigned long long ULL; typedef signed int SI; typedef signed long long SLL; #define DMX(a1,a2,d,r,v); {ULL xxx,yyy,zzz; xxx=(ULL)(a1)*(ULL)(a2); __asm__ ("mulq %3":"=a"(zzz),"=d"(yyy):"a"(xxx),"g"(v)); r=(UI)xxx-(UI)d*(UI)yyy;} #define DMARX(a1,a2,a3,d,r,v); {ULL xxx,yyy,zzz; xxx=(ULL)(a1)*(ULL)(a2)+(ULL)(a3); __asm__ ("mulq %3":"=a"(zzz),"=d"(yyy):"a"(xxx),"g"(v)); r=(UI)xxx-(UI)d*(UI)yyy;} #define usermod(a,r,d,v); {ULL yyy,zzz; __asm__ ("mulq %3":"=a"(zzz),"=d"(yyy):"a"(a),"g"(v)); r=(UI)a-(UI)d*(UI)yyy;} #define CMAX(x,y) (x > y ? x:y) #define CMIN(x,y) (x < y ? x:y)