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

```asm
<main>:
  endbr64
  push   %r14
  xor    %r14d,%r14d
  push   %rbp
  push   %rbx
  lea    D66(%rip),%rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    D33(%rip),%rax
  lea    0x20(%rsp),%rbp
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x10(%rsp)
  mov    %rax,0x20(%rsp)
  movq   $0x0,0x8(%rsp)
  nopw   0x0(%rax,%rax,1)
L76:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  movsd  0x20(%rsp),%xmm0
  ucomisd D11(%rip),%xmm0
  jp     L90
  jne    L90
  movsd  0x8(%rsp),%xmm5
  movsd  0x10(%rsp),%xmm7
  xor    %eax,%eax
  lea    D137(%rip),%rdi
  movsd  0x18(%rsp),%xmm4
  movapd %xmm5,%xmm0
  cvttsd2si %xmm7,%edx
  cvttsd2si %xmm4,%ecx
  addsd  %xmm7,%xmm0
  cvttsd2si %xmm5,%esi
  addsd  %xmm4,%xmm0
  movapd %xmm0,%xmm1
  movsd  %xmm0,0x18(%rsp)
  movq   %r14,%xmm0
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%r8d
  call   <printf@plt>
  movsd  0x10(%rsp),%xmm7
  comisd 0x8(%rsp),%xmm7
  jb     L24
  lea    D120(%rip),%rdi
  call   <puts@plt>
L57:
  movsd  D84(%rip),%xmm0
  movsd  0x10(%rsp),%xmm1
  lea    D134(%rip),%rdi
  mov    $0x2,%eax
  movsd  0x18(%rsp),%xmm5
  mulsd  %xmm0,%xmm1
  mulsd  0x8(%rsp),%xmm0
  divsd  %xmm5,%xmm1
  divsd  %xmm5,%xmm0
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L53
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r14
  ret
  nopl   0x0(%rax)
L90:
  movsd  D47(%rip),%xmm2
  movq   %r14,%xmm3
  ucomisd D43(%rip),%xmm0
  addsd  %xmm3,%xmm2
  movq   %xmm2,%r14
  jp     L9
  jne    L9
  movsd  D47(%rip),%xmm4
  addsd  0x8(%rsp),%xmm4
  movsd  %xmm4,0x8(%rsp)
  jmp    L76
  nopl   0x0(%rax,%rax,1)
L9:
  ucomisd D67(%rip),%xmm0
  jp     L95
  jne    L95
  movsd  D47(%rip),%xmm6
  addsd  0x10(%rsp),%xmm6
  movsd  %xmm6,0x10(%rsp)
  jmp    L76
  nopl   (%rax)
L95:
  pxor   %xmm6,%xmm6
  ucomisd %xmm6,%xmm0
  jp     L76
  jne    L76
  movsd  D47(%rip),%xmm7
  addsd  0x18(%rsp),%xmm7
  movsd  %xmm7,0x18(%rsp)
  jmp    L76
L24:
  lea    D39(%rip),%rdi
  call   <puts@plt>
  jmp    L57
L53:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D66
data_type: string
name: unpack_data
arguments: data_tag: D33
data_type: f32[2]
name: unpack_data
arguments: data_tag: D11
data_type: f32[2]
name: unpack_data
arguments: data_tag: D137
data_type: string
name: unpack_data
arguments: data_tag: D120
data_type: string
name: unpack_data
arguments: data_tag: D84
data_type: f32[2]
name: unpack_data
arguments: data_tag: D134
data_type: string
name: unpack_data
arguments: data_tag: D47
data_type: f32[2]
name: unpack_data
arguments: data_tag: D43
data_type: f32[2]
name: unpack_data
arguments: data_tag: D67
data_type: f32[2]
name: unpack_data
arguments: data_tag: D39
data_type: string

tool: D66: %lf

tool: {"D33": [0.0,-3.38671875]}

tool: {"D11": [0.0,-1.875]}

tool: D137: %d
%d
%d
%d


tool: D120: 93

tool: {"D84": [0.0,3.390625]}

tool: D134: %.2lf
%.2lf


tool: {"D47": [0.0,1.875]}

tool: {"D43": [0.0,3.32421875]}

tool: {"D67": [0.0,3.36328125]}

tool: D39: 83

assistant: ```c
int main(int argc, char const *argv[]) {
  double a = -99, v = 0, x = 0, y = 0, z = 0, w = 0;
  do {
    scanf("%lf", &a);
    if (a != -1) {
      v++;
      if (a == 83) {
        x++;
      } else if (a == 93) {
        y++;
      } else if (a == 0) {
        z++;
      }
    }
  } while (a != -1);
  printf("%d\n%d\n%d\n%d\n", (int)x, (int)y, (int)z, (int)(v - (x + y + z)));
  y >= x ? printf("93\n") : printf("83\n");
  printf("%.2lf\n%.2lf\n", (x * 100) / (x + y + z), (y * 100) / (x + y + z));
  return 0;
}
```