user: What would the C source look like for the assembly code provided here:

```asm
<_change_freq>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x800,-0x2c(%rbp)
  movl   $0x1000,-0x28(%rbp)
  movl   $0x1800,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x80,-0x1c(%rbp)
  movl   $0x100,-0x18(%rbp)
  movl   $0x180,-0x14(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x50(%rbp),%xmm0
  movsd  D19(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm1
  movsd  D2(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x3c(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L23
L9:
  mov    -0x3c(%rbp),%eax
  movswl %ax,%edx
  mov    -0x40(%rbp),%eax
  cltq
  mov    -0x2c(%rbp,%rax,4),%ecx
  mov    -0x4c(%rbp),%eax
  cltq
  mov    -0x20(%rbp,%rax,4),%eax
  add    %ecx,%eax
  lea    0x62(%rax),%ecx
  mov    -0x48(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <write16@plt>
  mov    -0x3c(%rbp),%eax
  sar    $0x10,%eax
  movswl %ax,%edx
  mov    -0x40(%rbp),%eax
  cltq
  mov    -0x2c(%rbp,%rax,4),%ecx
  mov    -0x4c(%rbp),%eax
  cltq
  mov    -0x20(%rbp,%rax,4),%eax
  add    %ecx,%eax
  lea    0x64(%rax),%ecx
  mov    -0x48(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <write16@plt>
  addl   $0x1,-0x40(%rbp)
L23:
  cmpl   $0x2,-0x40(%rbp)
  jle    L9
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x210,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x310,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x350,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x390,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x3d0,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x410,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x450,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x490,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x4d0,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x510,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x550,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x590,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x152,%edx
  mov    $0x5d0,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  mov    $0x10000,%edx
  mov    $0x11c,%esi
  mov    %rax,%rdi
  call   <write32@plt>
  mov    -0x48(%rbp),%rax
  add    $0x100,%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%rax
  add    $0x100,%rax
  or     $0x40,%edx
  mov    %edx,(%rax)
  mov    -0x48(%rbp),%rax
  add    $0x100,%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%rax
  add    $0x100,%rax
  or     $0x40000,%edx
  mov    %edx,(%rax)
  mov    $0x1,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L14
  call   <__stack_chk_fail@plt>
L14:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D19
type: byte[8]
name: read_data
arguments: data_tag: D2
type: f64

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

tool: D2: 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;
}
```