user: Please show me the C implementation that matches the assembly code listed below:

```asm
<CreateSRandomInterleaver>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    -0x44(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,-0x1c(%rbp)
  movl   $0x0,-0x2c(%rbp)
  mov    -0x44(%rbp),%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  mov    %eax,%edi
  call   <floor@plt>
  mov    %eax,-0x18(%rbp)
  movl   $0x0,-0x34(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L234
L95:
  mov    -0x18(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L3
  movl   $0x0,-0x34(%rbp)
  addl   $0x1,-0x30(%rbp)
L3:
  mov    -0x18(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%edx
  add    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x34(%rbp)
  addl   $0x1,-0x38(%rbp)
L234:
  mov    -0x38(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L95
  jmp    L180
L198:
  mov    $0x0,%eax
  call   <genrand@plt>
  imul   -0x44(%rbp),%eax
  mov    %eax,%edi
  call   <floor@plt>
  mov    %eax,-0x14(%rbp)
  mov    $0x0,%eax
  call   <genrand@plt>
  imul   -0x44(%rbp),%eax
  mov    %eax,%edi
  call   <floor@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  je     L180
  movl   $0x1,-0x28(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jge    L236
  movl   $0x0,-0x24(%rbp)
  jmp    L50
L236:
  mov    -0x14(%rbp),%eax
  sub    -0x48(%rbp),%eax
  mov    %eax,-0x24(%rbp)
L50:
  mov    -0x44(%rbp),%eax
  sub    -0x48(%rbp),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L101
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  jmp    L66
L101:
  mov    -0x14(%rbp),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x20(%rbp)
L66:
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L219
L24:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0xc(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  cmp    %eax,-0x48(%rbp)
  jle    L80
  movl   $0x0,-0x28(%rbp)
  jmp    L172
L80:
  addl   $0x1,-0x38(%rbp)
L219:
  mov    -0x38(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L24
L172:
  cmpl   $0x0,-0x28(%rbp)
  je     L180
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x10(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jge    L196
  movl   $0x0,-0x24(%rbp)
  jmp    L57
L196:
  mov    -0x10(%rbp),%eax
  sub    -0x48(%rbp),%eax
  mov    %eax,-0x24(%rbp)
L57:
  mov    -0x44(%rbp),%eax
  sub    -0x48(%rbp),%eax
  cmp    %eax,-0x10(%rbp)
  jl     L26
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  jmp    L71
L26:
  mov    -0x10(%rbp),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x20(%rbp)
L71:
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L56
L102:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  cmp    %eax,-0x48(%rbp)
  jle    L142
  movl   $0x0,-0x28(%rbp)
  jmp    L200
L142:
  addl   $0x1,-0x38(%rbp)
L56:
  mov    -0x38(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L102
L200:
  cmpl   $0x0,-0x28(%rbp)
  je     L180
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x2c(%rbp)
L180:
  mov    -0x2c(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L198
  nop
  nop
  leave
  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++;
        }
      }
    }
  }
}
```