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

```asm
<cswapc2n>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x48(%rsp),%r10d
  mov    %rsi,-0x40(%rsp)
  mov    %ecx,-0x28(%rsp)
  mov    %r9d,-0x24(%rsp)
  test   %edx,%edx
  js     L72
  je     L41
  lea    -0x1(%r8),%ebx
  mov    %ebx,-0x38(%rsp)
  cmp    -0x24(%rsp),%ebx
  jge    L41
  mov    0x38(%rsp),%eax
  lea    (%r10,%r10,1),%r8d
  lea    -0x1(%r10),%ecx
  imul   %r10d,%eax
  lea    (%rax,%rax,1),%edx
  imul   %ebx,%eax
  movslq %edx,%rdi
  mov    %rdi,-0x20(%rsp)
  add    %eax,%eax
  movslq %eax,%r14
  movslq %r8d,%rax
  mov    %rax,-0x10(%rsp)
  lea    0x0(,%rax,4),%r9
  mov    -0x40(%rsp),%rax
  lea    0x8(%rax,%rcx,8),%rax
  mov    %rax,-0x18(%rsp)
L27:
  mov    -0x28(%rsp),%eax
  test   %eax,%eax
  jle    L248
  mov    -0x40(%rsp),%rsi
  lea    (%r15,%r14,4),%rdi
  mov    %r10d,%r13d
  xor    %r12d,%r12d
  xor    %r11d,%r11d
  nopl   0x0(%rax)
L218:
  xor    %eax,%eax
  test   %r10d,%r10d
  jle    L152
  nop
L14:
  movss  (%rdi,%rax,4),%xmm0
  mov    %rax,%rdx
  movss  %xmm0,(%rsi,%rax,4)
  add    $0x1,%rax
  cmp    %rdx,%rcx
  jne    L14
  movslq %r13d,%rax
  mov    -0x40(%rsp),%rbx
  add    %r14,%rax
  lea    (%r15,%rax,4),%rbp
  lea    (%r10,%r12,1),%eax
  cltq
  lea    (%rbx,%rax,4),%rbx
  xor    %eax,%eax
  nopl   0x0(%rax)
L11:
  movss  0x0(%rbp,%rax,4),%xmm0
  mov    %rax,%rdx
  movss  %xmm0,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    %rdx,%rcx
  jne    L11
L152:
  lea    0x1(%r11),%eax
  add    %r8d,%r13d
  add    %r8d,%r12d
  add    %r9,%rdi
  add    %r9,%rsi
  cmp    %eax,-0x28(%rsp)
  je     L195
  mov    %eax,%r11d
  jmp    L218
  nopw   0x0(%rax,%rax,1)
L22:
  addl   $0x1,-0x30(%rsp)
  add    -0x18(%rsp),%r15
  mov    -0x30(%rsp),%eax
  cmp    %eax,-0x24(%rsp)
  jne    L216
L41:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L92:
  mov    -0x30(%rsp),%rcx
L248:
  addl   $0x1,-0x38(%rsp)
  add    -0x20(%rsp),%r14
  mov    -0x38(%rsp),%eax
  cmp    %eax,-0x24(%rsp)
  jne    L27
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L195:
  mov    %rcx,-0x30(%rsp)
  mov    -0x18(%rsp),%rsi
  mov    %r10d,%r12d
  xor    %ebx,%ebx
  mov    -0x10(%rsp),%r13
  xor    %ebp,%ebp
  nopl   0x0(%rax)
L43:
  test   %r10d,%r10d
  jle    L109
  movslq %r12d,%rdi
  mov    -0x40(%rsp),%rax
  mov    %rbx,%rcx
  lea    (%rdi,%r14,1),%rdx
  sub    %rdi,%rcx
  lea    (%rax,%rbx,4),%rax
  lea    (%r15,%rdx,4),%rdx
  nopw   0x0(%rax,%rax,1)
L139:
  movss  (%rax),%xmm0
  add    $0x8,%rax
  movss  %xmm0,(%rdx,%rcx,4)
  movss  -0x4(%rax),%xmm0
  add    $0x4,%rdx
  movss  %xmm0,-0x4(%rdx)
  cmp    %rsi,%rax
  jne    L139
L109:
  lea    0x1(%rbp),%eax
  add    %r8d,%r12d
  add    %r13,%rbx
  add    %r9,%rsi
  cmp    %ebp,%r11d
  je     L92
  mov    %eax,%ebp
  jmp    L43
L72:
  lea    -0x1(%r8),%ebx
  mov    %ebx,-0x30(%rsp)
  cmp    %ebx,%r9d
  jle    L41
  mov    0x38(%rsp),%eax
  lea    (%r10,%r10,1),%r11d
  mov    %r15,-0x38(%rsp)
  imul   %r10d,%eax
  lea    (%rax,%rax,1),%edx
  imul   %ebx,%eax
  movslq %edx,%rdi
  lea    -0x1(%r10),%edx
  mov    %rdi,-0x18(%rsp)
  add    %eax,%eax
  movslq %eax,%rdi
  movslq %r11d,%rax
  mov    %rax,-0x8(%rsp)
  lea    0x0(,%rax,4),%rbx
  mov    %rdi,%r15
  lea    0x8(%rsi,%rdx,8),%rax
  mov    %rax,-0x10(%rsp)
  nop
L216:
  mov    -0x28(%rsp),%ecx
  test   %ecx,%ecx
  jle    L22
  mov    %rdx,-0x20(%rsp)
  mov    -0x10(%rsp),%rsi
  mov    %r10d,%r9d
  xor    %r8d,%r8d
  mov    -0x8(%rsp),%rbp
  mov    -0x38(%rsp),%r12
  xor    %r14d,%r14d
  mov    -0x40(%rsp),%r13
  xchg   %ax,%ax
L205:
  test   %r10d,%r10d
  jle    L123
  movslq %r9d,%rdi
  mov    %r8,%rcx
  lea    0x0(%r13,%r8,4),%rax
  lea    (%rdi,%r15,1),%rdx
  sub    %rdi,%rcx
  lea    (%r12,%rdx,4),%rdx
  nopl   0x0(%rax,%rax,1)
L104:
  movss  (%rdx,%rcx,4),%xmm0
  add    $0x8,%rax
  add    $0x4,%rdx
  movss  %xmm0,-0x8(%rax)
  movss  -0x4(%rdx),%xmm0
  movss  %xmm0,-0x4(%rax)
  cmp    %rax,%rsi
  jne    L104
L123:
  lea    0x1(%r14),%eax
  add    %r11d,%r9d
  add    %rbp,%r8
  add    %rbx,%rsi
  cmp    %eax,-0x28(%rsp)
  je     L94
  mov    %eax,%r14d
  jmp    L205
  nopl   0x0(%rax)
L94:
  mov    -0x38(%rsp),%rax
  mov    -0x20(%rsp),%rdx
  mov    %r10d,%r13d
  xor    %r12d,%r12d
  mov    -0x40(%rsp),%rsi
  xor    %ebp,%ebp
  lea    (%rax,%r15,4),%rdi
  nopl   0x0(%rax,%rax,1)
L35:
  xor    %eax,%eax
  test   %r10d,%r10d
  jle    L28
  nopw   0x0(%rax,%rax,1)
L140:
  movss  (%rsi,%rax,4),%xmm0
  mov    %rax,%rcx
  movss  %xmm0,(%rdi,%rax,4)
  add    $0x1,%rax
  cmp    %rcx,%rdx
  jne    L140
  mov    -0x40(%rsp),%rcx
  lea    (%r10,%r12,1),%eax
  cltq
  lea    (%rcx,%rax,4),%r9
  mov    -0x38(%rsp),%rcx
  movslq %r13d,%rax
  add    %r15,%rax
  lea    (%rcx,%rax,4),%r8
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L125:
  movss  (%r9,%rax,4),%xmm0
  mov    %rax,%rcx
  movss  %xmm0,(%r8,%rax,4)
  add    $0x1,%rax
  cmp    %rcx,%rdx
  jne    L125
L28:
  lea    0x1(%rbp),%eax
  add    %r11d,%r13d
  add    %r11d,%r12d
  add    %rbx,%rsi
  add    %rbx,%rdi
  cmp    %ebp,%r14d
  je     L22
  mov    %eax,%ebp
  jmp    L35
```

assistant: ```c
void cswapc2n(float f[], float s[], int isign, int nxh, int nyi, int nyt, int nxhd, int nyd, int ndim) {
  int i, j, k, ioff, nk;
  if (isign < 0) {
    for (k = nyi - 1; k < nyt; k++) {
      nk = 2 * ndim * nxhd * k;
      for (j = 0; j < nxh; j++) {
        ioff = 2 * ndim * j;
        for (i = 0; i < ndim; i++) {
          s[2 * i + ioff] = f[i + ndim * (2 * j) + nk];
          s[2 * i + ioff + 1] = f[i + ndim * (2 * j + 1) + nk];
        }
      }
      for (j = 0; j < nxh; j++) {
        ioff = 2 * ndim * j;
        for (i = 0; i < ndim; i++) {
          f[i + ndim * (2 * j) + nk] = s[i + ioff];
        }
        ioff += ndim;
        for (i = 0; i < ndim; i++) {
          f[i + ndim * (2 * j + 1) + nk] = s[i + ioff];
        }
      }
    }
  } else if (isign > 0) {
    for (k = nyi - 1; k < nyt; k++) {
      nk = 2 * ndim * nxhd * k;
      for (j = 0; j < nxh; j++) {
        ioff = 2 * ndim * j;
        for (i = 0; i < ndim; i++) {
          s[i + ioff] = f[i + ndim * (2 * j) + nk];
        }
        ioff += ndim;
        for (i = 0; i < ndim; i++) {
          s[i + ioff] = f[i + ndim * (2 * j + 1) + nk];
        }
      }
      for (j = 0; j < nxh; j++) {
        ioff = 2 * ndim * j;
        for (i = 0; i < ndim; i++) {
          f[i + ndim * (2 * j) + nk] = s[2 * i + ioff];
          f[i + ndim * (2 * j + 1) + nk] = s[2 * i + ioff + 1];
        }
      }
    }
  }
  return;
}
```