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

```asm
<CINTdmat_transpose>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    %rdi,-0x20(%rsp)
  mov    %rsi,-0x8(%rsp)
  mov    %ecx,-0x18(%rsp)
  cmp    $0x3,%ecx
  jle    L98
  movslq %edx,%r13
  lea    0x0(,%rdx,4),%ebp
  mov    %rsi,%rbx
  mov    %rsi,%rdx
  lea    0x0(%r13,%r13,2),%rax
  mov    %rdi,%rsi
  movslq %ebp,%rbp
  movslq %ecx,%r10
  lea    (%rdi,%rax,8),%rdi
  lea    -0x4(%rcx),%eax
  shl    $0x3,%rbp
  shl    $0x3,%r10
  shr    $0x2,%eax
  lea    0x0(,%r13,8),%r15
  lea    -0x1(%r12),%r11d
  shl    $0x4,%r13
  mov    %eax,-0x14(%rsp)
  mov    %rax,-0x10(%rsp)
  shl    $0x5,%rax
  lea    0x20(%rdx,%rax,1),%r14
  nopl   0x0(%rax,%rax,1)
L24:
  lea    (%r15,%rsi,1),%r9
  lea    (%rsi,%r13,1),%r8
  mov    %rbx,%rdx
  xor    %eax,%eax
  test   %r12d,%r12d
  jle    L54
  nopw   0x0(%rax,%rax,1)
L71:
  movsd  (%rdx),%xmm0
  mov    %rax,%rcx
  movsd  %xmm0,(%rsi,%rax,8)
  movsd  0x8(%rdx),%xmm0
  movsd  %xmm0,(%r9,%rax,8)
  movsd  0x10(%rdx),%xmm0
  movsd  %xmm0,(%r8,%rax,8)
  movsd  0x18(%rdx),%xmm0
  add    %r10,%rdx
  movsd  %xmm0,(%rdi,%rax,8)
  add    $0x1,%rax
  cmp    %r11,%rcx
  jne    L71
L54:
  add    $0x20,%rbx
  add    %rbp,%rsi
  add    %rbp,%rdi
  cmp    %r14,%rbx
  jne    L24
  mov    -0x10(%rsp),%rax
  mov    -0x18(%rsp),%edx
  add    $0x1,%rax
  imul   %rbp,%rax
  add    %rax,-0x20(%rsp)
  mov    -0x14(%rsp),%eax
  lea    0x4(,%rax,4),%eax
  sub    %eax,%edx
L34:
  cmp    $0x2,%edx
  je     L2
  cmp    $0x3,%edx
  je     L20
  cmp    $0x1,%edx
  je     L27
L55:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L2:
  movslq %r12d,%rdi
  test   %r12d,%r12d
  jle    L55
  mov    -0x8(%rsp),%rbx
  cltq
  movslq -0x18(%rsp),%rcx
  mov    %r12d,%r12d
  lea    (%rbx,%rax,8),%rdx
  mov    -0x20(%rsp),%rax
  shl    $0x3,%rcx
  lea    (%rax,%r12,8),%rsi
  nopl   0x0(%rax,%rax,1)
L124:
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  movsd  0x8(%rdx),%xmm0
  add    %rcx,%rdx
  movsd  %xmm0,(%rax,%rdi,8)
  add    $0x8,%rax
  cmp    %rax,%rsi
  jne    L124
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L27:
  test   %r12d,%r12d
  jle    L55
  mov    -0x8(%rsp),%rbx
  cltq
  movslq -0x18(%rsp),%rcx
  mov    %r12d,%r12d
  lea    (%rbx,%rax,8),%rdx
  mov    -0x20(%rsp),%rax
  shl    $0x3,%rcx
  lea    (%rax,%r12,8),%rsi
  xchg   %ax,%ax
L102:
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rcx,%rdx
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rsi
  jne    L102
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L20:
  mov    -0x20(%rsp),%r9
  movslq %r12d,%r8
  lea    0x0(,%r8,8),%rsi
  lea    (%r9,%rsi,1),%rdi
  test   %r12d,%r12d
  jle    L55
  movslq -0x18(%rsp),%rcx
  mov    -0x8(%rsp),%rbx
  cltq
  add    %rdi,%rsi
  lea    (%rbx,%rax,8),%rdx
  shl    $0x3,%rcx
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L48:
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%r9,%rax,8)
  movsd  0x8(%rdx),%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
  movsd  0x10(%rdx),%xmm0
  add    %rcx,%rdx
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %r8,%rax
  jne    L48
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L98:
  mov    -0x18(%rsp),%edx
  xor    %eax,%eax
  jmp    L34
```

assistant: ```c
void CINTdmat_transpose(double *a_t, const double *a, const int m, const int n) {
  int i, j, k;
  double *pa1, *pa2, *pa3;
  for (j = 0; j < n - 3; j += 4) {
    pa1 = a_t + m;
    pa2 = pa1 + m;
    pa3 = pa2 + m;
    for (i = 0, k = j; i < m; i++, k += n) {
      a_t[i] = a[k + 0];
      pa1[i] = a[k + 1];
      pa2[i] = a[k + 2];
      pa3[i] = a[k + 3];
    }
    a_t += m * 4;
  }
  switch (n - j) {
  case 1:
    for (i = 0, k = j; i < m; i++, k += n) {
      a_t[i] = a[k];
    }
    break;
  case 2:
    pa1 = a_t + m;
    for (i = 0, k = j; i < m; i++, k += n) {
      a_t[i] = a[k + 0];
      pa1[i] = a[k + 1];
    }
    break;
  case 3:
    pa1 = a_t + m;
    pa2 = pa1 + m;
    for (i = 0, k = j; i < m; i++, k += n) {
      a_t[i] = a[k + 0];
      pa1[i] = a[k + 1];
      pa2[i] = a[k + 2];
    }
    break;
  }
}
```