user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  lea    D22(%rip),%r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  lea    D29(%rip),%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x478,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x468(%rsp)
  xor    %eax,%eax
  lea    0x80(%rsp),%rax
  lea    0x20(%rsp),%rbp
  mov    %rax,0x18(%rsp)
  mov    %rax,%r12
  lea    0x50(%rsp),%rbx
  nopl   0x0(%rax,%rax,1)
L30:
  add    $0x1,%r14d
  mov    %r15,%rdi
  xor    %eax,%eax
  mov    %r14d,%esi
  call   <printf@plt>
  mov    %r12,%rdi
  add    $0x64,%r12
  call   <gets@plt>
  lea    D11(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  add    $0x4,%rbp
  call   <scanf@plt>
  lea    D60(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r13,%rdi
  add    $0x4,%rbx
  call   <scanf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%r14d
  jne    L30
  lea    D82(%rip),%rdi
  xor    %r12d,%r12d
  lea    D85(%rip),%rbx
  call   <puts@plt>
  mov    0x8(%rsp),%r14d
  mov    0x18(%rsp),%rbp
  pxor   %xmm2,%xmm2
  jmp    L68
  nopl   0x0(%rax)
L19:
  mulss  0x50(%rsp,%r15,4),%xmm0
  pxor   %xmm1,%xmm1
  pxor   %xmm3,%xmm3
  cvtss2sd 0xc(%rsp),%xmm3
  cvtss2sd %xmm0,%xmm1
  divsd  D116(%rip),%xmm1
  comisd %xmm3,%xmm1
  jbe    L60
  movaps %xmm0,%xmm4
  mov    %r12d,%r14d
  divss  D63(%rip),%xmm4
  movss  %xmm4,0xc(%rsp)
L60:
  pxor   %xmm3,%xmm3
  cvtss2sd 0x10(%rsp),%xmm3
  comisd %xmm1,%xmm3
  jbe    L58
  mov    %r12d,0x14(%rsp)
  divss  D63(%rip),%xmm0
  movss  %xmm0,0x10(%rsp)
L58:
  cmp    $0xa,%r13d
  je     L78
L35:
  mov    %r13d,%r12d
L68:
  movslq %r12d,%r15
  lea    0x1(%r12),%r13d
  mov    %rbx,%rdi
  movss  %xmm2,0x8(%rsp)
  movss  0x50(%rsp,%r15,4),%xmm0
  lea    (%r15,%r15,4),%rax
  mov    %r13d,%esi
  mulss  0x20(%rsp,%r15,4),%xmm0
  lea    (%rax,%rax,4),%rax
  lea    0x0(%rbp,%rax,4),%rdx
  mov    $0x1,%eax
  cvtss2sd %xmm0,%xmm0
  divsd  D116(%rip),%xmm0
  call   <printf@plt>
  movss  0x20(%rsp,%r15,4),%xmm0
  movss  0x8(%rsp),%xmm2
  addss  %xmm0,%xmm2
  test   %r12d,%r12d
  jne    L19
  mulss  0x50(%rsp),%xmm0
  xor    %r14d,%r14d
  movl   $0x0,0x14(%rsp)
  mov    $0x1,%r13d
  divss  D63(%rip),%xmm0
  movss  %xmm0,0xc(%rsp)
  movss  %xmm0,0x10(%rsp)
  jmp    L35
  nopw   0x0(%rax,%rax,1)
L78:
  movslq 0x14(%rsp),%rax
  mov    0x18(%rsp),%rcx
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm2,%xmm0
  pxor   %xmm2,%xmm2
  lea    D56(%rip),%rdi
  cvtss2sd 0xc(%rsp),%xmm1
  lea    (%rax,%rax,4),%rax
  cvtss2sd 0x10(%rsp),%xmm2
  lea    (%rax,%rax,4),%rax
  lea    (%rcx,%rax,4),%rdx
  movslq %r14d,%rax
  lea    (%rax,%rax,4),%rax
  lea    (%rax,%rax,4),%rax
  lea    (%rcx,%rax,4),%rsi
  mov    $0x3,%eax
  call   <printf@plt>
  mov    0x468(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  add    $0x478,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L20:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D22
data_type: string
name: read_data
arguments: data_tag: D29
data_type: string
name: read_data
arguments: data_tag: D11
data_type: string
name: read_data
arguments: data_tag: D60
data_type: string
name: read_data
arguments: data_tag: D82
data_type: string
name: read_data
arguments: data_tag: D85
data_type: string
name: read_data
arguments: data_tag: D116
data_type: f64
name: read_data
arguments: data_tag: D63
data_type: byte[4]
name: read_data
arguments: data_tag: D56
data_type: string

tool: D22: Vendedor #%d
Nome: 

tool: D29:  %f

tool: D11: Total de vendas: R$

tool: D60: Pencentual de comissao: 

tool: D82: 
---- VENDEDORES ----

tool: D85: #%d. %s
Comissao a receber: R$%.2f


tool: D116: 100

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

tool: D56: 
Total de todas as vendas: R$%.2f
Maior valor a ser recebido: R$%.2f, pelo vendedor %s
Menor valor a ser recebido: R$%.2f, pelo vendedor %s


assistant: ```c
void main() {
  float total[10], comissao[10], contt = 0.0, maior, menor;
  char nomes[10][100];
  int ma, me, i;
  for (i = 0; i < 10; i++) {
    printf("Vendedor #%d\n"
           "Nome: ",
           i + 1);
    gets(nomes[i]);
    printf("Total de vendas: R$");
    scanf(" %f", &total[i]);
    printf("Pencentual de comissao: ");
    scanf(" %f", &comissao[i]);
    printf("\n");
    getchar();
  }
  printf("\n---- VENDEDORES ----\n");
  for (i = 0; i < 10; i++) {
    printf("#%d. %s\n"
           "Comissao a receber: R$%.2f\n",
           i + 1, nomes[i], comissao[i] * total[i] / 100.0);
    contt += total[i];
    if (i == 0) {
      maior = comissao[i] * total[i] / 100.0;
      menor = comissao[i] * total[i] / 100.0;
      ma = 0;
      me = 0;
    } else {
      if (comissao[i] * total[i] / 100.0 > maior) {
        maior = comissao[i] * total[i] / 100.0;
        ma = i;
      }
      if (comissao[i] * total[i] / 100.0 < menor) {
        menor = comissao[i] * total[i] / 100.0;
        me = i;
      }
    }
  }
  printf("\nTotal de todas as vendas: R$%.2f\n"
         "Maior valor a ser recebido: R$%.2f, pelo vendedor %s\n"
         "Menor valor a ser recebido: R$%.2f, pelo vendedor %s\n",
         contt, maior, nomes[ma], menor, nomes[me]);
}
```