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

```asm
<ptr_move>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x60,%rsp
  mov    %rdi,-0x2048(%rbp)
  mov    %rsi,-0x2050(%rbp)
  mov    %rdx,-0x2058(%rbp)
  mov    %rcx,-0x2060(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x2048(%rbp),%rax
  mov    %rax,%rdi
  call   <assert@plt>
  mov    -0x2060(%rbp),%rax
  cmp    -0x2050(%rbp),%rax
  jb     L73
  mov    -0x2050(%rbp),%rdx
  mov    -0x2058(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x2060(%rbp)
  jb     L262
L73:
  mov    -0x2060(%rbp),%rax
  cmp    -0x2050(%rbp),%rax
  jae    L137
  mov    -0x2050(%rbp),%rdx
  mov    -0x2058(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x2030(%rbp)
  mov    -0x2060(%rbp),%rax
  mov    %rax,-0x2050(%rbp)
  mov    -0x2030(%rbp),%rax
  sub    -0x2058(%rbp),%rax
  mov    %rax,-0x2060(%rbp)
  jmp    L126
L137:
  mov    -0x2060(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x2030(%rbp)
  mov    -0x2050(%rbp),%rdx
  mov    -0x2058(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x2060(%rbp)
L126:
  lea    -0x2010(%rbp),%rax
  mov    %rax,-0x2018(%rbp)
  mov    -0x2060(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x2030(%rbp),%rcx
  mov    -0x2050(%rbp),%rax
  add    %rcx,%rax
  cmp    %rax,%rdx
  jbe    L40
  jmp    L236
L91:
  mov    -0x2060(%rbp),%rax
  sub    -0x2050(%rbp),%rax
  mov    %rax,-0x2058(%rbp)
  cmpq   $0x400,-0x2058(%rbp)
  jbe    L24
  mov    -0x2058(%rbp),%rax
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x2018(%rbp)
  cmpq   $0x0,-0x2018(%rbp)
  jne    L24
  lea    -0x2010(%rbp),%rax
  mov    %rax,-0x2018(%rbp)
  movq   $0x400,-0x2058(%rbp)
L24:
  mov    -0x2060(%rbp),%rax
  sub    -0x2058(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x2048(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x2028(%rbp)
  mov    -0x2018(%rbp),%rax
  mov    %rax,-0x2020(%rbp)
  mov    -0x2058(%rbp),%rax
  mov    %rax,-0x2038(%rbp)
  jmp    L35
L132:
  mov    -0x2028(%rbp),%rdx
  lea    0x8(%rdx),%rax
  mov    %rax,-0x2028(%rbp)
  mov    -0x2020(%rbp),%rax
  lea    0x8(%rax),%rcx
  mov    %rcx,-0x2020(%rbp)
  mov    (%rdx),%rdx
  mov    %rdx,(%rax)
  subq   $0x1,-0x2038(%rbp)
L35:
  cmpq   $0x0,-0x2038(%rbp)
  jne    L132
  mov    -0x2060(%rbp),%rax
  sub    -0x2058(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x2048(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x2020(%rbp)
  mov    -0x2030(%rbp),%rax
  sub    -0x2060(%rbp),%rax
  mov    %rax,-0x2038(%rbp)
  jmp    L78
L140:
  mov    -0x2028(%rbp),%rdx
  lea    0x8(%rdx),%rax
  mov    %rax,-0x2028(%rbp)
  mov    -0x2020(%rbp),%rax
  lea    0x8(%rax),%rcx
  mov    %rcx,-0x2020(%rbp)
  mov    (%rdx),%rdx
  mov    %rdx,(%rax)
  subq   $0x1,-0x2038(%rbp)
L78:
  cmpq   $0x0,-0x2038(%rbp)
  jne    L140
  mov    -0x2018(%rbp),%rax
  mov    %rax,-0x2028(%rbp)
  mov    -0x2058(%rbp),%rax
  mov    %rax,-0x2038(%rbp)
  jmp    L255
L217:
  mov    -0x2028(%rbp),%rdx
  lea    0x8(%rdx),%rax
  mov    %rax,-0x2028(%rbp)
  mov    -0x2020(%rbp),%rax
  lea    0x8(%rax),%rcx
  mov    %rcx,-0x2020(%rbp)
  mov    (%rdx),%rdx
  mov    %rdx,(%rax)
  subq   $0x1,-0x2038(%rbp)
L255:
  cmpq   $0x0,-0x2038(%rbp)
  jne    L217
  mov    -0x2058(%rbp),%rax
  sub    %rax,-0x2060(%rbp)
  mov    -0x2058(%rbp),%rax
  sub    %rax,-0x2030(%rbp)
L236:
  mov    -0x2060(%rbp),%rax
  cmp    -0x2050(%rbp),%rax
  ja     L91
  jmp    L87
L70:
  mov    -0x2030(%rbp),%rax
  sub    -0x2060(%rbp),%rax
  mov    %rax,-0x2058(%rbp)
  cmpq   $0x400,-0x2058(%rbp)
  jbe    L45
  mov    -0x2058(%rbp),%rax
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x2018(%rbp)
  cmpq   $0x0,-0x2018(%rbp)
  jne    L45
  lea    -0x2010(%rbp),%rax
  mov    %rax,-0x2018(%rbp)
  movq   $0x400,-0x2058(%rbp)
L45:
  mov    -0x2060(%rbp),%rdx
  mov    -0x2058(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x2048(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x2028(%rbp)
  mov    -0x2058(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x2018(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x2020(%rbp)
  mov    -0x2058(%rbp),%rax
  mov    %rax,-0x2038(%rbp)
  jmp    L56
L171:
  subq   $0x8,-0x2028(%rbp)
  subq   $0x8,-0x2020(%rbp)
  mov    -0x2028(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x2020(%rbp),%rax
  mov    %rdx,(%rax)
  subq   $0x1,-0x2038(%rbp)
L56:
  cmpq   $0x0,-0x2038(%rbp)
  jne    L171
  mov    -0x2060(%rbp),%rdx
  mov    -0x2058(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x2048(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x2020(%rbp)
  mov    -0x2060(%rbp),%rax
  sub    -0x2050(%rbp),%rax
  mov    %rax,-0x2038(%rbp)
  jmp    L241
L119:
  subq   $0x8,-0x2028(%rbp)
  subq   $0x8,-0x2020(%rbp)
  mov    -0x2028(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x2020(%rbp),%rax
  mov    %rdx,(%rax)
  subq   $0x1,-0x2038(%rbp)
L241:
  cmpq   $0x0,-0x2038(%rbp)
  jne    L119
  mov    -0x2058(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x2018(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x2028(%rbp)
  mov    -0x2058(%rbp),%rax
  mov    %rax,-0x2038(%rbp)
  jmp    L216
L3:
  subq   $0x8,-0x2028(%rbp)
  subq   $0x8,-0x2020(%rbp)
  mov    -0x2028(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x2020(%rbp),%rax
  mov    %rdx,(%rax)
  subq   $0x1,-0x2038(%rbp)
L216:
  cmpq   $0x0,-0x2038(%rbp)
  jne    L3
  mov    -0x2058(%rbp),%rax
  add    %rax,-0x2060(%rbp)
  mov    -0x2058(%rbp),%rax
  add    %rax,-0x2050(%rbp)
L40:
  mov    -0x2030(%rbp),%rax
  cmp    -0x2060(%rbp),%rax
  ja     L70
L87:
  lea    -0x2010(%rbp),%rax
  cmp    %rax,-0x2018(%rbp)
  je     L180
  mov    -0x2018(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  jmp    L180
L262:
  nop
L180:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L204
  call   <__stack_chk_fail@plt>
L204:
  leave
  ret
```

assistant: ```c
void ptr_move(void *array, size_t off, size_t n, size_t pos) {
  size_t i, end;
  void **src, **dst;
  void *fxd[1024], **buf;
  assert(array);
  if ((pos >= off) && (pos < off + n))
    return;
  if (pos < off) {
    end = off + n;
    off = pos;
    pos = end - n;
  } else {
    end = pos + 1;
    pos = off + n;
  }
  buf = fxd;
  if (pos + pos > end + off) {
    while (pos > off) {
      n = pos - off;
      if (n > 1024) {
        buf = (void **)malloc(n * sizeof(void *));
        if (!buf) {
          buf = fxd;
          n = 1024;
        }
      }
      src = (void **)array + pos - n;
      dst = buf;
      for (i = n; i > 0; i--)
        *dst++ = *src++;
      dst = (void **)array + pos - n;
      for (i = end - pos; i > 0; i--)
        *dst++ = *src++;
      src = buf;
      for (i = n; i > 0; i--)
        *dst++ = *src++;
      pos -= n;
      end -= n;
    }
  } else {
    while (end > pos) {
      n = end - pos;
      if (n > 1024) {
        buf = (void **)malloc(n * sizeof(void *));
        if (!buf) {
          buf = fxd;
          n = 1024;
        }
      }
      src = (void **)array + pos + n;
      dst = buf + n;
      for (i = n; i > 0; i--)
        *--dst = *--src;
      dst = (void **)array + pos + n;
      for (i = pos - off; i > 0; i--)
        *--dst = *--src;
      src = buf + n;
      for (i = n; i > 0; i--)
        *--dst = *--src;
      pos += n;
      off += n;
    }
  }
  if (buf != fxd)
    free(buf);
}
```