5 of 5 deleted 2 characters in body

C, 38 bytes

g(x,y){while(x^=y^=x^=y%=x);return y;}