user: 请将以下的汇编代码转换成C语言代码:

```asm
<reverse_it>:
  endbr64
  mov    %edx,%eax
  mov    %rsi,%rcx
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %eax,%r8d
  sar    %r8d
  cmp    $0x7,%edx
  jle    L14
  sar    $0x1f,%eax
  push   %r14
  shr    $0x1e,%eax
  push   %r13
  lea    (%r8,%rax,1),%r9d
  push   %r12
  and    $0x3,%r9d
  push   %rbp
  sub    %eax,%r9d
  push   %rbx
  movslq %r9d,%rax
  test   %eax,%eax
  jle    L42
  movslq %edx,%rsi
  movslq %eax,%r10
  lea    -0x1(%rax),%r11d
  shl    $0x3,%rsi
  shl    $0x3,%r10
  mov    %rsi,%r13
  lea    -0x8(%rcx,%rsi,1),%r12
  lea    -0x10(%rdi,%rsi,1),%rbx
  sub    %r10,%r13
  cmp    $0x1,%r11d
  seta   %r11b
  cmp    %r12,%rbx
  lea    (%rdi,%r13,1),%r14
  setne  %bpl
  and    %ebp,%r11d
  lea    0xf(%rdi),%rbp
  sub    %rcx,%rbp
  cmp    $0x1e,%rbp
  seta   %bpl
  and    %ebp,%r11d
  lea    (%rcx,%r10,1),%rbp
  cmp    %rbp,%r14
  lea    (%rdi,%rsi,1),%r14
  setae  %bpl
  cmp    %r14,%rcx
  setae  %r14b
  or     %r14d,%ebp
  test   %bpl,%r11b
  je     L114
  lea    (%rcx,%r13,1),%r11
  add    %rdi,%r10
  cmp    %r10,%r11
  lea    (%rcx,%rsi,1),%r11
  setae  %r10b
  cmp    %r11,%rdi
  setae  %r11b
  or     %r11b,%r10b
  je     L114
  movupd (%rbx),%xmm0
  shufpd $0x1,%xmm0,%xmm0
  movups %xmm0,(%rcx)
  movupd (%rdi),%xmm0
  shufpd $0x1,%xmm0,%xmm0
  movups %xmm0,-0x10(%rcx,%rsi,1)
  lea    -0x3(%rdx),%esi
  movslq %esi,%rsi
  movsd  (%rdi,%rsi,8),%xmm0
  movsd  %xmm0,0x10(%rcx)
  movsd  0x10(%rdi),%xmm0
  movsd  %xmm0,(%rcx,%rsi,8)
L12:
  cmp    %eax,%r8d
  jle    L109
  movslq %edx,%rdx
  sub    %rax,%rdx
  lea    -0x20(,%rdx,8),%rdx
  lea    (%rdi,%rdx,1),%rsi
  add    %rcx,%rdx
  nopl   (%rax)
L59:
  movsd  0x18(%rsi),%xmm0
  sub    $0x20,%rdx
  sub    $0x20,%rsi
  movsd  %xmm0,(%rcx,%rax,8)
  movsd  0x30(%rsi),%xmm0
  movsd  %xmm0,0x8(%rcx,%rax,8)
  movsd  0x28(%rsi),%xmm0
  movsd  %xmm0,0x10(%rcx,%rax,8)
  movsd  0x20(%rsi),%xmm0
  movsd  %xmm0,0x18(%rcx,%rax,8)
  movsd  (%rdi,%rax,8),%xmm0
  movsd  %xmm0,0x38(%rdx)
  movsd  0x8(%rdi,%rax,8),%xmm0
  movsd  %xmm0,0x30(%rdx)
  movsd  0x10(%rdi,%rax,8),%xmm0
  movsd  %xmm0,0x28(%rdx)
  movsd  0x18(%rdi,%rax,8),%xmm0
  add    $0x4,%rax
  movsd  %xmm0,0x20(%rdx)
  cmp    %eax,%r8d
  jg     L59
L109:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L14:
  movslq %edx,%rdx
  shl    $0x3,%rdx
  movsd  -0x8(%rdi,%rdx,1),%xmm0
  lea    -0x8(%rsi,%rdx,1),%rax
  movsd  %xmm0,(%rsi)
  cmp    $0x2,%r8d
  je     L113
  cmp    $0x3,%r8d
  je     L82
  movsd  (%rdi),%xmm0
  movsd  %xmm0,(%rax)
  ret
  nopl   0x0(%rax,%rax,1)
L113:
  movsd  -0x10(%rdi,%rdx,1),%xmm0
  movsd  %xmm0,0x8(%rsi)
  movsd  (%rdi),%xmm0
  movsd  %xmm0,(%rax)
  movsd  0x8(%rdi),%xmm0
  movsd  %xmm0,-0x10(%rsi,%rdx,1)
  ret
  nop
L42:
  xor    %eax,%eax
  jmp    L12
  nopw   0x0(%rax,%rax,1)
L82:
  movsd  -0x10(%rdi,%rdx,1),%xmm0
  movsd  %xmm0,0x8(%rsi)
  movsd  -0x18(%rdi,%rdx,1),%xmm0
  movsd  %xmm0,0x10(%rsi)
  movsd  (%rdi),%xmm0
  movsd  %xmm0,(%rax)
  movsd  0x8(%rdi),%xmm0
  movsd  %xmm0,-0x10(%rsi,%rdx,1)
  movsd  0x10(%rdi),%xmm0
  movsd  %xmm0,-0x18(%rsi,%rdx,1)
  ret
  nopl   (%rax)
L114:
  movsd  -0x8(%rdi,%rsi,1),%xmm0
  movsd  %xmm0,(%rcx)
  movsd  (%rdi),%xmm0
  movsd  %xmm0,(%r12)
  cmp    $0x1,%r9d
  je     L12
  movsd  (%rbx),%xmm0
  movsd  %xmm0,0x8(%rcx)
  movsd  0x8(%rdi),%xmm0
  movsd  %xmm0,-0x10(%rcx,%rsi,1)
  cmp    $0x3,%r9d
  jne    L12
  movsd  -0x18(%rdi,%rsi,1),%xmm0
  movsd  %xmm0,0x10(%rcx)
  movsd  0x10(%rdi),%xmm0
  movsd  %xmm0,-0x18(%rcx,%rsi,1)
  jmp    L12
```

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];
  }
}
```