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

```asm
<plot_star>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movsd  %xmm0,-0x28(%rbp)
  movsd  %xmm1,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  movsd  %xmm2,-0x40(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L31
L48:
  movl   $0x0,-0x4(%rbp)
  jmp    L2
L74:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x30(%rbp),%xmm1
  movsd  D109(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x4(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rcx,%rax
  lea    0x0(,%rax,8),%rdx
  lea    D126(%rip),%rax
  movsd  %xmm0,(%rdx,%rax,1)
  addl   $0x1,-0x4(%rbp)
L2:
  cmpl   $0x2,-0x4(%rbp)
  jle    L74
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D125(%rip),%rax
  movl   $0x0,(%rdx,%rax,1)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x40(%rbp),%xmm0
  jbe    L85
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D125(%rip),%rax
  movl   $0xe,(%rdx,%rax,1)
L85:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x40(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  comisd %xmm0,%xmm1
  jbe    L15
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D125(%rip),%rax
  movl   $0xd,(%rdx,%rax,1)
L15:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd D38(%rip),%xmm0
  jbe    L68
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D125(%rip),%rax
  movl   $0xc,(%rdx,%rax,1)
L68:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd D119(%rip),%xmm0
  jbe    L40
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D125(%rip),%rax
  movl   $0xb,(%rdx,%rax,1)
L40:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd D11(%rip),%xmm0
  jbe    L70
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D125(%rip),%rax
  movl   $0xa,(%rdx,%rax,1)
L70:
  addl   $0x1,-0x8(%rbp)
L31:
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L48
  mov    -0x28(%rbp),%rdx
  mov    -0x1c(%rbp),%eax
  movq   %rdx,%xmm0
  lea    D125(%rip),%rdx
  mov    %eax,%esi
  lea    D126(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <plot_particle2D@plt>
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D109
data_type: f64
name: extract_symbolic_data
arguments: label: D38
data_type: f64[2]
name: extract_symbolic_data
arguments: label: D119
data_type: f64[2]
name: extract_symbolic_data
arguments: label: D11
data_type: f64

tool: D109: 0.5

tool: {"D38": [0.1,0.2]}

tool: {"D119": [0.2,0.3]}

tool: D11: 0.3

assistant: ```c
void plot_star(x, n, time, ratio, m, initm) double (*x)[(3)];
int n;
double time;
double ratio;
double *m, initm;
{
  static double anix[(10000)][(3)], maxx, button;
  static int tmpc[(10000)];
  int i, d;
  for (i = 0; i < n; i++) {
    for (d = 0; d < (3); d++)
      anix[i][d] = x[i][d] * ratio + 0.5;
    tmpc[i] = 0;
    if (m[i] > initm)
      tmpc[i] = 14;
    if (m[i] > 2 * initm)
      tmpc[i] = 13;
    if (m[i] > 0.1)
      tmpc[i] = 12;
    if (m[i] > 0.2)
      tmpc[i] = 11;
    if (m[i] > 0.3)
      tmpc[i] = 10;
  }
  plot_particle2D(anix, n, tmpc, time);
}
```