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

```asm
<bitrv1>:
  endbr64
  mov    %edi,%eax
  push   %r15
  mov    %rsi,%r8
  sar    $0x2,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  cmp    $0x1,%eax
  jle    L104
  mov    $0x1,%r9d
  nopl   (%rax)
L205:
  sar    %eax
  add    %r9d,%r9d
  cmp    %r9d,%eax
  jg     L205
  je     L64
  sar    %edi
  mov    $0x1,%r11d
  lea    0x8(%r8),%rbx
  movslq %r9d,%r10
  mov    %edi,%esi
  nopl   0x0(%rax)
L201:
  lea    (%r11,%rsi,1),%eax
  cmp    %eax,%esi
  jge    L98
  movslq %esi,%rdx
  lea    -0x1(%r11),%eax
  add    %rdx,%rax
  lea    (%r8,%rdx,8),%rcx
  mov    %r11d,%edx
  lea    (%rbx,%rax,8),%rbp
  nopl   (%rax)
L151:
  movslq %edx,%rax
  movsd  (%rcx),%xmm0
  lea    (%r8,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx)
  movsd  %xmm0,(%rax)
  lea    (%r9,%rdx,1),%eax
  movsd  (%rcx,%r10,8),%xmm0
  xor    %edi,%edx
  cltq
  lea    (%r8,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx,%r10,8)
  movsd  %xmm0,(%rax)
  cmp    %edi,%edx
  jge    L59
  mov    %edi,%eax
  nopl   (%rax)
L118:
  sar    %eax
  xor    %eax,%edx
  cmp    %eax,%edx
  jl     L118
L59:
  add    $0x8,%rcx
  cmp    %rcx,%rbp
  jne    L151
L98:
  add    $0x1,%r11d
  cmp    %r9d,%r11d
  je     L132
  xor    %edi,%esi
  cmp    %edi,%esi
  jge    L201
  mov    %edi,%eax
  nopw   0x0(%rax,%rax,1)
L32:
  sar    %eax
  xor    %eax,%esi
  cmp    %eax,%esi
  jl     L32
  jmp    L201
L104:
  je     L92
L132:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L64:
  lea    (%r9,%r9,1),%ebp
L82:
  lea    0x8(%r8),%rax
  movslq %r9d,%r11
  mov    %edi,%esi
  xor    %ecx,%ecx
  mov    %rax,-0x8(%rsp)
  mov    %r11,%r12
  lea    (%r11,%r11,2),%rbx
  sar    %esi
  shl    $0x4,%r12
  shl    $0x3,%rbx
  xor    %edi,%edi
  xor    %r13d,%r13d
L33:
  add    %r9d,%r13d
  xor    %esi,%edi
  movslq %r13d,%rax
  add    %r9d,%r13d
  lea    (%r8,%rax,8),%rdx
  movslq %r13d,%rax
  lea    (%r8,%rax,8),%rax
  movsd  (%rdx),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rax)
  cmp    %esi,%edi
  jge    L112
  mov    %esi,%eax
  nopl   0x0(%rax)
L28:
  sar    %eax
  xor    %eax,%edi
  cmp    %eax,%edi
  jl     L28
L112:
  lea    0x1(%rcx),%r15d
  cmp    %r15d,%r9d
  je     L132
  lea    (%r15,%rdi,1),%r13d
  cmp    %edi,%r13d
  jle    L197
  movslq %edi,%r10
  mov    %ecx,%eax
  mov    -0x8(%rsp),%rcx
  add    %r10,%rax
  lea    (%r8,%r10,8),%rdx
  lea    (%rcx,%rax,8),%r14
  mov    %r15d,%eax
  cs nopw 0x0(%rax,%rax,1)
L52:
  movslq %eax,%rcx
  movsd  (%rdx),%xmm0
  lea    (%r8,%rcx,8),%rcx
  movsd  (%rcx),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rcx)
  lea    (%rax,%rbp,1),%ecx
  movsd  (%rdx,%r11,8),%xmm0
  xor    %esi,%eax
  movslq %ecx,%r10
  sub    %r9d,%ecx
  lea    (%r8,%r10,8),%r10
  movsd  (%r10),%xmm1
  movsd  %xmm1,(%rdx,%r11,8)
  movsd  %xmm0,(%r10)
  movslq %ecx,%r10
  add    %ebp,%ecx
  movsd  (%rdx,%r12,1),%xmm0
  lea    (%r8,%r10,8),%r10
  movslq %ecx,%rcx
  movsd  (%r10),%xmm1
  lea    (%r8,%rcx,8),%rcx
  movsd  %xmm1,(%rdx,%r12,1)
  movsd  %xmm0,(%r10)
  movsd  (%rdx,%rbx,1),%xmm0
  movsd  (%rcx),%xmm1
  movsd  %xmm1,(%rdx,%rbx,1)
  movsd  %xmm0,(%rcx)
  cmp    %eax,%esi
  jle    L206
  mov    %esi,%ecx
  nopw   0x0(%rax,%rax,1)
L70:
  sar    %ecx
  xor    %ecx,%eax
  cmp    %ecx,%eax
  jl     L70
L206:
  add    $0x8,%rdx
  cmp    %rdx,%r14
  jne    L52
L197:
  mov    %r15d,%ecx
  jmp    L33
L92:
  mov    $0x1,%r9d
  mov    $0x2,%ebp
  jmp    L82
```

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