- // Can we lever the blocker of a candidate passer?
- leverable = shift<Up>(pos.pieces(Us, PAWN))
- & ~pos.pieces(Them)
- & (~attackedBy2[Them] | attackedBy[Us][ALL_PIECES])
- & (~(attackedBy[Them][KNIGHT] | attackedBy[Them][BISHOP])
- | (attackedBy[Us ][KNIGHT] | attackedBy[Us ][BISHOP]));
-
- // Remove candidate otherwise
- b &= ~candidatePassers
- | shift<WEST>(leverable)
- | shift<EAST>(leverable);
+ helpers = shift<Up>(pos.pieces(Us, PAWN))
+ & ~pos.pieces(Them)
+ & (~attackedBy2[Them] | attackedBy[Us][ALL_PIECES]);
+
+ // Remove blocked candidate passers that don't have help to pass
+ b &= ~blockedPassers
+ | shift<WEST>(helpers)
+ | shift<EAST>(helpers);