2e85aa2ad2
written as a template that when inlined is specialized for the caller through constant value propagation and dead code elimination. Thus, the specialized code that is generated for pmap_clear_reference() et al. avoids several conditional branches inside of a loop.