reduceproduct
ret = reduceproduct(theunit, 0) | reduceproduct(theunit, 1);
static int reduceproduct(struct unittype * theunit, int flip);