SLOT_MASK
#define SLOT(p,i) ((_SLOT(p,i) >> (TMPL_BITS+((i)<<3)+(i))) & SLOT_MASK)
tmp &= ~(SLOT_MASK << SLOT_SHIFT(slot));