user: Converte this assembly snippet into its equivalent C code:

```asm
<bitrevR2>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r11
  mov    %rdi,-0x50(%rsp)
  mov    %esi,%edi
  mov    %rdx,%r14
  mov    %rdx,-0x38(%rsp)
  lea    0x3(%rsi),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %eax,%ecx
  sar    %ecx
  mov    $0x1,%eax
  mov    %eax,%r8d
  shl    %cl,%r8d
  mov    %eax,%esi
  mov    %edi,%ecx
  shl    %cl,%esi
  mov    %esi,%r10d
  sub    %r8d,%r10d
  mov    %edi,%edx
  shr    $0x1f,%edx
  add    %edi,%edx
  sar    %edx
  lea    -0x1(%rdx),%ecx
  shl    %cl,%eax
  lea    -0x1(%rax),%r15d
  mov    %r15d,-0x40(%rsp)
  add    $0x1,%edi
  mov    %edi,%ecx
  shr    $0x1f,%ecx
  add    %edi,%ecx
  sar    %ecx
  add    $0x1,%ecx
  mov    %ecx,-0x3c(%rsp)
  mov    %r8d,%r8d
  shl    $0x2,%r8
  mov    %r8,-0x70(%rsp)
  mov    %r11,%rbx
  add    %r8,%rbx
  mov    %rbx,-0x8(%rsp)
  cmp    %rbx,%r11
  jae    L8
  lea    0x1(%rsi),%edi
  lea    0x2(%rsi),%ecx
  lea    0x3(%rsi),%r9d
  movslq %r15d,%rbx
  mov    %rbx,-0x18(%rsp)
  lea    0x0(,%rbx,4),%r8
  mov    %r14,%rbx
  lea    (%r14,%r8,1),%r11
  mov    %r11,-0x48(%rsp)
  mov    %esi,%esi
  lea    0x0(,%rsi,4),%r12
  mov    %edi,%esi
  shl    $0x2,%rsi
  mov    %ecx,%ecx
  lea    0x0(,%rcx,4),%r14
  mov    %r9d,%r9d
  lea    0x0(,%r9,4),%r13
  add    $0x1,%edx
  mov    $0x1,%edi
  mov    %edx,%ecx
  shl    %cl,%edi
  movslq %edi,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    %rcx,-0x10(%rsp)
  mov    %r15d,%eax
  cltq
  lea    -0x4(%rbx,%rax,4),%rax
  mov    %rax,-0x28(%rsp)
  mov    %r10d,%eax
  mov    %rax,-0x30(%rsp)
  lea    -0x8(%rbx,%r8,1),%rax
  mov    %rax,-0x20(%rsp)
  jmp    L54
L12:
  mov    -0x38(%rsp),%rax
  mov    -0x68(%rsp),%rdi
  mov    (%rax,%rdi,4),%eax
  shl    $0x2,%eax
  cltq
  add    -0x30(%rsp),%rax
  mov    -0x50(%rsp),%rbx
  lea    (%rbx,%rax,4),%r11
  mov    %edi,%eax
  movzbl -0x3c(%rsp),%ecx
  shl    %cl,%eax
  cltq
  lea    (%rbx,%rax,4),%rbx
  mov    -0x48(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x60(%rsp)
  shl    $0x2,%eax
  cltq
  lea    (%rbx,%rax,4),%rdx
  movss  (%r11),%xmm1
  movss  0x4(%r11),%xmm0
  movss  (%r11,%r12,1),%xmm9
  movss  (%r11,%rsi,1),%xmm8
  cmp    %edi,-0x40(%rsp)
  jle    L75
  mov    -0x5c(%rsp),%eax
  mov    %rax,-0x58(%rsp)
  shl    $0x2,%rax
  mov    -0x20(%rsp),%rbp
  sub    %rax,%rbp
  mov    -0x28(%rsp),%rcx
  mov    %r11,%rax
  movss  %xmm0,-0x60(%rsp)
  movaps %xmm8,%xmm6
L36:
  movss  0x8(%rax),%xmm5
  movss  0xc(%rax),%xmm4
  movss  (%rax,%r14,1),%xmm8
  movss  (%rax,%r13,1),%xmm15
  movss  (%rdx),%xmm3
  movss  0x4(%rdx),%xmm2
  lea    (%rdx,%r12,1),%r10
  movss  (%r10),%xmm14
  lea    (%rdx,%rsi,1),%r9
  movss  (%r9),%xmm13
  movss  0x8(%rdx),%xmm12
  movss  0xc(%rdx),%xmm7
  lea    (%rdx,%r14,1),%r8
  movss  (%r8),%xmm11
  lea    (%rdx,%r13,1),%rdi
  movss  (%rdi),%xmm10
  movaps %xmm1,%xmm0
  addss  %xmm9,%xmm0
  movss  %xmm0,(%rdx)
  movss  -0x60(%rsp),%xmm0
  addss  %xmm6,%xmm0
  movss  %xmm0,0x4(%rdx)
  subss  %xmm9,%xmm1
  movss  %xmm1,0x8(%rdx)
  movss  -0x60(%rsp),%xmm0
  subss  %xmm6,%xmm0
  movss  %xmm0,0xc(%rdx)
  movaps %xmm5,%xmm6
  addss  %xmm8,%xmm6
  movss  %xmm6,(%r10)
  movaps %xmm4,%xmm6
  addss  %xmm15,%xmm6
  movss  %xmm6,(%r9)
  subss  %xmm8,%xmm5
  movss  %xmm5,(%r8)
  subss  %xmm15,%xmm4
  movss  %xmm4,(%rdi)
  movaps %xmm3,%xmm4
  addss  %xmm14,%xmm4
  movss  %xmm4,(%rax)
  movaps %xmm2,%xmm4
  addss  %xmm13,%xmm4
  movss  %xmm4,0x4(%rax)
  subss  %xmm14,%xmm3
  movss  %xmm3,0x8(%rax)
  subss  %xmm13,%xmm2
  movss  %xmm2,0xc(%rax)
  movaps %xmm12,%xmm2
  addss  %xmm11,%xmm2
  movss  %xmm2,(%rax,%r12,1)
  movaps %xmm7,%xmm2
  addss  %xmm10,%xmm2
  movss  %xmm2,(%rax,%rsi,1)
  subss  %xmm11,%xmm12
  movss  %xmm12,(%rax,%r14,1)
  subss  %xmm10,%xmm7
  movss  %xmm7,(%rax,%r13,1)
  sub    -0x70(%rsp),%rax
  movss  (%rax),%xmm1
  movss  0x4(%rax),%xmm7
  movss  %xmm7,-0x60(%rsp)
  movss  (%rax,%r12,1),%xmm9
  movss  (%rax,%rsi,1),%xmm6
  mov    (%rcx),%edi
  lea    0x0(,%rdi,4),%edx
  movslq %edx,%rdx
  lea    (%rbx,%rdx,4),%rdx
  sub    $0x4,%rcx
  cmp    %rbp,%rcx
  jne    L36
  movaps %xmm7,%xmm0
  movaps %xmm6,%xmm8
  mov    -0x58(%rsp),%rax
  mov    -0x70(%rsp),%rbx
  imul   %rbx,%rax
  sub    %rbx,%r11
  sub    %rax,%r11
L75:
  movss  0x8(%r11),%xmm3
  movss  0xc(%r11),%xmm2
  lea    (%r11,%r14,1),%rdx
  movss  (%rdx),%xmm5
  lea    (%r11,%r13,1),%rax
  movss  (%rax),%xmm4
  movaps %xmm1,%xmm6
  addss  %xmm9,%xmm6
  movss  %xmm6,(%r11)
  movaps %xmm0,%xmm6
  addss  %xmm8,%xmm6
  movss  %xmm6,0x4(%r11)
  subss  %xmm9,%xmm1
  movss  %xmm1,0x8(%r11)
  subss  %xmm8,%xmm0
  movss  %xmm0,0xc(%r11)
  movaps %xmm3,%xmm0
  addss  %xmm5,%xmm0
  movss  %xmm0,(%r11,%r12,1)
  movaps %xmm2,%xmm0
  addss  %xmm4,%xmm0
  movss  %xmm0,(%r11,%rsi,1)
  subss  %xmm5,%xmm3
  movss  %xmm3,(%rdx)
  subss  %xmm4,%xmm2
  movss  %xmm2,(%rax)
  subq   $0x1,-0x68(%rsp)
  mov    -0x68(%rsp),%rax
  addl   $0x1,-0x5c(%rsp)
  test   %eax,%eax
  jns    L12
L60:
  mov    -0x10(%rsp),%rbx
  add    %rbx,-0x50(%rsp)
  mov    -0x50(%rsp),%rax
  cmp    %rax,-0x8(%rsp)
  jbe    L8
L54:
  mov    -0x18(%rsp),%rax
  mov    %rax,-0x68(%rsp)
  movl   $0xffffffff,-0x5c(%rsp)
  cmpl   $0x0,-0x40(%rsp)
  jns    L12
  jmp    L60
L8:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void bitrevR2(float *ioptr, int M, int16_t *BRLow) {
  float f0r;
  float f0i;
  float f1r;
  float f1i;
  float f2r;
  float f2i;
  float f3r;
  float f3i;
  float f4r;
  float f4i;
  float f5r;
  float f5i;
  float f6r;
  float f6i;
  float f7r;
  float f7i;
  float t0r;
  float t0i;
  float t1r;
  float t1i;
  float *p0r;
  float *p1r;
  float *IOP;
  float *iolimit;
  int Colstart;
  int iCol;
  unsigned int posA;
  unsigned int posAi;
  unsigned int posB;
  unsigned int posBi;
  const unsigned int Nrems2 = ((uint32_t)1 << ((M + 3) / 2));
  const unsigned int Nroot_1_ColInc = ((uint32_t)1 << (M)) - Nrems2;
  const unsigned int Nroot_1 = ((uint32_t)1 << (M / 2 - 1)) - 1;
  const unsigned int ColstartShift = (M + 1) / 2 + 1;
  posA = ((uint32_t)1 << (M));
  posAi = posA + 1;
  posB = posA + 2;
  posBi = posB + 1;
  iolimit = ioptr + Nrems2;
  for (; ioptr < iolimit; ioptr += ((uint32_t)1 << (M / 2 + 1))) {
    for (Colstart = Nroot_1; Colstart >= 0; Colstart--) {
      iCol = Nroot_1;
      p0r = ioptr + Nroot_1_ColInc + BRLow[Colstart] * 4;
      IOP = ioptr + (Colstart << ColstartShift);
      p1r = IOP + BRLow[iCol] * 4;
      f0r = *(p0r);
      f0i = *(p0r + 1);
      f1r = *(p0r + posA);
      f1i = *(p0r + posAi);
      for (; iCol > Colstart;) {
        f2r = *(p0r + 2);
        f2i = *(p0r + (2 + 1));
        f3r = *(p0r + posB);
        f3i = *(p0r + posBi);
        f4r = *(p1r);
        f4i = *(p1r + 1);
        f5r = *(p1r + posA);
        f5i = *(p1r + posAi);
        f6r = *(p1r + 2);
        f6i = *(p1r + (2 + 1));
        f7r = *(p1r + posB);
        f7i = *(p1r + posBi);
        t0r = f0r + f1r;
        t0i = f0i + f1i;
        f1r = f0r - f1r;
        f1i = f0i - f1i;
        t1r = f2r + f3r;
        t1i = f2i + f3i;
        f3r = f2r - f3r;
        f3i = f2i - f3i;
        f0r = f4r + f5r;
        f0i = f4i + f5i;
        f5r = f4r - f5r;
        f5i = f4i - f5i;
        f2r = f6r + f7r;
        f2i = f6i + f7i;
        f7r = f6r - f7r;
        f7i = f6i - f7i;
        *(p1r) = t0r;
        *(p1r + 1) = t0i;
        *(p1r + 2) = f1r;
        *(p1r + (2 + 1)) = f1i;
        *(p1r + posA) = t1r;
        *(p1r + posAi) = t1i;
        *(p1r + posB) = f3r;
        *(p1r + posBi) = f3i;
        *(p0r) = f0r;
        *(p0r + 1) = f0i;
        *(p0r + 2) = f5r;
        *(p0r + (2 + 1)) = f5i;
        *(p0r + posA) = f2r;
        *(p0r + posAi) = f2i;
        *(p0r + posB) = f7r;
        *(p0r + posBi) = f7i;
        p0r -= Nrems2;
        f0r = *(p0r);
        f0i = *(p0r + 1);
        f1r = *(p0r + posA);
        f1i = *(p0r + posAi);
        iCol -= 1;
        p1r = IOP + BRLow[iCol] * 4;
      }
      f2r = *(p0r + 2);
      f2i = *(p0r + (2 + 1));
      f3r = *(p0r + posB);
      f3i = *(p0r + posBi);
      t0r = f0r + f1r;
      t0i = f0i + f1i;
      f1r = f0r - f1r;
      f1i = f0i - f1i;
      t1r = f2r + f3r;
      t1i = f2i + f3i;
      f3r = f2r - f3r;
      f3i = f2i - f3i;
      *(p0r) = t0r;
      *(p0r + 1) = t0i;
      *(p0r + 2) = f1r;
      *(p0r + (2 + 1)) = f1i;
      *(p0r + posA) = t1r;
      *(p0r + posAi) = t1i;
      *(p0r + posB) = f3r;
      *(p0r + posBi) = f3i;
    }
  }
}
```