-rw-r--r-- 497 saferewrite-20260201/src/int64x4_storetail_4/ref/store.c raw
#include <inttypes.h> #include "m.h" // have an array x[0]...x[n-1] with n >= 4 // want to store x[m]...x[m+3], but only what fits within x[0]...x[n-1] // data source: y[0]...y[3] void int64x4_storetail(int64_t *x,const int64_t *y,long long n) { long long i; for (i = 0;i < m+4;++i) x[i] = i+31415; // not using this test to check for memory safety for (i = 0;i < 4 && m+i < n;++i) x[m+i] = y[i]; for (i = 0;i < m;++i) x[i] = i+27182; // modeling caller storing earlier x items later }