user: Translate the below assembly code into C programming language:

```asm
<ft_memmove>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  lea    0x0(,%rdx,8),%edi
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdx,%rbx
  call   <malloc@plt>
  mov    %rax,%rdi
  test   %rbx,%rbx
  je     L125
  lea    -0x1(%rbx),%rsi
  lea    0x1(%rbp),%rdx
  cmp    $0x6,%rsi
  seta   %r8b
  sub    %rdx,%rax
  cmp    $0xe,%rax
  jbe    L243
  test   %r8b,%r8b
  je     L243
  mov    %rbx,%rdx
  cmp    $0xe,%rsi
  jbe    L188
  and    $0xfffffffffffffff0,%rdx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L135:
  movdqu 0x0(%rbp,%rax,1),%xmm0
  movups %xmm0,(%rdi,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L135
  mov    %rbx,%rax
  and    $0xfffffffffffffff0,%rax
  test   $0xf,%bl
  je     L295
  mov    %rbx,%rdx
  sub    %rax,%rdx
  lea    -0x1(%rdx),%rcx
  cmp    $0x6,%rcx
  jbe    L267
L193:
  mov    0x0(%rbp,%rax,1),%rcx
  mov    %rcx,(%rdi,%rax,1)
  mov    %rdx,%rcx
  and    $0xfffffffffffffff8,%rcx
  add    %rcx,%rax
  cmp    %rcx,%rdx
  je     L295
L267:
  movzbl 0x0(%rbp,%rax,1),%edx
  mov    %dl,(%rdi,%rax,1)
  lea    0x1(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L295
  movzbl 0x1(%rbp,%rax,1),%edx
  mov    %dl,0x1(%rdi,%rax,1)
  lea    0x2(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L295
  movzbl 0x2(%rbp,%rax,1),%edx
  mov    %dl,0x2(%rdi,%rax,1)
  lea    0x3(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L295
  movzbl 0x3(%rbp,%rax,1),%edx
  mov    %dl,0x3(%rdi,%rax,1)
  lea    0x4(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L295
  movzbl 0x4(%rbp,%rax,1),%edx
  mov    %dl,0x4(%rdi,%rax,1)
  lea    0x5(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L295
  movzbl 0x5(%rbp,%rax,1),%edx
  mov    %dl,0x5(%rdi,%rax,1)
  lea    0x6(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L295
  movzbl 0x6(%rbp,%rax,1),%edx
  mov    %dl,0x6(%rdi,%rax,1)
L295:
  lea    0x1(%rdi),%rdx
  mov    %r12,%rax
  sub    %rdx,%rax
  cmp    $0xe,%rax
  jbe    L311
  test   %r8b,%r8b
  je     L311
  mov    %rbx,%rdx
  cmp    $0xe,%rsi
  jbe    L105
  and    $0xfffffffffffffff0,%rdx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L141:
  movdqu (%rdi,%rax,1),%xmm1
  movups %xmm1,(%r12,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L141
  mov    %rbx,%rax
  and    $0xfffffffffffffff0,%rax
  test   $0xf,%bl
  je     L125
  mov    %rbx,%rdx
  sub    %rax,%rdx
  lea    -0x1(%rdx),%rcx
  cmp    $0x6,%rcx
  jbe    L98
L130:
  mov    (%rdi,%rax,1),%rcx
  mov    %rcx,(%r12,%rax,1)
  mov    %rdx,%rcx
  and    $0xfffffffffffffff8,%rcx
  add    %rcx,%rax
  cmp    %rdx,%rcx
  je     L125
L98:
  movzbl (%rdi,%rax,1),%edx
  mov    %dl,(%r12,%rax,1)
  lea    0x1(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L125
  movzbl 0x1(%rdi,%rax,1),%edx
  mov    %dl,0x1(%r12,%rax,1)
  lea    0x2(%rax),%rdx
  cmp    %rbx,%rdx
  jae    L125
  movzbl 0x2(%rdi,%rax,1),%edx
  mov    %dl,0x2(%r12,%rax,1)
  lea    0x3(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L125
  movzbl 0x3(%rdi,%rax,1),%edx
  mov    %dl,0x3(%r12,%rax,1)
  lea    0x4(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L125
  movzbl 0x4(%rdi,%rax,1),%edx
  mov    %dl,0x4(%r12,%rax,1)
  lea    0x5(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L125
  movzbl 0x5(%rdi,%rax,1),%edx
  mov    %dl,0x5(%r12,%rax,1)
  lea    0x6(%rax),%rdx
  cmp    %rdx,%rbx
  jbe    L125
  movzbl 0x6(%rdi,%rax,1),%edx
  mov    %dl,0x6(%r12,%rax,1)
L125:
  call   <free@plt>
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L311:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L314:
  movzbl (%rdi,%rax,1),%edx
  mov    %dl,(%r12,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rbx
  jne    L314
  call   <free@plt>
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  xchg   %ax,%ax
L243:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L196:
  movzbl 0x0(%rbp,%rax,1),%edx
  mov    %dl,(%rdi,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rbx
  jne    L196
  jmp    L295
L188:
  xor    %eax,%eax
  jmp    L193
L105:
  xor    %eax,%eax
  jmp    L130
```

assistant: ```c
void *ft_memmove(void *s1, const void *s2, size_t n) {
  size_t i;
  char *tmp;
  char *ptr1;
  char *ptr2;
  i = 0;
  ptr1 = ((char *)s1);
  ptr2 = ((char *)s2);
  tmp = malloc(sizeof(ptr2) * n);
  while (i < n) {
    tmp[i] = ptr2[i];
    i++;
  }
  i = 0;
  while (i < n) {
    ptr1[i] = tmp[i];
    i++;
  }
  free(tmp);
  return (s1);
}
```