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

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D12(%rip),%rbx
  mov    %rbx,%rdi
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rsi
  call   <scanf@plt>
  movss  0x20(%rsp),%xmm0
  pxor   %xmm4,%xmm4
  comiss %xmm4,%xmm0
  jbe    L24
  pxor   %xmm0,%xmm0
  lea    0x24(%rsp),%r13
  lea    0x1f(%rsp),%r12
  movss  %xmm0,0x4(%rsp)
  lea    D120(%rip),%rbp
  movss  %xmm0,0xc(%rsp)
  movss  %xmm0,0x8(%rsp)
  jmp    L72
  xchg   %ax,%ax
L57:
  movss  0x24(%rsp),%xmm1
  cmp    $0x52,%al
  je     L74
  addss  0x4(%rsp),%xmm1
  movss  %xmm1,0x4(%rsp)
L17:
  addss  D58(%rip),%xmm0
  movss  0x20(%rsp),%xmm1
  comiss %xmm0,%xmm1
  jbe    L64
L72:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  movss  %xmm0,(%rsp)
  call   <scanf@plt>
  xor    %eax,%eax
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movzbl 0x1f(%rsp),%eax
  movss  (%rsp),%xmm0
  cmp    $0x43,%al
  jne    L57
  movss  0x8(%rsp),%xmm2
  addss  0x24(%rsp),%xmm2
  movss  %xmm2,0x8(%rsp)
  jmp    L17
  nopw   0x0(%rax,%rax,1)
L74:
  addss  0xc(%rsp),%xmm1
  movss  %xmm1,0xc(%rsp)
  jmp    L17
L24:
  pxor   %xmm4,%xmm4
  movss  %xmm4,0x4(%rsp)
  movss  %xmm4,0xc(%rsp)
  movss  %xmm4,0x8(%rsp)
  nopl   0x0(%rax)
L64:
  movss  0x8(%rsp),%xmm0
  addss  0xc(%rsp),%xmm0
  lea    D57(%rip),%rdi
  movss  0x4(%rsp),%xmm5
  addss  %xmm0,%xmm5
  movaps %xmm5,%xmm0
  movss  %xmm5,(%rsp)
  call   <printf@plt>
  movss  0x8(%rsp),%xmm0
  lea    D0(%rip),%rdi
  call   <printf@plt>
  movss  0xc(%rsp),%xmm0
  lea    D11(%rip),%rdi
  call   <printf@plt>
  movss  0x4(%rsp),%xmm0
  lea    D35(%rip),%rdi
  call   <printf@plt>
  movss  D92(%rip),%xmm0
  movss  0x8(%rsp),%xmm4
  divss  (%rsp),%xmm4
  lea    D64(%rip),%rdi
  mulss  %xmm4,%xmm0
  call   <printf@plt>
  movss  D92(%rip),%xmm0
  movss  0xc(%rsp),%xmm6
  divss  (%rsp),%xmm6
  lea    D51(%rip),%rdi
  mulss  %xmm6,%xmm0
  call   <printf@plt>
  movss  0x4(%rsp),%xmm0
  divss  (%rsp),%xmm0
  mulss  D92(%rip),%xmm0
  lea    D85(%rip),%rdi
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L68
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L68:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D12
data_type: string
name: unpack_data
arguments: label: D120
data_type: string
name: unpack_data
arguments: label: D58
data_type: byte[4]
name: unpack_data
arguments: label: D57
data_type: string
name: unpack_data
arguments: label: D0
data_type: string
name: unpack_data
arguments: label: D11
data_type: string
name: unpack_data
arguments: label: D35
data_type: string
name: unpack_data
arguments: label: D92
data_type: byte[4]
name: unpack_data
arguments: label: D64
data_type: string
name: unpack_data
arguments: label: D51
data_type: string
name: unpack_data
arguments: label: D85
data_type: string

tool: D12: %f

tool: D120:  %c

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

tool: D57: Total: %.0f cobaias


tool: D0: Total de coelhos: %.0f


tool: D11: Total de ratos: %.0f


tool: D35: Total de sapos: %.0f


tool: {"D92": [0x00,0x00,0xc8,0x42]}

tool: D64: Percentual de coelhos: %.2f %%


tool: D51: Percentual de ratos: %.2f %%


tool: D85: Percentual de sapos: %.2f %%


assistant: ```c
int main() {
  float a, b, c, e, f, d1 = 0, d2 = 0, d3 = 0;
  char d;
  scanf("%f", &a);
  for (e = 0; e < a; e++) {
    scanf("%f", &b);
    scanf(" %c", &d);
    if (d == 'C') {
      d1 += b;
    } else if (d == 'R') {
      d2 += b;
    } else
      d3 += b;
  }
  f = d1 + d2 + d3;
  printf("Total: %.0f cobaias\n", f);
  printf("Total de coelhos: %.0f\n", d1);
  printf("Total de ratos: %.0f\n", d2);
  printf("Total de sapos: %.0f\n", d3);
  printf("Percentual de coelhos: %.2f %%\n", ((d1 / f) * 100));
  printf("Percentual de ratos: %.2f %%\n", ((d2 / f) * 100));
  printf("Percentual de sapos: %.2f %%\n", ((d3 / f) * 100));
  return 0;
}
```