diff --git a/sysdeps/aarch64/memcpy.S b/sysdeps/aarch64/memcpy.S
index 51e7268..6b8610e 100644
--- a/sysdeps/aarch64/memcpy.S
+++ b/sysdeps/aarch64/memcpy.S
@@ -35,6 +35,7 @@
Â #define A_hÂ Â Â  x7
Â #define A_hwÂ Â  w7
Â #define B_lÂ Â Â  x8
+#define B_lwÂ Â  w8
Â #define B_hÂ Â Â  x9
Â #define C_lÂ Â Â  x10
Â #define C_hÂ Â Â  x11
@@ -70,21 +71,40 @@ END (memmove)
Â libc_hidden_builtin_def (memmove)
Â ENTRY (memcpy)

+Â Â Â Â Â Â  prfmÂ Â Â  PLDL1KEEP, [src]
Â Â Â Â Â Â Â  addÂ Â Â Â  srcend, src, count
Â Â Â Â Â Â Â  addÂ Â Â Â  dstend, dstin, count
+Â Â Â Â Â Â  cmpÂ Â Â Â  count, 16
+Â Â Â Â Â Â  b.lsÂ Â Â  L(copy16)
Â Â Â Â Â Â Â  cmpÂ Â Â Â  count, 96
Â Â Â Â Â Â Â  b.hiÂ Â Â  L(copy_long)
-Â Â Â Â Â Â  cmpÂ Â Â Â  count, 16
-Â Â Â Â Â Â  b.hsÂ Â Â  L(copy_medium)

+Â Â Â Â Â Â  /* Medium copies: 17..96 bytes.Â  */
+Â Â Â Â Â Â  subÂ Â Â Â  tmp1, count, 1
+Â Â Â Â Â Â  ldpÂ Â Â Â  A_l, A_h, [src]
+Â Â Â Â Â Â  tbnzÂ Â Â  tmp1, 6, L(copy96)
+Â Â Â Â Â Â  ldpÂ Â Â Â  D_l, D_h, [srcend, -16]
+Â Â Â Â Â Â  tbzÂ Â Â Â  tmp1, 5, 1f
+Â Â Â Â Â Â  ldpÂ Â Â Â  B_l, B_h, [src, 16]
+Â Â Â Â Â Â  ldpÂ Â Â Â  C_l, C_h, [srcend, -32]
+Â Â Â Â Â Â  stpÂ Â Â Â  B_l, B_h, [dstin, 16]
+Â Â Â Â Â Â  stpÂ Â Â Â  C_l, C_h, [dstend, -32]
+1:
+Â Â Â Â Â Â  stpÂ Â Â Â  A_l, A_h, [dstin]
+Â Â Â Â Â Â  stpÂ Â Â Â  D_l, D_h, [dstend, -16]
+Â Â Â Â Â Â  ret
+
+Â Â Â Â Â Â  .p2align 4
Â Â Â Â Â Â Â  /* Small copies: 0..16 bytes.Â  */
Â L(copy16):
-Â Â Â Â Â Â  tbzÂ Â Â Â  count, 3, 1f
+Â Â Â Â Â Â  cmpÂ Â Â Â  count, 8
+Â Â Â Â Â Â  b.loÂ Â Â  1f
Â Â Â Â Â Â Â  ldrÂ Â Â Â  A_l, [src]
Â Â Â Â Â Â Â  ldrÂ Â Â Â  A_h, [srcend, -8]
Â Â Â Â Â Â Â  strÂ Â Â Â  A_l, [dstin]
Â Â Â Â Â Â Â  strÂ Â Â Â  A_h, [dstend, -8]
Â Â Â Â Â Â Â  ret
+Â Â Â Â Â Â  .p2align 4
Â 1:
Â Â Â Â Â Â Â  tbzÂ Â Â Â  count, 2, 1f
Â Â Â Â Â Â Â  ldrÂ Â Â Â  A_lw, [src]
@@ -92,33 +112,21 @@ L(copy16):
Â Â Â Â Â Â Â  strÂ Â Â Â  A_lw, [dstin]
Â Â Â Â Â Â Â  strÂ Â Â Â  A_hw, [dstend, -4]
Â Â Â Â Â Â Â  ret
-Â Â Â Â Â Â  .p2align 4
+
+Â Â Â Â Â Â  /* Copy 0..3 bytes.Â  Use a branchless sequence that copies the same
+Â Â Â Â Â Â Â Â Â  byte 3 times if count==1, or the 2nd byte twice if count==2.Â  */
Â 1:
Â Â Â Â Â Â Â  cbzÂ Â Â Â  count, 2f
+Â Â Â Â Â Â  lsrÂ Â Â Â  tmp1, count, 1
Â Â Â Â Â Â Â  ldrbÂ Â Â  A_lw, [src]
-Â Â Â Â Â Â  tbzÂ Â Â Â  count, 1, 1f
-Â Â Â Â Â Â  ldrhÂ Â Â  A_hw, [srcend, -2]
-Â Â Â Â Â Â  strhÂ Â Â  A_hw, [dstend, -2]
-1:Â Â Â Â  strbÂ Â Â  A_lw, [dstin]
+Â Â Â Â Â Â  ldrbÂ Â Â  A_hw, [srcend, -1]
+Â Â Â Â Â Â  ldrbÂ Â Â  B_lw, [src, tmp1]
+Â Â Â Â Â Â  strbÂ Â Â  A_lw, [dstin]
+Â Â Â Â Â Â  strbÂ Â Â  B_lw, [dstin, tmp1]
+Â Â Â Â Â Â  strbÂ Â Â  A_hw, [dstend, -1]
Â 2:Â Â Â Â  ret

Â Â Â Â Â Â Â  .p2align 4
-Â Â Â Â Â Â  /* Medium copies: 17..96 bytes.Â  */
-L(copy_medium):
-Â Â Â Â Â Â  ldpÂ Â Â Â  A_l, A_h, [src]
-Â Â Â Â Â Â  tbnzÂ Â Â  count, 6, L(copy96)
-Â Â Â Â Â Â  ldpÂ Â Â Â  D_l, D_h, [srcend, -16]
-Â Â Â Â Â Â  tbzÂ Â Â Â  count, 5, 1f
-Â Â Â Â Â Â  ldpÂ Â Â Â  B_l, B_h, [src, 16]
-Â Â Â Â Â Â  ldpÂ Â Â Â  C_l, C_h, [srcend, -32]
-Â Â Â Â Â Â  stpÂ Â Â Â  B_l, B_h, [dstin, 16]
-Â Â Â Â Â Â  stpÂ Â Â Â  C_l, C_h, [dstend, -32]
-1:
-Â Â Â Â Â Â  stpÂ Â Â Â  A_l, A_h, [dstin]
-Â Â Â Â Â Â  stpÂ Â Â Â  D_l, D_h, [dstend, -16]
-Â Â Â Â Â Â  ret
-
-Â Â Â Â Â Â  .p2align 4
Â Â Â Â Â Â Â  /* Copy 64..96 bytes.Â  Copy 64 bytes from the start and
Â Â Â Â Â Â Â Â Â Â  32 bytes from the end.Â  */
Â L(copy96):
