#include "crypto_encode_1277x7879.h" /* auto-generated; do not edit */ #define int16 int16_t #define uint16 uint16_t #define uint32 uint32_t void PQCLEAN_SNTRUP1277_CLEAN_crypto_encode_1277x7879(unsigned char *out, const void *v) { const int16 *R0 = v; /* XXX: caller could overlap R with input */ uint16 R[639]; long i; uint16 r0, r1; uint32 r2; for (i = 0; i < 638; ++i) { r0 = (uint16) ((R0[2 * i] + 3939) & 16383); r1 = (uint16) ((R0[2 * i + 1] + 3939) & 16383); r2 = r0 + r1 * (uint32)7879; *out++ = (unsigned char) r2; r2 >>= 8; *out++ = (unsigned char) r2; r2 >>= 8; R[i] = (uint16) r2; } R[638] = (uint16) ((R0[1276] + 3939) & 16383); for (i = 0; i < 319; ++i) { r0 = R[2 * i]; r1 = R[2 * i + 1]; r2 = r0 + r1 * (uint32)948; *out++ = (unsigned char) r2; r2 >>= 8; R[i] = (uint16) r2; } R[319] = R[638]; for (i = 0; i < 160; ++i) { r0 = R[2 * i]; r1 = R[2 * i + 1]; r2 = r0 + r1 * (uint32)3511; *out++ = (unsigned char) r2; r2 >>= 8; *out++ = (unsigned char) r2; r2 >>= 8; R[i] = (uint16) r2; } for (i = 0; i < 80; ++i) { r0 = R[2 * i]; r1 = R[2 * i + 1]; r2 = r0 + r1 * (uint32)189; *out++ = (unsigned char) r2; r2 >>= 8; R[i] = (uint16) r2; } for (i = 0; i < 40; ++i) { r0 = R[2 * i]; r1 = R[2 * i + 1]; r2 = r0 + r1 * (uint32)140; *out++ = (unsigned char) r2; r2 >>= 8; R[i] = (uint16) r2; } for (i = 0; i < 20; ++i) { r0 = R[2 * i]; r1 = R[2 * i + 1]; r2 = r0 + r1 * (uint32)77; R[i] = (uint16) r2; } for (i = 0; i < 10; ++i) { r0 = R[2 * i]; r1 = R[2 * i + 1]; r2 = r0 + r1 * (uint32)5929; *out++ = (unsigned char) r2; r2 >>= 8; *out++ = (unsigned char) r2; r2 >>= 8; R[i] = (uint16) r2; } for (i = 0; i < 5; ++i) { r0 = R[2 * i]; r1 = R[2 * i + 1]; r2 = r0 + r1 * (uint32)537; *out++ = (unsigned char) r2; r2 >>= 8; R[i] = (uint16) r2; } for (i = 0; i < 2; ++i) { r0 = R[2 * i]; r1 = R[2 * i + 1]; r2 = r0 + r1 * (uint32)1127; *out++ = (unsigned char) r2; r2 >>= 8; R[i] = (uint16) r2; } R[2] = R[4]; r0 = R[0]; r1 = R[1]; r2 = r0 + r1 * (uint32)4962; *out++ = (unsigned char) r2; r2 >>= 8; *out++ = (unsigned char) r2; r2 >>= 8; R[0] = (uint16) r2; R[1] = R[2]; r0 = R[0]; r1 = R[1]; r2 = r0 + r1 * (uint32)376; *out++ = (unsigned char) r2; r2 >>= 8; R[0] = (uint16) r2; r0 = R[0]; *out++ = (unsigned char) r0; r0 >>= 8; *out++ = (unsigned char) r0; }