user: What is the c source code of the assembly code below?

```asm
<bitrv1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rcx
  mov    %edi,%ebp
  sar    %ebp
  movsd  0x8(%rsi),%xmm0
  movslq %ebp,%rax
  mov    %rax,-0x18(%rsp)
  lea    0x0(,%rax,8),%rdx
  lea    (%rsi,%rdx,1),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,0x8(%rsi)
  movsd  %xmm0,(%rax)
  mov    %edi,%r8d
  sar    $0x2,%r8d
  cmp    $0xb,%edi
  jle    L139
  mov    %r8d,%r12d
  mov    $0x2,%r10d
L213:
  add    %r10d,%r10d
  sar    $0x2,%r12d
  cmp    $0x2,%r12d
  jg     L213
  je     L174
  cmp    $0x2,%r10d
  jle    L239
  mov    %r8d,%r9d
  mov    $0x2,%r12d
  lea    0x10(%rcx),%r13
  jmp    L36
L174:
  lea    0x1(%r10),%eax
  cltq
  lea    (%rcx,%rax,8),%rdx
  movsd  (%rdx),%xmm0
  lea    0x0(%rbp,%r10,1),%eax
  cltq
  lea    (%rcx,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rax)
  cmp    $0x2,%r10d
  jle    L239
  mov    %r8d,%ebx
  movslq %r10d,%r9
  mov    $0x1,%eax
  sub    -0x18(%rsp),%rax
  mov    %rax,-0x10(%rsp)
  lea    0x10(%rcx),%rax
  mov    %rax,-0x8(%rsp)
  jmp    L184
L43:
  mov    %r8d,%eax
L231:
  sar    %eax
  xor    %eax,%ebx
  cmp    %eax,%ebx
  jl     L231
L184:
  lea    (%r12,%rbx,1),%r13d
  cmp    %ebx,%r13d
  jle    L7
  movslq %ebx,%rdx
  lea    (%rcx,%rdx,8),%rdi
  mov    -0x18(%rsp),%rax
  add    %rdx,%rax
  lea    (%rcx,%rax,8),%rsi
  lea    0x0(%rbp,%rbx,1),%eax
  cltq
  add    -0x10(%rsp),%rax
  lea    (%rcx,%rax,8),%r11
  lea    -0x1(%r12),%eax
  shr    %eax
  mov    %eax,%eax
  lea    (%rdx,%rax,2),%rax
  mov    -0x8(%rsp),%rdx
  lea    (%rdx,%rax,8),%r14
  mov    %r12d,%edx
L74:
  movsd  (%rdi),%xmm0
  movslq %edx,%rax
  lea    (%rcx,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdi)
  movsd  %xmm0,(%rax)
  lea    (%r10,%rdx,1),%eax
  movsd  (%rdi,%r9,8),%xmm0
  movslq %eax,%r15
  lea    (%rcx,%r15,8),%r15
  movsd  (%r15),%xmm1
  movsd  %xmm1,(%rdi,%r9,8)
  movsd  %xmm0,(%r15)
  add    $0x1,%eax
  movsd  (%rsi,%r9,8),%xmm0
  movslq %eax,%r15
  lea    (%rcx,%r15,8),%r15
  movsd  (%r15),%xmm1
  movsd  %xmm1,(%rsi,%r9,8)
  movsd  %xmm0,(%r15)
  sub    %r10d,%eax
  movsd  (%rsi),%xmm0
  movslq %eax,%r15
  lea    (%rcx,%r15,8),%r15
  movsd  (%r15),%xmm1
  movsd  %xmm1,(%rsi)
  movsd  %xmm0,(%r15)
  add    %ebp,%eax
  movsd  0x8(%rsi),%xmm0
  movslq %eax,%r15
  lea    (%rcx,%r15,8),%r15
  movsd  (%r15),%xmm1
  movsd  %xmm1,0x8(%rsi)
  movsd  %xmm0,(%r15)
  add    %r10d,%eax
  movsd  0x8(%rsi,%r9,8),%xmm0
  movslq %eax,%r15
  lea    (%rcx,%r15,8),%r15
  movsd  (%r15),%xmm1
  movsd  %xmm1,0x8(%rsi,%r9,8)
  movsd  %xmm0,(%r15)
  sub    $0x1,%eax
  movsd  0x8(%rdi,%r9,8),%xmm0
  movslq %eax,%r15
  lea    (%rcx,%r15,8),%r15
  movsd  (%r15),%xmm1
  movsd  %xmm1,0x8(%rdi,%r9,8)
  movsd  %xmm0,(%r15)
  movsd  (%r11),%xmm0
  sub    %r10d,%eax
  cltq
  lea    (%rcx,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r11)
  movsd  %xmm0,(%rax)
  xor    %r8d,%edx
  cmp    %edx,%r8d
  jle    L65
  mov    %r8d,%eax
L23:
  sar    %eax
  xor    %eax,%edx
  cmp    %eax,%edx
  jl     L23
L65:
  add    $0x10,%rdi
  add    $0x10,%rsi
  add    $0x10,%r11
  cmp    %r14,%rdi
  jne    L74
L7:
  lea    0x1(%r13),%eax
  add    %ebp,%r13d
  movslq %eax,%rdx
  lea    (%rcx,%rdx,8),%rsi
  movsd  (%rsi),%xmm0
  movslq %r13d,%rdx
  lea    (%rcx,%rdx,8),%rdx
  movsd  (%rdx),%xmm1
  movsd  %xmm1,(%rsi)
  movsd  %xmm0,(%rdx)
  add    %r10d,%eax
  cltq
  lea    (%rcx,%rax,8),%rdx
  movsd  (%rdx),%xmm0
  add    %r10d,%r13d
  movslq %r13d,%rax
  lea    (%rcx,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rax)
  add    $0x2,%r12d
  cmp    %r10d,%r12d
  jge    L239
  xor    %r8d,%ebx
  cmp    %ebx,%r8d
  jg     L43
  jmp    L184
L162:
  mov    %r8d,%eax
L17:
  sar    %eax
  xor    %eax,%r9d
  cmp    %eax,%r9d
  jl     L17
L36:
  lea    (%r12,%r9,1),%ebx
  cmp    %r9d,%ebx
  jle    L180
  movslq %r9d,%rdx
  lea    (%rcx,%rdx,8),%rsi
  mov    -0x18(%rsp),%rax
  add    %rdx,%rax
  lea    (%rcx,%rax,8),%rdi
  lea    -0x1(%r12),%eax
  shr    %eax
  mov    %eax,%eax
  lea    (%rdx,%rax,2),%rax
  lea    0x0(%r13,%rax,8),%r11
  mov    %r12d,%edx
L143:
  movsd  (%rsi),%xmm0
  movslq %edx,%rax
  shl    $0x3,%rax
  lea    (%rcx,%rax,1),%r14
  movsd  (%r14),%xmm1
  movsd  %xmm1,(%rsi)
  movsd  %xmm0,(%r14)
  movsd  (%rdi),%xmm0
  lea    0x8(%rcx,%rax,1),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdi)
  movsd  %xmm0,(%rax)
  lea    0x1(%rbp,%rdx,1),%eax
  movsd  0x8(%rdi),%xmm0
  movslq %eax,%r14
  lea    (%rcx,%r14,8),%r14
  movsd  (%r14),%xmm1
  movsd  %xmm1,0x8(%rdi)
  movsd  %xmm0,(%r14)
  movsd  0x8(%rsi),%xmm0
  sub    $0x1,%eax
  cltq
  lea    (%rcx,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,0x8(%rsi)
  movsd  %xmm0,(%rax)
  xor    %r8d,%edx
  cmp    %edx,%r8d
  jle    L120
  mov    %r8d,%eax
L30:
  sar    %eax
  xor    %eax,%edx
  cmp    %eax,%edx
  jl     L30
L120:
  add    $0x10,%rsi
  add    $0x10,%rdi
  cmp    %r11,%rsi
  jne    L143
L180:
  lea    0x1(%rbx),%eax
  cltq
  lea    (%rcx,%rax,8),%rdx
  movsd  (%rdx),%xmm0
  lea    0x0(%rbp,%rbx,1),%eax
  cltq
  lea    (%rcx,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rax)
  add    $0x2,%r12d
  cmp    %r10d,%r12d
  jge    L239
  xor    %r8d,%r9d
  cmp    %r9d,%r8d
  jg     L162
  jmp    L36
L133:
  movsd  0x18(%rcx),%xmm0
  lea    0x10(%rcx,%rdx,1),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,0x18(%rcx)
  movsd  %xmm0,(%rax)
  jmp    L239
L139:
  cmp    $0x2,%r8d
  je     L133
L239:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void bitrv1(int n, double *a) {
  int j0, k0, j1, k1, l, m, i, j, k, nh;
  double x;
  nh = n >> 1;
  x = a[1];
  a[1] = a[nh];
  a[nh] = x;
  m = 2;
  for (l = n >> 2; l > 2; l >>= 2) {
    m <<= 1;
  }
  if (l == 2) {
    j1 = m + 1;
    k1 = m + nh;
    x = a[j1];
    a[j1] = a[k1];
    a[k1] = x;
    j0 = 0;
    for (k0 = 2; k0 < m; k0 += 2) {
      for (i = nh >> 1; i > (j0 ^= i); i >>= 1)
        ;
      k = k0;
      for (j = j0; j < j0 + k0; j += 2) {
        x = a[j];
        a[j] = a[k];
        a[k] = x;
        j1 = j + m;
        k1 = k + m;
        x = a[j1];
        a[j1] = a[k1];
        a[k1] = x;
        j1 += nh;
        k1++;
        x = a[j1];
        a[j1] = a[k1];
        a[k1] = x;
        j1 -= m;
        k1 -= m;
        x = a[j1];
        a[j1] = a[k1];
        a[k1] = x;
        j1++;
        k1 += nh;
        x = a[j1];
        a[j1] = a[k1];
        a[k1] = x;
        j1 += m;
        k1 += m;
        x = a[j1];
        a[j1] = a[k1];
        a[k1] = x;
        j1 -= nh;
        k1--;
        x = a[j1];
        a[j1] = a[k1];
        a[k1] = x;
        j1 -= m;
        k1 -= m;
        x = a[j1];
        a[j1] = a[k1];
        a[k1] = x;
        for (i = nh >> 1; i > (k ^= i); i >>= 1)
          ;
      }
      k1 = j0 + k0;
      j1 = k1 + 1;
      k1 += nh;
      x = a[j1];
      a[j1] = a[k1];
      a[k1] = x;
      j1 += m;
      k1 += m;
      x = a[j1];
      a[j1] = a[k1];
      a[k1] = x;
    }
  } else {
    j0 = 0;
    for (k0 = 2; k0 < m; k0 += 2) {
      for (i = nh >> 1; i > (j0 ^= i); i >>= 1)
        ;
      k = k0;
      for (j = j0; j < j0 + k0; j += 2) {
        x = a[j];
        a[j] = a[k];
        a[k] = x;
        j1 = j + nh;
        k1 = k + 1;
        x = a[j1];
        a[j1] = a[k1];
        a[k1] = x;
        j1++;
        k1 += nh;
        x = a[j1];
        a[j1] = a[k1];
        a[k1] = x;
        j1 -= nh;
        k1--;
        x = a[j1];
        a[j1] = a[k1];
        a[k1] = x;
        for (i = nh >> 1; i > (k ^= i); i >>= 1)
          ;
      }
      k1 = j0 + k0;
      j1 = k1 + 1;
      k1 += nh;
      x = a[j1];
      a[j1] = a[k1];
      a[k1] = x;
    }
  }
}
```