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

```asm
<raid_sort>:
  endbr64
  mov    %rsi,%rax
  cmp    $0x6,%edi
  ja     L52
  lea    D3(%rip),%rcx
  mov    %edi,%edi
  movslq (%rcx,%rdi,4),%rdx
  add    %rcx,%rdx
  notrack jmp *%rdx
  nopl   0x0(%rax,%rax,1)
  mov    (%rsi),%r9d
  mov    0x10(%rsi),%edx
  cmp    %edx,%r9d
  jle    L193
  mov    %r9d,%ecx
  mov    %edx,(%rsi)
  mov    %r9d,0x10(%rsi)
  mov    %edx,%r9d
  mov    %ecx,%edx
L193:
  mov    0x4(%rax),%ecx
  mov    0x14(%rax),%r8d
  cmp    %r8d,%ecx
  jle    L138
  mov    %ecx,%esi
  mov    %r8d,0x4(%rax)
  mov    %ecx,0x14(%rax)
  mov    %r8d,%ecx
  mov    %esi,%r8d
L138:
  mov    0x8(%rax),%edi
  cmp    %r9d,%edi
  jge    L282
  mov    %edi,%esi
  mov    %edi,(%rax)
  mov    %r9d,%edi
  mov    %r9d,0x8(%rax)
  mov    %esi,%r9d
L282:
  mov    0xc(%rax),%esi
  cmp    %ecx,%esi
  jge    L246
  mov    %esi,%r10d
  mov    %esi,0x4(%rax)
  mov    %ecx,%esi
  mov    %ecx,0xc(%rax)
  mov    %r10d,%ecx
L246:
  cmp    %edx,%edi
  jle    L239
  mov    %edi,%r10d
  mov    %edx,0x8(%rax)
  mov    %edi,0x10(%rax)
  mov    %edx,%edi
  mov    %r10d,%edx
L239:
  cmp    %r8d,%esi
  jle    L17
  mov    %esi,%r10d
  mov    %r8d,0xc(%rax)
  mov    %esi,0x14(%rax)
  mov    %r8d,%esi
  mov    %r10d,%r8d
L17:
  cmp    %r9d,%ecx
  jge    L29
  mov    %r9d,0x4(%rax)
  mov    %ecx,(%rax)
  mov    %r9d,%ecx
L29:
  cmp    %edi,%esi
  jge    L50
  mov    %edi,%r9d
  mov    %esi,0x8(%rax)
  mov    %edi,0xc(%rax)
  mov    %esi,%edi
  mov    %r9d,%esi
L50:
  cmp    %r8d,%edx
  jle    L301
  mov    %r8d,0x10(%rax)
  mov    %edx,0x14(%rax)
  mov    %r8d,%edx
L301:
  cmp    %ecx,%edx
  jge    L277
  mov    %ecx,%r8d
  mov    %edx,0x4(%rax)
  mov    %ecx,0x10(%rax)
  mov    %edx,%ecx
  mov    %r8d,%edx
L277:
  cmp    %edi,%ecx
  jle    L100
  mov    %edi,0x4(%rax)
  mov    %ecx,0x8(%rax)
L100:
  cmp    %esi,%edx
  jge    L52
  mov    %edx,0xc(%rax)
  mov    %esi,0x10(%rax)
L52:
  ret
  nopl   0x0(%rax)
  mov    (%rsi),%edx
  mov    0x4(%rsi),%ecx
  cmp    %ecx,%edx
  jle    L52
  mov    %ecx,(%rsi)
  mov    %edx,0x4(%rsi)
  ret
  nopw   0x0(%rax,%rax,1)
  mov    (%rsi),%edx
  mov    0x8(%rsi),%ecx
  cmp    %ecx,%edx
  jle    L62
  mov    %ecx,(%rsi)
  mov    %edx,0x8(%rsi)
  mov    %edx,%esi
  mov    %ecx,%edx
  mov    %esi,%ecx
L62:
  mov    0x4(%rax),%esi
  cmp    %edx,%esi
  jge    L30
  mov    %edx,0x4(%rax)
  mov    %esi,(%rax)
  mov    %edx,%esi
L30:
  cmp    %ecx,%esi
  jle    L52
  mov    %ecx,0x4(%rax)
  mov    %esi,0x8(%rax)
  ret
  nopl   (%rax)
  mov    (%rsi),%edi
  mov    0x8(%rsi),%ecx
  cmp    %ecx,%edi
  jle    L295
  mov    %edi,%edx
  mov    %ecx,(%rsi)
  mov    %edi,0x8(%rsi)
  mov    %ecx,%edi
  mov    %edx,%ecx
L295:
  mov    0x4(%rax),%edx
  mov    0xc(%rax),%esi
  cmp    %esi,%edx
  jle    L281
  mov    %edx,%r8d
  mov    %esi,0x4(%rax)
  mov    %edx,0xc(%rax)
  mov    %esi,%edx
  mov    %r8d,%esi
L281:
  cmp    %edi,%edx
  jge    L180
  mov    %edi,0x4(%rax)
  mov    %edx,(%rax)
  mov    %edi,%edx
L180:
  cmp    %ecx,%esi
  jge    L166
  mov    %esi,0x8(%rax)
  mov    %ecx,0xc(%rax)
  mov    %esi,%ecx
L166:
  cmp    %edx,%ecx
  jge    L52
  mov    %ecx,0x4(%rax)
  mov    %edx,0x8(%rax)
  ret
  nopw   0x0(%rax,%rax,1)
  mov    (%rsi),%edi
  mov    0x10(%rsi),%edx
  cmp    %edx,%edi
  jle    L271
  mov    %edi,%ecx
  mov    %edx,(%rsi)
  mov    %edi,0x10(%rsi)
  mov    %edx,%edi
  mov    %ecx,%edx
L271:
  mov    0x8(%rax),%ecx
  cmp    %edi,%ecx
  jge    L191
  mov    %ecx,%esi
  mov    %ecx,(%rax)
  mov    %edi,%ecx
  mov    %edi,0x8(%rax)
  mov    %esi,%edi
L191:
  mov    0x4(%rax),%esi
  mov    0xc(%rax),%r8d
  cmp    %r8d,%esi
  jle    L116
  mov    %esi,%r9d
  mov    %r8d,0x4(%rax)
  mov    %esi,0xc(%rax)
  mov    %r8d,%esi
  mov    %r9d,%r8d
L116:
  cmp    %ecx,%edx
  jge    L130
  mov    %ecx,%r9d
  mov    %edx,0x8(%rax)
  mov    %ecx,0x10(%rax)
  mov    %edx,%ecx
  mov    %r9d,%edx
L130:
  cmp    %edi,%esi
  jge    L89
  mov    %edi,0x4(%rax)
  mov    %esi,(%rax)
  mov    %edi,%esi
L89:
  cmp    %r8d,%ecx
  jle    L270
  mov    %ecx,%edi
  mov    %r8d,0x8(%rax)
  mov    %ecx,0xc(%rax)
  mov    %r8d,%ecx
  mov    %edi,%r8d
L270:
  cmp    %esi,%edx
  jge    L202
  mov    %esi,%edi
  mov    %edx,0x4(%rax)
  mov    %esi,0x10(%rax)
  mov    %edx,%esi
  mov    %edi,%edx
L202:
  cmp    %esi,%ecx
  jge    L133
  mov    %ecx,0x4(%rax)
  mov    %esi,0x8(%rax)
L133:
  cmp    %r8d,%edx
  jge    L52
  mov    %edx,0xc(%rax)
  mov    %r8d,0x10(%rax)
  ret
```

assistant: ```c
void raid_sort(int n, int *v) {
  switch (n) {
  case 2:
    do {
      if (v[0] > v[1]) {
        int t = v[0];
        v[0] = v[1];
        v[1] = t;
      }
    } while (0);
    break;
  case 3:
    do {
      if (v[0] > v[2]) {
        int t = v[0];
        v[0] = v[2];
        v[2] = t;
      }
    } while (0);
    do {
      if (v[0] > v[1]) {
        int t = v[0];
        v[0] = v[1];
        v[1] = t;
      }
    } while (0);
    do {
      if (v[1] > v[2]) {
        int t = v[1];
        v[1] = v[2];
        v[2] = t;
      }
    } while (0);
    break;
  case 4:
    do {
      if (v[0] > v[2]) {
        int t = v[0];
        v[0] = v[2];
        v[2] = t;
      }
    } while (0);
    do {
      if (v[1] > v[3]) {
        int t = v[1];
        v[1] = v[3];
        v[3] = t;
      }
    } while (0);
    do {
      if (v[0] > v[1]) {
        int t = v[0];
        v[0] = v[1];
        v[1] = t;
      }
    } while (0);
    do {
      if (v[2] > v[3]) {
        int t = v[2];
        v[2] = v[3];
        v[3] = t;
      }
    } while (0);
    do {
      if (v[1] > v[2]) {
        int t = v[1];
        v[1] = v[2];
        v[2] = t;
      }
    } while (0);
    break;
  case 5:
    do {
      if (v[0] > v[4]) {
        int t = v[0];
        v[0] = v[4];
        v[4] = t;
      }
    } while (0);
    do {
      if (v[0] > v[2]) {
        int t = v[0];
        v[0] = v[2];
        v[2] = t;
      }
    } while (0);
    do {
      if (v[1] > v[3]) {
        int t = v[1];
        v[1] = v[3];
        v[3] = t;
      }
    } while (0);
    do {
      if (v[2] > v[4]) {
        int t = v[2];
        v[2] = v[4];
        v[4] = t;
      }
    } while (0);
    do {
      if (v[0] > v[1]) {
        int t = v[0];
        v[0] = v[1];
        v[1] = t;
      }
    } while (0);
    do {
      if (v[2] > v[3]) {
        int t = v[2];
        v[2] = v[3];
        v[3] = t;
      }
    } while (0);
    do {
      if (v[1] > v[4]) {
        int t = v[1];
        v[1] = v[4];
        v[4] = t;
      }
    } while (0);
    do {
      if (v[1] > v[2]) {
        int t = v[1];
        v[1] = v[2];
        v[2] = t;
      }
    } while (0);
    do {
      if (v[3] > v[4]) {
        int t = v[3];
        v[3] = v[4];
        v[4] = t;
      }
    } while (0);
    break;
  case 6:
    do {
      if (v[0] > v[4]) {
        int t = v[0];
        v[0] = v[4];
        v[4] = t;
      }
    } while (0);
    do {
      if (v[1] > v[5]) {
        int t = v[1];
        v[1] = v[5];
        v[5] = t;
      }
    } while (0);
    do {
      if (v[0] > v[2]) {
        int t = v[0];
        v[0] = v[2];
        v[2] = t;
      }
    } while (0);
    do {
      if (v[1] > v[3]) {
        int t = v[1];
        v[1] = v[3];
        v[3] = t;
      }
    } while (0);
    do {
      if (v[2] > v[4]) {
        int t = v[2];
        v[2] = v[4];
        v[4] = t;
      }
    } while (0);
    do {
      if (v[3] > v[5]) {
        int t = v[3];
        v[3] = v[5];
        v[5] = t;
      }
    } while (0);
    do {
      if (v[0] > v[1]) {
        int t = v[0];
        v[0] = v[1];
        v[1] = t;
      }
    } while (0);
    do {
      if (v[2] > v[3]) {
        int t = v[2];
        v[2] = v[3];
        v[3] = t;
      }
    } while (0);
    do {
      if (v[4] > v[5]) {
        int t = v[4];
        v[4] = v[5];
        v[5] = t;
      }
    } while (0);
    do {
      if (v[1] > v[4]) {
        int t = v[1];
        v[1] = v[4];
        v[4] = t;
      }
    } while (0);
    do {
      if (v[1] > v[2]) {
        int t = v[1];
        v[1] = v[2];
        v[2] = t;
      }
    } while (0);
    do {
      if (v[3] > v[4]) {
        int t = v[3];
        v[3] = v[4];
        v[4] = t;
      }
    } while (0);
    break;
  }
}
```