1#define SYSCLIB_DISABLE_BUILTINS
10void *memmove(
void *dest,
const void *src,
size_t n)
17 if ((uintptr_t)s-(uintptr_t)d-n <= -2*n)
return memcpy(d, s, n);
21 if ((uintptr_t)s % WS == (uintptr_t)d % WS) {
22 while ((uintptr_t)d % WS) {
23 if (!n--)
return dest;
26 for (; n>=WS; n-=WS, d+=WS, s+=WS) *(WT *)d = *(WT *)s;
29 for (; n; n--) *d++ = *s++;
32 if ((uintptr_t)s % WS == (uintptr_t)d % WS) {
33 while ((uintptr_t)(d+n) % WS) {
34 if (!n--)
return dest;
37 while (n>=WS) n-=WS, *(WT *)(d+n) = *(WT *)(s+n);
40 while (n) n--, d[n] = s[n];