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

```asm
<rlft3>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rdi,0x40(%rsp)
  mov    %rsi,0x50(%rsp)
  mov    %rdx,%rsi
  mov    %rdx,0x38(%rsp)
  mov    %rcx,%r15
  mov    %r8,%rbx
  mov    %r9d,0x6c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  lea    0x4(,%r8,4),%rcx
  mov    %rcx,0x48(%rsp)
  mov    (%rdi,%rdx,8),%rax
  add    (%rax,%r15,8),%rcx
  mov    %rcx,%rax
  mov    0x8(%rdi),%rdx
  sub    0x8(%rdx),%rax
  lea    -0x4(%rax),%rdx
  sar    $0x2,%rdx
  mov    %r15,%rax
  imul   %r8,%rax
  imul   %rsi,%rax
  cmp    %rax,%rdx
  jne    L77
L132:
  pxor   %xmm2,%xmm2
  cvtsi2sdl 0x6c(%rsp),%xmm2
  movapd %xmm2,%xmm0
  mulsd  D2(%rip),%xmm0
  pxor   %xmm6,%xmm6
  cvtsd2ss %xmm0,%xmm6
  movss  %xmm6,0x68(%rsp)
  test   %rbx,%rbx
  js     L67
  pxor   %xmm0,%xmm0
  cvtsi2sd %rbx,%xmm0
L79:
  movsd  D10(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mulsd  %xmm2,%xmm1
  movq   %xmm1,%rbp
  movapd %xmm1,%xmm0
  mulsd  D42(%rip),%xmm0
  call   <sin@plt>
  movapd %xmm0,%xmm1
  mulsd  D20(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rsp)
  movq   %rbp,%xmm0
  call   <sin@plt>
  movsd  %xmm0,0x18(%rsp)
  mov    0x38(%rsp),%rax
  mov    %rax,0x78(%rsp)
  mov    %r15,0x80(%rsp)
  mov    %rbx,%rax
  shr    %rax
  mov    %rax,0x88(%rsp)
  cmpl   $0x1,0x6c(%rsp)
  je     L171
  cmpq   $0x0,0x38(%rsp)
  je     L53
L10:
  shr    $0x2,%rbx
  mov    %rbx,0x60(%rsp)
  mov    0x40(%rsp),%rax
  lea    0x8(%rax),%r14
  mov    0x48(%rsp),%rax
  add    $0x4,%rax
  mov    %rax,0x58(%rsp)
  lea    0x1(%r15,%r15,1),%rax
  mov    %rax,0x28(%rsp)
  movq   $0x1,0x30(%rsp)
  mov    $0x1,%r12d
  movss  D59(%rip),%xmm6
  movss  D68(%rip),%xmm9
  movss  0x68(%rsp),%xmm7
  xorps  %xmm9,%xmm7
  movaps %xmm6,%xmm8
  jmp    L178
L77:
  lea    D18(%rip),%rdi
  call   <nrerror@plt>
  jmp    L132
L67:
  mov    %rbx,%rax
  shr    %rax
  mov    %rbx,%rdx
  and    $0x1,%edx
  or     %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L79
L171:
  lea    0x70(%rsp),%rsi
  mov    0x40(%rsp),%r14
  mov    0x8(%r14),%rax
  mov    0x8(%rax),%rdi
  mov    $0x1,%ecx
  mov    $0x3,%edx
  call   <fourn@plt>
  cmpq   $0x0,0x38(%rsp)
  je     L202
  lea    0x8(%r14),%rsi
  mov    0x50(%rsp),%rax
  lea    0x8(%rax),%rcx
  mov    $0x1,%r8d
  jmp    L95
L92:
  mov    (%rsi),%rdi
  mov    (%rdi,%rax,1),%rdi
  movss  0x4(%rdi),%xmm0
  mov    (%rcx),%rdi
  movss  %xmm0,-0x4(%rdi,%rax,1)
  mov    (%rsi),%rdi
  mov    (%rdi,%rax,1),%rdi
  movss  0x8(%rdi),%xmm0
  mov    (%rcx),%rdi
  movss  %xmm0,(%rdi,%rax,1)
  add    $0x1,%rdx
  add    $0x8,%rax
  cmp    %rdx,%r15
  jae    L92
L30:
  add    $0x1,%r8
  add    $0x8,%rsi
  add    $0x8,%rcx
  cmp    %r8,0x38(%rsp)
  jb     L10
L95:
  mov    $0x8,%eax
  mov    $0x1,%edx
  test   %r15,%r15
  jne    L92
  jmp    L30
L148:
  cmp    $0x1,%rax
  mov    %rax,%rdx
  cmovne %rcx,%rdx
  mov    (%r14),%rdi
  mov    (%rdi,%rax,8),%rdi
  movss  0x4(%rdi),%xmm0
  mov    (%r12),%r9
  lea    0x0(,%rdx,4),%r8
  movss  (%r9,%rdx,4),%xmm11
  movaps %xmm0,%xmm2
  addss  %xmm11,%xmm2
  mulss  %xmm8,%xmm2
  movss  0x8(%rdi),%xmm1
  movss  0x4(%r9,%r8,1),%xmm10
  movaps %xmm1,%xmm3
  subss  %xmm10,%xmm3
  mulss  %xmm8,%xmm3
  subss  %xmm11,%xmm0
  mulss  0x68(%rsp),%xmm0
  addss  %xmm10,%xmm1
  mulss  %xmm7,%xmm1
  movaps %xmm2,%xmm10
  addss  %xmm1,%xmm10
  movss  %xmm10,0x4(%rdi)
  mov    (%r14),%rdi
  mov    (%rdi,%rax,8),%rdi
  movaps %xmm3,%xmm10
  addss  %xmm0,%xmm10
  movss  %xmm10,0x8(%rdi)
  mov    (%r12),%rdi
  subss  %xmm1,%xmm2
  movss  %xmm2,(%rdi,%rdx,4)
  mov    (%r12),%rdx
  subss  %xmm3,%xmm0
  movss  %xmm0,0x4(%rdx,%r8,1)
L69:
  add    $0x1,%rax
  sub    $0x2,%rcx
  cmp    %rax,%r15
  jb     L110
L230:
  cmp    $0x1,%r11
  je     L148
  mov    %r13,%rdx
  sub    %rax,%rdx
  cmp    $0x1,%rax
  cmove  %rax,%rdx
  mov    (%r14),%rdi
  mov    (%rdi,%rax,8),%r9
  mov    (%rsp),%rdi
  add    %r9,%rdi
  movss  (%rdi),%xmm3
  mov    (%rsi),%r8
  mov    (%r8,%rdx,8),%r8
  movss  (%r8,%rbp,1),%xmm11
  movss  (%r9,%rbx,1),%xmm1
  movss  (%r8,%r10,1),%xmm10
  movaps %xmm1,%xmm0
  subss  %xmm10,%xmm0
  mulss  %xmm6,%xmm0
  movaps %xmm3,%xmm2
  addss  %xmm11,%xmm2
  mulss  %xmm6,%xmm2
  cvtss2sd %xmm2,%xmm2
  addss  %xmm10,%xmm1
  mulss  %xmm7,%xmm1
  cvtss2sd %xmm1,%xmm1
  movapd %xmm1,%xmm10
  mulsd  %xmm4,%xmm10
  subss  %xmm11,%xmm3
  mulss  0x68(%rsp),%xmm3
  cvtss2sd %xmm3,%xmm3
  movapd %xmm3,%xmm12
  mulsd  %xmm5,%xmm12
  movapd %xmm2,%xmm11
  addsd  %xmm10,%xmm11
  subsd  %xmm12,%xmm11
  cvtsd2ss %xmm11,%xmm11
  movss  %xmm11,(%rdi)
  mulsd  %xmm4,%xmm3
  mulsd  %xmm5,%xmm1
  mov    (%r14),%rdi
  mov    (%rdi,%rax,8),%rdi
  pxor   %xmm11,%xmm11
  cvtss2sd %xmm0,%xmm11
  addsd  %xmm3,%xmm11
  addsd  %xmm1,%xmm11
  cvtsd2ss %xmm11,%xmm11
  movss  %xmm11,(%rdi,%rbx,1)
  mov    (%rsi),%rdi
  mov    (%rdi,%rdx,8),%rdi
  subsd  %xmm10,%xmm2
  addsd  %xmm12,%xmm2
  cvtsd2ss %xmm2,%xmm2
  movss  %xmm2,(%rdi,%rbp,1)
  mov    (%rsi),%rdi
  mov    (%rdi,%rdx,8),%rdx
  xorps  %xmm9,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm3,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rdx,%r10,1)
  jmp    L69
L110:
  movsd  0x10(%rsp),%xmm3
  movapd %xmm3,%xmm0
  mulsd  %xmm4,%xmm0
  movsd  0x18(%rsp),%xmm2
  movapd %xmm2,%xmm1
  mulsd  %xmm5,%xmm1
  subsd  %xmm1,%xmm0
  addsd  %xmm4,%xmm0
  mulsd  %xmm5,%xmm3
  mulsd  %xmm2,%xmm4
  addsd  %xmm3,%xmm4
  addsd  %xmm4,%xmm5
  add    $0x1,%r11
  sub    $0x8,%r10
  cmp    %r11,0x8(%rsp)
  je     L21
  movapd %xmm0,%xmm4
L139:
  test   %r15,%r15
  je     L110
  mov    0x20(%rsp),%rax
  sub    %r10,%rax
  mov    %rax,(%rsp)
  lea    -0x4(%r10),%rbp
  lea    0x0(,%r11,8),%rbx
  mov    0x28(%rsp),%rcx
  mov    $0x1,%eax
  lea    0x2(%r15),%r13
  jmp    L230
L21:
  addq   $0x1,0x30(%rsp)
  mov    0x30(%rsp),%rax
  add    $0x8,%r14
  cmp    %rax,0x38(%rsp)
  jb     L53
  mov    0x38(%rsp),%rax
  lea    0x2(%rax),%r12
  mov    0x30(%rsp),%rax
  sub    %rax,%r12
  cmp    $0x1,%rax
  cmove  %rax,%r12
L178:
  shl    $0x3,%r12
  mov    0x40(%rsp),%rax
  lea    (%rax,%r12,1),%rsi
  add    0x50(%rsp),%r12
  mov    0x60(%rsp),%rax
  add    $0x2,%rax
  mov    %rax,0x8(%rsp)
  mov    0x58(%rsp),%r10
  movsd  D0(%rip),%xmm4
  pxor   %xmm5,%xmm5
  mov    $0x1,%r11d
  mov    0x48(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x20(%rsp)
  jmp    L139
L53:
  cmpl   $0xffffffff,0x6c(%rsp)
  je     L228
L202:
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L90
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L228:
  lea    0x70(%rsp),%rsi
  mov    0x40(%rsp),%rax
  mov    0x8(%rax),%rax
  mov    0x8(%rax),%rdi
  mov    $0xffffffff,%ecx
  mov    $0x3,%edx
  call   <fourn@plt>
  jmp    L202
L90:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D2
data_type: f32[2]
name: read_data
arguments: label: D10
data_type: f64
name: read_data
arguments: label: D42
data_type: f64
name: read_data
arguments: label: D20
data_type: f32[2]
name: read_data
arguments: label: D59
data_type: byte[4]
name: read_data
arguments: label: D68
data_type: byte[4]
name: read_data
arguments: label: D18
data_type: string
name: read_data
arguments: label: D0
data_type: f64

tool: {"D2": [0.0,-1.75]}

tool: D10: 6.28318530717959

tool: D42: 0.5

tool: {"D20": [0.0,-2.0]}

tool: {"D59": [0x00,0x00,0x00,0x3f]}

tool: {"D68": [0x00,0x00,0x00,0x80]}

tool: D18: rlft3: problem with dimensions or contiguity of data array


tool: D0: 1

assistant: ```c
void rlft3(float ***data, float **speq, unsigned long nn1, unsigned long nn2, unsigned long nn3, int isign) {
  void fourn(float data[], unsigned long nn[], int ndim, int isign);
  void nrerror(char error_text[]);
  unsigned long i1, i2, i3, j1, j2, j3, nn[4], ii3;
  double theta, wi, wpi, wpr, wr, wtemp;
  float c1, c2, h1r, h1i, h2r, h2i;
  if (1 + &data[nn1][nn2][nn3] - &data[1][1][1] != nn1 * nn2 * nn3)
    nrerror("rlft3: problem with dimensions or contiguity of data array\n");
  c1 = 0.5;
  c2 = -0.5 * isign;
  theta = isign * (6.28318530717959 / nn3);
  wtemp = sin(0.5 * theta);
  wpr = -2.0 * wtemp * wtemp;
  wpi = sin(theta);
  nn[1] = nn1;
  nn[2] = nn2;
  nn[3] = nn3 >> 1;
  if (isign == 1) {
    fourn(&data[1][1][1] - 1, nn, 3, isign);
    for (i1 = 1; i1 <= nn1; i1++)
      for (i2 = 1, j2 = 0; i2 <= nn2; i2++) {
        speq[i1][++j2] = data[i1][i2][1];
        speq[i1][++j2] = data[i1][i2][2];
      }
  }
  for (i1 = 1; i1 <= nn1; i1++) {
    j1 = (i1 != 1 ? nn1 - i1 + 2 : 1);
    wr = 1.0;
    wi = 0.0;
    for (ii3 = 1, i3 = 1; i3 <= (nn3 >> 2) + 1; i3++, ii3 += 2) {
      for (i2 = 1; i2 <= nn2; i2++) {
        if (i3 == 1) {
          j2 = (i2 != 1 ? ((nn2 - i2) << 1) + 3 : 1);
          h1r = c1 * (data[i1][i2][1] + speq[j1][j2]);
          h1i = c1 * (data[i1][i2][2] - speq[j1][j2 + 1]);
          h2i = c2 * (data[i1][i2][1] - speq[j1][j2]);
          h2r = -c2 * (data[i1][i2][2] + speq[j1][j2 + 1]);
          data[i1][i2][1] = h1r + h2r;
          data[i1][i2][2] = h1i + h2i;
          speq[j1][j2] = h1r - h2r;
          speq[j1][j2 + 1] = h2i - h1i;
        } else {
          j2 = (i2 != 1 ? nn2 - i2 + 2 : 1);
          j3 = nn3 + 3 - (i3 << 1);
          h1r = c1 * (data[i1][i2][ii3] + data[j1][j2][j3]);
          h1i = c1 * (data[i1][i2][ii3 + 1] - data[j1][j2][j3 + 1]);
          h2i = c2 * (data[i1][i2][ii3] - data[j1][j2][j3]);
          h2r = -c2 * (data[i1][i2][ii3 + 1] + data[j1][j2][j3 + 1]);
          data[i1][i2][ii3] = h1r + wr * h2r - wi * h2i;
          data[i1][i2][ii3 + 1] = h1i + wr * h2i + wi * h2r;
          data[j1][j2][j3] = h1r - wr * h2r + wi * h2i;
          data[j1][j2][j3 + 1] = -h1i + wr * h2i + wi * h2r;
        }
      }
      wr = (wtemp = wr) * wpr - wi * wpi + wr;
      wi = wi * wpr + wtemp * wpi + wi;
    }
  }
  if (isign == -1)
    fourn(&data[1][1][1] - 1, nn, 3, isign);
}
```