- /* --- Tidying up the tail end --- */ \
- \
- if (sz) { \
- small: \
- if (!d) off += sz; \
- else do { y = s ? *s++ : 0; *d++ = ctx->b[off++] ^ y; sz--; } \
- while (sz); \
+ /* Handle multiple whole blocks. */ \
+ if (!d) while (plan.from_input) { \
+ pre##_eblk(&ctx->ctx, t, t); \
+ plan.from_input -= PRE##_BLKSZ; \
+ } else if (!s) while (plan.from_input) { \
+ pre##_eblk(&ctx->ctx, t, t); \
+ BLKC_STORE(PRE, d, t); d += PRE##_BLKSZ; \
+ plan.from_input -= PRE##_BLKSZ; \
+ } else while (plan.from_input) { \
+ pre##_eblk(&ctx->ctx, t, t); \
+ BLKC_LOAD(PRE, u, s); s += PRE##_BLKSZ; \
+ BLKC_XSTORE(PRE, d, t, u); d += PRE##_BLKSZ; \
+ plan.from_input -= PRE##_BLKSZ; \