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

```asm
<revbin_permute>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  cmp    $0x40,%rsi
  jbe    L15
  mov    %r15,%r13
  mov    %rsi,%rdi
  xor    %eax,%eax
  xor    %ebx,%ebx
  call   <ld@plt>
  lea    -0x1(%r15),%r14
  shr    %r13
  shr    $0x2,%r15
  movslq %eax,%r12
  mov    %r14,%rcx
  lea    -0x2(%r13),%rax
  mov    %r15,(%rsp)
  sub    %rax,%rcx
  mov    %rax,0x8(%rsp)
  xor    %r15d,%r15d
  mov    %rcx,0x18(%rsp)
  nopw   0x0(%rax,%rax,1)
L73:
  lea    0x1(%r15),%rsi
  xor    %r13,%rbx
  cmp    %rbx,%rsi
  jb     L50
L68:
  lea    0x2(%r15),%rbx
  mov    %r12,%rsi
  xor    %eax,%eax
  mov    %rbx,%rdi
  call   <revbin@plt>
  movslq %eax,%r9
  cmp    %r9,%rbx
  jb     L28
L63:
  lea    0x3(%r15),%rbx
  xor    %r13,%r9
  cmp    %r9,%rbx
  jb     L23
L27:
  add    $0x4,%r15
  mov    %r12,%rsi
  xor    %eax,%eax
  mov    %r15,%rdi
  call   <revbin@plt>
  movslq %eax,%rbx
  cmp    (%rsp),%r15
  jae    L72
  cmp    %rbx,%r15
  jae    L73
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <idx_swap@plt>
  mov    %r14,%rdx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  xor    %rbx,%rdx
  xor    %r15,%rsi
  xor    %eax,%eax
  call   <idx_swap@plt>
  mov    0x8(%rsp),%rax
  mov    %rbp,%rdi
  mov    %rax,%rdx
  xor    %r15,%rax
  xor    %rbx,%rdx
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <idx_swap@plt>
  mov    0x18(%rsp),%rax
  mov    %rbp,%rdi
  mov    %rax,%rdx
  xor    %r15,%rax
  mov    %rax,%rsi
  xor    %rbx,%rdx
  xor    %eax,%eax
  xor    %r13,%rbx
  call   <idx_swap@plt>
  lea    0x1(%r15),%rsi
  cmp    %rbx,%rsi
  jae    L68
L50:
  mov    %rbx,%rdx
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %rsi,0x10(%rsp)
  call   <idx_swap@plt>
  mov    0x10(%rsp),%rsi
  mov    %rbx,%rdx
  mov    %rbp,%rdi
  xor    %r14,%rdx
  xor    %eax,%eax
  xor    %r14,%rsi
  call   <idx_swap@plt>
  jmp    L68
  nopl   0x0(%rax,%rax,1)
L23:
  mov    %r9,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %r9,0x10(%rsp)
  call   <idx_swap@plt>
  mov    0x8(%rsp),%rax
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    0x10(%rsp),%rdx
  xor    %rax,%rsi
  xor    %rax,%rdx
  xor    %eax,%eax
  call   <idx_swap@plt>
  jmp    L27
  nopw   0x0(%rax,%rax,1)
L28:
  mov    %r9,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %r9,0x10(%rsp)
  xor    %r14,%rbx
  call   <idx_swap@plt>
  mov    0x10(%rsp),%r9
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  xor    %r9,%rdx
  call   <idx_swap@plt>
  mov    0x10(%rsp),%r9
  jmp    L63
  nopw   0x0(%rax,%rax,1)
L72:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L15:
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <revbin_permute_leq_64@plt>
```

assistant: ```c
void revbin_permute(double _Complex *f, unsigned long n) {
  if (n <= 64) {
    revbin_permute_leq_64(f, n);
    return;
  }
  const unsigned long ldn = ld(n);
  const unsigned long nh = (n >> 1);
  const unsigned long n1 = n - 1;
  const unsigned long nx1 = nh - 2;
  const unsigned long nx2 = n1 - nx1;
  unsigned long k = 0, r = 0;
  while (k < (n / 4)) {
    if (r > k) {
      idx_swap(f, k, r);
      idx_swap(f, n1 ^ k, n1 ^ r);
      idx_swap(f, nx1 ^ k, nx1 ^ r);
      idx_swap(f, nx2 ^ k, nx2 ^ r);
    }
    ++k;
    r ^= nh;
    if (r > k) {
      idx_swap(f, k, r);
      idx_swap(f, n1 ^ k, n1 ^ r);
    }
    ++k;
    r = revbin(k, ldn);
    if (r > k) {
      idx_swap(f, k, r);
      idx_swap(f, n1 ^ k, n1 ^ r);
    }
    ++k;
    r ^= nh;
    if (r > k) {
      idx_swap(f, k, r);
      idx_swap(f, nx1 ^ k, nx1 ^ r);
    }
    ++k;
    r = revbin(k, ldn);
  }
}
```