user: 请从给定的汇编指令推导出C源代码:

```asm
<four1>:
  endbr64
  push   %r13
  push   %r12
  lea    (%rsi,%rsi,1),%r12d
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  cmp    $0x1,%r12d
  jbe    L124
  mov    %rdi,%rbx
  mov    %esi,%eax
  mov    %esi,%edi
  mov    %edx,%r10d
  and    $0x7fffffff,%edi
  test   $0x7ffffffe,%eax
  lea    0x18(%rbx),%rcx
  mov    $0x1,%esi
  setne  %r9b
  mov    $0x1,%edx
  nopl   0x0(%rax,%rax,1)
L69:
  mov    %edi,%eax
  cmp    %edi,%edx
  jbe    L97
  test   %r9b,%r9b
  jne    L95
  jmp    L97
  nopl   (%rax)
L137:
  cmp    %eax,%edx
  jbe    L97
L95:
  sub    %eax,%edx
  shr    %eax
  cmp    $0x1,%eax
  ja     L137
L97:
  add    %eax,%edx
  lea    0x2(%rsi),%eax
  cmp    %eax,%r12d
  jbe    L129
  cmp    %eax,%edx
  jbe    L46
  movsd  (%rcx),%xmm1
  mov    %edx,%r8d
  add    $0x3,%esi
  lea    (%rbx,%r8,8),%r8
  lea    (%rbx,%rsi,8),%rsi
  movsd  (%r8),%xmm0
  movsd  %xmm1,(%r8)
  lea    0x1(%rdx),%r8d
  lea    (%rbx,%r8,8),%r8
  movsd  %xmm0,(%rcx)
  movsd  (%r8),%xmm0
  movsd  (%rsi),%xmm1
  movsd  %xmm1,(%r8)
  movsd  %xmm0,(%rsi)
L46:
  add    $0x10,%rcx
  mov    %eax,%esi
  jmp    L69
  nopl   (%rax)
L102:
  cmp    %r13d,%r12d
  ja     L75
L124:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L129:
  cmp    $0x2,%r12d
  jbe    L124
  pxor   %xmm6,%xmm6
  mov    $0x2,%r13d
  cvtsi2sd %r10d,%xmm6
  movsd  %xmm6,0x18(%rsp)
  nopl   0x0(%rax,%rax,1)
L75:
  mov    %r13d,%eax
  pxor   %xmm0,%xmm0
  movsd  D20(%rip),%xmm1
  add    %r13d,%r13d
  cvtsi2sd %rax,%xmm0
  mov    %rax,%rbp
  divsd  %xmm0,%xmm1
  movsd  D35(%rip),%xmm0
  mulsd  0x18(%rsp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm1,0x10(%rsp)
  call   <sin@plt>
  movsd  D33(%rip),%xmm5
  movsd  0x10(%rsp),%xmm1
  mulsd  %xmm0,%xmm5
  mulsd  %xmm0,%xmm5
  movapd %xmm1,%xmm0
  movsd  %xmm5,0x8(%rsp)
  call   <sin@plt>
  cmp    $0x1,%ebp
  movsd  0x8(%rsp),%xmm5
  movapd %xmm0,%xmm6
  jbe    L102
  mov    D21(%rip),%rax
  pxor   %xmm4,%xmm4
  mov    $0x1,%r8d
  lea    0x1(%rbp),%edi
  movq   %rax,%xmm3
  nopl   0x0(%rax)
L36:
  mov    %r8d,%eax
  cmp    %r8d,%r12d
  jb     L50
L98:
  lea    (%rdi,%rax,1),%ecx
  lea    0x0(%rbp,%rax,1),%edx
  lea    (%rbx,%rdx,8),%rdx
  lea    (%rbx,%rcx,8),%rsi
  mov    %eax,%ecx
  movsd  (%rdx),%xmm2
  movsd  (%rsi),%xmm0
  lea    (%rbx,%rcx,8),%rcx
  movapd %xmm2,%xmm1
  movapd %xmm0,%xmm7
  mulsd  %xmm3,%xmm1
  mulsd  %xmm4,%xmm7
  mulsd  %xmm4,%xmm2
  mulsd  %xmm3,%xmm0
  subsd  %xmm7,%xmm1
  addsd  %xmm2,%xmm0
  movsd  (%rcx),%xmm2
  subsd  %xmm1,%xmm2
  movsd  %xmm2,(%rdx)
  lea    0x1(%rax),%edx
  add    %r13d,%eax
  lea    (%rbx,%rdx,8),%rdx
  movsd  (%rdx),%xmm2
  subsd  %xmm0,%xmm2
  movsd  %xmm2,(%rsi)
  addsd  (%rcx),%xmm1
  movsd  %xmm1,(%rcx)
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  cmp    %eax,%r12d
  jae    L98
L50:
  movapd %xmm5,%xmm0
  movapd %xmm6,%xmm1
  add    $0x2,%r8d
  mulsd  %xmm4,%xmm1
  mulsd  %xmm3,%xmm0
  subsd  %xmm1,%xmm0
  movapd %xmm5,%xmm1
  mulsd  %xmm4,%xmm1
  addsd  %xmm3,%xmm0
  mulsd  %xmm6,%xmm3
  addsd  %xmm1,%xmm3
  addsd  %xmm3,%xmm4
  cmp    %ebp,%r8d
  jae    L102
  movapd %xmm0,%xmm3
  jmp    L36
```

tool_calls: name: retrieve_data
arguments: data_label: D20
data_type: f64
name: retrieve_data
arguments: data_label: D35
data_type: f64
name: retrieve_data
arguments: data_label: D33
data_type: f32[2]
name: retrieve_data
arguments: data_label: D21
data_type: f64

tool: D20: 6.28318530717959

tool: D35: 0.5

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

tool: D21: 1

assistant: ```c
void four1(data, nn, isign) double data[];
unsigned int nn;
int isign;
{
  unsigned int n, mmax, m, j, istep, i;
  double wtemp, wr, wpr, wpi, wi, theta;
  double tempr, tempi;
  n = nn << 1;
  j = 1;
  for (i = 1; i < n; i += 2) {
    if (j > i) {
      tempr = (data[j]);
      (data[j]) = (data[i]);
      (data[i]) = tempr;
      tempr = (data[j + 1]);
      (data[j + 1]) = (data[i + 1]);
      (data[i + 1]) = tempr;
    }
    m = n >> 1;
    while (m >= 2 && j > m) {
      j -= m;
      m >>= 1;
    }
    j += m;
  }
  mmax = 2;
  while (n > mmax) {
    istep = mmax << 1;
    theta = isign * (6.28318530717959 / mmax);
    wtemp = sin(0.5 * theta);
    wpr = -2.0 * wtemp * wtemp;
    wpi = sin(theta);
    wr = 1.0;
    wi = 0.0;
    for (m = 1; m < mmax; m += 2) {
      for (i = m; i <= n; i += istep) {
        j = i + mmax;
        tempr = wr * data[j] - wi * data[j + 1];
        tempi = wr * data[j + 1] + wi * data[j];
        data[j] = data[i] - tempr;
        data[j + 1] = data[i + 1] - tempi;
        data[i] += tempr;
        data[i + 1] += tempi;
      }
      wr = (wtemp = wr) * wpr - wi * wpi + wr;
      wi = wi * wpr + wtemp * wpi + wi;
    }
    mmax = istep;
  }
}
```