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

```asm
<bitrv1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%r8
  mov    %edi,%eax
  sar    $0x2,%eax
  cmp    $0x7,%edi
  jle    L93
  mov    $0x1,%r9d
L134:
  sar    %eax
  add    %r9d,%r9d
  cmp    %r9d,%eax
  jg     L134
  je     L161
L235:
  sar    %edi
  mov    %edi,%esi
  mov    $0x1,%r11d
  lea    0x8(%r8),%rbx
  movslq %r9d,%r10
  cmp    $0x1,%r9d
  jg     L40
  jmp    L212
L161:
  test   %r9d,%r9d
  jle    L212
L218:
  sar    %edi
  mov    %edi,%esi
  lea    (%r9,%r9,1),%r12d
  movslq %r9d,%r11
  mov    %r11,%rbp
  shl    $0x4,%rbp
  lea    (%r11,%r11,2),%rbx
  shl    $0x3,%rbx
  mov    $0x0,%ecx
  mov    $0x0,%edi
  mov    $0x0,%r13d
  lea    0x8(%r8),%rax
  mov    %rax,-0x8(%rsp)
  jmp    L213
L67:
  movslq %edi,%r10
  lea    (%r8,%r10,8),%rdx
  mov    %ecx,%eax
  add    %r10,%rax
  mov    -0x8(%rsp),%rcx
  lea    (%rcx,%rax,8),%r14
  mov    %r15d,%eax
L208:
  movsd  (%rdx),%xmm0
  movslq %eax,%rcx
  lea    (%r8,%rcx,8),%rcx
  movsd  (%rcx),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rcx)
  lea    (%r12,%rax,1),%ecx
  movsd  (%rdx,%r11,8),%xmm0
  movslq %ecx,%r10
  lea    (%r8,%r10,8),%r10
  movsd  (%r10),%xmm1
  movsd  %xmm1,(%rdx,%r11,8)
  movsd  %xmm0,(%r10)
  sub    %r9d,%ecx
  movsd  (%rdx,%rbp,1),%xmm0
  movslq %ecx,%r10
  lea    (%r8,%r10,8),%r10
  movsd  (%r10),%xmm1
  movsd  %xmm1,(%rdx,%rbp,1)
  movsd  %xmm0,(%r10)
  movsd  (%rdx,%rbx,1),%xmm0
  add    %r12d,%ecx
  movslq %ecx,%rcx
  lea    (%r8,%rcx,8),%rcx
  movsd  (%rcx),%xmm1
  movsd  %xmm1,(%rdx,%rbx,1)
  movsd  %xmm0,(%rcx)
  xor    %esi,%eax
  cmp    %eax,%esi
  jle    L118
  mov    %esi,%ecx
L160:
  sar    %ecx
  xor    %ecx,%eax
  cmp    %ecx,%eax
  jl     L160
L118:
  add    $0x8,%rdx
  cmp    %r14,%rdx
  jne    L208
L117:
  mov    %r15d,%ecx
L213:
  add    %r9d,%r13d
  movslq %r13d,%rax
  lea    (%r8,%rax,8),%rdx
  movsd  (%rdx),%xmm0
  add    %r9d,%r13d
  movslq %r13d,%rax
  lea    (%r8,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rax)
  xor    %esi,%edi
  cmp    %edi,%esi
  jle    L222
  mov    %esi,%eax
L9:
  sar    %eax
  xor    %eax,%edi
  cmp    %eax,%edi
  jl     L9
L222:
  lea    0x1(%rcx),%r15d
  cmp    %r9d,%r15d
  je     L212
  lea    (%r15,%rdi,1),%r13d
  cmp    %edi,%r13d
  jg     L67
  jmp    L117
L41:
  xor    %esi,%edi
  cmp    %edi,%esi
  jle    L40
  mov    %esi,%eax
L190:
  sar    %eax
  xor    %eax,%edi
  cmp    %eax,%edi
  jl     L190
L40:
  lea    (%r11,%rdi,1),%eax
  cmp    %edi,%eax
  jle    L184
  movslq %edi,%rdx
  lea    (%r8,%rdx,8),%rcx
  lea    -0x1(%r11),%eax
  add    %rdx,%rax
  lea    (%rbx,%rax,8),%rbp
  mov    %r11d,%edx
L7:
  movsd  (%rcx),%xmm0
  movslq %edx,%rax
  lea    (%r8,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx)
  movsd  %xmm0,(%rax)
  movsd  (%rcx,%r10,8),%xmm0
  lea    (%r9,%rdx,1),%eax
  cltq
  lea    (%r8,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx,%r10,8)
  movsd  %xmm0,(%rax)
  xor    %esi,%edx
  cmp    %edx,%esi
  jle    L220
  mov    %esi,%eax
L173:
  sar    %eax
  xor    %eax,%edx
  cmp    %eax,%edx
  jl     L173
L220:
  add    $0x8,%rcx
  cmp    %rbp,%rcx
  jne    L7
L184:
  add    $0x1,%r11d
  cmp    %r9d,%r11d
  jne    L41
L212:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L93:
  mov    $0x1,%r9d
  cmp    $0x1,%eax
  jne    L235
  mov    %eax,%r9d
  jmp    L218
```

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