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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x32,%ecx
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x4d8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x4c8(%rsp)
  xor    %eax,%eax
  lea    0x330(%rsp),%rbx
  lea    0xc(%rsp),%rsi
  mov    %rbx,%rdi
  rep stos %rax,%es:(%rdi)
  movl   $0x0,(%rdi)
  lea    D36(%rip),%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L84
  lea    0x10(%rsp),%r15
  xor    %r13d,%r13d
  lea    0x1a0(%rsp),%r14
  lea    D18(%rip),%r12
  nopl   (%rax)
L155:
  mov    %r15,%rsi
  xor    %eax,%eax
  lea    (%r14,%r13,4),%rdx
  mov    %r12,%rdi
  call   <scanf@plt>
  mov    (%r15),%ebp
  mov    (%r14,%r13,4),%esi
  movdqa D4(%rip),%xmm1
  cmp    %esi,%ebp
  jg     L143
  mov    %esi,%eax
  sub    %ebp,%eax
  lea    0x1(%rax),%edi
  cmp    $0x2,%eax
  jbe    L39
  movslq %ebp,%rax
  lea    (%rbx,%rax,4),%rdx
  mov    %edi,%eax
  shr    $0x2,%eax
  lea    -0x1(%rax),%ecx
  lea    0x10(%rdx),%rax
  shl    $0x4,%rcx
  add    %rax,%rcx
  jmp    L81
  nopl   0x0(%rax)
L183:
  add    $0x10,%rax
L81:
  movdqu (%rdx),%xmm0
  paddd  %xmm1,%xmm0
  movups %xmm0,(%rdx)
  mov    %rax,%rdx
  cmp    %rcx,%rax
  jne    L183
  mov    %edi,%eax
  and    $0xfffffffc,%eax
  add    %eax,%ebp
  cmp    %eax,%edi
  je     L159
L39:
  movslq %ebp,%rax
  addl   $0x1,0x330(%rsp,%rax,4)
  lea    0x1(%rbp),%eax
  cmp    %eax,%esi
  jl     L159
  cltq
  add    $0x2,%ebp
  addl   $0x1,0x330(%rsp,%rax,4)
  cmp    %esi,%ebp
  jg     L159
  movslq %ebp,%rbp
  addl   $0x1,0x330(%rsp,%rbp,4)
L159:
  lea    0x1(%rsi),%ebp
L143:
  mov    0xc(%rsp),%eax
  add    $0x1,%r13
  add    $0x4,%r15
  cmp    %r13d,%eax
  jg     L155
  test   %eax,%eax
  jle    L27
  lea    0x1(%rax),%edi
  mov    $0x1,%r12d
  mov    $0x1,%eax
  mov    $0x1,%ecx
  nopl   0x0(%rax,%rax,1)
L32:
  mov    (%rbx,%rax,4),%edx
  cmp    %ecx,%edx
  jl     L71
  cmp    %eax,%edx
  sete   %sil
  test   %sil,%sil
  cmovne %eax,%r12d
  cmovne %edx,%ecx
L71:
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L32
  cmp    $0x1,%ecx
  je     L27
L190:
  mov    %r12d,%esi
  lea    D16(%rip),%rdi
  call   <printf@plt>
  movslq 0xc(%rsp),%rdx
  test   %edx,%edx
  jle    L41
  xor    %eax,%eax
  lea    0x10(%rsp),%rcx
  lea    0x1a0(%rsp),%rdi
  nopl   0x0(%rax)
L131:
  cmp    %r12d,(%rcx,%rax,4)
  jg     L70
  cmp    %r12d,(%rdi,%rax,4)
  jge    L177
L70:
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L131
L41:
  mov    %ebp,%esi
  lea    D30(%rip),%rdi
  call   <printf@plt>
  mov    0x4c8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x4d8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L84:
  xor    %ebp,%ebp
L27:
  mov    $0x1,%r12d
  jmp    L190
L177:
  lea    0x1(%rax),%ebp
  jmp    L41
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D36
type: string
name: extract_symbolic_data
arguments: label: D18
type: string
name: extract_symbolic_data
arguments: label: D4
type: byte[16]
name: extract_symbolic_data
arguments: label: D16
type: string
name: extract_symbolic_data
arguments: label: D30
type: string

tool: D36: %d


tool: D18: %d %d


tool: {"D4": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

tool: D16: Numero de guardioes sinceros = %d


tool: D30: Guardiao %d


assistant: ```c
int main() {
  int nGuardioes, i, ctrl = 0, quantidadeVotos = 1, nGuardioesSinceros = 1;
  int votoGuardioes[100 + 1];
  int inicio[100];
  int fim[100];
  for (i = 0; i < 100 + 1; i++)
    votoGuardioes[i] = 0;
  scanf("%d\n", &nGuardioes);
  for (i = 0; i < nGuardioes; i++) {
    scanf("%d %d\n", &inicio[i], &fim[i]);
    ctrl = inicio[i];
    while (ctrl <= fim[i]) {
      votoGuardioes[ctrl]++;
      ctrl++;
    }
  }
  for (i = 1; i <= nGuardioes; i++) {
    if (votoGuardioes[i] >= quantidadeVotos && votoGuardioes[i] == i) {
      quantidadeVotos = votoGuardioes[i];
      nGuardioesSinceros = i;
    }
  }
  if (quantidadeVotos == 1)
    nGuardioesSinceros = 1;
  printf("Numero de guardioes sinceros = %d\n", nGuardioesSinceros);
  i = 0;
  while (i < nGuardioes) {
    if (inicio[i] <= nGuardioesSinceros && fim[i] >= nGuardioesSinceros) {
      ctrl = i + 1;
      break;
    } else
      i++;
  }
  printf("Guardiao %d\n", ctrl);
  return 0;
}
```