user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r15
  lea    D50(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    $0x0,%ebx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rsi
  call   <scanf@plt>
  mov    0x30(%rsp),%eax
  movl   $0x0,0x8(%rsp)
  movl   $0x0,(%rsp)
  test   %eax,%eax
  jle    L32
  xor    %r15d,%r15d
  lea    0x2f(%rsp),%r14
  lea    0x34(%rsp),%r13
  lea    D72(%rip),%r12
  jmp    L3
  nopw   0x0(%rax,%rax,1)
L13:
  cmp    $0x52,%al
  je     L33
  lea    0x0(%rbp,%rdx,1),%esi
  cmp    $0x53,%al
  cmove  %esi,%ebp
L8:
  add    %edx,%ebx
  add    $0x1,%r15d
  cmp    %r15d,0x30(%rsp)
  jle    L32
L3:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movzbl 0x2f(%rsp),%eax
  mov    0x34(%rsp),%edx
  cmp    $0x43,%al
  jne    L13
  add    %edx,(%rsp)
  add    %edx,%ebx
  add    $0x1,%r15d
  cmp    %r15d,0x30(%rsp)
  jg     L3
L32:
  pxor   %xmm4,%xmm4
  lea    D79(%rip),%rdi
  cvtsi2sd %ebx,%xmm4
  movapd %xmm4,%xmm0
  movsd  %xmm4,0x18(%rsp)
  call   <printf@plt>
  pxor   %xmm3,%xmm3
  lea    D14(%rip),%rdi
  cvtsi2sdl (%rsp),%xmm3
  movapd %xmm3,%xmm0
  movsd  %xmm3,(%rsp)
  call   <printf@plt>
  pxor   %xmm2,%xmm2
  lea    D17(%rip),%rdi
  cvtsi2sdl 0x8(%rsp),%xmm2
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x10(%rsp)
  call   <printf@plt>
  pxor   %xmm1,%xmm1
  lea    D59(%rip),%rdi
  cvtsi2sd %ebp,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <printf@plt>
  movsd  0x18(%rsp),%xmm4
  movsd  D53(%rip),%xmm0
  lea    D31(%rip),%rdi
  movsd  (%rsp),%xmm3
  movapd %xmm0,%xmm5
  divsd  %xmm4,%xmm5
  mulsd  %xmm5,%xmm3
  movsd  %xmm5,(%rsp)
  movapd %xmm3,%xmm0
  call   <printf@plt>
  movsd  0x10(%rsp),%xmm2
  mulsd  (%rsp),%xmm2
  lea    D56(%rip),%rdi
  movapd %xmm2,%xmm0
  call   <printf@plt>
  movsd  (%rsp),%xmm0
  movsd  0x8(%rsp),%xmm1
  lea    D96(%rip),%rdi
  mulsd  %xmm1,%xmm0
  call   <printf@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L75
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L33:
  add    %edx,0x8(%rsp)
  jmp    L8
L75:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D50
type_infered: string
name: disassemble_data
arguments: tag: D72
type_infered: string
name: disassemble_data
arguments: tag: D79
type_infered: string
name: disassemble_data
arguments: tag: D14
type_infered: string
name: disassemble_data
arguments: tag: D17
type_infered: string
name: disassemble_data
arguments: tag: D59
type_infered: string
name: disassemble_data
arguments: tag: D53
type_infered: f64
name: disassemble_data
arguments: tag: D31
type_infered: string
name: disassemble_data
arguments: tag: D56
type_infered: string
name: disassemble_data
arguments: tag: D96
type_infered: string

tool: D50: %d

tool: D72: %d %c

tool: D79: Total: %d cobaias


tool: D14: Total de coelhos: %d


tool: D17: Total de ratos: %d


tool: D59: Total de sapos: %d


tool: D53: 100

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


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


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


assistant: ```c
int main() {
  int testsQtt;
  scanf("%d", &testsQtt);
  int i;
  char animalType;
  int animalAmount;
  int totalQtt = 0, cQtt = 0, rQtt = 0, sQtt = 0;
  for (i = 0; i < testsQtt; i++) {
    scanf("%d %c", &animalAmount, &animalType);
    if (animalType == 'C')
      cQtt += animalAmount;
    else if (animalType == 'R')
      rQtt += animalAmount;
    else if (animalType == 'S')
      sQtt += animalAmount;
    totalQtt += animalAmount;
  }
  printf("Total: %d cobaias\n", totalQtt);
  printf("Total de coelhos: %d\n", cQtt);
  printf("Total de ratos: %d\n", rQtt);
  printf("Total de sapos: %d\n", sQtt);
  printf("Percentual de coelhos: %.2f %%\n", ((100.0 / totalQtt) * cQtt));
  printf("Percentual de ratos: %.2f %%\n", ((100.0 / totalQtt) * rQtt));
  printf("Percentual de sapos: %.2f %%\n", ((100.0 / totalQtt) * sQtt));
  return 0;
}
```