user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<raid_sort>:
  endbr64
  mov    %rsi,%rax
  cmp    $0x6,%edi
  ja     L78
  mov    %edi,%edi
  lea    D9(%rip),%rcx
  movslq (%rcx,%rdi,4),%rdx
  add    %rcx,%rdx
  notrack jmp *%rdx
  mov    (%rsi),%edx
  mov    0x4(%rsi),%ecx
  cmp    %ecx,%edx
  jle    L78
  mov    %ecx,(%rsi)
  mov    %edx,0x4(%rsi)
  ret
  mov    (%rsi),%edx
  mov    0x8(%rsi),%ecx
  cmp    %ecx,%edx
  jle    L249
  mov    %ecx,(%rsi)
  mov    %edx,0x8(%rsi)
L249:
  mov    (%rax),%edx
  mov    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L48
  mov    %ecx,(%rax)
  mov    %edx,0x4(%rax)
L48:
  mov    0x4(%rax),%edx
  mov    0x8(%rax),%ecx
  cmp    %ecx,%edx
  jle    L78
  mov    %ecx,0x4(%rax)
  mov    %edx,0x8(%rax)
  ret
  mov    (%rsi),%edx
  mov    0x8(%rsi),%ecx
  cmp    %ecx,%edx
  jle    L127
  mov    %ecx,(%rsi)
  mov    %edx,0x8(%rsi)
L127:
  mov    0x4(%rax),%edx
  mov    0xc(%rax),%ecx
  cmp    %ecx,%edx
  jle    L266
  mov    %ecx,0x4(%rax)
  mov    %edx,0xc(%rax)
L266:
  mov    (%rax),%edx
  mov    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L211
  mov    %ecx,(%rax)
  mov    %edx,0x4(%rax)
L211:
  mov    0x8(%rax),%edx
  mov    0xc(%rax),%ecx
  cmp    %ecx,%edx
  jle    L103
  mov    %ecx,0x8(%rax)
  mov    %edx,0xc(%rax)
L103:
  mov    0x4(%rax),%edx
  mov    0x8(%rax),%ecx
  cmp    %ecx,%edx
  jle    L78
  mov    %ecx,0x4(%rax)
  mov    %edx,0x8(%rax)
  ret
  mov    (%rsi),%edx
  mov    0x10(%rsi),%ecx
  cmp    %ecx,%edx
  jle    L71
  mov    %ecx,(%rsi)
  mov    %edx,0x10(%rsi)
L71:
  mov    (%rax),%edx
  mov    0x8(%rax),%ecx
  cmp    %ecx,%edx
  jle    L45
  mov    %ecx,(%rax)
  mov    %edx,0x8(%rax)
L45:
  mov    0x4(%rax),%edx
  mov    0xc(%rax),%ecx
  cmp    %ecx,%edx
  jle    L58
  mov    %ecx,0x4(%rax)
  mov    %edx,0xc(%rax)
L58:
  mov    0x8(%rax),%edx
  mov    0x10(%rax),%ecx
  cmp    %ecx,%edx
  jle    L4
  mov    %ecx,0x8(%rax)
  mov    %edx,0x10(%rax)
L4:
  mov    (%rax),%edx
  mov    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L92
  mov    %ecx,(%rax)
  mov    %edx,0x4(%rax)
L92:
  mov    0x8(%rax),%edx
  mov    0xc(%rax),%ecx
  cmp    %ecx,%edx
  jle    L206
  mov    %ecx,0x8(%rax)
  mov    %edx,0xc(%rax)
L206:
  mov    0x4(%rax),%edx
  mov    0x10(%rax),%ecx
  cmp    %ecx,%edx
  jle    L208
  mov    %ecx,0x4(%rax)
  mov    %edx,0x10(%rax)
L208:
  mov    0x4(%rax),%edx
  mov    0x8(%rax),%ecx
  cmp    %ecx,%edx
  jle    L307
  mov    %ecx,0x4(%rax)
  mov    %edx,0x8(%rax)
L307:
  mov    0xc(%rax),%edx
  mov    0x10(%rax),%ecx
  cmp    %ecx,%edx
  jle    L78
  mov    %ecx,0xc(%rax)
  mov    %edx,0x10(%rax)
  ret
  mov    (%rsi),%edx
  mov    0x10(%rsi),%ecx
  cmp    %ecx,%edx
  jle    L209
  mov    %ecx,(%rsi)
  mov    %edx,0x10(%rsi)
L209:
  mov    0x4(%rax),%edx
  mov    0x14(%rax),%ecx
  cmp    %ecx,%edx
  jle    L124
  mov    %ecx,0x4(%rax)
  mov    %edx,0x14(%rax)
L124:
  mov    (%rax),%edx
  mov    0x8(%rax),%ecx
  cmp    %ecx,%edx
  jle    L64
  mov    %ecx,(%rax)
  mov    %edx,0x8(%rax)
L64:
  mov    0x4(%rax),%edx
  mov    0xc(%rax),%ecx
  cmp    %ecx,%edx
  jle    L228
  mov    %ecx,0x4(%rax)
  mov    %edx,0xc(%rax)
L228:
  mov    0x8(%rax),%edx
  mov    0x10(%rax),%ecx
  cmp    %ecx,%edx
  jle    L108
  mov    %ecx,0x8(%rax)
  mov    %edx,0x10(%rax)
L108:
  mov    0xc(%rax),%edx
  mov    0x14(%rax),%ecx
  cmp    %ecx,%edx
  jle    L214
  mov    %ecx,0xc(%rax)
  mov    %edx,0x14(%rax)
L214:
  mov    (%rax),%edx
  mov    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L273
  mov    %ecx,(%rax)
  mov    %edx,0x4(%rax)
L273:
  mov    0x8(%rax),%edx
  mov    0xc(%rax),%ecx
  cmp    %ecx,%edx
  jle    L263
  mov    %ecx,0x8(%rax)
  mov    %edx,0xc(%rax)
L263:
  mov    0x10(%rax),%edx
  mov    0x14(%rax),%ecx
  cmp    %ecx,%edx
  jle    L9
  mov    %ecx,0x10(%rax)
  mov    %edx,0x14(%rax)
L9:
  mov    0x4(%rax),%edx
  mov    0x10(%rax),%ecx
  cmp    %ecx,%edx
  jle    L264
  mov    %ecx,0x4(%rax)
  mov    %edx,0x10(%rax)
L264:
  mov    0x4(%rax),%edx
  mov    0x8(%rax),%ecx
  cmp    %ecx,%edx
  jle    L66
  mov    %ecx,0x4(%rax)
  mov    %edx,0x8(%rax)
L66:
  mov    0xc(%rax),%edx
  mov    0x10(%rax),%ecx
  cmp    %ecx,%edx
  jle    L78
  mov    %ecx,0xc(%rax)
  mov    %edx,0x10(%rax)
L78:
  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;
  }
}
```