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

```asm
<turbulence>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,%r12d
  mov    %esi,%r13d
  mov    %edx,%ebx
  movsd  %xmm0,0x18(%rsp)
  mov    %edi,%eax
  sub    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm1,0x8(%rsp)
  mulsd  %xmm1,%xmm0
  divsd  D85(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sin@plt>
  movq   %xmm0,%rbp
  imul   $0xffffffe9,%ebx,%eax
  add    %r13d,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  D85(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sin@plt>
  movq   %rbp,%xmm2
  addsd  %xmm0,%xmm2
  movsd  %xmm2,0x10(%rsp)
  lea    (%r12,%r13,1),%ebp
  imul   $0xffffffed,%ebx,%eax
  add    %ebp,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  D85(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sin@plt>
  addsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  lea    0x0(%rbp,%r12,1),%r14d
  imul   $0xffffffeb,%ebx,%eax
  add    %r14d,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  D85(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sin@plt>
  movapd %xmm0,%xmm4
  addsd  0x10(%rsp),%xmm4
  movsd  %xmm4,0x10(%rsp)
  add    %r13d,%ebp
  lea    0x0(,%rbx,8),%r15d
  mov    %ebx,%eax
  sub    %r15d,%eax
  lea    0x0(%rbp,%rax,2),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  D85(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sin@plt>
  addsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  add    %r12d,%r14d
  imul   $0xfffffff5,%ebx,%eax
  add    %eax,%r14d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14d,%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  D85(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sin@plt>
  movapd %xmm0,%xmm6
  addsd  0x10(%rsp),%xmm6
  movsd  %xmm6,0x10(%rsp)
  sub    %r15d,%ebx
  add    %r13d,%ebp
  add    %ebx,%ebp
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  D85(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sin@plt>
  addsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  lea    0x0(,%r12,8),%eax
  sub    %r12d,%eax
  lea    (%rax,%r13,8),%eax
  add    %ebx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  D85(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sin@plt>
  addsd  0x10(%rsp),%xmm0
  mulsd  D3(%rip),%xmm0
  mulsd  0x18(%rsp),%xmm0
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_tag: D85
data_type: f64
name: read_data
arguments: data_tag: D3
data_type: byte[8]

tool: D85: 3.141592654

tool: {"D3": [0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x3f]}

assistant: ```c
double turbulence(int x, int y, int seed, double strength, double frequency) {
  double offset = sin((x - seed) * frequency / (3.141592654)) + sin((y - seed * 23) * frequency / (3.141592654)) + sin((x + y - seed * 19) * frequency / (3.141592654)) + sin((2 * x + y - seed * 21) * frequency / (3.141592654)) + sin((x + 2 * y - seed * 14) * frequency / (3.141592654)) + sin((3 * x + y - seed * 11) * frequency / (3.141592654)) + sin((x + 3 * y - seed * 7) * frequency / (3.141592654)) + sin((7 * x + 8 * y - seed * 7) * frequency / (3.141592654));
  offset /= 8;
  return strength * offset;
}
```