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

```asm
<par_shapes__trefoil>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x78(%rbp),%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x58(%rbp)
  movss  D55(%rip),%xmm0
  movss  %xmm0,-0x54(%rbp)
  movss  D56(%rip),%xmm0
  movss  %xmm0,-0x50(%rbp)
  movss  D55(%rip),%xmm0
  movss  %xmm0,-0x4c(%rbp)
  movss  -0x58(%rbp),%xmm1
  movss  D117(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x48(%rbp)
  mov    -0x68(%rbp),%rax
  movss  (%rax),%xmm2
  movss  D114(%rip),%xmm0
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D96(%rip),%xmm0
  mulss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D9(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x44(%rbp)
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D9(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x40(%rbp)
  movss  -0x44(%rbp),%xmm1
  movss  D69(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movd   %xmm1,%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  mulss  -0x50(%rbp),%xmm0
  movss  -0x54(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x3c(%rbp)
  mov    -0x44(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movss  -0x3c(%rbp),%xmm1
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x38(%rbp)
  mov    -0x44(%rbp),%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  movss  -0x3c(%rbp),%xmm1
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x34(%rbp)
  movss  -0x44(%rbp),%xmm1
  movss  D69(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movd   %xmm1,%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  movss  -0x4c(%rbp),%xmm1
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x30(%rbp)
  movss  -0x50(%rbp),%xmm1
  movss  D112(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movss  %xmm1,-0x7c(%rbp)
  movss  -0x44(%rbp),%xmm1
  movss  D69(%rip),%xmm0
  movaps %xmm1,%xmm4
  mulss  %xmm0,%xmm4
  movd   %xmm4,%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  mulss  -0x7c(%rbp),%xmm0
  movss  %xmm0,-0x7c(%rbp)
  mov    -0x44(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  mulss  -0x7c(%rbp),%xmm0
  movss  %xmm0,-0x7c(%rbp)
  movss  -0x44(%rbp),%xmm1
  movss  D69(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movd   %xmm1,%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movd   %xmm0,%eax
  movd   %eax,%xmm6
  mulss  -0x50(%rbp),%xmm6
  movaps %xmm6,%xmm0
  movaps %xmm0,%xmm3
  addss  -0x54(%rbp),%xmm3
  movss  %xmm3,-0x80(%rbp)
  mov    -0x44(%rbp),%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  movss  -0x80(%rbp),%xmm1
  mulss  %xmm0,%xmm1
  movss  -0x7c(%rbp),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x2c(%rbp)
  movss  -0x50(%rbp),%xmm1
  movss  D112(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movss  %xmm1,-0x7c(%rbp)
  movss  -0x44(%rbp),%xmm1
  movss  D69(%rip),%xmm0
  movaps %xmm1,%xmm7
  mulss  %xmm0,%xmm7
  movd   %xmm7,%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  mulss  -0x7c(%rbp),%xmm0
  movss  %xmm0,-0x7c(%rbp)
  mov    -0x44(%rbp),%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  movaps %xmm0,%xmm5
  mulss  -0x7c(%rbp),%xmm5
  movss  %xmm5,-0x7c(%rbp)
  movss  -0x44(%rbp),%xmm1
  movss  D69(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movd   %xmm1,%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  mulss  -0x50(%rbp),%xmm0
  addss  -0x54(%rbp),%xmm0
  movss  %xmm0,-0x80(%rbp)
  mov    -0x44(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  mulss  -0x80(%rbp),%xmm0
  addss  -0x7c(%rbp),%xmm0
  movss  %xmm0,-0x28(%rbp)
  movss  -0x4c(%rbp),%xmm1
  movss  D69(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movss  %xmm1,-0x7c(%rbp)
  movss  -0x44(%rbp),%xmm1
  movss  D69(%rip),%xmm0
  movaps %xmm1,%xmm4
  mulss  %xmm0,%xmm4
  movd   %xmm4,%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  mulss  -0x7c(%rbp),%xmm0
  movss  %xmm0,-0x24(%rbp)
  lea    -0x2c(%rbp),%rax
  mov    %rax,%rdi
  call   <par_shapes__normalize3@plt>
  movss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x20(%rbp)
  movss  -0x2c(%rbp),%xmm0
  movss  D18(%rip),%xmm1
  xorps  %xmm1,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <par_shapes__normalize3@plt>
  lea    -0x20(%rbp),%rdx
  lea    -0x2c(%rbp),%rcx
  lea    -0x14(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <par_shapes__cross3@plt>
  movss  -0x20(%rbp),%xmm3
  movss  %xmm3,-0x7c(%rbp)
  mov    -0x40(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  mulss  -0x7c(%rbp),%xmm0
  movss  %xmm0,-0x7c(%rbp)
  movss  -0x14(%rbp),%xmm7
  movss  %xmm7,-0x80(%rbp)
  mov    -0x40(%rbp),%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  mulss  -0x80(%rbp),%xmm0
  addss  -0x7c(%rbp),%xmm0
  mulss  -0x48(%rbp),%xmm0
  addss  -0x38(%rbp),%xmm0
  mov    -0x70(%rbp),%rax
  movss  %xmm0,(%rax)
  movss  -0x1c(%rbp),%xmm6
  movss  %xmm6,-0x7c(%rbp)
  mov    -0x40(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  mulss  -0x7c(%rbp),%xmm0
  movss  %xmm0,-0x7c(%rbp)
  movss  -0x10(%rbp),%xmm2
  movss  %xmm2,-0x80(%rbp)
  mov    -0x40(%rbp),%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  mulss  -0x80(%rbp),%xmm0
  addss  -0x7c(%rbp),%xmm0
  mulss  -0x48(%rbp),%xmm0
  mov    -0x70(%rbp),%rax
  add    $0x4,%rax
  addss  -0x34(%rbp),%xmm0
  movss  %xmm0,(%rax)
  movss  -0xc(%rbp),%xmm0
  mulss  -0x48(%rbp),%xmm0
  movss  %xmm0,-0x7c(%rbp)
  mov    -0x40(%rbp),%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  mulss  -0x7c(%rbp),%xmm0
  mov    -0x70(%rbp),%rax
  add    $0x8,%rax
  addss  -0x30(%rbp),%xmm0
  movss  %xmm0,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L2
  call   <__stack_chk_fail@plt>
L2:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D55
datatype: byte[4]
name: parse_data
arguments: tag: D56
datatype: byte[4]
name: parse_data
arguments: tag: D117
datatype: byte[4]
name: parse_data
arguments: tag: D114
datatype: byte[4]
name: parse_data
arguments: tag: D96
datatype: byte[4]
name: parse_data
arguments: tag: D9
datatype: f64
name: parse_data
arguments: tag: D69
datatype: byte[4]
name: parse_data
arguments: tag: D112
datatype: byte[4]
name: parse_data
arguments: tag: D18
datatype: byte[4]

tool: {"D55": [0x00,0x00,0x00,0x3f]}

tool: {"D56": [0x9a,0x99,0x99,0x3e]}

tool: {"D117": [0xcd,0xcc,0xcc,0x3d]}

tool: {"D114": [0x00,0x00,0x80,0x3f]}

tool: {"D96": [0x00,0x00,0x80,0x40]}

tool: D9: 3.14159265359

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

tool: {"D112": [0x00,0x00,0xc0,0xbf]}

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

assistant: ```c
void par_shapes__trefoil(float const *uv, float *xyz, void *userdata) {
  float minor = *((float *)userdata);
  const float a = 0.5f;
  const float b = 0.3f;
  const float c = 0.5f;
  const float d = minor * 0.1f;
  const float u = (1 - uv[0]) * 4 * (3.14159265359);
  const float v = uv[1] * 2 * (3.14159265359);
  const float r = a + b * cos(1.5f * u);
  const float x = r * cos(u);
  const float y = r * sin(u);
  const float z = c * sin(1.5f * u);
  float q[3];
  q[0] = -1.5f * b * sin(1.5f * u) * cos(u) - (a + b * cos(1.5f * u)) * sin(u);
  q[1] = -1.5f * b * sin(1.5f * u) * sin(u) + (a + b * cos(1.5f * u)) * cos(u);
  q[2] = 1.5f * c * cos(1.5f * u);
  par_shapes__normalize3(q);
  float qvn[3] = {q[1], -q[0], 0};
  par_shapes__normalize3(qvn);
  float ww[3];
  par_shapes__cross3(ww, q, qvn);
  xyz[0] = x + d * (qvn[0] * cos(v) + ww[0] * sin(v));
  xyz[1] = y + d * (qvn[1] * cos(v) + ww[1] * sin(v));
  xyz[2] = z + d * ww[2] * sin(v);
}
```