user: What would the C source look like for the assembly code provided here?

```asm
<CreateSRandomInterleaver>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  push   %r14
  push   %r13
  push   %r12
  lea    (%rdi,%rdi,4),%r12d
  push   %rbp
  mov    %rdx,%rbp
  add    %r12d,%r12d
  push   %rbx
  mov    %edi,%ebx
  sub    $0x8,%rsp
  call   <sqrt@plt>
  mov    %eax,%edi
  call   <floor@plt>
  test   %ebx,%ebx
  jle    L69
  lea    -0x1(%rbx),%edx
  mov    %rbp,%rcx
  xor    %edi,%edi
  xor    %esi,%esi
  lea    0x0(%rbp,%rdx,4),%r9
  jmp    L54
  nopw   0x0(%rax,%rax,1)
L65:
  add    %eax,%edx
  add    %edi,%edx
  cmp    %edx,%ebx
  jg     L87
  add    $0x1,%edi
  xor    %esi,%esi
L87:
  add    $0x4,%rcx
L54:
  mov    %esi,%edx
  add    $0x1,%esi
  imul   %eax,%edx
  lea    (%rdx,%rdi,1),%r8d
  mov    %r8d,(%rcx)
  cmp    %r9,%rcx
  jne    L65
L69:
  xor    %r13d,%r13d
  test   %r12d,%r12d
  jg     L145
  jmp    L16
  nopw   0x0(%rax,%rax,1)
L35:
  cmp    %r12d,%r13d
  jge    L16
L145:
  xor    %eax,%eax
  call   <genrand@plt>
  imul   %ebx,%eax
  mov    %eax,%edi
  call   <floor@plt>
  mov    %eax,%r14d
  xor    %eax,%eax
  call   <genrand@plt>
  imul   %ebx,%eax
  mov    %eax,%edi
  call   <floor@plt>
  mov    %eax,%esi
  cmp    %eax,%r14d
  je     L35
  cltq
  mov    %r14d,%r8d
  mov    %ebx,%r9d
  lea    0x0(%rbp,%rax,4),%r10
  sub    %r15d,%r8d
  xor    %eax,%eax
  cmp    %r15d,%r14d
  cmovl  %eax,%r8d
  sub    %r15d,%r9d
  lea    (%r14,%r15,1),%eax
  mov    (%r10),%edi
  cmp    %r14d,%r9d
  cmovle %ebx,%eax
  cmp    %eax,%r8d
  jge    L99
  sub    %r8d,%eax
  movslq %r8d,%r11
  sub    $0x1,%eax
  lea    0x0(%rbp,%r11,4),%rdx
  add    %r11,%rax
  lea    0x4(%rbp,%rax,4),%r8
  nopl   0x0(%rax)
L118:
  mov    %edi,%r11d
  sub    (%rdx),%r11d
  mov    %r11d,%eax
  neg    %eax
  cmovs  %r11d,%eax
  cmp    %r15d,%eax
  jl     L35
  add    $0x4,%rdx
  cmp    %r8,%rdx
  jne    L118
L99:
  mov    %esi,%edx
  xor    %eax,%eax
  movslq %r14d,%rcx
  sub    %r15d,%edx
  cmp    %r15d,%esi
  lea    0x0(%rbp,%rcx,4),%r8
  cmovl  %eax,%edx
  lea    (%rsi,%r15,1),%eax
  cmp    %esi,%r9d
  mov    (%r8),%ecx
  cmovle %ebx,%eax
  cmp    %eax,%edx
  jge    L18
  sub    %edx,%eax
  movslq %edx,%r9
  sub    $0x1,%eax
  lea    0x0(%rbp,%r9,4),%rsi
  add    %r9,%rax
  lea    0x4(%rbp,%rax,4),%r9
  nopl   0x0(%rax)
L2:
  mov    %ecx,%edx
  sub    (%rsi),%edx
  mov    %edx,%eax
  neg    %eax
  cmovs  %edx,%eax
  cmp    %r15d,%eax
  jl     L35
  add    $0x4,%rsi
  cmp    %rsi,%r9
  jne    L2
L18:
  add    $0x1,%r13d
  mov    %edi,(%r8)
  mov    %ecx,(%r10)
  cmp    %r12d,%r13d
  jl     L145
L16:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void CreateSRandomInterleaver(int N, int S, int *alpha) {
  int spacing, i, offset, index, block;
  int max_swaps, num_swaps;
  int index_1, index_2, value_1, value_2, test, start, stop;
  max_swaps = 10 * N;
  num_swaps = 0;
  spacing = floor(sqrt(N));
  offset = 0;
  block = 0;
  for (i = 0; i < N; i++) {
    index = spacing * offset + block;
    if (index >= N) {
      offset = 0;
      block++;
    }
    alpha[i] = spacing * offset + block;
    offset++;
  }
  while (num_swaps < max_swaps) {
    index_1 = (int)floor(N * genrand());
    index_2 = (int)floor(N * genrand());
    if (index_1 != index_2) {
      test = 1;
      value_1 = alpha[index_2];
      if (index_1 < S)
        start = 0;
      else
        start = index_1 - S;
      if (index_1 >= N - S)
        stop = N;
      else
        stop = index_1 + S;
      for (i = start; i < stop; i++) {
        if (abs(value_1 - alpha[i]) < S) {
          test = 0;
          break;
        }
      }
      if (test) {
        value_2 = alpha[index_1];
        if (index_2 < S)
          start = 0;
        else
          start = index_2 - S;
        if (index_2 >= N - S)
          stop = N;
        else
          stop = index_2 + S;
        for (i = start; i < stop; i++) {
          if (abs(value_2 - alpha[i]) < S) {
            test = 0;
            break;
          }
        }
        if (test) {
          alpha[index_1] = value_1;
          alpha[index_2] = value_2;
          num_swaps++;
        }
      }
    }
  }
}
```