user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<_change_freq>:
  endbr64
  push   %r15
  movslq %esi,%rsi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x48,%rsp
  movdqa D30(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    D39(%rip),%rax
  movl   $0x1800,0x18(%rsp)
  lea    0x10(%rsp),%r15
  movaps %xmm0,0x20(%rsp)
  pxor   %xmm0,%xmm0
  mov    0x20(%rsp,%rsi,4),%r13d
  cvtsi2sd %edx,%xmm0
  divsd  D10(%rip),%xmm0
  mov    %rax,0x10(%rsp)
  mulsd  D14(%rip),%xmm0
  lea    0x1c(%rsp),%rax
  mov    %rax,0x8(%rsp)
  cvttsd2si %xmm0,%ecx
  mov    %ecx,%r14d
  movswl %cx,%r12d
  sar    $0x10,%r14d
L10:
  mov    (%r15),%ebp
  mov    %r12d,%edx
  mov    %rbx,%rdi
  add    $0x4,%r15
  add    %r13d,%ebp
  lea    0x62(%rbp),%esi
  call   <write16@plt>
  lea    0x64(%rbp),%esi
  mov    %r14d,%edx
  mov    %rbx,%rdi
  call   <write16@plt>
  cmp    %r15,0x8(%rsp)
  jne    L10
  mov    $0x152,%edx
  mov    $0x210,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x310,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x350,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x390,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x3d0,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x410,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x450,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x490,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x4d0,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x510,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x550,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x590,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x152,%edx
  mov    $0x5d0,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  mov    $0x10000,%edx
  mov    $0x11c,%esi
  mov    %rbx,%rdi
  call   <write32@plt>
  orl    $0x40040,0x100(%rbx)
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x48,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D30
data_type: byte[16]
name: extract_symbolic_data
arguments: label: D39
data_type: byte[8]
name: extract_symbolic_data
arguments: label: D10
data_type: byte[8]
name: extract_symbolic_data
arguments: label: D14
data_type: f64

tool: {"D30": [0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x80,0x01,0x00,0x00]}

tool: {"D39": [0x00,0x08,0x00,0x00,0x00,0x10,0x00,0x00]}

tool: {"D10": [0x00,0x00,0x00,0x00,0x84,0xd7,0x97,0x41]}

tool: D14: 4294967296

assistant: ```c
int _change_freq(char *BASE, int channel, int freq) {
  int FREQ, i;
  double freq_frac;
  unsigned int GC314FS_GCoffset[3] = {0x800, 0x1000, 0x1800};
  unsigned int chan_control_map[4] = {0x00, 0x80, 0x100, 0x180};
  freq_frac = (double)freq / (double)100000000;
  FREQ = 4294967296.0 * freq_frac;
  for (i = 0; i < 3; i++) {
    write16(BASE, GC314FS_GCoffset[i] + chan_control_map[channel] + 0x62, (short)(FREQ & 0x0000ffff));
    write16(BASE, GC314FS_GCoffset[i] + chan_control_map[channel] + 0x64, (short)((FREQ >> 16) & 0x0000ffff));
  }
  write32(BASE, 0x210, 0x152);
  write32(BASE, 0x310, 0x152);
  write32(BASE, 0x350, 0x152);
  write32(BASE, 0x390, 0x152);
  write32(BASE, 0x3d0, 0x152);
  write32(BASE, 0x410, 0x152);
  write32(BASE, 0x450, 0x152);
  write32(BASE, 0x490, 0x152);
  write32(BASE, 0x4d0, 0x152);
  write32(BASE, 0x510, 0x152);
  write32(BASE, 0x550, 0x152);
  write32(BASE, 0x590, 0x152);
  write32(BASE, 0x5d0, 0x152);
  write32(BASE, 0x11c, 0x00010000);
  *((unsigned int *)(BASE + 0x100)) |= 0x00000040;
  *((unsigned int *)(BASE + 0x100)) |= 0x00040000;
  return 1;
}
```