user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  push   %r13
  lea    D12(%rip),%rdi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%rsi
  call   <scanf@plt>
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jle    L18
  mov    $0x1,%ebx
  lea    0x20(%rsp),%r13
  lea    0x18(%rsp),%r12
  lea    D62(%rip),%rbp
  nopl   0x0(%rax,%rax,1)
L29:
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  add    $0x1,%ebx
  cmp    %ebx,0x14(%rsp)
  jge    L29
L18:
  pxor   %xmm0,%xmm0
  lea    D4(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  lea    D80(%rip),%rdi
  call   <printf@plt>
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  lea    D43(%rip),%rdi
  call   <printf@plt>
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  lea    D78(%rip),%rdi
  call   <printf@plt>
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  lea    D42(%rip),%rdi
  divsd  %xmm0,%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm0
  mov    $0x1,%eax
  lea    D50(%rip),%rdi
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm0
  mov    $0x1,%eax
  lea    D25(%rip),%rdi
  call   <printf@plt>
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0xb8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L15:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D12
type_infered: string
name: retrieve_data
arguments: data_tag: D62
type_infered: string
name: retrieve_data
arguments: data_tag: D4
type_infered: string
name: retrieve_data
arguments: data_tag: D80
type_infered: string
name: retrieve_data
arguments: data_tag: D43
type_infered: string
name: retrieve_data
arguments: data_tag: D78
type_infered: string
name: retrieve_data
arguments: data_tag: D42
type_infered: string
name: retrieve_data
arguments: data_tag: D50
type_infered: string
name: retrieve_data
arguments: data_tag: D25
type_infered: string

tool: D12: %d

tool: D62: %lf%s

tool: D4: Total: %.0lf


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


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


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


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


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


tool: D25: 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;
}
```