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

```asm
<modele_gravite>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r13
  mov    %rsi,%rbp
  lea    0x38(%rsp),%r14
  lea    0x30(%rsp),%r15
  movsd  0x8(%rdi),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x30(%rsp),%xmm14
  movsd  %xmm14,(%rsp)
  movsd  0x38(%rsp),%xmm10
  movsd  %xmm10,0x8(%rsp)
  movsd  0x10(%r13),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  mov    0x30(%rsp),%r12
  movsd  0x38(%rsp),%xmm11
  movsd  %xmm11,0x10(%rsp)
  movsd  0x18(%r13),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  mov    0x30(%rsp),%rbx
  movsd  0x38(%rsp),%xmm12
  movsd  %xmm12,0x18(%rsp)
  movsd  0x20(%r13),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x30(%rsp),%xmm9
  movsd  %xmm9,0x20(%rsp)
  movsd  0x38(%rsp),%xmm13
  movsd  %xmm13,0x28(%rsp)
  movsd  0x28(%r13),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x30(%rsp),%xmm3
  movsd  0x38(%rsp),%xmm2
  movq   $0x0,0x0(%rbp)
  movsd  D22(%rip),%xmm5
  movapd %xmm3,%xmm4
  mulsd  %xmm5,%xmm4
  addsd  D47(%rip),%xmm4
  movq   %r12,%xmm0
  movq   %rbx,%xmm6
  mulsd  %xmm6,%xmm0
  movsd  0x20(%rsp),%xmm9
  movapd %xmm9,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  0x10(%rsp),%xmm11
  movapd %xmm11,%xmm6
  movsd  0x28(%rsp),%xmm13
  mulsd  %xmm13,%xmm6
  subsd  %xmm6,%xmm1
  mulsd  %xmm5,%xmm1
  mulsd  %xmm2,%xmm1
  movq   %r12,%xmm6
  mulsd  %xmm4,%xmm6
  movsd  0x18(%rsp),%xmm12
  mulsd  %xmm12,%xmm6
  addsd  %xmm6,%xmm1
  movsd  (%rsp),%xmm14
  mulsd  %xmm14,%xmm1
  movapd %xmm9,%xmm6
  mulsd  D23(%rip),%xmm6
  mulsd  %xmm12,%xmm6
  mulsd  %xmm2,%xmm6
  movq   %rbx,%xmm7
  mulsd  %xmm4,%xmm7
  addsd  D20(%rip),%xmm7
  addsd  %xmm7,%xmm6
  movsd  0x8(%rsp),%xmm10
  mulsd  %xmm10,%xmm6
  addsd  %xmm6,%xmm1
  movsd  D31(%rip),%xmm6
  mulsd  %xmm6,%xmm1
  xorpd  D28(%rip),%xmm1
  movsd  %xmm1,0x8(%rbp)
  movq   %rbx,%xmm1
  mulsd  %xmm9,%xmm1
  mulsd  %xmm11,%xmm1
  movq   %r12,%xmm7
  mulsd  %xmm13,%xmm7
  addsd  %xmm7,%xmm1
  mulsd  %xmm5,%xmm1
  mulsd  %xmm2,%xmm1
  movapd %xmm11,%xmm7
  mulsd  %xmm4,%xmm7
  mulsd  %xmm12,%xmm7
  addsd  %xmm7,%xmm1
  movapd %xmm10,%xmm7
  mulsd  %xmm6,%xmm7
  mulsd  %xmm7,%xmm1
  movsd  %xmm1,0x10(%rbp)
  movq   %r12,%xmm7
  mulsd  %xmm10,%xmm7
  mulsd  %xmm12,%xmm7
  movq   %rbx,%xmm8
  mulsd  %xmm14,%xmm8
  mulsd  %xmm10,%xmm0
  mulsd  %xmm12,%xmm14
  addsd  %xmm14,%xmm0
  movapd %xmm9,%xmm1
  mulsd  %xmm6,%xmm1
  mulsd  %xmm5,%xmm1
  movapd %xmm7,%xmm5
  subsd  %xmm8,%xmm5
  mulsd  %xmm5,%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  %xmm6,%xmm4
  mulsd  %xmm0,%xmm4
  subsd  %xmm4,%xmm1
  movsd  %xmm1,0x18(%rbp)
  movapd %xmm9,%xmm1
  mulsd  %xmm10,%xmm1
  mulsd  %xmm11,%xmm1
  movapd %xmm13,%xmm4
  mulsd  %xmm0,%xmm4
  addsd  %xmm4,%xmm1
  mulsd  D7(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  %xmm1,0x20(%rbp)
  mulsd  %xmm9,%xmm0
  mulsd  %xmm11,%xmm10
  movapd %xmm10,%xmm1
  mulsd  %xmm13,%xmm1
  subsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  subsd  %xmm7,%xmm8
  mulsd  %xmm2,%xmm8
  addsd  %xmm8,%xmm0
  mulsd  D40(%rip),%xmm0
  movsd  %xmm0,0x28(%rbp)
  movq   $0x0,0x30(%rbp)
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D22
type_infered: byte[8]
name: extract_symbolic_data
arguments: label: D47
type_infered: byte[8]
name: extract_symbolic_data
arguments: label: D23
type_infered: byte[8]
name: extract_symbolic_data
arguments: label: D20
type_infered: byte[8]
name: extract_symbolic_data
arguments: label: D31
type_infered: f64
name: extract_symbolic_data
arguments: label: D28
type_infered: byte[16]
name: extract_symbolic_data
arguments: label: D7
type_infered: byte[8]
name: extract_symbolic_data
arguments: label: D40
type_infered: byte[8]

tool: {"D22": [0x9b,0x38,0xb9,0xdf,0xa1,0x28,0xa0,0xbf]}

tool: {"D47": [0xf5,0x2d,0x18,0x01,0xba,0xa4,0x01,0x40]}

tool: {"D23": [0x9b,0x38,0xb9,0xdf,0xa1,0x28,0xa0,0x3f]}

tool: {"D20": [0xcc,0xc6,0x94,0x59,0xce,0x37,0x18,0x40]}

tool: D31: 9.81

tool: {"D28": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D7": [0xd0,0x53,0x2e,0x9e,0x8b,0xd0,0xd3,0xbf]}

tool: {"D40": [0xd0,0x53,0x2e,0x9e,0x8b,0xd0,0xd3,0x3f]}

assistant: ```c
void modele_gravite(const double Q[7], double gravity[7]) {
  int i;
  double C1, C2, C3, C4, C5, C6, C7;
  double C11, C22, C33, C44, C55, C66, C77;
  double S1, S2, S3, S4, S5, S6, S7;
  C1 = cos(Q[0]);
  C2 = cos(Q[1]);
  C3 = cos(Q[2]);
  C4 = cos(Q[3]);
  C5 = cos(Q[4]);
  C6 = cos(Q[5]);
  C7 = cos(Q[6]);
  C11 = cos(2 * Q[0]);
  C22 = cos(2 * Q[1]);
  C33 = cos(2 * Q[2]);
  C44 = cos(2 * Q[3]);
  C55 = cos(2 * Q[4]);
  C66 = cos(2 * Q[5]);
  C77 = cos(2 * Q[6]);
  S1 = sin(Q[0]);
  S2 = sin(Q[1]);
  S3 = sin(Q[2]);
  S4 = sin(Q[3]);
  S5 = sin(Q[4]);
  S6 = sin(Q[5]);
  S7 = sin(Q[6]);
  gravity[0] = 0;
  gravity[1] = -(9.81 * (S2 * (0.450 * (3.51 + 4.31 + 3.45 + 1.46 + 0.24) - 3.51 * 0.08944 + 8.41 * 0.06325 + C4 * (0.50 * (3.45 + 1.46 + 0.24) - 3.45 * 0.1647 + 4.31 * 0.04609 + C6 * (1.46 * -0.03 + 0.24 * (0.08 + -0.029))) - C5 * (1.46 * -0.03 + 0.24 * (0.08 + -0.029)) * S4 * S6) + C2 * (C3 * (0.50 * (3.45 + 1.46 + 0.24) - 3.45 * 0.1647 + 4.31 * 0.04609 + C6 * (1.46 * -0.03 + 0.24 * (0.08 + -0.029))) * S4 + (1.46 * -0.03 + 0.24 * (0.08 + -0.029)) * (C3 * C4 * C5 - S3 * S5) * S6)));
  gravity[2] = 9.81 * S2 * ((0.50 * (3.45 + 1.46 + 0.24) - 3.45 * 0.1647 + 4.31 * 0.04609 + C6 * (1.46 * -0.03 + 0.24 * (0.08 + -0.029))) * S3 * S4 + (1.46 * -0.03 + 0.24 * (0.08 + -0.029)) * (C4 * C5 * S3 + C3 * S5) * S6);
  gravity[3] = -(9.81 * (0.50 * (3.45 + 1.46 + 0.24) - 3.45 * 0.1647 + 4.31 * 0.04609 + C6 * (1.46 * -0.03 + 0.24 * (0.08 + -0.029))) * (C3 * C4 * S2 + C2 * S4)) + C5 * 9.81 * (1.46 * -0.03 + 0.24 * (0.08 + -0.029)) * (-(C2 * C4) + C3 * S2 * S4) * S6;
  gravity[4] = 9.81 * (1.46 * -0.03 + 0.24 * (0.08 + -0.029)) * (C5 * S2 * S3 + (C3 * C4 * S2 + C2 * S4) * S5) * S6;
  gravity[5] = -(9.81 * (1.46 * -0.03 + 0.24 * (0.08 + -0.029)) * (C6 * (C5 * (C3 * C4 * S2 + C2 * S4) - S2 * S3 * S5) + (C2 * C4 - C3 * S2 * S4) * S6));
  gravity[6] = 0;
}
```