user: 请将以下的汇编代码转换成C语言代码：

```asm
<ShuffleSortedArray>:
  endbr64
  push   %r15
  push   %r14
  lea    D5(%rip),%r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x228,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x218(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%esi
  jle    L86
  nopl   0x0(%rax,%rax,1)
L7:
  movslq %r13d,%rax
  shl    $0x2,%rax
  lea    (%rbx,%rax,1),%r15
  cmp    $0x8,%r12d
  ja     L68
  mov    %r12d,%edx
  movslq (%r14,%rdx,4),%rdx
  add    %r14,%rdx
  notrack jmp *%rdx
  nopw   0x0(%rax,%rax,1)
  lea    0xc(%rbx,%rax,1),%rcx
  mov    (%r15),%esi
  mov    (%rcx),%edx
  mov    %edx,(%r15)
  lea    0x8(%rbx,%rax,1),%rdx
  mov    (%rdx),%edi
  mov    %edi,(%rcx)
  mov    %esi,(%rdx)
  lea    0x10(%rbx,%rax,1),%rdx
  lea    0x14(%rbx,%rax,1),%rax
  mov    (%rdx),%ecx
L99:
  mov    (%rax),%esi
  mov    %esi,(%rdx)
  mov    %ecx,(%rax)
  test   %ebp,%ebp
  je     L86
L98:
  sub    $0x1,%ebp
  movslq %ebp,%rax
  mov    0x14(%rsp,%rax,8),%r12d
L108:
  mov    0x10(%rsp,%rax,8),%r13d
  jmp    L7
  rolq   $0x20,(%r15)
  test   %ebp,%ebp
  jne    L98
  nopl   0x0(%rax,%rax,1)
L86:
  mov    0x218(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L122
  add    $0x228,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
  lea    0x8(%rbx,%rax,1),%rdx
  mov    (%r15),%ecx
  mov    (%rdx),%esi
  mov    %esi,(%r15)
  mov    %ecx,(%rdx)
  lea    0xc(%rbx,%rax,1),%rdx
  lea    0x10(%rbx,%rax,1),%rax
  mov    (%rdx),%ecx
  jmp    L99
  lea    0x8(%rbx,%rax,1),%rax
  mov    (%r15),%edx
  mov    (%rax),%ecx
  mov    %ecx,(%r15)
  mov    %edx,(%rax)
  test   %ebp,%ebp
  jne    L98
  jmp    L86
  nopl   0x0(%rax)
  lea    0x10(%rbx,%rax,1),%rcx
  mov    (%r15),%esi
  mov    (%rcx),%edx
  mov    %edx,(%r15)
  lea    0xc(%rbx,%rax,1),%rdx
  mov    (%rdx),%edi
  mov    %edi,(%rcx)
  lea    0x4(%rbx,%rax,1),%rcx
  mov    %esi,(%rdx)
  lea    0x8(%rbx,%rax,1),%rdx
  mov    (%rcx),%esi
  mov    (%rdx),%edi
  mov    %edi,(%rcx)
  mov    %esi,(%rdx)
  lea    0x14(%rbx,%rax,1),%rdx
  lea    0x18(%rbx,%rax,1),%rax
  mov    (%rdx),%ecx
  jmp    L99
L68:
  mov    %r12d,%ecx
  lea    0x4(%rbx,%rax,1),%rdi
  mov    %r15,%rsi
  shr    $0x1f,%ecx
  add    %r12d,%ecx
  sar    %ecx
  lea    (%rcx,%r13,1),%edx
  mov    %ecx,0x8(%rsp)
  add    $0x1,%r13d
  movslq %edx,%rdx
  mov    (%rbx,%rdx,4),%r8d
  lea    0x0(,%rcx,4),%edx
  mov    %r8d,0xc(%rsp)
  call   <memmove@plt>
  lea    -0x1(%r12),%eax
  mov    0x8(%rsp),%ecx
  lea    0x1(%rbp),%esi
  mov    %eax,%edx
  mov    0xc(%rsp),%r8d
  shr    $0x1f,%edx
  lea    (%rcx,%r13,1),%edi
  add    %eax,%edx
  movd   %edi,%xmm0
  movslq %ebp,%rax
  mov    %r8d,(%r15)
  sar    %edx
  movd   %edx,%xmm1
  punpckldq %xmm1,%xmm0
  movq   %xmm0,0x10(%rsp,%rax,8)
  cmp    $0x3,%r12d
  jg     L75
  mov    %edx,%r12d
  jmp    L108
  cs nopw 0x0(%rax,%rax,1)
L75:
  mov    %esi,%ebp
  mov    %ecx,%r12d
  jmp    L7
L122:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void ShuffleSortedArray(int *array, int count) {
  struct {
    int first, count;
  } aStack[64];
  int stk = 0;
  int first = 0;
  int tmp;
  while (count > 1 || stk) {
    if (count <= 1) {
      stk--;
      first = aStack[stk].first;
      count = aStack[stk].count;
    }
    switch (count) {
    case 2:
    case 3:
      tmp = array[first];
      array[first] = array[first + 1];
      array[first + 1] = tmp;
      count = 0;
      break;
    case 4:
      tmp = array[first];
      array[first] = array[first + 2];
      array[first + 2] = tmp;
      count = 0;
      break;
    case 5:
      tmp = array[first];
      array[first] = array[first + 2];
      array[first + 2] = tmp;
      tmp = array[first + 3];
      array[first + 3] = array[first + 4];
      array[first + 4] = tmp;
      count = 0;
      break;
    case 6:
    case 7:
      tmp = array[first];
      array[first] = array[first + 3];
      array[first + 3] = array[first + 2];
      array[first + 2] = tmp;
      tmp = array[first + 4];
      array[first + 4] = array[first + 5];
      array[first + 5] = tmp;
      count = 0;
      break;
    case 8:
      tmp = array[first];
      array[first] = array[first + 4];
      array[first + 4] = array[first + 3];
      array[first + 3] = tmp;
      tmp = array[first + 1];
      array[first + 1] = array[first + 2];
      array[first + 2] = tmp;
      tmp = array[first + 5];
      array[first + 5] = array[first + 6];
      array[first + 6] = tmp;
      count = 0;
      break;
    default:
      tmp = array[first + count / 2];
      memmove(&array[first + 1], &array[first], sizeof(array[0]) * (count / 2));
      array[first] = tmp;
      first++;
      aStack[stk].first = first + count / 2;
      aStack[stk].count = (count - 1) / 2;
      stk++;
      count = count / 2;
      break;
    }
  }
}
```