user: What would the C source look like for the assembly code provided here?

```asm
<reverse_it>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x3,-0x4(%rbp)
  jle    L69
  movl   $0x0,-0x8(%rbp)
  jmp    L47
L42:
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x8(%rbp)
L47:
  mov    -0x4(%rbp),%eax
  cltd
  shr    $0x1e,%edx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L42
  jmp    L6
L35:
  mov    -0x24(%rbp),%eax
  sub    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  sub    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  sub    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x18(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  sub    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x20(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x3,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  sub    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  sub    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  sub    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x18(%rax),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x3,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  sub    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x20(%rax),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x4,-0x8(%rbp)
L6:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L35
  jmp    L66
L69:
  cmpl   $0x2,-0x4(%rbp)
  jne    L52
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  jmp    L66
L52:
  cmpl   $0x3,-0x4(%rbp)
  jne    L81
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x18(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  jmp    L66
L81:
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
L66:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void reverse_it(double *input, double *output, int n) {
  int i, len;
  len = n / 2;
  if (len >= 4) {
    for (i = 0; i < (len % 4); ++i) {
      output[i] = input[n - 1 - i];
      output[n - 1 - i] = input[i];
    }
    for (; i < len; i += 4) {
      output[i] = input[n - i - 1];
      output[i + 1] = input[n - i - 2];
      output[i + 2] = input[n - i - 3];
      output[i + 3] = input[n - i - 4];
      output[n - i - 1] = input[i];
      output[n - i - 2] = input[i + 1];
      output[n - i - 3] = input[i + 2];
      output[n - i - 4] = input[i + 3];
    }
  } else if (len == 2) {
    output[0] = input[n - 1];
    output[1] = input[n - 2];
    output[n - 1] = input[0];
    output[n - 2] = input[1];
  } else if (len == 3) {
    output[0] = input[n - 1];
    output[1] = input[n - 2];
    output[2] = input[n - 3];
    output[n - 1] = input[0];
    output[n - 2] = input[1];
    output[n - 3] = input[2];
  } else {
    output[0] = input[n - 1];
    output[n - 1] = input[0];
  }
}
```