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

```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
  movl   $0x0,0x0(%rbp)
  cmp    $0x1,%ebx
  je     L69
  lea    -0x2(%rbx),%edx
  lea    0x4(%rbp),%rcx
  xor    %edi,%edi
  lea    0x8(%rbp,%rdx,4),%r8
  mov    $0x1,%edx
L66:
  mov    %edx,%esi
  imul   %eax,%esi
  add    %edi,%esi
  cmp    %esi,%ebx
  jg     L148
  add    $0x1,%edi
  xor    %edx,%edx
L148:
  mov    %eax,%esi
  add    $0x4,%rcx
  imul   %edx,%esi
  add    $0x1,%edx
  add    %edi,%esi
  mov    %esi,-0x4(%rcx)
  cmp    %r8,%rcx
  jne    L66
L69:
  xor    %r13d,%r13d
  test   %r12d,%r12d
  jg     L5
  jmp    L65
  nopl   0x0(%rax,%rax,1)
L135:
  cmp    %r12d,%r13d
  jge    L65
L5:
  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     L135
  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    L12
  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)
L18:
  mov    %edi,%r11d
  sub    (%rdx),%r11d
  mov    %r11d,%eax
  neg    %eax
  cmovs  %r11d,%eax
  cmp    %r15d,%eax
  jl     L135
  add    $0x4,%rdx
  cmp    %rdx,%r8
  jne    L18
L12:
  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    L24
  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)
L109:
  mov    %ecx,%edx
  sub    (%rsi),%edx
  mov    %edx,%eax
  neg    %eax
  cmovs  %edx,%eax
  cmp    %r15d,%eax
  jl     L135
  add    $0x4,%rsi
  cmp    %r9,%rsi
  jne    L109
L24:
  add    $0x1,%r13d
  mov    %edi,(%r8)
  mov    %ecx,(%r10)
  cmp    %r12d,%r13d
  jl     L5
L65:
  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++;
        }
      }
    }
  }
}
```