user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  lea    -0xc0(%rbp),%rax
  mov    %rax,%rsi
  lea    D102(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x1,-0xbc(%rbp)
  jmp    L6
L50:
  lea    -0x90(%rbp),%rdx
  lea    -0xb8(%rbp),%rax
  mov    %rax,%rsi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0x90(%rbp),%rax
  cmp    $0x43,%rax
  jne    L73
  movsd  -0xb8(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  movsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  jmp    L59
L73:
  lea    -0x90(%rbp),%rax
  cmp    $0x53,%rax
  jne    L45
  movsd  -0xb8(%rbp),%xmm0
  movsd  -0xb0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  movsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  jmp    L59
L45:
  lea    -0x90(%rbp),%rax
  cmp    $0x52,%rax
  jne    L59
  movsd  -0xb8(%rbp),%xmm0
  movsd  -0xa8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  movsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
L59:
  addl   $0x1,-0xbc(%rbp)
L6:
  mov    -0xc0(%rbp),%eax
  cmp    %eax,-0xbc(%rbp)
  jle    L50
  mov    -0x98(%rbp),%rax
  movq   %rax,%xmm0
  lea    D68(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0xa0(%rbp),%rax
  movq   %rax,%xmm0
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0xa8(%rbp),%rax
  movq   %rax,%xmm0
  lea    D109(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  -0xa0(%rbp),%xmm1
  movsd  D3(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  divsd  -0x98(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  -0xa8(%rbp),%xmm1
  movsd  D3(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  divsd  -0x98(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  -0xb0(%rbp),%xmm1
  movsd  D3(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  divsd  -0x98(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L58
  call   <__stack_chk_fail@plt>
L58:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D102
type_guessed: string
name: read_data
arguments: tag: D67
type_guessed: string
name: read_data
arguments: tag: D68
type_guessed: string
name: read_data
arguments: tag: D77
type_guessed: string
name: read_data
arguments: tag: D109
type_guessed: string
name: read_data
arguments: tag: D23
type_guessed: string
name: read_data
arguments: tag: D3
type_guessed: f32[2]
name: read_data
arguments: tag: D9
type_guessed: string
name: read_data
arguments: tag: D29
type_guessed: string
name: read_data
arguments: tag: D56
type_guessed: string

tool: D102: %d

tool: D67: %lf%s

tool: D68: Total: %.0lf


tool: D77: Total de coelhos: %.0lf


tool: D109: Total de ratos: %.0lf


tool: D23: Total de sapos: %.0lf


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

tool: D9: Percentual de coelhos: %.2lf %%


tool: D29: Percentual de ratos: %.2lf %%


tool: D56: Percentual de sapos: %.2lf %%


assistant: ```c
int main(void) {
  int i, x;
  char letra[128];
  double quantia, sapo = 0, rato = 0, coelho = 0, total = 0;
  scanf("%d", &x);
  for (i = 1; i <= x; i++) {
    scanf("%lf%s", &quantia, &letra);
    if (letra == 'C') {
      coelho += quantia;
      total += quantia;
    } else if (letra == 'S') {
      sapo += quantia;
      total += quantia;
    } else if (letra == 'R') {
      rato += quantia;
      total += quantia;
    }
  }
  printf("Total: %.0lf\n", total);
  printf("Total de coelhos: %.0lf\n", coelho);
  printf("Total de ratos: %.0lf\n", rato);
  printf("Total de sapos: %.0lf\n", sapo);
  printf("Percentual de coelhos: %.2lf %%\n", coelho * 100 / total);
  printf("Percentual de ratos: %.2lf %%\n", rato * 100 / total);
  printf("Percentual de sapos: %.2lf %%\n", sapo * 100 / total);
  return 0;
}
```