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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x130,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  jmp    L56
L119:
  movl   $0x0,-0x120(%rbp)
  jmp    L136
L79:
  movl   $0x0,-0x11c(%rbp)
  jmp    L66
L100:
  mov    -0x11c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x120(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x5,%rax
  sub    %rdx,%rax
  add    %rcx,%rax
  movl   $0x0,-0x110(%rbp,%rax,4)
  addl   $0x1,-0x11c(%rbp)
L66:
  cmpl   $0x1e,-0x11c(%rbp)
  jle    L100
  addl   $0x1,-0x120(%rbp)
L136:
  cmpl   $0x1,-0x120(%rbp)
  jle    L79
  movl   $0x0,-0x118(%rbp)
  jmp    L116
L86:
  lea    -0x12d(%rbp),%rdx
  lea    -0xc(%rbp),%rax
  mov    %rax,%rsi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movzbl -0x12d(%rbp),%eax
  cmp    $0x45,%al
  jne    L102
  movzbl -0xb(%rbp),%eax
  movsbl %al,%edx
  movzbl -0xc(%rbp),%eax
  movsbl %al,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <char_to_int@plt>
  mov    %eax,%edx
  mov    $0x3c,%eax
  sub    %edx,%eax
  movslq %eax,%rdx
  add    $0x1f,%rdx
  mov    -0x110(%rbp,%rdx,4),%edx
  add    $0x1,%edx
  cltq
  add    $0x1f,%rax
  mov    %edx,-0x110(%rbp,%rax,4)
  jmp    L45
L102:
  movzbl -0xb(%rbp),%eax
  movsbl %al,%edx
  movzbl -0xc(%rbp),%eax
  movsbl %al,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <char_to_int@plt>
  mov    %eax,%edx
  mov    $0x3c,%eax
  sub    %edx,%eax
  movslq %eax,%rdx
  mov    -0x110(%rbp,%rdx,4),%edx
  add    $0x1,%edx
  cltq
  mov    %edx,-0x110(%rbp,%rax,4)
L45:
  addl   $0x1,-0x118(%rbp)
L116:
  mov    -0x12c(%rbp),%eax
  cmp    %eax,-0x118(%rbp)
  jl     L86
  movl   $0x0,-0x12c(%rbp)
  movl   $0x0,-0x128(%rbp)
  movl   $0x0,-0x114(%rbp)
  jmp    L139
L67:
  mov    -0x114(%rbp),%eax
  cltq
  mov    -0x110(%rbp,%rax,4),%eax
  mov    %eax,-0x124(%rbp)
  mov    -0x114(%rbp),%eax
  cltq
  add    $0x1f,%rax
  mov    -0x110(%rbp,%rax,4),%eax
  cmp    %eax,-0x124(%rbp)
  jle    L28
  mov    -0x114(%rbp),%eax
  cltq
  add    $0x1f,%rax
  mov    -0x110(%rbp,%rax,4),%eax
  mov    %eax,-0x124(%rbp)
L28:
  mov    -0x124(%rbp),%eax
  add    %eax,-0x128(%rbp)
  addl   $0x1,-0x114(%rbp)
L139:
  cmpl   $0x1e,-0x114(%rbp)
  jle    L67
  mov    -0x128(%rbp),%eax
  mov    %eax,%esi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L56:
  lea    -0x12c(%rbp),%rax
  mov    %rax,%rsi
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  test   %rax,%rax
  jg     L119
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L37
  call   <__stack_chk_fail@plt>
L37:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D17
datatype: string
name: disassemble_data
arguments: data_tag: D6
datatype: string
name: disassemble_data
arguments: data_tag: D26
datatype: string

tool: D17: %s %c

tool: D6: %d


tool: D26: %d

assistant: ```c
int main() {
  int N;
  int sapato[2][60 - 30 + 1];
  char entrada[4];
  char lado;
  int num_pares;
  int menor;
  while (scanf("%d", &N) > 0) {
    for (int i = 0; i < 2; ++i) {
      for (int j = 0; j < (60 - 30 + 1); ++j) {
        sapato[i][j] = 0;
      }
    }
    for (int i = 0; i < N; ++i) {
      scanf("%s %c", entrada, &lado);
      if (lado == 'E')
        sapato[1][60 - char_to_int(entrada[0], entrada[1])]++;
      else
        sapato[0][60 - char_to_int(entrada[0], entrada[1])]++;
    }
    N = 0;
    num_pares = 0;
    for (int i = 0; i < (60 - 30 + 1); i++) {
      menor = sapato[0][i];
      if (sapato[1][i] < menor) {
        menor = sapato[1][i];
      }
      num_pares += menor;
    }
    printf("%d\n", num_pares);
  }
  return 0;
}
```