user: Please show me the C implementation that matches the assembly code listed below:

```asm
<twobody_scale_SD>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm1
  movsd  D66(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  D80(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  D80(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  D131(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x18,%rax
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  cmpl   $0x0,-0x24(%rbp)
  je     L30
  mov    -0x30(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x20,%rax
  movsd  D28(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x28,%rax
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x30,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x30,%rax
  movsd  D90(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x38,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x38,%rax
  mulsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x40,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x40,%rax
  movsd  D90(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x48,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x48,%rax
  mulsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  cmpl   $0x1,-0x24(%rbp)
  je     L33
  mov    -0x30(%rbp),%rax
  add    $0x50,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x50,%rax
  movsd  D28(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x58,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x58,%rax
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x60,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x60,%rax
  movsd  D28(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x68,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x68,%rax
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x70,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x70,%rax
  movsd  D90(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x78,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x78,%rax
  mulsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x10(%rbp),%xmm1
  movsd  D85(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  sub    $0xffffffffffffff80,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  sub    $0xffffffffffffff80,%rax
  movsd  D44(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x88,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x88,%rax
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x90,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x90,%rax
  movsd  D44(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x98,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x98,%rax
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0xa0,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0xa0,%rax
  movsd  D44(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0xa8,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0xa8,%rax
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L31
L30:
  nop
  jmp    L31
L33:
  nop
L31:
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: label: D66
type: f64
name: read_data
arguments: label: D80
type: f64
name: read_data
arguments: label: D131
type: f64
name: read_data
arguments: label: D28
type: byte[8]
name: read_data
arguments: label: D90
type: byte[8]
name: read_data
arguments: label: D85
type: byte[8]
name: read_data
arguments: label: D44
type: byte[8]

tool: D66: 1

tool: D80: 6

tool: D131: 2

tool: {"D28": [0x55,0x55,0x55,0x55,0x55,0x55,0xe5,0x3f]}

tool: {"D90": [0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x3f]}

tool: {"D85": [0xab,0xaa,0xaa,0xaa,0xaa,0xaa,0xea,0x3f]}

tool: {"D44": [0x72,0x1c,0xc7,0x71,0x1c,0xc7,0xf1,0x3f]}

assistant: ```c
void twobody_scale_SD(int version, double *two, double l) {
  double l1 = 1.0 + l;
  double l2 = l1 * l1;
  double l3 = l2 * l1;
  l2 /= 6.0;
  l3 /= 6.0;
  l1 /= 2.0;
  two[1] *= l1;
  two[3] *= l1;
  if (version == 0)
    return;
  two[4] *= 2.0 / 3.0;
  two[5] *= l2;
  two[6] *= 4.0 / 3.0;
  two[7] *= l3;
  two[8] *= 4.0 / 3.0;
  two[9] *= l3;
  if (version == 1)
    return;
  two[10] *= 2.0 / 3.0;
  two[11] *= l2;
  two[12] *= 2.0 / 3.0;
  two[13] *= l2;
  two[14] *= 4.0 / 3.0;
  two[15] *= l3;
  double lm;
  lm = 5.0 / 6.0 * l3;
  two[16] *= 10.0 / 9.0;
  two[17] *= lm;
  two[18] *= 10.0 / 9.0;
  two[19] *= lm;
  two[20] *= 10.0 / 9.0;
  two[21] *= lm;
}
```