First implementation for a pgen function in bitwise_distance.c