eg this one is:
int2 diff = (%s.rg & 255) - (%s.rg & 255);
return diff.g >0 || (diff.g == 0 && diff.r > 0);

btw: Why does all here start with "(%s&255) + "?